In regards to "Crescendo or Diminuendo Note Velocities" Plugin
The plugin, found here: http://musescore.org/en/project/crescendo-diminuendo-playback, seems a little confusing to me. After reading the instructions, I still can't figure out how it works. It says, "Select the notes from FIRST to LAST, then just click on the plugin and it will automatically set the velocity values." Well, when I do so, it doesn't do a thing.
Now, I'm only saying this because after I do what it says, I check each individual note that should have been effected. Nothing changes. Because of this, I figure I don't need to play it back to hear it. It should show the change before having to play it, am I right?
Also, I am aware that at the end it states, "Only works on single voice, and only use it on one staff at a time." Well, I have a score (with multiple instruments) and I'm only testing it out on one instrument where it has only one voice. So, I believe this is OK as well.
So, can anyone tell me what I'm doing wrong with this plugin?
Comments
As it happens, I just used that for the first time last night, and found it very useful, but it failed on one of my attempts. I think what happened is that I didn't select the right range of notes - it has to include the first note of the new dynamic. That is, if you have an "p" attached to beat one of one measure and then an "mf" attached to beat one of the next measure, you can't just select the first measure - you need to select all the way to beat one of the next measure, so the plugin knows how loud you are trying to get.
At least, I think that's what I did wrong. I tried it again while paying more attention to my selection and it worked fine. Really a clever little utility!
In reply to As it happens, I just used by Marc Sabatella
Ok, finally figured out how it works. It could use a little more improvement--the plugin and the description on how to use it--but it's not like I'm complaining. I can't write code. I probably create a how two SS process on this, or just spruce up the plugin description. Your description was a little more helpful than the one that is posted.
But first, I need a little more time with this thing to understand all of it's bags and what not.
BTW, is this plugin being directly implemented into the program for update 1.2 or 2.0? What I mean is, are the crescendo and decrescendo hairpins going to adjust automatically in the newer versions once they are released?
I believe I found defect in Crescendo/Diminuendo plugin.
In case last selected note is at the end of score plugin deadlocks in infinite loop.
In order to fix (I did it for myself, wondering if others are experiencing troubles) following line:
while(!cursor.isChord()) {cursor.next();}
needs to be replaced with:
while(!cursor.isChord() && !cursor.eos()) {cursor.next();}
Thank you.
In reply to I believe I found defect in by stylex_
See also #13219: loops if last note of selection is last note of staff and http://musescore.org/en/node/16577
This plugin also seems to have an effective range. I tried to use it in one of my pieces. It can do the diminuendo just fine with 1 measure. However, when I had an 8 measure crescendo, it just poops and doesn't work.
In reply to This plugin also seems to by ElzamVB
It does work with multiple measures. It fails (or rather goes into en infinite loop) of the selection includes the last note of the instrument in the score. I attached a fixed version to the bug report #13219: loops if last note of selection is last note of staff
In reply to It does work with multiple by Jojo-Schmitz
Ah, many thanks.
In reply to Ah, many thanks. by ElzamVB
Actually you were right, sort of: if there are more then twice the number of notes than the difference between the starting and ending velocity, bad things happened.
Both bugs fixed now and available at http://musescore.org/en/project/crescendo-diminuendo-playback
For some reason it won't diminuendo to p in this. Any thoughts? (Measure 32)
In reply to Another error? by ElzamVB
You mean between measure 27 and 32? Works just fine for me.
In March 2014 I downloaded the "Crescendo or Diminuendo Note Velocities" plugin version 0.8 and I experience the same problem: I select a start- and an end note, then click "Create crescendo or diminuendo" from the MuseScore Plugin menu. No result, no visual feedback, no velocity properties are changed.
I had a look in the code and saw that changes to the velocity property are done if and only if the intermediate notes are part of a chord (according to my interpretation of the function isChord()) -- why is that? Or does function isChord() return true also for notes that are not part of a chord?
All the best!
In reply to Changes volume only on chords? by widheg
a note is a chord, consisting of just one note...
In reply to a note is a chord, consisting by Jojo-Schmitz
After debugging the plugin I noticed that function isChord() indeed returns true also for a single note. This is in fact inconsistent with the MuseScore own documentation, which defines Chord as "The minimal definition of a chord is a minimum of two different notes played together." No further definition of the minimal definition was found.
Reference: http://musescore.org/en/handbook/glossary as of 2014-03-10.
In reply to Design inconsistent with MuseScore documentation. by widheg
Guess the documentation need to get fixed then
In reply to Guess the documentation need by Jojo-Schmitz
Yes, but not the Glossary, which seems correct in defining a Chord as ... a minimum of two different notes played together.
However, the documentation of the function
isChord()
on page http://musescore.org/en/plugin-development/cursor-object (and perhaps elsewhere) certainly needs to be corrected.I've found two issues about the plugin and its intended usage:
1) Users are supposed to make an extended selection (i.e. to see a blue rectangle around the selection). If a user would select only the first and the last individual notes, then the plugin does nothing (without giving any feed-back to the user that (s)he has made an illegal selection).
2) The distribution of the increases in velocity is not correctly calculated. The place where the size of increase (variable inc) is computed uses a divisor of the no. of chords (including one-note "chords";-) found. The divisor should be the same but minus one (this then correctly corresponds to the number of intervals that exist between the start- and end note selected). However when changing this, one must pay attention to avoid dividing by zero -- this can be avoided by changing the if-statement (just above the division) from
if (numberOfChords == 0)
to either
if (numberOfChords <= 2)
or
if (numberOfChords <= 1)
Having said that, one may also discuss whether or not the velocity increase should instead be evenly distributed over time for distinct notes -- as opposed to depend on the order in which notes and rests happen to appear in each voice.
All the best!
In reply to Yes, but not the Glossary ... by widheg
ad 1) I've made the description clearer (on http://musescore.org/en/project/crescendo-diminuendo-playback)
ad 2) feel free to submit a pull request with your proposed code changes to https://github.com/jojo-schmitz/crescendo-diminuendo-playback
But I believe this (esp. the "<")
while (cursor.tick() < selectionEnd.tick()) {
takes care of the 'fence post' error you seem to be seeing?
Ah, I see (by stepping thru the code), it does not. Fixed now, please check.
And thanks for the report (even if it took my quite a while to get in :-))
In reply to Design inconsistent with MuseScore documentation. by widheg
I wouldn't call the documentation inconsistent. it just needs to clarify that there are multiple possible definitions for "chord". A sound consisting of two or more simultaneous notes is indeed the usual *musical* definition of chord. But "Chord" is also used internally within MuseScore as the class name for a particular data structure used to represent even single notes. I guess the documentation of isChord could be clearer that it isn't referirng to the ordinary musical definition of chord, but instead to the specific data structure. But then, if you look at the documentation for the Chord object, in the plugin documentation, you'll see it already says "one or more notes". And the documentation for isChord specifically says it returns true if the cursor points "a Chord" - capital C - which is meant to indicate the actual Chord object, not the ordinary musical meaning of Chord. I guess saying "a Chord object" and adding a link to the Chord page wouldn't hurt.
In reply to I wouldn't call the by Marc Sabatella
Consistent terminology means that a given term has one and only one meaning ... ;-)
Also, I am not suggesting that the documentation is (internally) inconsistent, I'm suggesting that the design is inconsistent with the documentation in this respect.
The classes should of course have the same semantics as the real world objects modeled by the classes -- this is stressed in object-oriented analysis and design and is to reduce the risk of any misunderstandings between the users who use the software and the software engineers who design it.
Having said that, it's obviously too late to rename the vocabulary in the design, so it's the design documentation that should be corrected, for example on page http://musescore.org/en/plugin-development/cursor-object.
All the best!
In reply to Consistent terminology means ... by widheg
This is a programming manual and so from context it is clear that Chord means Chord object. Cursor Object links to Chord Object and that clearly states that a Chord object consists of one or more Notes (Note objects ).
The glossary in turn correctly describes the musical term "chord".
So I see nothing to improve here.
In reply to This is a programming manual by Jojo-Schmitz
Yes, there are indeed correction opportunities: the page
http://musescore.org/en/plugin-development/cursor-object talks about Chord, chord and Chord object. I do not mean tokens in code excerpts, but in explanatory text e.g. 'pointing at a chord'. If each occurrence of these terms is to denote a Chord Object, then I would have thought that 'Chord Object' would be the term to use -- this to 1) emphasize the difference to a chord (which by definition is something else); and 2) show the correspondence to the link 'Chord Object' near the top of that same page.
PS
The whole fuzz about this stems from the fact that the term chord (proper noun or not) is used to convey two different meanings.
DS
In reply to Yes, there are improvement opportunities. by widheg
So go ahead and fix it ;-)
In reply to So go ahead and fix it ;-) by Jojo-Schmitz
I think it's better that the design team approves, coordinates, perform and verifies changes. I wonder how the resulting documentation would look like after a while if each and every user was to make changes in it ... ;-)
We should work on our process, not the outcome of our process. (W. Edwards Deming)
In reply to Configuration Control by widheg
It is (sort of) a wiki, go make the changes.
Most of that documentations needs to be redonw for 2.0 anyway, which uses a different plugin framework.
In a given staff, if no note exist in voice n, can a note still exist in voice n+1?
I raise this question because I noticed that the plugin does not proceed to process any voice n+1 if no note was found in voice n. For example, if there is no note in voice 2, then the plugin does not look to see if there is any note(s) in voice 3. Perhaps the plugin can correctly trust that the voices containing any content are always internally packed and stored at the lowest voice index (0-3), if so, this should not be any problem and you may stop read this comment.
However, if an empty voice can appear at a lower index than the index of a non-empty voice, then that non-empty voice will not be processed by the plugin, which would be a fault. This because of a
break;
instead of acontinue;
statement.All the best!
In reply to If no note exist in voice n, can a note exist in voice n+1? by widheg
Yes this is possible. Not sure (yet) why the plugin doesn't seem to handle that though.
Ah, I seen it does a "break" rather than a "continue" if no notes to change found in a voice of the selection. Will be fixed shortly...