Old 01-08-2017, 08:02 PM   #1
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default Scripts: Duplicate selected notes at various intervals

These are in response to Commala's request here: http://forum.cockos.com/showthread.php?t=185657



(Diatonically means "within the scale", in case that confuses anyone. Properly harmonized notes for a given key versus chromatics, etc.)

There are about forty individual actions that look like this...
Code:
Duplicate selected notes up 4 semitones
Duplicate selected notes down 10 semitones
Duplicate selected notes up a third diatonically
Duplicate selected notes down a ninth diatonically
...for putting on shortcut keys and toolbars, as well as two "master" actions that will just open a window to let you select notes, choose intervals, harmonize them, and repeat as much as you want.

1. If any of the scripts encounter a note that isn't in the current scale, they'll jump the edit cursor to it and offer you a couple of suggestions or the option to just skip it. The cursor will be put back where you had it afterward.

2. The diatonic scripts require Key Snap to be enabled in the MIDI editor, since that's the only way I can get the current scale from Reaper.

Available on ReaPack: The Choice of a New Generation. Enjoy!
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 01-08-2017 at 08:09 PM.
Lokasenna is offline   Reply With Quote
Old 01-08-2017, 09:07 PM   #2
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Amazing, thanks so much !!

EDIT: So i just tried it and here is something that confuses me:
After i clicked the "Go" button, i don't get to see those 3 buttons as seen in your licecap.
Do i have to hold some modifier key together with mouseclick on "Go" button, to see those 3 ?

OSX 10.12.2
Reaper 5.32pre10 - 64bit.

Last edited by vanhaze; 01-08-2017 at 09:28 PM.
vanhaze is offline   Reply With Quote
Old 01-08-2017, 09:57 PM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

That means it didn't find any notes outside the current scale; in the .gif above, it automatically creates a harmonized third above all of the notes that are actually *in* C Major, which is selected in Key Snap at the bottom, and then it goes back to ask the user how they'd like to harmonize the notes that aren't in C Major - all of the sharps and flats in between.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 01-09-2017 at 10:02 AM.
Lokasenna is offline   Reply With Quote
Old 01-08-2017, 10:04 PM   #4
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 615
Default

Thanks Lokasenna for all your work on this! I hope we see Cockos straighten out the API issue soonish

I use these actions a bit like the way Sibelius is set up by default, with shortcuts across the number row to duplicate the selected notes at a given chromatic interval. So the basic chromatic scripts are working just fine for replicating that.

The diatonic scripts can be used more freely, because the script takes care to decide whether the duplicates should be created at an interval of 3 or 4 semitones, when you tell it to create diatonic thirds for example. In it's current iteration, the script will prompt for user input when it is given a note outside the key. In the future, we may see the script's role expanded in these decisions, something I'm greatly anticipating.

Can't wait to see where it goes from here!
Commala is offline   Reply With Quote
Old 01-09-2017, 09:59 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Very good ! Good work ! It can without a doubt help with harmonization !
X-Raym is offline   Reply With Quote
Old 01-09-2017, 10:09 AM   #6
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

nice work indeed!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 01-12-2017, 09:14 AM   #7
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Just a small heads-up - I'm going to work on the "smart" behavior that Commala and I had previously discussed, but I think it'll be a better fit in the upcoming, bigger version of Chord Helper. Here's a preview: http://forum.cockos.com/showthread.p...28#post1784428

Once it's all sorted out there I can look at transferring the logic over here, but IMO these scripts are better left the way they are - simple, giving the user a quick choice, done.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 01-12-2017, 09:59 AM   #8
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

confused about getting the scripts...
it looks like in the gif, there is one 'master' script that lets you choose what to do next... but on the reapak it shows a ton of individual scripts...
what to do... or should we just wait for the integrated into chord helper version???
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 01-12-2017, 11:51 AM   #9
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

ReaPack should only show two entries - Duplicate chromatically, and Duplicate diatonically. When you install one of them, they add about twenty actions to Reaper's action list for "up 3 semitones", "down a fifth", etc, along with the main script that pops up a window like in the .gif.



If you're installing them yourself from the repository, you need the main script from the MIDI Editor folder and then, if you want them, save the individual actions in the same subfolder relative to where you put the main one.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-30-2017, 01:04 PM   #10
imagegod
Human being with feelings
 
Join Date: Mar 2016
Posts: 409
Default

I installed and then re-installed reapack (just to be sure), but I don't see those actions in the MIDI editor.

Perhaps my problem was addressed in this thread...unfortunately, I have no idea what this means: "If you're installing them yourself from the repository, you need the main script from the MIDI Editor folder and then, if you want them, save the individual actions in the same subfolder relative to where you put the main one."

Personally, I think this should be a basic part of Reaper functionality, but I'm not going to fight city hall.

FYI: I just figured that all my 'repositories' are 'enabled'...I still don't know why I can't see your actions.

Thanks.
__________________
Windows 10/Surface Pro 3, Intel i7 4650U 1.7/2.3 GHz, 8GB SSD
Overture 5/GPO 5.1/Omnisphere 2.1/Audacity/Komplete/Reaper

Last edited by imagegod; 03-30-2017 at 01:09 PM.
imagegod is offline   Reply With Quote
Old 03-30-2017, 02:10 PM   #11
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by imagegod View Post
I installed and then re-installed reapack (just to be sure), but I don't see those actions in the MIDI editor.
Have you asked it to install the scripts? If you don't see them in your list, run "Synchronize packages" to refresh it.


Last edited by cfillion; 03-30-2017 at 02:35 PM.
cfillion is offline   Reply With Quote
Old 03-30-2017, 02:38 PM   #12
imagegod
Human being with feelings
 
Join Date: Mar 2016
Posts: 409
Default

That did it...thanks a million cfillion! Very much appreciated!

This should definitely be a part of Reaper's basic functionality...why they wouldn't include this is beyond me.

I have nothing but good things to say about Reaper and its developers, but this deficit is a headscratcher. Thanks!
__________________
Windows 10/Surface Pro 3, Intel i7 4650U 1.7/2.3 GHz, 8GB SSD
Overture 5/GPO 5.1/Omnisphere 2.1/Audacity/Komplete/Reaper

Last edited by imagegod; 03-30-2017 at 04:40 PM.
imagegod is offline   Reply With Quote
Old 09-10-2018, 08:25 AM   #13
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Very useful scripts! Could you possibly make window to automatically close when specific interval actions are executed?
bFooz is offline   Reply With Quote
Old 09-10-2018, 10:27 AM   #14
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

The specific interval actions only open a window if there are notes that it doesn't know what to do with - a C# if the key is C Major, for instance.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 09-12-2018, 01:09 PM   #15
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

Hi, Lokasenna.
I just stumbled upon these while trying to solve a major problem I've been having.

I want to change a melody into a chord progression, by using a cycle action to iterate through chords of the selected note.

Your scripts are the only solution I've been able to find to help with diatonic differences of the scales.

However, the diatonic duplication does not work well when placed in a custom action list. Is there something that can be done to help the diatonic duplication to run as smoothly as the semitone ones? It's as if it keeps running after execution or something.
Ozman is offline   Reply With Quote
Old 09-12-2018, 01:22 PM   #16
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

The diatonic ones will pause if they find a note that isn't in the current scale and ask you how to harmonize it. Is that what it's doing?

If not, can you pos a .gif?
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 09-12-2018, 01:24 PM   #17
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

Quote:
Originally Posted by Lokasenna View Post
The diatonic ones will pause if they find a note that isn't in the current scale and ask you how to harmonize it. Is that what it's doing?

If not, can you pos a .gif?
It's been a while... what's that screen capture app that folks are using here?
And what is a good site to upload it?

Last edited by Ozman; 09-12-2018 at 01:38 PM.
Ozman is offline   Reply With Quote
Old 09-12-2018, 01:33 PM   #18
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

My first test (diatonic triad), is as below:

SWS/BR: Save note selection from active item, slot 01
Script: Lokasenna_Duplicate selected notes up 7 semitones.lua
Edit: Unselect all
SWS/BR: Restore note selection to active item, slot 01
Script: Lokaseena_Duplicate selected notes up a third diatonically.lua
Edit: Unselect all
SWS/BR: Restore note selection to active item, slot 01

It may run well, once, but continued calling of the script on either causes popups or it to not run (just giving me a root and the fifth).


The way I'm using it is by selecting a note of the monophonic melody, one note at a time, and running the script.
The cycle action would step through a group of these. A script would be preferrable, but Kawa's script for such is bugg, and it is grid based.

Your's is the only I've found that adapts to custom note lengths.

Last edited by Ozman; 09-12-2018 at 01:38 PM.
Ozman is offline   Reply With Quote
Old 09-12-2018, 01:41 PM   #19
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Popups from the script asking you to do something, or is it Reaper's "there's already a copy of this script running, yo" message?

The script should be terminating itself as soon as it's done looking through notes and asking for user decisions. You can look for running scripts at the bottom of the Actions menu though.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 09-12-2018, 01:46 PM   #20
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

Ok, when I use a keyboard shortcut to run the script,
it inserts the notes. Then the Duplicate selected notes popup shows.

If I run the script from the actions window, it alternates btwn running and not running.
Ozman is offline   Reply With Quote
Old 09-12-2018, 01:59 PM   #21
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Ah, the individual actions were letting the main window open when they were done. Updating with a (theoretical) fix now.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 09-13-2018 at 08:53 AM.
Lokasenna is offline   Reply With Quote
Old 09-13-2018, 05:50 AM   #22
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

Much thanks, Lokasenna.

These scripts will be VERY useful when it comes to brain-storming chord progressions.
Ozman is offline   Reply With Quote
Old 09-13-2018, 08:00 AM   #23
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

Also, is it possible, that when running a duplicate with a specific interval, that the window doesn't open, but just adds the notes? Because, when I trigger such a script, the intent is to not add any input other than the selected note, like how it functions when the notes are duplicated by semitone.
Ozman is offline   Reply With Quote
Old 09-13-2018, 08:53 AM   #24
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

As of the fix I put up yesterday, it should only ever open if one of the selected notes is outside the current scale and so it has to ask you what you want to do.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 09-13-2018, 10:01 AM   #25
Ozman
Human being with feelings
 
Join Date: Feb 2015
Posts: 753
Default

Much thanks, Lokasenna.

This works perfectly!

Last edited by Ozman; 09-18-2018 at 07:28 AM.
Ozman is offline   Reply With Quote
Old 03-10-2019, 06:48 PM   #26
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Hi, I have noticed a bug: when the next note is at the same pitch as newly duplicated note, the next note is erased.

Example: write a line of ascending thirds - c,e,g and then run "Duplicate third up". Original e and g are erased.
bFooz is offline   Reply With Quote
Old 03-10-2019, 09:06 PM   #27
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

That's strange; I can't replicate it here. Can you grab a .gif of it happening?
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-11-2019, 03:31 AM   #28
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Sure.

bFooz is offline   Reply With Quote
Old 03-11-2019, 06:05 AM   #29
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Thanks. Looks like it's "Options: Correct overlapping notes while editing" deleting them, though it probably shouldn't be seeing an overlap if note 1's end is the same as note 2's start.

When I get a chance I'll see if I can have the script temporarily disable that setting, but as a workaround for now you should be able to make a custom action like:

Options: Correct overlapping notes while editing (to turn it off)
Duplicate selected notes up a third diatonically
Options: Correct overlapping notes while editing (back on)
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 03-11-2019, 06:27 AM   #30
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Thanks, that was it! I am actually going to keep it off all the time because in notation it corrects them anyway even when the option is off.
bFooz 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 09:43 AM.


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