View Single Post
Old 07-03-2018, 03:17 AM   #1668
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,783
Default

Quote:
Originally Posted by reapero View Post
Hi guys,

Is it possible to make a simple script that adds a new stereo hardware output to the selected track? I guess the name could be editable by the user in the script
Code:
function createHardwareOut(output)
  for ti = 0, reaper.CountSelectedTracks()-1 do
    local track = reaper.GetSelectedTrack(0, ti)
    local send = reaper.CreateTrackSend(track, nil)
    reaper.SetTrackSendInfo_Value(track, 1, send, 'I_DSTCHAN', output)
  end
end

createHardwareOut(0) -- 0 = default output channel
cfillion is offline   Reply With Quote