|
|
|
01-23-2020, 09:10 AM
|
#1
|
Human being with feelings
Join Date: Apr 2018
Posts: 211
|
Create Send 1 from selected track, if Send 1 exist, then just create a send to it
Hi guys, ok, I have that script below that works and create a send from the selected track to SEND 1 if you will. Now, what i<m looking for, is that before the popup question, if SEND 1 is already there and does already exist, then just create a Send to the SEND 1.
I hope I'm clear.
tks
Seby
Code:
function Msg(param)
reaper.ShowConsoleMsg(tostring(param).. "\n")
end
local defsendvol = ({reaper.BR_Win32_GetPrivateProfileString( 'REAPER', 'defsendvol', '0', reaper.get_ini_file() )})[2]
local defsendflag = ({reaper.BR_Win32_GetPrivateProfileString( 'REAPER', 'defsendflag', '0', reaper.get_ini_file() )})[2]
function newSend()
local retval, pref = reaper.GetUserInputs( 'Creat New Aux',1, "Enter the name of the Aux 1:", "")
if retval then
for i = 1, reaper.CountSelectedTracks(0) do
local tr = reaper.GetSelectedTrack(0,i-1)
if tr then
track_col = reaper.GetTrackColor( tr )
_, src_name = reaper.GetSetMediaTrackInfo_String( tr, 'P_NAME', '',false )
reaper.InsertTrackAtIndex( reaper.GetNumTracks(0), true )
new_dest_tr = reaper.CSurf_TrackFromID( reaper.GetNumTracks(0), false )
new_send_id = reaper.CreateTrackSend( tr, new_dest_tr)
if new_send_id >= 0 then
new_name = 'Aux '..pref..' '
if new_dest_tr then
reaper.GetSetMediaTrackInfo_String( new_dest_tr, 'P_NAME', new_name ,true)
reaper.SetTrackSendInfo_Value( tr, 0, new_send_id, 'D_VOL', defsendvol)
reaper.SetTrackSendInfo_Value( tr, 0, new_send_id, 'I_SENDMODE', defsendflag)
end
end
end
end
reaper.TrackList_AdjustWindows( false )
end
end
|
|
|
01-23-2020, 01:34 PM
|
#2
|
Human being with feelings
Join Date: Apr 2018
Posts: 211
|
Hire someone for scripting
Hi, I'm looking for someone I could hire to create a script for reaper for me.
Is there anyone interested please?
tks
Seby
|
|
|
01-23-2020, 02:51 PM
|
#4
|
Human being with feelings
Join Date: Apr 2018
Posts: 211
|
Quote:
Originally Posted by vsthem
|
hi, tks, but I wanted to add the same thing it does but to my actual script.
But you are right, this is exactly what I needed.
tks
Seby
|
|
|
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 10:06 AM.
|