Simple Button Notation (accordion) plugin
Let me start by saying that I know very little about coding, however, I did attempt to edit the note name plugin with some success.
Ideally, the plugin will notate the button number (bold or not) for the pitch on the accordion. Simple button notation (button number with accented pulls) is the common notation in Newfoundland, accordion music is otherwise taught by ear. A plugin like this would make accordion accessible to so many more people who don't have the time, patience, or ability to sit and write out button notation - ABC notation is available for many traditional tunes, and those are no problem for Musescore!
As a starting point, I took the note names plugin and changed the letters to their corresponding button numbers on my G/C accordion; I tried making the pulls bold using what HTML I remember from my teens, and that much worked!
[I also tried to make the pulls be red, but nothing I looked up seemed to work for that, which is not a big deal]
This is where things went wrong: I realized I only had one octave - listed as numbered cases - to reassign. This resulted in an obvious error as pictured in the image below (Image description at end). Realistically, I need D2-E7, but I have no use for accidentals, bb, nor ##.
I have read a lot of forum posts (I'm 4 hours into my trying to understand this/trial and error), and tried messing with the suggestions regarding the octave comments (comma-apostrophe and numbered octave denotation, moving middle C etc.), but nothing to provide me with more lines to number the different octaves.
I feel like there has to be some way to make this happen. The question is whether or not it is attainable. Is there someway to tell the program what I want it to call each pitch? Is this an edit that someone who attempted more coding in the last 4 hours than they have since 2002 can accomplish, or would this require starting from scratch to create a whole new plugin?
Accessible Image Description: The image attached is a screenshot of the first four bars of a score (2/4 time) in Musescore. Before attempting anything, I went through and inserted staff text with the correct simple button notation (simple button notation reading "6 "6* "5* "5 | "4 "5 .5* | "5 "4 "3 "3* | "4 "3* "3 " |). I ran my changes as I was doing them in the plugin creator, everything went well until bar three, beat two, where the low G is generated as 6 - sensibly, as it's the number I replaced G with in the code - rather than the 3 that I need it to be in order to be correct.
Thank you so much for all of the advice and support you provide to the community!
This is a common accordion layout, in case that is somehow useful. Image is of a standard G/C-21 button layout. Image credit to https://www.tunes2play4fun.com/advanced-layout.html
Attachment | Size |
---|---|
20.22.26.png | 54.92 KB |
Comments
If you only need the button numbers to depend on note pitches, not caring about enharmonic changes, then you should use the note's
pitch
property. The note names plugin has a bit different purpose and uses the note'stpc
property which represents the note's value and differentiates between different notes with the same pitch, but does not indeed contain an information about the note's octave.Probably the simplest way to modify the plugin would be to replace
tpc
bypitch
at this line and modify those "case" statements to match what you need. Pitch value here is the standard MIDI pitch which just sequentially enumerates pitches from 0 to 127. The corresponding note values can be found from this table. You probably won't need all 128 values to cover the accordion's range so it would be enough to list only the possibly used pitch values in the plugin.> [I also tried to make the pulls be red, but nothing I looked up seemed to work for that, which is not a big deal]
For this you can assign the color property of the text element:
text.color = "red"
.In reply to If you only need the added… by dmitrio95
Absolute genius!! Thank you so much!!
IT WORKS!!
I couldn't figure out how to change the colours only on the pulls, but the text.color = "red" did work for the entire thing (which is still more success than I made on my own).
I can't thank you enough for your help.. ** MANY** thanks!
In reply to Absolute genius!! Thank you… by pryoralyssa
Can you upload your resulting plugin...too much coding for me to be able to do!