|
|
|
04-19-2019, 04:26 PM
|
#1
|
Human being with feelings
Join Date: Dec 2015
Posts: 172
|
How to deal with TrackFX_SetPinMappings ??
Hi, guys!
Could you help me to understand how it works..
I have several ReaSamplomatic5000 on my track
I want my 1st RS5K's output mapped to 1/2, second - 3/4 (removed default mapping to 1/2), third - 5/6 and so on
Code:
for i = 0, reaper.TrackFX_GetCount( tr )-1 do
reaper.TrackFX_SetPinMappings( tr, i, 0, 0, 1, 0 ) --- what arguments do I pass here???
end
|
|
|
04-19-2019, 05:18 PM
|
#2
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Hi kartalex,
I made this for another purpose a while back, might be what you need ?
Lua attached.
|
|
|
04-19-2019, 05:37 PM
|
#3
|
Human being with feelings
Join Date: Dec 2015
Posts: 172
|
Quote:
Originally Posted by J Reverb
Hi kartalex,
I made this for another purpose a while back, might be what you need ?
Lua attached.
|
It works! Thank you! Cool!
|
|
|
04-19-2019, 06:51 PM
|
#4
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Quote:
Originally Posted by J Reverb
Hi kartalex,
I made this for another purpose a while back, might be what you need ?
Lua attached.
|
You also have to use 32bits high mask to make cascade working for channels higher than 32
Code:
function set_pins_fx_rack_1_2_cascade_in_out()
for i = 0, reaper.CountSelectedTracks(0) - 1 do
trk = reaper.GetSelectedTrack(0,i)
count_fx = reaper.TrackFX_GetCount(trk)
if count_fx ~= nil then end
local retval,csv = reaper.GetUserInputs
("Cascade pins for fx from 1+2 or 3+4",1,"0 = from 1+2...1 = from 3+4...","0")
local pins = csv:match("([^,]+)")
pins = tonumber(pins)
if tonumber(pins) == 0 then
pinl=1
pinr=2
end
if tonumber(pins) ==1 then
pinl=4
pinr=8
end
rs5k_cnt = 0
for i = 1, count_fx do
retval,namefx = reaper.TrackFX_GetFXName(trk, i-1, '')
if namefx:lower():match('reasamplomatic') or namefx:lower():match('rs5k') then rs5k_cnt = rs5k_cnt + 1 end
end
reaper.SetMediaTrackInfo_Value( trk, 'I_NCHAN', math.max(math.min(2,rs5k_cnt*2), 64))
fx_cnt = 1
for i = 1, count_fx do
retval,namefx = reaper.TrackFX_GetFXName(trk, i-1, '')
if namefx:lower():match('reasamplomatic') or namefx:lower():match('rs5k') and fx_cnt <= 32 then
reaper.TrackFX_SetPinMappings(trk, i-1, 1, 0, pinl&0xFFFFFFFF,(pinl>>32)&0xFFFFFFFF) --pin l out
reaper.TrackFX_SetPinMappings(trk, i-1, 1, 1, pinr&0xFFFFFFFF,(pinr>>32)&0xFFFFFFFF) --pin r out
pinl=(pinl*4)
pinr=(pinr*4)
fx_cnt=fx_cnt+1
if fx_cnt > 32 then break end
end
end
end
end
set_pins_fx_rack_1_2_cascade_in_out()
|
|
|
04-19-2019, 07:24 PM
|
#5
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,071
|
Thanks for the heads up
pinl&0xFFFFFFFF,(pinl>>32)&0xFFFFFFFF) Interesting
Presumably the match name excludes anything other than rs5k instances ?
|
|
|
04-19-2019, 08:53 PM
|
#6
|
Human being with feelings
Join Date: Dec 2015
Posts: 172
|
Quote:
Originally Posted by mpl
You also have to use 32bits high mask to make cascade working for channels higher than 32
|
Thanks, Michael!
Quote:
Originally Posted by J Reverb
Interesting
|
Indeed, Lua is beautiful
|
|
|
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 07:40 PM.
|