MIDI Ex Machina - A Note Randomising Sequence Generator
Hello fellow randomers
Small update to 1.3.5 to fix a crash when no item is selected in the arrange view.
This is the stable release of 'MIDI Ex Machina' - a note randomising sequence generating tool for the Reaper MIDI editor.
Originally released as the MIDI Note Randomiser, the latest version has gotten fat and includes a Euclidean sequence generator (Bjorklund algorithm), and a monophonic random sequence generator, as well as a totally unnecessary and cheezy rebrand...
MIDI Note Randomiser has been retired, so it you were using it then I'd advise switching to this shiny new version. All the old features are there, plus some user requests (permute, multiple octaves), and some new bling.
Special 'Permute' scale for randomising only selected note values
Force first note to scale root
Randomise all or selected notes, even if using Permute
Octave doubling with probability slider
Sequencer
Monophonic random note generator
Grid size selector
Note length probability sliders
Shift notes left<>right by grid size
Accent/Velocity randomising
Legato randomising
Force first grid slot to contain a note
Pass-thru to Note Randomiser
Euclidean Generator
Bjorklund algorithm
Grid size selector
Sliders for number of Pulses, number of Slots, and sequence Rotation
Accent/Velocity randomising
Pass-thru to Note Randomiser
General
Re-sizable interface
Saves all script state with the Reaper project file
Reset sliders to default (right-click on the slider labels)
There's a wiki on GitHub, with some additional information, warnings on some known bad behaviour, credits for the code I was too lazy/stupid to write myself, and some other stuff.
I hope you find it useful !
If you find any bugs (ha !) - you can post them here, or on the Issue tracker on GitHub if you have an account. Please try and make them as informative as possible and I will try to resolve them quickly.
If you have any feature requests (ha ! again !) this is as good a place as any, or on GitHub if you prefer. If they fit in with the general philosophy of the thing, and I can work out a way to implement it, then I'll give it a go.
WoW... this script is a lot of fun! Thanks for it...
I am wondering if it would possible to have it work in the Inline Editor as well?
or maybe a version of it that would do that???
I don't use the inline editor, but never say never
As it is, the main loop checks that the midi editor is open, and that there's an active take, pretty much any function that does stuff with a take uses these checks before doing anything.
If I knew how to test for being inline, then it might be possible. I'll add to the FR's and look into it. But, there are a number of additional core features I want to implement first.
so just to say that given what this script can do, especially that it can run on just a few selected notes, being able to use it in the Inline Editor would be really great. I think if you try the Inline Editor yourself you will see what I mean.
one comment about a feature you might care to add...
the script can operate on only selected notes... which is something I find very kewl because let's say you have a pattern you basically like but also have some small section of it that you want to varigate... so just select the notes and run the script on those and get varieties of just that section...
I have dual monitors so I mostly open the ME in the 'other' monitor... off to the right side
Ok but then running this script, the GUI for it will not live on top of that floating ME...
It will stay on top of the arrange window, but vanishes behind the ME if moved over there...
Perhaps that can be changed?
Hi hopi,
I don't have a dual screen set-up here so hard for me to test, but even on one, if I have a full screen ME then I can lose the script behind it ... I am not sure if it's possible to pin a script window to the front, or even to locate the window and bring it back (short of closing and reopening it..).
I also noticed in Jon's video that the fonts look pretty bad on a Mac :| I did use one that I thought was common on both Win/Mac but the rendering looks very different. I'll look into this too - if there's a way to detect the current OS, then I can switch the font to a more Mac friendly one..
If any of the more experienced scripters can offer a solution then I'd be definitely try to fix both those issues.
Thanks Rob... Ok so you see the behavior I'm pointing to even on a single screen... that's good.
I think maybe one of the other script guys, Lokasenna, Heda, MPL, SPK77, etc., might know a way to solve this if we can get them to look in here...
I know I have already mentioned the wish to have it work on the Inline Editor but I'll say it again here just as a reminder because that would be soooo nice.
You have a very sweet thing going on here that is a lot of fun to play with and I greatly appreciate your contining work on it!
Thanks Rob... Ok so you see the behavior I'm pointing to even on a single screen... that's good.
I think maybe one of the other script guys, Lokasenna, Heda, MPL, SPK77, etc., might know a way to solve this if we can get them to look in here...
I know I have already mentioned the wish to have it work on the Inline Editor but I'll say it again here just as a reminder because that would be soooo nice.
You have a very sweet thing going on here that is a lot of fun to play with and I greatly appreciate your contining work on it!
Thanks for the feedback, hopi - much appreciated, as is your inline tenacity If it's doable, I'll certainly look into it.
Thanks again Rob... wonder if you could explain the Permute setting to me...
pretend you are talking to an idiot...
[hahaha pretend, hell!]
PS: just tried the updater via Reapack but Reapack still says 1.3... so don't know if it is actually getting the 1.32 version...
heheh
Permute is a special scale available from the Scale drop down list.
If you select some notes from a MIDI item, then choose Permute (or vice versa) - The script will use the selected midi note values for randomising the selection (instead of using a full scale). You can activate the 'All / Sel Notes' option to have it affect all notes but still using the originally selected note values.
If you change your selection, the Permute scale will update with the new note values
Make sense? I can put a licecap together tomorrow if you like - but it's pretty straightforward once you try it a couple of times.
Just tested the ReaPack update on a portable install - it updated as soon as I launched Reaper, but maybe you need to manually refresh the packages? At a glance, the version number is in the window title bar (tho I'm sure you knew that )
But I don't...how do you import that index.xml ?
If I update Reapack and search for Rob in the actions in the midi-editor, noting pops up?
Thanx in advance!
Last edited by Knob Twiddler; 05-13-2017 at 11:45 PM.
But I don't...how do you import that index.xml ?
If I update Reapack and search for Rob in the actions in the midi-editor, noting pops up?
Thanx in advance!
In Reaper open the menu: Extensions / ReaPack / Import a Repository
Not sure if just importing repository is enough to find the script in
action list.
Once the repository is imported (state:enabled - on the right side),
you need to select it and go to options-install packages.
Then it should be there.
1.In Reaper open the menu: Extensions / ReaPack / Import a Repository
2. Cut and paste the link: https://github.com/RobU23/ReaScripts...ster/index.xml
3. open the Package Browser and search/filter for 'RobU'
4. Rightclick and install
5. Make some music!
6. Or better: let it make some music for you.
Hi. I was messing around with your script last night and made a little track. Everything but the synth pads and flute melody was generated MIDI with the euclidean thingamajig. Polyrhythms galore!
Permute is a special scale available from the Scale drop down list.
If you select some notes from a MIDI item, then choose Permute (or vice versa) - The script will use the selected midi note values for randomising the selection (instead of using a full scale). You can activate the 'All / Sel Notes' option to have it affect all notes but still using the originally selected note values.
If you change your selection, the Permute scale will update with the new note values
Make sense? I can put a licecap together tomorrow if you like - but it's pretty straightforward once you try it a couple of times.
Just tested the ReaPack update on a portable install - it updated as soon as I launched Reaper, but maybe you need to manually refresh the packages? At a glance, the version number is in the window title bar (tho I'm sure you knew that )
Thanks Rob... yeah Permute... very kewl!
OK so not that brings up a question:
Say I use permute to set the scale of whatever selected few notes... say 5 notes
But then I want to run the randomizer on all notes but using that permute scale... right?
Is there a way to keep that scale when I change to selecting all notes to be randomized???
Hi. I was messing around with your script last night and made a little track. Everything but the synth pads and flute melody was generated MIDI with the euclidean thingamajig. Polyrhythms galore!
Say I use permute to set the scale of whatever selected few notes... say 5 notes
But then I want to run the randomizer on all notes but using that permute scale... right?
Is there a way to keep that scale when I change to selecting all notes to be randomized???
If I understand correctly - you want your current Permute scale to affect all notes in the MIDI item? Just tick the 'All / Sel Notes' option, then click Generate.
The limitation here is that it works either with the selected notes (i.e. the notes that make up the current permute scale), or all notes. Manually selecting different notes (right-click-drag, or ctrl-a), will create a new Permute scale, which is by design.
I know I have already mentioned the wish to have it work on the Inline Editor but I'll say it again here just as a reminder because that would be soooo nice.
Hi hopi,
I've looked into this and see a couple of issues
1) I can't find a way for the script to detect if it's in the inline editor (devs, if you're listening, can this be added to the API, please?).
Julian has a script that does this using reaper.BR_GetMouseCursorContext_MIDI() - but as far as I can tell, the mouse needs to be over the item/take for this to work (although I could be wrong...). Also, I'm not using any extensions at the moment, and would like to keep the script's dependencies at zero, if I can.
2) The script calls MIDIEditor_OnCommand to run action ID 40435 (Send all notes off to all MIDI outputs/plug-ins) after deleting then inserting the modified notes to the take. This is done to kill any hanging notes.
Unfortunately, the inline editor does not have access to OnCommand so I can't reliably delete notes from a take without the chance of a hang.
However, I did find reaper.OnPauseButton() in the API so it might still be do-able (i.e pause playback, do scripty stuff, resume playback), if I could detect the inline editor, of course...
If any scripters can offer advice on other ways of detecting the inline editor that would be hugely helpful, and would make hopi very happy
Might I suggest a variation on permute that only lets the notes get used once in the randomisation
woggle
Yeah, I agree that could be very useful - it's do-able as an option for sure. I'll put it in the tracker on GitHub.
That said, you might have to wait a while, there are some other features in development at the moment, but I'm sure I'll get around to it at some point