so I have:
Code:
for i = 0, totalTracks-1 do
track = reaper.GetSelectedTrack(0,i)
reaper.SetMediaTrackInfo_Value(track, "I_RECMODE", 3)
--etc...
and I get an error when trying to run the script saying "bad argument #1 to 'SetMediaTrackInfo_Value' (MediaTrack expected)".
So what I'm seeing here is that the variable 'track' isn't a MediaTrack, but I've no clue why that would be.