Musescore for mechanical music instruments

• Jan 13, 2017 - 23:03

We started to use Musescore to arrange music for mechanical music instruments like music boxes or hand organs.

We wrote a script to transform midi into svg to get a pattern for the laser cutter in our hackerspace.

However, since such instruments are often not fully chromatic, most music needs some arrangement (transpose, replace unplayable notes) before it is playable.

To help in the arrangement, I created tailored instruments for Musescore. E.g., for a 30-note semi-chromatic music box, the instrument definition is the following:

<Instrument id="musicbox-30notes">
	<longName>Music Box 30</longName>
	<shortName>M.b.</shortName>
	<description>30-note Teanola Music Box</description>
	<musicXMLid>mechanical.musicbox30</musicXMLid>
	<staves>2</staves>
	<clef>1</clef>
	<clef staff="2">17</clef>
	<barlineSpan>1</barlineSpan>
	<transposeDiatonic>3</transposeDiatonic>
	<transposeChromatic>5</transposeChromatic>
	<aPitchRange>53-93</aPitchRange>
	<pPitchRange>53-93</pPitchRange>
	<Channel></Channel>
	<genre>mechanical</genre>
</Instrument>

By using the PitchRanges, I can only see if a note is too low or to high. Within this range, there are many other unplayable notes. Hence, I wrote a plugin that colors and mutes all unplayable notes for a given instrument. That works quite well.

However, it would be much easier if this function would be included in MuseScore. It could be realized by an additional definition in the instrument.xml, e.g.:

	<playablePitches>53, 55, 60, 62, 64, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 
                 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93
        </playablePitches>

If this definition is found, all notes that have a pitch different from those in the list would be colored (like the ones outside the pitchRange). This might be also interesting for other instruments that are not chromatic.

Or is there a feature like this already in MuseScore that I missed?

Daniela


Comments

Interesting project! Are the plugin and midi to svg tool available?

There is nothing like playablePitches in MuseScore currently. You could have a look to instrument.cpp if you want to add it.

In reply to by Fermate

I too am very interested in your project. You will see I just posted under "Feature Request" a requirement similar to yours, having not found your post. I am also trying to use Musescore for arranging for mechanical organs and organettes and hope to use a basic Chinese laser cutter. My first trial was to arrange on Musescore, save as a MIDI files and then use "Noteur" software which, with a related program "Midiboek", creates a "printscript" file which describes the punching requirements for a pneumatic punch machine. This is a text file which effectively includes the X & Y co-ordinates of each hole. I have then written a simple PC-BASIC program to convert that into G-Code which will operate a laser cutter driven by an Arduino loaded with GRBL firmware. The Noteur software uses a "Gam" file to define the notes used by the organ and so mutes and "greys out" bad notes. However, it displays in piano roll type graphics which is why I prefer to use Musecore for the arranging. Your plug-in would simplify the above process. I would certainly be interested in obtaining your plug-in if you decide to release it, although I am not familiar with svg. Also my programming skills are a bit out of date since I have not yet mastered C etc., hence my use of BASIC.

In reply to by Fermate

Thank you ever so much for taking the time to reply and post back the plugins. I will definitely check this out. I have already added the 30 note instrument to my instruments.xml as per your previous comments. I’m part way through arranging “I’ll walk with god” which sounds awesome on 30 notes. Out of interest how did you break yours? Mine is motorised and I broke it by having two pages in at the same time (accidentally feeding the next one through too soon) but still managed to fix it by bending some metal to increase the torque on the cogs. I think musescore should add support to highlight non playable notes as you suggested especially for other semi-chromatic instruments.

All the best
Tom

In reply to by Tommylux

Mine is not really motorized, but I combined it with a spinning wheel. Same thing - suddenly two pages came it at once and it choked. Now a little plastic gear-wheel is broken. Not sure whether I'll try to 3D-print a new one, try to find a metal one in the right size, try to laser a wooden one or just by a new instrument.

In reply to by Fermate

It looks like you can buy a new one for not much money.

I have fixed mine by bending the metal in two dimensions. Gear 3 to 3 was skipping class. Although it’s connected to the same metal plate, I did find there was slightly more touque when I bent the metal leftwards. then I bent the plate where the motor sits backwards which gives slightly more contact. You can feel the difference when there is less movement on the gear.

This fixed it for me. There is also some ideas to fix gears here: http://www.instructables.com/id/Broken-Gear-Repair/?amp_page=true

But it doesn’t look feasible on such small gears.

I am also working up through the supply chain and trying to get hold of the Chinese manufacturer to see if I can get replacement gears. I know of one supplier who makes brass gears but trying to find out.

All the best.

Attachment Size
ADE2A2CB-C401-435F-8FC2-48F4B4B899AB.jpeg 722.02 KB

In reply to by Tommylux

Your plugin works really well by the way. You should be proud of that. Not really looked at the code but doesn’t appear to be a language I’m familiar with. +1 if musescore would make a simple change to highlight unplayable notes. Would work well for other punch note instruments.

Do you still have an unanswered question? Please log in first to post your question.