|
|
|
08-08-2019, 12:55 AM
|
#1
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
MIDI Editor Snap to Scale & Chord Guide
These will create snap guides for midi notes,
the second one will run independent of ReaTrak using the Lokasenna GUI
this is installed via ReaPack, just run the Script: Set Lokasenna_GUI v2 library path.lua first.
The other 2 will run with ReaTrak and use the local GUI Library and other scripts.
right click Save Link/Target As
ReaTrak create midi scale (snap guide).lua
ReaTrak create midi scale (snap guide) (Lokasenna GUI library).lua
Select the whole song or part,
run the script
set the Key & Scale
hit the green button.
The Chord Snap Guide button in ReaTrak will create the Midi Chord Snap Guide track.
Both scripts will set the Editor to color notes by channel,
scale note will be blue, chord root and slash notes will be green and other chord notes yellow.
If you have issues seeing the colors because of your theme you can use the default midi note color map or you can set the midi editor to color notes by Track and set the Midi Scale track color to whatever you like, it just won't show the root of the chord a different color if you are using the Midi Chord Snap Guide so you can switch back to color notes by Channel.
Will update them both in the next ReaTrak release.
See if it is working correctly and I can add some more scales.
Full Screen
You can also set the note color to Track:
Last edited by MusoBob; 08-08-2019 at 06:27 PM.
|
|
|
08-08-2019, 09:29 AM
|
#2
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
Thanks Bob... this is almost great for me... however I suppose due to the theme and MIDI color map I use, the item that holds the snap to track is colored just as strongly as the track with the real notes on it...
The result is that the snap to track essentially obliterates the real notes...
In your shown examples it is dimmed way down which is what I'd like to see, ...but I don't see that. I'm pretty sure this is a problem internal to reaper theme, etc. Any ideas?
|
|
|
08-08-2019, 11:33 AM
|
#3
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
You need to have only the "eye" selected and not the edit "lock",
else you can change the midi note color map to the default.
Last edited by MusoBob; 08-08-2019 at 12:26 PM.
|
|
|
08-08-2019, 03:32 PM
|
#4
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
thanks Bob... I'll see if that helps
EDIT: yeah it does help... and if I change the setting to color by velocity, then I can also change what the color of the shown notes is... that makes it even more workable for me
Last edited by hopi; 08-08-2019 at 03:40 PM.
|
|
|
08-08-2019, 04:46 PM
|
#5
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
You can set the midi editor to color notes by Track and set the Midi Scale track color to whatever you like, it just won't show the root of the chord a different color if you are using the Midi Chord Snap Guide.
Last edited by MusoBob; 08-08-2019 at 06:20 PM.
|
|
|
11-26-2019, 03:33 PM
|
#6
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
For the editor to display the guide notes in faint color under "Options when using one (MIDI) editor per project" submenu (found in the Track list context menu or main menu Contents) "(Media item) Selection is linked to visibility" option must be disabled.
It might make sense to disable this with the script in the background provided the user is notified. And notification of the notes coloration method change will also be fair to a user.
And thank you for sharing.
Last edited by Buy One; 11-26-2019 at 03:58 PM.
|
|
|
11-26-2019, 11:44 PM
|
#7
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Thanks, I was looking for that setting.
Try these and let me know if it works for you.
ReaTrak create midi scale (snap guide).lua
ReaTrak create midi chords from region chord name (snap guide).lua
ReaTrak create midi scale (snap guide) (Lokasenna GUI library).lua
Code:
reaper.MIDIEditor_OnCommand(hwnd, 40739) -- color notes/CC by channel
reaper.SetToggleCommandState( 3, 40818, 1 ) -- Contents: Show/hide track list ON
reaper.SetToggleCommandState( 3, 40892, 0 ) -- Options: MIDI track list/media item lane selection is linked to visibility OFF
reaper.MIDIEditor_OnCommand(hwnd,2) -- File: Close MIDI Editor window
Info = [[
Set Color notes/CC by channel
Set Contents: Show/hide track list ON
Set Options: MIDI track list/media item
lane selection is linked to visibility OFF
]]
reaper.MB(Info, "Info Midi Editor Settings", 0)
Last edited by MusoBob; 11-27-2019 at 12:27 AM.
|
|
|
11-27-2019, 08:15 AM
|
#8
|
Human being with feelings
Join Date: Jun 2018
Location: Edmonton, AB, Canada
Posts: 1,391
|
I'm pretty lazy about jumping on add-ons, but this looks like the one for me. Looks great! Can't wait to try this out later. Very nice work, MusoBob.
__________________
My Rig (also serves as my gaming PC): MSI Mag X570 Tomahawk Mobo, Ryzen R9 3900X, 32GB RAM, Samsung 960 Evo 500gb NVMe, Crucial 1TB NVMe, NVidia RTX 2080 Super, Arturia Minifuse 2, Nektar Impact LX25+ MIDI Controller Keyboard.
|
|
|
11-27-2019, 08:58 AM
|
#9
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
Quote:
Originally Posted by MusoBob
Try these and let me know if it works for you.
|
Thank you, for the suggestion implementation as well, seems to work fine.
Do i understand correctly that ReaTrak create midi chords from region chord name (snap guide).lua script creates chords whose name is specified in the region name in the format listed within this script? And if so, can several chord names be specified in the region name and what must be their delimiter?
Last edited by Buy One; 11-27-2019 at 12:15 PM.
|
|
|
11-27-2019, 12:45 PM
|
#10
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Each chord has it's own region, so with other ReaTrak scripts it will snap midi notes that start within the region to chord notes, it will create chords from the chord name etc.. With other ReaTrak scripts you can split region insert new chord, remove chord and glue region. If you install the latest ReaTrak-xxConfigZIP all the ReaTrak scripts are put into Scripts\ReaTrak.
|
|
|
11-27-2019, 02:33 PM
|
#11
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
Got it, i haven't followed the development hence the question. After studying it a little bit i'm starting to understand the general principle.
I tested this script several times with C as the region name and i noticed that after G4 the notes sequence breaks, further up i get G#4 as the root, then C and D# and so one, which all have two copies sitting on top of each other.
Or maybe i'm using it wrongly because i get the exact same result with Gm in the region name, meaning it starts off as a C sequence then breaks.
Last edited by Buy One; 11-27-2019 at 02:53 PM.
|
|
|
11-27-2019, 04:32 PM
|
#12
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
EDIT: sorry I thought you were snapping midi notes to chords, but it's just the snap guide you are creating ?
If you can upload a pic of the before after midi or upload the midi I can try it out.
I was thinking about making a GUI for it with a few options like mute notes greater than the chord note, say if you have a CMaj7 chord snapped to a CMaj it will mute the top note.
Last edited by MusoBob; 11-27-2019 at 04:41 PM.
|
|
|
11-27-2019, 04:52 PM
|
#13
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
This is the snap guide I get when I create a 1 bar C region:
|
|
|
11-28-2019, 08:14 AM
|
#14
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
Yes, exactly, simply running the script, here's a presentation
FULL SIZE
In the video the key snap happens to be enabled, but it doesn't affect the script's behavior because the result is the same with its being off.
This time the odd sequence was a bit different in terms of the intervals.
Maybe it's because of my older version of the program?
Last edited by Buy One; 11-29-2019 at 12:10 PM.
|
|
|
11-28-2019, 03:29 PM
|
#15
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
|
|
|
11-29-2019, 09:16 AM
|
#16
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
In terms of chord structure the new script works properly but unfortunately exhibits two new issues, it creates 4 bars long MIDI item regardless of the region span, and sets loop points to region
BTW does this script depend on other Reatrak scripts or do SWS/S&M extensions suffice?
Last edited by Buy One; 11-29-2019 at 12:08 PM.
|
|
|
11-29-2019, 12:34 PM
|
#17
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
I copied any ReaTrak scripts to an internal function so if should only need SWS/S&M.
You will have to send another pic of what you mean.
|
|
|
11-29-2019, 01:19 PM
|
#18
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
OK
Please take a look
First i ran the new version, then the previous to highlight the difference
|
|
|
11-29-2019, 02:51 PM
|
#19
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
ReaTrak create midi chords from region chord name (snap guide)2.lua
is 2 the new or old ?
what start measure have you got it set on as I tried it with -1 & -3 ?
as this is what I get:
|
|
|
11-29-2019, 03:46 PM
|
#20
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
2 is the newer version which is glitchy on my end as far as length and adding loop points are concerned
my measure start was 0, it can be seen on my gif, just like it is for the new version on your screenshot
then i gave it another shot and discovered another oddity, while having two regions and trying to create an item for the farther one on the timeline the item was consistently being created under the one earlier on the timeline instead
in this case the item length fit the earlier region perfectly, but the guide notes were always shorter
Last edited by Buy One; 11-29-2019 at 04:00 PM.
|
|
|
11-29-2019, 03:56 PM
|
#21
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
But what's the bar offset in Project settings > Project start measure
|
|
|
11-30-2019, 03:17 AM
|
#22
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
Oh sorry, misread your question, my project start measure was -2
I just tested with it being 0, the result is virtually the same only that this time the item created under another (earlier non-selected) region is still 4 bars long but the notes length fits that particular region
May be i don't use it correctly... what i do is set time selection to region and run the script
|
|
|
11-30-2019, 02:20 PM
|
#24
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
I tested with http://reatrak.com/downloads/test_fi...ountry%20G.csv
and
http://reatrak.com/downloads/test_fi...huffle%20A.csv
The regions loaded from measure 1 (the project start measure was both 0 and 1), after applying the script
A. the first region was filled with notes only halfway, the remaining half was empty of notes,
B. the MIDI item length was short of the very last region, it didn't get beyond the end of the penultimate region. Tried extending time selection beyond the last region, didn't help.
This behavior was consistent.
I guess the bottom line is if i'm the only one for whom it doesn't work, then don't mind me, we'll leave it as it stands
|
|
|
12-01-2019, 03:53 AM
|
#26
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
Alright then
With individual region the item as well as the notes in it were consistently 1 bar long regardless of the region length
With the regions imported from Blues Shuffle A.csv file
A. first region got 2 items, one half its length, the second one with proper length, they were created one by one
B. the last region still didn't get any item
|
|
|
12-01-2019, 10:23 AM
|
#27
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
The script is pretty basic,
it will select the region,
insert new midi item,
length = reaper.BR_GetMidiSourceLenPPQ(take) -- length of region/midi item
insert the chord notes length in the midi item,
select the next region,
....
Regions-Midi-Items.gif
if you could post a pic it would help, you don't have to do all the regions, just do some of the regions.
|
|
|
12-02-2019, 12:54 AM
|
#28
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
|
|
|
12-03-2019, 04:58 AM
|
#30
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
So far seems to work properly in different combinations of regions both in terms of names and of distribution on the timeline
|
|
|
12-03-2019, 05:28 AM
|
#31
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
That's good thanks for finding issues and testing it.
|
|
|
12-03-2019, 07:58 AM
|
#32
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
If i could suggest another thing (and if it's feasible), it's to make the script more robust by forcing it to completely ignore unrelated regions, including those not specifically marked with @ symbol. Currently under unnamed regions it creates items with a C chord broken sequence, a bug which i initially reported to be affecting relevant regions, and under named regions it creates an item with a C and a G# notes spread across 6 first and 5 last octaves respectively.
But that's at your discretion of course and thank you for sharing the script.
|
|
|
12-03-2019, 01:01 PM
|
#33
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
|
|
|
12-04-2019, 11:59 AM
|
#34
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
It still creates items under unnamed regions only devoid of any notes.
|
|
|
12-04-2019, 03:21 PM
|
#35
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
It has to do that otherwise you won't have 1 item that shows through the other midi item that are on top of that layer that you want to snap the notes to.
If you need it that way just take the GLUE command out of the script.
--reaper.Main_OnCommand(40421,0) -- Item: Select all items in track
--reaper.Main_OnCommand(41588,0) -- Item: Glue items
ReaTrak create midi chords from region chord name (snap guide) - no glue.lua
then you can manually glue any you like.
|
|
|
12-05-2019, 03:36 AM
|
#36
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
Yeah, i think it's better this way.
What i meant though was that the script ignore irrelevant regions regardless of the @ symbol presence. But this is nitpicking really so i don't want to nag you any further about that.
Could you maybe tell where in the script i can disable automatic notes selection in the MIDI item, which happens with its latest no-glue version. I guess it has to do with the fact that now all items are separate. I've managed to make it deselect notes in the last item, but not in the rest. If it's not easily possible, never mind.
Last edited by Buy One; 12-05-2019 at 03:43 AM.
|
|
|
12-05-2019, 04:08 AM
|
#37
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
The @ lets you name the regions "@ Chorus" "@ Verse" "@ Bring in FX"
at the bottom of the script add this
Code:
reaper.MIDI_SelectAll( take, 0)
just above
and add
Code:
reaper.Main_OnCommand(40289, 0) -- Item: Unselect all items
just above
Code:
Info = [[
Set Color notes/CC by channel
So just click Edit then Ctrl+S to save n run.
reaper.Main_OnCommand( 40289, 0) -- Item: Unselect all items
the command numbers you get by right click in the Action list
Copy Selected action commandID or text
If it's a non Reaper Command for user script or SWS
Code:
commandID2 = reaper.NamedCommandLookup("_SWS_CREATETRK1")
reaper.Main_OnCommand(commandID2, 0) -- SWS: Create and select first track
|
|
|
12-06-2019, 03:44 AM
|
#38
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
That does it. Thank you very much for such a thorough explanation.
|
|
|
12-06-2019, 03:48 AM
|
#39
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Ok what's next ? lol
Thanks for your help in getting it working better.
|
|
|
12-06-2019, 11:30 AM
|
#40
|
Human being with feelings
Join Date: Sep 2019
Posts: 1,134
|
I guess you're the one to decide, i'm just an average user who occasionally finds glitches.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:54 AM.
|