PG Music Home
Posted By: musocity Style Picker Send To New Project Tab - 12/12/23 11:30 AM
If you are previewing your chords with Styles in the Style Picker you should be able to send each ready made Style you like to a new Tab.
New project tab (40859)
Main_OnCommand(40859, 0)
SetCurrentBPM(ReaProject* __proj, double bpm, bool wantUndo)
SetTempoTimeSigMarker(ReaProject* proj, int ptidx, double timepos, int measurepos, double beatpos, double bpm, int timesig_num, int timesig_denom, bool lineartempo)
Send the chords also as midi markers in a midi file or write direct to markers or regions.
You probably can't send it direct from the Style Picker so maybe you could have a drop after Send to choose the Tab to send it to or just "Send to new Tab".
Posted By: musocity Re: Style Picker Send To New Project Tab - 12/12/23 07:39 PM
[Linked Image]

Attached File
BBVST6-Tabbed-Projects.gif  (238 downloads)
Posted By: musocity Re: Style Picker Send To New Project Tab - 01/15/24 01:21 AM
I made this script:
Move-selected-tracks-to-new-tab.zip
As tracks are generated directly from the Style Picker you can move them to a new Tab by selecting all the tracks below the BBPlugin track then run the script.
Look at the Style tempo and set that tempo for the new Tab.
The script will add the 2 bar count-in.

Watch Video: VST6-Styles-To-Tabs-2.mp4

Code
reaper.Main_OnCommand(40047,0) -- Peaks: Build any missing peaks

retval, retvals_csv = reaper.GetUserInputs("Set tempo for new Tab", 2, "Tempo,TimeSig 4 or 3", "120,4")

bpm, TimeSig  = retvals_csv:match("([^,]+),([^,]+)")

if retval then
  reaper.Main_OnCommand(40289,0) -- Item: Unselect (clear selection of) all items
  
  reaper.Main_OnCommand(40337,0) -- Track: Cut tracks
  
  reaper.Main_OnCommand(40859,0) -- New project tab
  
  reaper.Main_OnCommand( 40042, 0 ) -- Transport: Go to start of project
  
  reaper.SetCurrentBPM( 0, bpm, 0 ) -- 0 no undo points 1 undo points
  
  
  if TimeSig == "4" then
    length = 4
    denom = 4
  end
  if TimeSig == "3" then
    length = 3
    denom = 4
  end
  
  reaper.AddTempoTimeSigMarker(0, 0, bpm, length, denom, 0)
    
   if reaper.APIExists("SNM_SetIntConfigVar") then
    reaper.SNM_SetIntConfigVar( "projmeasoffs", -2) -- offset measures www.sws-extension.org
    reaper.SNM_SetIntConfigVar("projmeaslen", length) -- sets the length
    reaper.SNM_SetIntConfigVar("projtsdenom", denom) -- sets the denominator
  else
    print("Install SWS Extensions to set Biab 2 bar count-in offset and time signature www.sws-extension.org")
  end
  
  reaper.Main_OnCommand(42398,0) -- Item: Paste items/tracks
  
  

end
Posted By: musocity Re: Style Picker Send To New Project Tab - 01/15/24 02:59 AM
Move-selected-tracks-to-new-tab.zip
Updated to set time signature if you choose a 3/4 you can set to 3, default is 4/4 set to 4:

[Linked Image]
© PG Music Forums