Old 03-02-2017, 05:34 AM   #1
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default Midi notes randomizer

Hi,

Is there a script which can randomly transform selected notes pitch within a defined range ?
dupont is offline   Reply With Quote
Old 03-02-2017, 05:51 AM   #2
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
Hi,

Is there a script which can randomly transform selected notes pitch within a defined range ?
Updated: 8th Mar 22:12 - Polyphonic bug fixes.


I am working on a script to do exactly that and a whole lot more but it's currently a work in progress. If I knew the Reaper API and Lua a bit better, and didn't have to endure the 9-5 suck every day, it'd probably be finished by now and we'd all be happy... :P

I had intended not to release until it until all the v1 features were in place (if not entirely bug free..), but for now here is a cut-down-note-transform-only version - you can select a key, a scale, and an octave, and set a weighting for each note in the scale.

https://www.dropbox.com/sh/dfce34108...R30mdUTIa?dl=0


You'll need both files as the script uses a version of Eugen27771's (awesome) GUI. Download both to the same folder and run the midi_note_randomizer.lua script.

You need to be in the Midi Editor, with some notes selected; move the sliders, select a scale, key, octave, press the Randomize button. Pretty simple at the moment, but there's more to come




Cheers
Rob
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen

Last edited by RobU; 03-08-2017 at 03:14 PM.
RobU is offline   Reply With Quote
Old 03-02-2017, 06:29 AM   #3
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
Probably not so much help right now, but I am working on a script to do exactly that and a whole lot more. Currently, you can select a key, scale, and octave, and set a weighting for each note in the scale. it works, but is rough around the edges and half of the planned functionality is in alpha/beta.

If I knew the Reaper API and Lua a bit better, and didn't have to endure the 9-5 suck every day, it'd probably be finished by now and we'd all be happy... :P

I had intended not to release until it until all the v1 features were in place (if not entirely bug free..), but I could do a note-transform-only version for you this week as a stop-gap-beta-test if you want - (free-time allowing)

PM me if you're interested.

That said, no doubt someone else has something that can do what you want right now...

Rob
Thanks for your quick reply.
There is a script from SPK77 : "set random velocities" which is what i'm looking for but not for velocities random, for note pitch. I look at this script but as I'm not a coder i'm unable to understand. I hoped to find a line and change velocity by pitch but it is more complicated.
Can this script be easy adapted in order to change notes pitch instead of velocity ?

A midi transform fonction is what i'm most missing from logicpro, such useful and time saver.
dupont is offline   Reply With Quote
Old 03-02-2017, 06:31 AM   #4
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
Thanks for your quick reply.
There is a script from SPK77 : "set random velocities" which is what i'm looking for but not for velocities random, for note pitch. I look at this script but as I'm not a coder i'm unable to understand. I hoped to find a line and change velocity by pitch but it is more complicated.
Can this script be easy adapted in order to change notes pitch instead of velocity ?

A midi transform fonction is what i'm most missing from logicpro, such useful and time saver.
See my edited comments above
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-02-2017, 08:13 AM   #5
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
See my edited comments above
You make my day, that's what I was looking for.
Could you add a preset manager and it will be even better.

Thank's RobU.
dupont is offline   Reply With Quote
Old 03-02-2017, 08:20 AM   #6
Plazma
Human being with feelings
 
Join Date: May 2014
Posts: 290
Default

I've been test-driving this script... it shows great potential for being a good tool to help with the creative process. Gonna follow this thread.
__________________
Reaper 64bit ~ Win 10 64bit | www.pennysound.co.za (Free & commercial Omnisphere patches)
Plazma is offline   Reply With Quote
Old 03-02-2017, 12:23 PM   #7
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

I noticed after several "mangle" that some notes get erased from right to left of the midi clip.
dupont is offline   Reply With Quote
Old 03-02-2017, 12:40 PM   #8
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
I noticed after several "mangle" that some notes get erased from right to left of the midi clip.
I've nevered noticed that here and I abuse it quite a lot... I'll take a look tho. -

How long is the item? Is it looped source? Glued?
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-02-2017, 01:12 PM   #9
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
I've nevered noticed that here and I abuse it quite a lot... I'll take a look tho. -

How long is the item? Is it looped source? Glued?
4 bars long, not looped, not glued.
I select all notse of the item but not C1, which is the downbeat kick note I don't want to randomize
dupont is offline   Reply With Quote
Old 03-02-2017, 02:46 PM   #10
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
4 bars long, not looped, not glued.
I select all notse of the item but not C1, which is the downbeat kick note I don't want to randomize
I can't replicate the problem, at least on a new 4 bar item full of painted notes, first note not selected and seriously mashing the mangle button

Can you send me a small project file with this problem so I can test?

Thanks!
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-02-2017, 03:19 PM   #11
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
You make my day, that's what I was looking for.
Could you add a preset manager and it will be even better.

Thank's RobU.
Saving and loading will be added at some point once I finalise the data structures - can you tell me what you had in mind for a 'preset' ?

Cheers
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-03-2017, 02:18 AM   #12
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Minor tweaks. The same link above should still work.

dupont - Can you try glueing the item first and let me know if it solves your disappearing note problem? If it does, I can do a silent glue on initialisation.
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-03-2017, 04:44 AM   #13
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
Saving and loading will be added at some point once I finalise the data structures - can you tell me what you had in mind for a 'preset' ?

Cheers
A preset will be usefull to recall the scale and note weight slider adjustment.
dupont is offline   Reply With Quote
Old 03-03-2017, 04:48 AM   #14
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
I can't replicate the problem, at least on a new 4 bar item full of painted notes, first note not selected and seriously mashing the mangle button

Can you send me a small project file with this problem so I can test?

Thanks!
I recorded a video and I found what is wrong.
On the first pat of the video, when the octave is 2 : note are erased after several mangles.
Second part of the video, no issue if octave is set to 3, issue restart when I select octave 2.

Tried with glued and not glues item.
Hope it helps.

https://drive.google.com/file/d/0ByV...ew?usp=sharing
dupont is offline   Reply With Quote
Old 03-03-2017, 05:06 AM   #15
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
I recorded a video and I found what is wrong.
On the first pat of the video, when the octave is 2 : note are erased after several mangles.
Second part of the video, no issue if octave is set to 3, issue restart when I select octave 2.

Tried with glued and not glues item.
Hope it helps.

https://drive.google.com/file/d/0ByV...ew?usp=sharing

Thanks dupont - I have managed to replicate the problem - as far as I can tell, it only happens when there are different notes occupying the same position. If you switch from diamonds to show notes as rectangles, you can see them getting, well, mangled...

I'll look into it


Rob
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen

Last edited by RobU; 03-03-2017 at 05:56 AM.
RobU is offline   Reply With Quote
Old 03-03-2017, 05:55 AM   #16
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Some observations

In Reaper ME, if I create two notes of equal length, drag one on top of the other, then deselect both, the notes will be merged (or one discarded, but the effect is the same)

This appears to be what's happening with the script, it is transposing a note on top of an existing note of the same length and the result is the same as if you do it manually (almost, there is some other weirdness going on too...).

hmm.... Anyway, while I try figure out how to deal with that, as a workaround to preserve your kicks, reduce the probability of the first note slider to 0, or change the root note up a semi-tone - that way C1 won't get selected when randomising

R
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen

Last edited by RobU; 03-03-2017 at 06:27 AM.
RobU is offline   Reply With Quote
Old 03-03-2017, 11:35 AM   #17
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
Some observations

In Reaper ME, if I create two notes of equal length, drag one on top of the other, then deselect both, the notes will be merged (or one discarded, but the effect is the same)

This appears to be what's happening with the script, it is transposing a note on top of an existing note of the same length and the result is the same as if you do it manually (almost, there is some other weirdness going on too...).

hmm.... Anyway, while I try figure out how to deal with that, as a workaround to preserve your kicks, reduce the probability of the first note slider to 0, or change the root note up a semi-tone - that way C1 won't get selected when randomising

R
OK thanks, Happy debugging !
dupont is offline   Reply With Quote
Old 03-04-2017, 08:40 AM   #18
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
OK thanks, Happy debugging !
I'd rather gouge out my eyes to be honest...

However, I believe I've solved the problem, in fact it should work with reasonable amounts of polyphony (i.e. chords, but bear in mind it has no concept of chords yet, notes will be in the scale, but that's about it)

There's a new version at the link above - - can you test please?

I was thinking that when you drop down an octave, you'll need to remove the kick drum note probability to 0 anyway, because it will randomise notes onto that lane, creating more kicks..

Let me know how you get on

R
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen

Last edited by RobU; 03-04-2017 at 09:05 AM.
RobU is offline   Reply With Quote
Old 03-04-2017, 09:29 AM   #19
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,868
Default

Dear Reapers,

Dunno about you but lately, the amount of amazing script releases for Reaper is really going to the roof.

I honestly can't sleep anymore, the adrenalin is reaching dangerous levels in my body.

The wonderful stuff lately, from ie Lokasenna, me2beats, X-Raym, mpl, etc and now this staggering script from RobU !

I just tried it on my mac and it works great, very inspiring, mucho fun !

@ Robu: i would like to make a video tonight, on my YT channel about Midi Mangler,
just as a show off and explanation to people.
If that's ok with U ?

I think many people will like this nifty thing !
__________________
Reaper - OSX (always latest version)
OSX Catalina (always latest version)
My Reaper Tips&Tricks: https://www.youtube.com/user/vanhaze2000/playlists
vanhaze is online now   Reply With Quote
Old 03-04-2017, 11:55 AM   #20
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by vanhaze View Post
Dear Reapers,

Dunno about you but lately, the amount of amazing script releases for Reaper is really going to the roof.

I honestly can't sleep anymore, the adrenalin is reaching dangerous levels in my body.

The wonderful stuff lately, from ie Lokasenna, me2beats, X-Raym, mpl, etc and now this staggering script from RobU !

I just tried it on my mac and it works great, very inspiring, mucho fun !

@ Robu: i would like to make a video tonight, on my YT channel about Midi Mangler,
just as a show off and explanation to people.
If that's ok with U ?

I think many people will like this nifty thing !

Thanks for the kind words, vanhaze, but take a deep breath, man, I'm not quite in the same league as the guys you mentioned...!

I have tidied up the code, renamed it to 'Midi Note Randomizer' (since that's what it does...), updated the screen shot and the link above.

If you want to do a video, sure go ahead - I'd appreciate it if you use the latest version because 'The Mangler' will return in the near(ish) future when the planned functionality is finished.


If any of the ReaPack guys read this; While the headers in my scrips are ReaPack compatible, a) I have no idea how to add this to ReaPack, and b) if ReaPack supports 'requires' in Lua scripts? Maybe someone can clue me in?

Cheers,
Rob
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-04-2017, 12:00 PM   #21
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,868
Default

Awesome RobU, many thanks !

Releasing a vid about the fantastic "Midi Note Randomizer" this eve
__________________
Reaper - OSX (always latest version)
OSX Catalina (always latest version)
My Reaper Tips&Tricks: https://www.youtube.com/user/vanhaze2000/playlists
vanhaze is online now   Reply With Quote
Old 03-04-2017, 12:20 PM   #22
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
I'd rather gouge out my eyes to be honest...

However, I believe I've solved the problem, in fact it should work with reasonable amounts of polyphony (i.e. chords, but bear in mind it has no concept of chords yet, notes will be in the scale, but that's about it)

There's a new version at the link above - - can you test please?

I was thinking that when you drop down an octave, you'll need to remove the kick drum note probability to 0 anyway, because it will randomise notes onto that lane, creating more kicks..

Let me know how you get on

R
Hello RoBu,

I got 2 Reaper freezes, I had to quit Reaper and restart.
It happened while randomizing a 16 bars long item.
dupont is offline   Reply With Quote
Old 03-04-2017, 12:26 PM   #23
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
Hello RoBu,

I got 2 Reaper freezes, I had to quit Reaper and restart.
It happened while randomizing a 16 bars long item.
16 bars? heh...

Was it the latest version?

Edit: Ok, I've managed to replicate it with 16 bars (and 4 even...) - I'll take a look - thanks for the heads up.. meantime drop out the kick note using probability slider
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen

Last edited by RobU; 03-04-2017 at 12:48 PM.
RobU is offline   Reply With Quote
Old 03-04-2017, 12:49 PM   #24
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by vanhaze View Post
Awesome RobU, many thanks !

Releasing a vid about the fantastic "Midi Note Randomizer" this eve
Don't forget to mention the bugs :P
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-04-2017, 02:08 PM   #25
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,868
Default

Which bug(s) ?!

Havent encountered any :0)

Here is the thread for my video announce about your great Script:

http://forum.cockos.com/showthread.p...10#post1812710

I sincerely hope you like it.
I tend to not make my videos too long.
Leaving room for others to do their own exploration on what i show / explain.
__________________
Reaper - OSX (always latest version)
OSX Catalina (always latest version)
My Reaper Tips&Tricks: https://www.youtube.com/user/vanhaze2000/playlists
vanhaze is online now   Reply With Quote
Old 03-04-2017, 07:13 PM   #26
timbralzoom
Human being with feelings
 
timbralzoom's Avatar
 
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,718
Default

Thank you!!
timbralzoom is offline   Reply With Quote
Old 03-04-2017, 07:28 PM   #27
panspOrmia
Human being with feelings
 
Join Date: Feb 2015
Posts: 3
Default Script error...

Quote:
Originally Posted by RobU View Post
Don't forget to mention the bugs :P
After loading and running the script, I get this error (see attached pic).

I`m on Windows 7 64bit (latest version of Reaper).

Any help would be appreciated...

cheers,
pete
Attached Images
File Type: png mdr.png (4.1 KB, 316 views)
panspOrmia is offline   Reply With Quote
Old 03-05-2017, 01:30 AM   #28
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default 16 bars !

Quote:
Originally Posted by RobU View Post
16 bars? heh...

Was it the latest version?

Edit: Ok, I've managed to replicate it with 16 bars (and 4 even...) - I'll take a look - thanks for the heads up.. meantime drop out the kick note using probability slider
Indead 16 bars is quite a long item.
I made a mistake it was a 4 bars long not 16 bars !

The workaround to set the C1 slider to 0 works, thanks.
Is it posible to set the octave param to 2 when the script load because, the drums note I want to randomize are mostly spread between C#1 and C2 ?
That's also the reason I asked for a preset manager.
dupont is offline   Reply With Quote
Old 03-05-2017, 03:42 AM   #29
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by dupont View Post
Indead 16 bars is quite a long item.
I made a mistake it was a 4 bars long not 16 bars !

The workaround to set the C1 slider to 0 works, thanks.
Is it posible to set the octave param to 2 when the script load because, the drums note I want to randomize are mostly spread between C#1 and C2 ?
That's also the reason I asked for a preset manager.

If you're ok editing the script, open it up (either in Reaper's editor, or an external editor), scroll down to line 30 and change m.oct to 3 (default value is 4), then save it.

R
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-05-2017, 08:49 AM   #30
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by vanhaze View Post
Which bug(s) ?!

Havent encountered any :0)

Here is the thread for my video announce about your great Script:

http://forum.cockos.com/showthread.p...10#post1812710

I sincerely hope you like it.
I tend to not make my videos too long.
Leaving room for others to do their own exploration on what i show / explain.
Cool, thanks vanhaze

The big bug at the moment is if you try and use it polyphonicly (is that even a work...?) - it will eat notes (as dupont has found...), and hangs on items longer than 1bar, there is a workaround for specific use cases, but it's not ideal.

If you're using it for monophonic sequences, it seems to be stable enough - something bear in mind.

When I get the fix for polyphony, I'll be back...
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-05-2017, 09:24 AM   #31
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,675
Default

maybe the bug happens when the option in MIDI editor is on: Automatically correct overlapping notes
heda is offline   Reply With Quote
Old 03-05-2017, 10:52 AM   #32
dupont
Human being with feelings
 
dupont's Avatar
 
Join Date: Nov 2007
Location: France
Posts: 688
Default

Quote:
Originally Posted by RobU View Post
If you're ok editing the script, open it up (either in Reaper's editor, or an external editor), scroll down to line 30 and change m.oct to 3 (default value is 4), then save it.

R
Line 30 changed, now it start up at octave 2 as requested.
dupont is offline   Reply With Quote
Old 03-05-2017, 03:32 PM   #33
Arnar
Human being with feelings
 
Arnar's Avatar
 
Join Date: Jan 2007
Location: Smokie Bay.
Posts: 796
Default

Installed this into "Scripts" but it will not show up in reaper ?
Any ideas ?
__________________
In Music We Trust.
http://soundcloud.com/hazar
http://soundcloud.com/ifthenrun
Arnar is offline   Reply With Quote
Old 03-05-2017, 03:37 PM   #34
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,868
Default

Did you:

1) Open Action List.
2) Reascript > click "Load" button.
3) Navigate to the Script and then click "open" button.

??

These 3 steps are needed to load the Script into Action List, so it becomes available in Action List.
__________________
Reaper - OSX (always latest version)
OSX Catalina (always latest version)
My Reaper Tips&Tricks: https://www.youtube.com/user/vanhaze2000/playlists
vanhaze is online now   Reply With Quote
Old 03-06-2017, 01:48 AM   #35
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by heda View Post
maybe the bug happens when the option in MIDI editor is on: Automatically correct overlapping notes
Thanks, Heda - do you know how I can check for the state of that option from the script ?
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-06-2017, 02:01 AM   #36
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 4,868
Default

Yesterday, I indeed also experienced Reaper hangs when using the script on "polyphonic' midi items.

Many thanks in advance for fixing RobU !!
__________________
Reaper - OSX (always latest version)
OSX Catalina (always latest version)
My Reaper Tips&Tricks: https://www.youtube.com/user/vanhaze2000/playlists
vanhaze is online now   Reply With Quote
Old 03-06-2017, 03:56 AM   #37
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,675
Default

Quote:
Originally Posted by RobU View Post
Thanks, Heda - do you know how I can check for the state of that option from the script ?
This would do it
PHP Code:
fixnoteoverlaps reaper.GetToggleCommandStateEx(3206040681
and to set it to 0
PHP Code:
reaper.SetToggleCommandState(32060406810
But I think, the better solution would be to check to avoid notes being positioned in the same position. So you wouldn't need to worry about that overlapping notes setting. Because if you have a 4 notes chord for example, you may want to randomize it and keep it being 4 notes.

Last edited by heda; 03-06-2017 at 04:07 AM.
heda is offline   Reply With Quote
Old 03-06-2017, 04:57 AM   #38
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by heda View Post
This would do it
PHP Code:
fixnoteoverlaps reaper.GetToggleCommandStateEx(3206040681
and to set it to 0
PHP Code:
reaper.SetToggleCommandState(32060406810
But I think, the better solution would be to check to avoid notes being positioned in the same position. So you wouldn't need to worry about that overlapping notes setting. Because if you have a 4 notes chord for example, you may want to randomize it and keep it being 4 notes.
Thanks, Heda.

Re your thoughts: Agreed - I am working on code to keep the notes from overlapping in the first place, 4 separate notes at the same position, should always be 4 separate notes

Cheers
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-06-2017, 05:00 AM   #39
RobU
Human being with feelings
 
RobU's Avatar
 
Join Date: Sep 2009
Location: R'lyeh
Posts: 820
Default

Quote:
Originally Posted by vanhaze View Post
Yesterday, I indeed also experienced Reaper hangs when using the script on "polyphonic' midi items.

Many thanks in advance for fixing RobU !!
Yeah, it hangs because my code to check for overlaps majorly sucks and gets stuck in an infinite loop - best to stick to monophonic for now. Or, in the case of drums (like dupont), if you're trying to avoid clashes with particular notes, reduce the probability of that note to zero with the appropriate slider

Fixes coming sometime
__________________
Hard work never killed anybody, but why take a chance?
~Edgar Bergen
RobU is offline   Reply With Quote
Old 03-06-2017, 03:52 PM   #40
Cerber
Human being with feelings
 
Cerber's Avatar
 
Join Date: Feb 2017
Posts: 17
Default

Oh thank you so much for this script, RobU! I was looking for something like that for a long time! It works fine, I personally do not need more than that.
Cerber is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.