Random generator plugin request

• Aug 19, 2015 - 22:41

Hi! I'm not completely sure whether this should be in the plugin forum or feature request forum, but I'll try here in the plugins forum.

I'm a violin teacher, and really likes musescore writing down new sheet music and creating sheet music tasks for my student, but writing random notes for students to write the name of is so time consuming, and I think it could be generated quite easily. But I'm not a developer, so I don't know how to create the generator.. But if someone good developing plugins sees this, I would really like, and actually be willing to pay some money (not much though) if someone could create this plugin for me:

"The random note generator"

It would work like this:

It does exactly what it says - create random notes. But it needs to have some sort of user interface to limit the randomness, and these are the restrictions I would love to see:

1. Select time signature (I would want my random notes to be inside the bars)
2. Select how many bars should be generated
3. Select note duration, ranging from whole-notes to sixteen-notes (would be very nice with a possibility with a multiple choice interface - i.e. you can choose that the random notes would only be quarter notes, or a mix between quarter and half-notes etc)
4. Select pitch range (with this you can select whether the notes would span from c1-c1 or from A to c5 or something)
5. Select accidentals (four choices would be great: no accidentals - only sharps - only flats - both flat and sharps)

It would be SO great to have this to create random new tasks and tests for students to fill in! But I don't know if it's even possible to create it?

Anyone have any suggestions?


I could have a crack at it (I'm not sure if MuseScore has a random number generator, but I expect there's something on the Interweb).
No need for payment (it will be published on the MuseScore website for everyone), but I have a real job, so I can only look at it evenings and weekends.

In reply to by DonH

That would be so great! :D

They do have a random sheet generator, so I guess there's some random involved in that plugin, but as you see, it's a little bit to random for what I would like to use it for...

Actually, I can show you almost exactly what I'm thinking about:


This site does it very good, but lacks the flexibility of editing things after it's created, and doesn't have like random accidentals. But the interface I find quite good.

Will you notify me if you come any way with it? And if you don't find the time that's of course completely understandable, I wasn't sure if I really expected anyone to be able to do it :)

In reply to by [DELETED] 5

I love it! It does what it's supposed to do, and it does it with flair—its output is right on the edge of being real music, and they come ready-made with clever titles.

One suggestion: currently the shortest note is an eighth note. It would be nice to have an option to control that, allowing for faster notes.

In reply to by [DELETED] 5

This made me smile - thank you lasconic, and I love the titles! :)


1. Pitch values:
Add a range limit. Either lowest and highest notes generated, or some preset interval, such as "Keep melody within: Perfect Octave/Perfect fifth", etc.

2. Rhythmic values:
Add note length limits. "Longest note: breve/semibreve/crotchet", etc. and "Shortest note: crotchet/quaver/semiquaver", etc.

3. Dynamic values:
Add dynamics with a control such as, "Generate random dynamics between: (e.g.) piano - fortissimo"

In reply to by Xasman

Thank you for the feedback.

New address http://randomsheetmusic.lasconic.com/

* Added ability to choose an ambitus
* Added ability to choose the note durations to use

Not sure about the dynamics. I guess something to restrict the interval between two consecutive notes would make sense? and maybe a way to get notes out of scale, but how do you see the UI? I don't really see how "no accidentals - only sharps - only flats - both flat and sharps" could work.

In reply to by [DELETED] 5

Great work lasconic - I'm having much (probably *too* much!) fun with this. The latest version is a definite improvement. I like the idea of allowing or disallowing specific note lengths - in fact it's better than my previous suggestion of selecting a range.

Yes, restricting intervals between two consecutive notes would be good, and perhaps also an option to prevent consecutive repeating notes too?

Regarding your question about the UI: I think, rather than a Key Signature drop-down menu as at present, it might be preferable to separate the choices of root note and scale; in other words, have one drop-down menu to select a root note and another to select a scale built on that note.

For example:


Melodic Minor
Harmonic Minor
Major Pentatonic
Minor Pentatonic
Melodic Minor Pentatonic

Does that sound feasible?

Another idea is to generate for example, 16 bars using one root/scale, and then append (in the same generated piece) another 16 bars specifying a different root/scale - making one complete 32-bar piece. Of course, the ability to append one or two bars at a time would allow generating a "random" melody over any given chord progression but using a specific chord/scale analysis; might be a useful practice tool.

In reply to by Xasman

Thank you for your feedback! It should be fixed.

Btw I did thought about your proposal about tonic and scale/mode. I'm not sure which key signature to pick in this case.

Also, I guess it would be a totally different tool with a very different audience. The current tool is probably more suited for a beginner composer who want some random melody to start with or for a student/teacher who wants a quick sight reading exercice.

In reply to by [DELETED] 5

Yes, I guess you're right, but is there any reason why both audiences (and those in-between) couldn't be accommodated with the same tool? After all, as with Musescore itself, beginner composers could just use the functions they need to begin with, and then later move on to use the more advanced features as they progress.

I think perhaps all the scales other than the existing major (and natural minor) options could (should?) all simply use the open/atonal key signature. Just a root note would need to be specified in these cases. After all, it's easy enough to change the key signature in Musescore after generating the exercise anyway if and when required.

Instead of the drop-down idea, maybe it would be good (and perhaps easier?) to allow the user to choose exactly which notes to include/exclude by selecting them from a chromatic scale based on any given root? (Rather like the example at http://www.randomsheetmusic.com/, but with a chromatic scale over just one octave)?

In reply to by [DELETED] 5

Hello Iasconic,
Any chance of implementing Xasman's suggestions of allowing the user to specify specific notes from a chromatic scale? This would be a useful feature to create worksheets of specific intervals/notes. It also might make the randomized output more pleasurable to listen to. Thanks, Sam

In reply to by [DELETED] 5

I would find very useful for a neuroscience project on harmony perception and tonal memory the possibility to choose specific notes for the random melody. Unfortunately I am not a programmer but my impression is that is almost there! If anyone wishes to actively participate in this project by implementing such a feature, is very welcome!

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