Old 06-02-2020, 01:06 PM   #41
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

-other topic but similar script-
"build scales depending on region name"
I would like to keep the names that have already been entered and call up the corresponding scales.
Scales depending on chords:
maj7 - Ionian (0,2,4,5,7,9,11)
m7 - Dorian (0,2,3,5,7,8,10)
m7b9 - Phrygian (0,1,3,5,7,8,10)
maj7 # 11 - Lydian (0,2,4,6,7,9,11)
7 -Mixolydian (0,2,4,5,7,9,10)
m - Aeolian (0,2,3,5,7,8,10)
m7b5b9 - Locrian (0,1,3,5,6,8,10)
13b9 - Half-Whole Diminished (0,1,3,4,6,7,9,10)
dim7 - Whole-Half (0,2,3,5,6,8,9,11)
etc

Last edited by Dragonetti; 06-02-2020 at 01:57 PM.
Dragonetti is offline   Reply With Quote
Old 06-02-2020, 04:49 PM   #42
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Something like this maybe, see if you can work it out, I should of just made this script:

Count through the regions
Code:
 retval, num_markers, num_regions = reaper.CountProjectMarkers(0)

for i = 0, num_regions do -- regions loop start
Get the current region
Code:
retval, isrgn, pos, rgnend, name, markrgnindexnumber, color = reaper.EnumProjectMarkers3( 0, i )
seeing if any of the selected items
Code:
items = reaper.CountSelectedMediaItems()
start in it, if they do get that index (chord_region) that is sent to the function call "get_chord_notes(chord_region)"

Check the position of an item
Code:
for x = 0, items do -- items loop start

  current_item = GetMediaItem( 0, x )

  item_start = reaper.GetMediaItemInfo_Value( current_item, "D_POSITION")
Code:
chord_region = markrgnindexnumber

If the item_start >= pos and item_start < rgnend then 
  
  get_chord_notes(chord_region) -- get the chord notes for current region
  
  take = reaper.GetActiveTake(item)
 
  reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note1) -- chord root

end
Code:
end -- items loop end
Code:
end -- regions loop end
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-03-2020, 12:43 AM   #43
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by Dragonetti View Post
-other topic but similar script-
"build scales depending on region name"
I would like to keep the names that have already been entered and call up the corresponding scales.
Scales depending on chords:
maj7 - Ionian (0,2,4,5,7,9,11)
m7 - Dorian (0,2,3,5,7,8,10)
m7b9 - Phrygian (0,1,3,5,7,8,10)
maj7 # 11 - Lydian (0,2,4,6,7,9,11)
7 -Mixolydian (0,2,4,5,7,9,10)
m - Aeolian (0,2,3,5,7,8,10)
m7b5b9 - Locrian (0,1,3,5,6,8,10)
13b9 - Half-Whole Diminished (0,1,3,4,6,7,9,10)
dim7 - Whole-Half (0,2,3,5,6,8,9,11)
etc
You can use a GUI to select a scale.
You should be able to modify the script to do that, it's still counting the items and setting the pitch the same way.

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-03-2020, 01:39 AM   #44
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

@MusoBob
Thank you for all the suggestions.
I will deal with it and ask for help if necessary.

The first questions are coming:
The whole thing should be track based.
Don't the selected items still have to activate the tracks?
My code doesn't work yet:
Code:
items = reaper.CountSelectedMediaItems ()


for x = 0, items do - items loop start

   current_item = reaper.GetMediaItem (0, x)

   item_start = reaper.GetMediaItemInfo_Value (current_item, "D_POSITION")
  
  
  
  
chord_region = markrgnindexnumber

if item_start> = pos and item_start <rgnend then
  
   get_chord_notes (chord_region) - get the chord notes for current region
  
   take = reaper.GetActiveTake (current_item)
 
   reaper.SetMediaItemTakeInfo_Value (take, 'D_PITCH', note1) - chord root

end

Last edited by Dragonetti; 06-03-2020 at 02:13 AM.
Dragonetti is offline   Reply With Quote
Old 06-05-2020, 09:52 AM   #45
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I can't work it out myself.
The thing is too big for me.
Dragonetti is offline   Reply With Quote
Old 06-05-2020, 05:35 PM   #46
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by Dragonetti View Post
First of all, no prospects of success
I have to get this:
pitch to all selected items of a track, depending on the region
is unfortunately too difficult
So you mean set the pitch of the selected items on a track to note1 (root) of the region chord it falls in ?
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-06-2020, 12:08 AM   #47
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Yes, I hope I understand correctly.
If I only select one track, of course only the root note.
With 4 tracks the whole chord.
Basically, I find it good to repeat the chords if more tracks are "selected" (there are only items selected) as chord tones.
Here in the example (chord "C") I find it good to repeat the chord for 4 tracks. c, e, g, c, e, g, c ......
Thanks
Dragonetti is offline   Reply With Quote
Old 06-06-2020, 12:48 AM   #48
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

So there's no inversions where
octave = 14
and note4(+17) needs to be moved to the bottom to note4(+5) ??
anything that's not a chord note is set to 0 ?
is 4 tracks the maximum ?
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-06-2020, 01:27 AM   #49
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

In the example, I forgot the better voicing
4 tracks maximum
and with a three-part chord you can repeat the root note.

Last edited by Dragonetti; 06-06-2020 at 01:33 AM.
Dragonetti is offline   Reply With Quote
Old 06-08-2020, 08:49 PM   #50
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Ok, I'm busy at the moment on other projects but it should be all doable so I'll try and get back to it.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-09-2020, 01:11 AM   #51
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Thank you very much.
I look forward to it

Last edited by Dragonetti; 06-09-2020 at 03:45 PM.
Dragonetti is offline   Reply With Quote
Old 06-14-2020, 05:47 AM   #52
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

deleted

Last edited by Dragonetti; 06-14-2020 at 08:14 PM.
Dragonetti is offline   Reply With Quote
Old 06-18-2020, 03:42 AM   #53
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Hi
maybe someone can help.
If you delete an item, the script aborts.
The script should ignore the missing item and just keep working.
The code is in post # 33
Thanks
Dragonetti is offline   Reply With Quote
Old 06-18-2020, 12:47 PM   #54
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Media item expected.
Don't delete it, either mute it or turn the volume down or add a volume knob, the original script muted the notes that were not in the chord :


__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-18-2020, 09:34 PM   #55
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

You could also have the items as takes on one track

Take: Implode items ...takes

Item properties: Toggle item play all takes

reaper.CountTakes( item )
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-19-2020, 01:40 PM   #56
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

@MusoBob
Thanks for the suggestions.

Regarding post # 44:
Couldn't you go on?
I tried a few things but didn't get anywhere.
Posting the code wouldn't do anything.
Maybe you can expand the idea in post # 44 even further?
That would be nice.
Best wishes
Dragonetti
Dragonetti is offline   Reply With Quote
Old 06-19-2020, 03:21 PM   #57
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Is POST #47 the latest way ?

When you make edits to old posts I'm not notified by email, you are best to post the new idea in a new post.

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-20-2020, 03:02 AM   #58
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

@MusoBob
I sent you a PM.
The post 47 gif is almost correct.
The highest note under chord "C" should be note4 (+12)

would be new: I expand all chords up to note7 by octaves.
Example "C" (0,4,7,12,16,19,24)
here is a special case:

Last edited by Dragonetti; 06-20-2020 at 01:57 PM.
Dragonetti is offline   Reply With Quote
Old 06-21-2020, 01:27 PM   #59
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

If you could post the ideas here it would be better than messages to keep it all together. If you could post some pics and explanations it will be easier to understand what you now need.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-22-2020, 02:36 AM   #60
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

@MusoBob

Here are the points :
1. multiple region with chord symbols
2. multiple tracks with different rhythms
3. As shown in post # 47, I now select any items
4. now the tracks are selected in the tcp which contain selected items. in post 47 there are 4.
5. Now the bottom track gets the note 1 (root note)
the note 2 above etc. - of course depending on the chord symbol.
6. that would be new: since your chord tones have the highest number of note7, I would like (I can myself) raise all chords to note7 (by octave)
-----
To be more flexible, please do not use voicing.
I wanted to make an extra voicingtool anyway.
I'm still not quite sure how.

It could look like this:
Swap the pitch settings of the selected
Items depending on their tracks.
For example 4 tracks: counted from the bottom

1to4(+12), 2to1, 3to2, 4to3


Thank you for your attention
Dragonetti is offline   Reply With Quote
Old 06-22-2020, 11:10 PM   #61
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

See what this does ReaTrak set selected audio items pitch from region chord name v3.lua

If slash chords are needed it can be added.

It is set to select all tracks with selected items on, but if you select all the items in a region and one track does not have an item on it then the next track up will be the next chord note.
So if you like you can comment these lines out and select the tracks manually after selecting the items.

Code:
  commandID2 = reaper.NamedCommandLookup("_SWS_SELTRKWITEM")
  reaper.Main_OnCommand(commandID2, 0) -- SWS: Select only track(s) with selected item(s) _SWS_SELTRKWITEM
If there in no chord note it will set the item to the root,
Code:
else
  reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note1) -- chord root
you can set this to whatever you like:
Code:
default_pitch = note1+12 --put this at the top of Main
~~~~~
~~~~~

else
  reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',default_pitch) -
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-23-2020, 05:33 AM   #62
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Super thank you

I'll take a closer look at that.
An error has occurred here.
The script writes as 2nd note "3" and "4" should actually
Write 5 and 11.

"to select all tracks with selected items on"
is exactly right

"If there in no chord note it will set the item to the root§"
I like that


Last edited by Dragonetti; 06-23-2020 at 09:05 AM.
Dragonetti is offline   Reply With Quote
Old 06-23-2020, 02:00 PM   #63
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I found the mistake
You forgot the + note1
"reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note3+note1)"
Dragonetti is offline   Reply With Quote
Old 06-24-2020, 05:40 PM   #64
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Yes, thanks, I would of just been using it on the C chords.
I updated the script above to have the +note1 on all.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 07-09-2020, 09:02 AM   #65
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Hello MusoBob. I changed your script to generate scales. I hope you don't mind. I wanted to start a new thread. Can i do that?
Dragonetti is offline   Reply With Quote
Old 07-09-2020, 12:54 PM   #66
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Yes, there is a button at the top you just click that
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 09-06-2020, 12:54 PM   #67
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

@MusoBob
can you take a look here, i can't get any further
Thanks
https://forum.cockos.com/showthread.php?t=236158
post#34
Dragonetti is offline   Reply With Quote
Old 06-03-2021, 04:32 PM   #68
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

https://www.youtube.com/watch?v=an_iVttAVv4
Dragonetti 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:07 AM.


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