Old 05-18-2020, 05:57 AM   #1
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default Build chords depending on region name

Hi
I'm still looking for a script with which I can build chords for 4 vertically selected items.

As can be seen in the gif, I select 4 items with the same pitch.
The script should now build a chord by entering special pitch values.
e.g. from bottom to top (-12, + 4, + 7, + 14) or (-13, + 2, + 7, + 14) etc.

I would prefer to be able to step through multiple chords each time I run the script.
Thanks

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

Who can help?
Each time the script is run, it should select a new table.
In this code he always takes table1.
This is probably also possible with "cycle action", but it would be nicer within a script.
Thanks
Code:
--------------- chord builder -----------------

local items = reaper.CountSelectedMediaItems()
if items == 0 then return end
 
reaper.Undo_BeginBlock() 
reaper.PreventUIRefresh(1)
  
table1 = {12,7,4,-12}
table2 = {12,7,0,-8}
table3 = {12,7,4,0}  
table4 = {16,12,7,-12}  
table5 = {16,12,7,-8}   
table6 = {16,12,7,0}  
table7 = {19,16,12,-12}  
table8 = {19,16,12,0}  
  

for i = 0, items-1 do  
  local item = reaper.GetSelectedMediaItem(0,i)

  local take = reaper.GetActiveTake(item)
  if take then
    local pitch = reaper.GetMediaItemTakeInfo_Value(take, 'D_PITCH')
    local new_pitch = table1[i+1] 
    if new_pitch ~= pitch then
      reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',new_pitch)
      reaper.UpdateItemInProject(item)
    end
  end
end

reaper.PreventUIRefresh(-1) 
reaper.Undo_EndBlock('Chords_builder_Major', -1)
Dragonetti is offline   Reply With Quote
Old 05-22-2020, 02:12 AM   #3
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

bump!
Dragonetti is offline   Reply With Quote
Old 05-22-2020, 06:03 AM   #4
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

I thought about doing that but thought it's easy just using midi ?
When I run it, it just gives the same table1 chord
if I change
new_pitch = table1[i+1]
to
new_pitch = table2[i+1]

it will give the table2 chord

not sure how you want it to work ?

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-22-2020, 06:16 AM   #5
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

Are you looking for it to toggle through the chords each time you run it ?
You could get it to set the chord by region name, so as you change the region name it will change the chord and even mute the notes not used of the selected items.
Or pick the chords from a GUI.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-22-2020, 08:23 AM   #6
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Thank you for your answers.
These are all three great options.
I thought the easiest was to toggle, but ....
I have to think it over carefully now.
Dragonetti is offline   Reply With Quote
Old 05-22-2020, 03:15 PM   #7
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

I have Script: ReaTrak create midi chords from region chord name.lua
It would do it all with a bit of modification.
It's just sets the root note
if root == "C" then note1 = 60
you could set that to 0 if all the note samples are "C"
then depending on the chord type
if string.find(",Maj,M,", ","..chord..",", 1, true) then note2=4 note3=7 end
that will set each note that amount of semitones above the first note.
set these to -1 instead of 0
note2 = 0
note3 = 0
note4 = 0
note5 = 0
note6 = 0
note7 = 0

so if the note is not set with the chord it will be muted -1
table1 = {note7,note6,note5,note4,note3,note2,note1}

You could also have a note below note1 for slash chords.

I'll give it more thought if you need any help with 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 05-22-2020, 03:57 PM   #8
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

There are also GUIs/Circle of Fifths to create/enter/change the chords (regions)
you could combine it to an all in one script.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-23-2020, 01:49 AM   #9
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Thanks for your extensive script.
That would be awesome if I could convert it for my purposes.
I don't use midi tracks.
Only audio items should be manipulated.
In my case it must
"reaper.SetMediaItemTakeInfo_Value (take, 'D_PITCH', new_pitch)"
to get integrated.
Example:
I write Cm7 in the region, select my audio items.
Now the appropriate pitch values are entered when executing the script.
Dragonetti is offline   Reply With Quote
Old 05-23-2020, 05:17 AM   #10
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

You have
reaper.SetMediaItemInfo_Value( item, B_MUTE, 1)
reaper.GetMediaItemInfo_Value( item, B_MUTE)

to mute the unused chord notes
I think it should be pretty easy to modify and add your script on the end.
Have a look at it, if you can't work it out I'll look at it in the morning here.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-23-2020, 04:56 PM   #11
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

ReaTrak set selected audio items pitch from region chord name.lua
EDIT:updated
Try this with 8 items.
It's only set to do one chord region where the cursor is at the moment but it can be set to update all chord regions in one go.
You can loop the end part but I just set all 8 separately to work it out first.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak

Last edited by MusoBob; 05-23-2020 at 05:35 PM.
MusoBob is offline   Reply With Quote
Old 05-23-2020, 08:18 PM   #12
pandabot
Human being with feelings
 
pandabot's Avatar
 
Join Date: Oct 2018
Posts: 367
Default

Quote:
Originally Posted by Dragonetti View Post
That would be awesome if I could convert it for my purposes.
You could put your sample in ReaSamplomatic5000 and then you'd be able to use midi chords like this https://youtu.be/VxEGphq0Gck?t=193
pandabot is offline   Reply With Quote
Old 05-24-2020, 02:16 AM   #13
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

@pandbot
Thanks
The items are already in the arrangement and should stay that way. The items have to be selected and then changed(pitch) by script.
@MusoBob
Thank you very much MusoBob
for your script idea.
I don't need a mute function.
I only want to select certain items and manipulate the items depending on the RegionName.

The script should be executed with a toolbar button.

Dragonetti is offline   Reply With Quote
Old 05-24-2020, 11:21 AM   #14
Buy One
Human being with feelings
 
Buy One's Avatar
 
Join Date: Sep 2019
Posts: 1,115
Default

RS5k is an inferior option since it changes the length of audio wave at pitch shift
Buy One is online now   Reply With Quote
Old 05-24-2020, 02:07 PM   #15
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

Quote:
I don't need a mute function.
I only want to select certain items and manipulate the items depending on the RegionName.

The script should be executed with a toolbar button.
How many vertical items do you have 4 ? 5,6,7,8 ?
If you don't want to mute the item that are not used, what pitch do you want them to be, the chord root note ?
Do you want the script to update all chords at the same time ?
or just update the chord under the cursor ?
or update the time selection that could be one chord a few chords or all chords.
Do you have items on other tracks that are not chord notes ?
or do you just have the chord note items ?
so the script can "Item: Select all items in current time selection"
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-24-2020, 03:05 PM   #16
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

The script should only process selected items (maximum 8).
All unselected remain as they are.
Yes, update all selected items at the same time.
Cursor and time selection are not important.
There will be a lot of items that have no chord notes.

If I only selected 1 item, the chord root note would have to come.
Thank you for the effort
I hope it is easier to understand now
I have 2 examples here.
2 selected

8 selected
Dragonetti is offline   Reply With Quote
Old 05-24-2020, 08:47 PM   #17
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

Try this and see if it works
ReaTrak set selected audio items pitch from region chord name v2.lua

Put you cursor under the chord region
select the items
run script

It is only doing one chord at a time
there is no slash chord note
it will still mute notes more than the chord notes
so if you have a Major chord and select 4 notes it will mute the top note,
but you can disable that by commenting these lines out or set mute to 0
reaper.SetMediaItemInfo_Value(item4, "B_MUTE", 1)
To reset pitch choose notes/all run Item properties: Reset item 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 05-25-2020, 02:22 AM   #18
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Thank you for the effort
works quite well.
Is it possible to edit all selected items in a region at once? In this gif you have to edit each chord individually with the script.
Dragonetti is offline   Reply With Quote
Old 05-26-2020, 12:08 PM   #19
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

Try this and see if it works
ReaTrak set selected audio items pitch from region chord name v2.lua

This will do all selected items across all chords.
It still mutes any extra notes that are not in the chord but as mentioned you can disable that.
If your notes are offset to create a strum, set all the reaper.SetEditCurPos "+.2" to a greater value to select all items, so it over the latest item.
You can add reaper.PreventUIRefresh( prevent_count ) to make it quicker.

I'll make another v3 that will use 8 notes to allow for slash chords.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak

Last edited by MusoBob; 05-26-2020 at 12:21 PM.
MusoBob is offline   Reply With Quote
Old 05-27-2020, 04:19 AM   #20
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

super tool
@ MusoBob, thank you very much
I still have to improve the voicing.
Installing a voicing improvement directly in your script becomes too confusing.
I have to make a new script request.
Should I open a new thread or will I get in trouble?

Last edited by Dragonetti; 05-27-2020 at 04:51 AM.
Dragonetti is offline   Reply With Quote
Old 05-27-2020, 05:02 AM   #21
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

What does it need to do ?
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-27-2020, 06:02 AM   #22
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

There are still big jumps in voicing.

The new script must find the highest pitch value of the selected items, then transpose it down 1 octave and rearrange the chord so that the pitch stays from the bottom up.
If you do this a few times you get tight voicing.
edit:
reordering here does not mean moving audio items as can be seen in the GIF.
Reordering only means changing the pitch entries like this.

Last edited by Dragonetti; 05-27-2020 at 06:08 AM. Reason: GIF doesn't quite show it
Dragonetti is offline   Reply With Quote
Old 05-27-2020, 11:56 PM   #23
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

Can you just add
if new_pitch > 19 then new_pitch = new_pitch -12 end ?
or are they offset like a strum or do they all start at the same time ?
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-28-2020, 01:08 AM   #24
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

They start always at the same time, but
where do I have to enter that
"if new_pitch > 19 then new_pitch = new_pitch -12 end"
Dragonetti is offline   Reply With Quote
Old 05-28-2020, 02:30 AM   #25
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

Try this
set octave to maximum note

you can leave the old code there with

--[[

old code

--]]

Code:
  octave = 19  -- set to maximum octave note

  
  if note7 == 255 and item_table[7] then
    item7 = reaper.GetSelectedMediaItem(0,item_table[7])
    reaper.SetMediaItemInfo_Value(item7, "B_MUTE", 1)
    reaper.UpdateItemInProject(item7) 
  elseif item_table[7] then
    item7 = reaper.GetSelectedMediaItem(0,item_table[7])  
    take = reaper.GetActiveTake(item7)
    if note7+note1 > octave then note7 = note7 -12 end
    reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note7+note1)
    reaper.SetMediaItemInfo_Value(item7, "B_MUTE", 0)
    reaper.UpdateItemInProject(item7) 
  end
  
  if note6 == 255 and item_table[6] then
    item6 = reaper.GetSelectedMediaItem(0,item_table[6])
    reaper.SetMediaItemInfo_Value(item6, "B_MUTE", 1)
    reaper.UpdateItemInProject(item6) 
  elseif item_table[6] then  
    item6 = reaper.GetSelectedMediaItem(0,item_table[6])
    take = reaper.GetActiveTake(item6)
    if note6+note1 > octave then note6 = note6 -12 end
    reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note6+note1)
    reaper.SetMediaItemInfo_Value(item6, "B_MUTE", 0)
    reaper.UpdateItemInProject(item6) 
  end
  
  if note5 == 255 and item_table[5] then
    item5 = reaper.GetSelectedMediaItem(0,item_table[5])
    reaper.SetMediaItemInfo_Value(item5, "B_MUTE", 1)
    reaper.UpdateItemInProject(item5) 
  elseif item_table[6] then  
    item5 = reaper.GetSelectedMediaItem(0,item_table[5])
    take = reaper.GetActiveTake(item5)
    if note5+note1 > octave then note5 = note5 -12 end
    reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note5+note1)
    reaper.SetMediaItemInfo_Value(item5, "B_MUTE", 0)
    reaper.UpdateItemInProject(item5) 
  end
  
  if note4 == 255 and item_table[4] then
    item4 = reaper.GetSelectedMediaItem(0,item_table[4])
    reaper.SetMediaItemInfo_Value(item4, "B_MUTE", 1)
    reaper.UpdateItemInProject(item4) 
  elseif item_table[4] then  
    item4 = reaper.GetSelectedMediaItem(0,item_table[4])
    take = reaper.GetActiveTake(item4)
    if note4+note1 > octave then note4 = note4 -12 end
    reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note4+note1)
    reaper.SetMediaItemInfo_Value(item4, "B_MUTE", 0)
    reaper.UpdateItemInProject(item4) 
  end
    
  if note3 == 255 and item_table[3] then
    item3 = reaper.GetSelectedMediaItem(0,item_table[3])
    reaper.SetMediaItemInfo_Value(item3, "B_MUTE", 1) 
    reaper.UpdateItemInProject(item3)
  elseif item_table[3] then 
    item3 = reaper.GetSelectedMediaItem(0,item_table[3]) 
    take = reaper.GetActiveTake(item3)
    if note3+note1 > octave then note3 = note3 -12 end
    reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note3+note1)
    reaper.SetMediaItemInfo_Value(item3, "B_MUTE", 0)
    reaper.UpdateItemInProject(item3) 
  end
    
  if note2 == 255 and item_table[2] then
    item2 = reaper.GetSelectedMediaItem(0,item_table[2])
    reaper.SetMediaItemInfo_Value(item2, "B_MUTE", 1) 
    reaper.UpdateItemInProject(item3)
  elseif item_table[2] then  
    item2 = reaper.GetSelectedMediaItem(0,item_table[2])
    take = reaper.GetActiveTake(item2)
    if note2+note1 > octave then note2 = note2 -12 end
    reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note2+note1)
    reaper.SetMediaItemInfo_Value(item2, "B_MUTE", 0) 
    reaper.UpdateItemInProject(item2)
  end
  
  if note1 == 255 and item_table[1] then
    item1 = reaper.GetSelectedMediaItem(0,item_table[1])
    reaper.SetMediaItemInfo_Value(item1, "B_MUTE", 1)
    reaper.UpdateItemInProject(item1) 
  elseif item_table[1] then  
    item1 = reaper.GetSelectedMediaItem(0,item_table[1])
    take = reaper.GetActiveTake(item1) 
    reaper.SetMediaItemTakeInfo_Value(take, 'D_PITCH',note1)
    reaper.SetMediaItemInfo_Value(item1, "B_MUTE", 0)
    reaper.UpdateItemInProject(item1) 
  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 05-28-2020, 02:51 AM   #26
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

I have set the maximum to 14.
now the deepest tone must be down, etc

Dragonetti is offline   Reply With Quote
Old 05-28-2020, 03:21 AM   #27
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

No matter what track you play the sample on it will all sound the same.
Is there any reason they have to be in an order ?
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-28-2020, 04:44 AM   #28
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Unfortunately must be.
For example a string quartet or choir.
The division of parts is always bass tenor alto soprano or
Cello Viola Violin2 Violin1
Voice crossings shouldn't be.
The tracks will also get different sounds .
Dragonetti is offline   Reply With Quote
Old 05-28-2020, 08:59 AM   #29
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Hi MusoBob
Would that be makeable with your script?
the script is only applied to one track and creates a scale according to the region name.
Cmaj gives 0, 2, 4, 5, 7, 9, 11, 12
Am gives -3, -1 , 0, 2, 4, 5, 7, 9
I don't want to change the region names because of the overview.

Thanks for the attention


Dragonetti is offline   Reply With Quote
Old 05-28-2020, 04:40 PM   #30
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

I just get the chord root when I do one line.


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

If the items are distributed irregularly, the script will not work.
Can you improve that?

Maybe the script just has to consider the items on the different tracks and different regions
post#30:
I had asked if that would be possible.




Last edited by Dragonetti; 05-29-2020 at 06:11 AM.
Dragonetti is offline   Reply With Quote
Old 05-29-2020, 07:23 PM   #32
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

You might be better with a GUI to do all the different things.
Like create scale for selected items, selected track.
What chord note for selected items, selected track.
__________________
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-01-2020, 05:30 AM   #33
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

Try this and see if it works, I'm going to bed and will test it more in the morning.
ReaTrak set selected audio items pitch from region chord name v2b.lua

If it works I'll look at the one line scales.
__________________
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-01-2020, 08:50 AM   #34
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Unfortunately does not work.
Wouldn't it be better to foreget the cursor position and search for selected items within a region?
Dragonetti is offline   Reply With Quote
Old 06-01-2020, 02:30 PM   #35
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

What's not working ? it won't run at all ? the notes are wrong ?

With the cursor position it's counting one lot of items vertically at a time so the top item is 0 and bottom item 6.
This is what I get:

__________________
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-01-2020, 03:42 PM   #36
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

The voicing is super but
if there is a rhythmic variation in the chords, the script stops
Furthermore you have to make Undo for each chord, which is a bit cumbersome.
Thanks

Last edited by Dragonetti; 06-02-2020 at 02:18 AM.
Dragonetti is offline   Reply With Quote
Old 06-02-2020, 02:49 AM   #37
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

If you have a different amount of items of different lengths on different tracks you would be best to make another script that will count the tracks rather than items, so whatever items are on a particular track and within a particular region will be pitched accordingly.
__________________
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-02-2020, 03:11 AM   #38
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

Thanks
That is probably the solution
edit:
I found this in Reapack
Script: X-Raym_Select only tracks of selected items.lua
Unfortunately I can not integrate that.

Last edited by Dragonetti; 06-02-2020 at 03:58 AM.
Dragonetti is offline   Reply With Quote
Old 06-02-2020, 04:20 AM   #39
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,640
Default

It is already using
Code:
  commandID2 = reaper.NamedCommandLookup("_SWS_SELTRKWITEM")
  reaper.Main_OnCommand(commandID2, 0) -- SWS: Select only track(s) with selected item(s) _SWS_SELTRKWITEM
that's how you call on another script, if it's a native reaper one:
Code:
reaper.Main_OnCommand(40297, 0) --Track: Unselect all tracks 40297
if you right click in the Action window you will get the ID.
Or you can copy the code from another script and put it in a function.

Code:
function select_tracks()
  [scriptcode]
end
Code:
select_tracks() -- call on function
__________________
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-02-2020, 05:04 AM   #40
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 974
Default

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

Last edited by Dragonetti; 06-02-2020 at 07:36 AM.
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 04:22 AM.


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