Bug in Bar.AddNote

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in Bar.AddNote

Gideon Raveh

Hi all,

I have a consistent (and insistent) bug. The method

note = bar.AddNote(position,pitch,Half,False,1,degree);

does nothing and returns nothing. It happens only in one place, inside a loop evaluating a GuitarFrame (D7); in all the other frames (including D7) it works as expected.

Tracing shows that the input parameters are as expected too.

Any suggestions?

Gideon Raveh.

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Bar.AddNote

Bob Zawalich-3

Having used AddNote about a million times, I doubt it has a bug in it. Can you give a larger contexts of a small running plugin and a score to test it on?

 

You need to be aware that if there is a NoteRest at a given location, AddNote will add the note to the NR rather than creating a new one and it might not be the duration you want. If the Diatonic Pitch variable is not valid is will probably also fail.

 

So before anyone can help you will need to provide more context.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Gideon Raveh
Sent: Saturday, September 10, 2016 10:22 PM
To: [hidden email]
Subject: [Plugin-dev] Bug in Bar.AddNote

 

Hi all,

I have a consistent (and insistent) bug. The method

note = bar.AddNote(position,pitch,Half,False,1,degree);

does nothing and returns nothing. It happens only in one place, inside a loop evaluating a GuitarFrame (D7); in all the other frames (including D7) it works as expected.

Tracing shows that the input parameters are as expected too.

Any suggestions?

Gideon Raveh.

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Bar.AddNote

Gideon Raveh

Hi Bob.

You are right (as always).

I put the D7 chord above the wrong note (an eight to the right), and there was no room to add an half note.

See the screenshot.

Thanks,

Gideon.

 

From: Bob Zawalich [mailto:[hidden email]]
Sent: 11 September 2016 21:20
To: 'A mailing list for Sibelius plug-in developers'
Subject: Re: [Plugin-dev] Bug in Bar.AddNote

 

Having used AddNote about a million times, I doubt it has a bug in it. Can you give a larger contexts of a small running plugin and a score to test it on?

 

You need to be aware that if there is a NoteRest at a given location, AddNote will add the note to the NR rather than creating a new one and it might not be the duration you want. If the Diatonic Pitch variable is not valid is will probably also fail.

 

So before anyone can help you will need to provide more context.

 

From: [hidden email] [[hidden email]] On Behalf Of Gideon Raveh
Sent: Saturday, September 10, 2016 10:22 PM
To: [hidden email]
Subject: [Plugin-dev] Bug in Bar.AddNote

 

Hi all,

I have a consistent (and insistent) bug. The method

note = bar.AddNote(position,pitch,Half,False,1,degree);

does nothing and returns nothing. It happens only in one place, inside a loop evaluating a GuitarFrame (D7); in all the other frames (including D7) it works as expected.

Tracing shows that the input parameters are as expected too.

Any suggestions?

Gideon Raveh.

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev

2016-09-12.png (120K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Bar.AddNote

Bob Zawalich-3

Ah, good. Indeed, if there is not enough room in the bar for the entire note, the add will fail.

 

In the old days a lot of routines line AddNote would not return anything. You would have to search in the bar to see if anything got created.

Lots of things are better now. I rarely write anything that does not require at least Sib 6 these days because there was so much good stuff added in v6.

 

Glad you got it figured out.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Gideon Raveh
Sent: Monday, September 12, 2016 12:33 PM
To: [hidden email]
Subject: Re: [Plugin-dev] Bug in Bar.AddNote

 

Hi Bob.

You are right (as always).

I put the D7 chord above the wrong note (an eight to the right), and there was no room to add an half note.

See the screenshot.

Thanks,

Gideon.

 

From: Bob Zawalich [[hidden email]]
Sent: 11 September 2016 21:20
To: 'A mailing list for Sibelius plug-in developers'
Subject: Re: [Plugin-dev] Bug in Bar.AddNote

 

Having used AddNote about a million times, I doubt it has a bug in it. Can you give a larger contexts of a small running plugin and a score to test it on?

 

You need to be aware that if there is a NoteRest at a given location, AddNote will add the note to the NR rather than creating a new one and it might not be the duration you want. If the Diatonic Pitch variable is not valid is will probably also fail.

 

So before anyone can help you will need to provide more context.

 

From: [hidden email] [[hidden email]] On Behalf Of Gideon Raveh
Sent: Saturday, September 10, 2016 10:22 PM
To: [hidden email]
Subject: [Plugin-dev] Bug in Bar.AddNote

 

Hi all,

I have a consistent (and insistent) bug. The method

note = bar.AddNote(position,pitch,Half,False,1,degree);

does nothing and returns nothing. It happens only in one place, inside a loop evaluating a GuitarFrame (D7); in all the other frames (including D7) it works as expected.

Tracing shows that the input parameters are as expected too.

Any suggestions?

Gideon Raveh.

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev