Code:
function Msg(value)
reaper.ShowConsoleMsg(tostring(value).."\n")
end
sel_track = reaper.GetSelectedTrack2( 0, 0, false )
if sel_track then
track_rec = reaper.GetMediaTrackInfo_Value(sel_track, "I_RECINPUT")
if track_rec then
Msg("I_RECINPUT= "..track_rec)
end
end
--[[
I_RECINPUT : int * : record input, <0=no input.
if 4096 set, input is MIDI and low 5 bits represent channel (0=all, 1-16=only chan),
next 6 bits represent physical input (63=all, 62=VKB).
If 4096 is not set,
low 10 bits (0..1023) are input start channel (ReaRoute/Loopback start at 512).
If 2048 is set, input is multichannel input (using track channel count),
or if 1024 is set, input is stereo input, otherwise input is mono.
--]]