Random generator plugin request
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?
Comments
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 I could have a crack at it 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:
//www.randomsheetmusic.com/
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 I could have a crack at it by DonH
You can base your work on the random plugin already included in MuseScore.
https://github.com/musescore/MuseScore/blob/master/share/plugins/random…
I believe there is currently no way to insert a key signature from the plugin framework. However time signature should be possible.
In reply to You can base your work on the by [DELETED] 5
Thanks Iasconic.
This is very much a work in progress, but the first stab is here:
https://musescore.org/en/project/randomnotesgenerator
It just creates quavers at the moment.
In reply to Thanks Iasconic. This is very by DonH
Nice :)
I think it's already better than the randomgenerator's that's included in the original download! Not ready for use quite yet though.
In reply to Thanks Iasconic. This is very by DonH
Would you be able to get something from looking at the source code of randomsheetmusic.com? I don't know if it's written in the same or anything the same language.
In reply to Would you be able to get by oysteinv
I quickly put this together this weekend. It generates MusicXML file, MuseScore can open them.
You can choose time signature, a time signature (4/4, 3/4 and 2/4) for the time being and a key signature. Chromatic doesn't work for the moment, all notes are in the scale of the key.
Let me know how it could be improved.
https://randomsheetmusic-1055.appspot.com/
In reply to I quickly put this together 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 I quickly put this together by [DELETED] 5
This made me smile - thank you lasconic, and I love the titles! :)
Suggestions:
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 This made me smile - thank 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 Thank you for the by [DELETED] 5
Suggestion: download MXL files rather than XML, as it's easier to have that extension specifically associated with MuseScore.
In reply to Suggestion: download MXL by Isaac Weiss
Good idea. It now generates MXL.
In reply to Good idea. It now generates by [DELETED] 5
Very nice! New suggestion: allow choice of clef.
In reply to Very nice! New suggestion: by Isaac Weiss
Clef is easily changeable in MuseScore while parameters to control the randomization of the notes are not. So clefs selection seems less interesting.
In reply to Thank you for the 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:
Root:
F
Scale:
Major
Melodic Minor
Harmonic Minor
Major Pentatonic
Minor Pentatonic
Melodic Minor Pentatonic
Whole-Tone
Diminished
Augmented
Chromatic
etc...
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 Great work lasconic - I'm by Xasman
Maximum interval between two consecutive notes is in. http://randomsheetmusic.lasconic.com
In reply to Maximum interval between two by [DELETED] 5
Thanks - it's coming along nicely... :)
In reply to Thanks - it's coming along by Xasman
And one more update with "avoid unison" option.
In reply to And one more update with by [DELETED] 5
I don't know how likely it is that http://randomsheetmusic.lasconic.com/ will be found by people who don't already know MuseScore, but I think people might be less interested by "Edit the resulting MusicXML for free with MuseScore" than something like "Play and print the resulting MusicXML file for free with MuseScore."
In reply to And one more update with by [DELETED] 5
Great - better and better. Thank you, lasconic!
The ambitus seems pretty loosely interpreted now though - in the score I just generated, I specified an ambitus of G#3 to G5, but the lowest note produced was F3 and the highest was C7!
In reply to Great - better and better. 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 Thank you for your feedback! 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 Thank you for your feedback! 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 Hello Iasconic,… by Sambaji
Hello, no I have no plan to add features at this moment. The website used an old version of music21 and it would need to be upgraded first.
In reply to Hello, no I have no plan 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!
In reply to Thanks Iasconic. This is very by DonH
Updated to create all selected note lengths...
https://musescore.org/en/project/randomnotesgenerator