Extracting Alphabetical Note Series from MuseScore MXL
I'm an educator working with students to teach them to read sheet music and extract the notes as pitch codes for software programming into a microchip piezo-tone 'speaker', dah-dah-dah-- at the equivalent pitch for the note(s) they've transcribed, then setting the tempo, and playing with note duration and rests. It's simple fun.
The problem is the length of time to transcribe notes into pitch codes, and do it accurately, without losing the whole purpose, which is to learn to code 'music' into a chipset that only recognizes numerical pitch number and milli-second pause commands. Is there any way to go from MIDI or MXL to say an XLS spreadsheet with a lookup table matching MXL input as alphabetical 'C,D,E,F,G...' notes, with 44,58,78,89,97... pitch code output?
Then students can refer back to the sheet music for time sig, note duration and rests in between each pitch tones, to tweek the code series until it sounds like the music they're trying to represent.
Attachment | Size |
---|---|
Transcribe Note to Pitch Code.jpg | 223.45 KB |
Comments
Save the MuseScore file as an "Uncompressed MuseScore File (*.mscx)"
Then open the file in a text editor (e.g., NotePad, NoteTab). Below is an example of a single quarter note:
<Chord>
<durationType>quarter</durationType>
<Note>
<Accidental>
<subtype>flat</subtype>
</Accidental>
<pitch>52</pitch>
<tpc>6</tpc>
</Note>
</Chord>
It happens to be the Fb (E natural, of course) below middle C. You'll have to do a little massaging if you want to pull the data into Excel and a little experimentation to determine which numerical value equals what pitch. But it should be relatively easy.
You could most probably write a plugin that puts out the pitches as a comma separated list, ready to import into Excel?
Take for example the notenames plugin and modify it to your needs.
I'm nit sure though why you map 'C, D, E, F, G...' to "44, 58, 78, 89, 97", it'd rather be "48, 50, 52, 53, 55", or "60, 62, 64, 65, 67", depending on octave
See also https://musescore.org/en/plugin-development/note-pitch-values (which is for 1.x plugins, but the values are the same for 2.x plugins, as they are MIDI pitches.)