Old 10-22-2014, 08:14 PM   #1
cheyrn
Human being with feelings
 
Join Date: Oct 2014
Posts: 67
Default MediaTrack* and eel

GetSelectedTrack returns a MediaTrack pointer.

How do I parse it in eel?

I would like to know, first of all. Aside from that I am trying to save the track index of the selected track (only 1 is selected). I think I can do that by looping through the tracks until I find one that is selected. But, it would be nice to get it from the track info instead. And, I imagine there might be other information about the track that I might want from that data structure at some point.
cheyrn is offline   Reply With Quote
Old 10-22-2014, 08:20 PM   #2
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

You may want to look at:
Code:
CountTracks(ReaProject* proj)
CountSelectedTracks(ReaProject* proj)
MediaTrack* GetSelectedTrack(ReaProject* proj, int seltrackidx)
double GetMediaTrackInfo_Value(MediaTrack* tr, "parmname")
What are you trying to do? Get first selected track number?
Code:
first_sel_track = GetMediaTrackInfo_Value(GetSelectedTrack(0, 0), "IP_TRACKNUMBER");
Or get all selected track numbers in an array?
Code:
tracks = CountSelectedTracks(0);
i=0;
loop(tracks,
    TrackList[i] = GetMediaTrackInfo_Value(GetSelectedTrack(0, i), "IP_TRACKNUMBER");
    i+=1;
);
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 10-22-2014 at 08:31 PM.
Argitoth is offline   Reply With Quote
Old 10-22-2014, 08:54 PM   #3
cheyrn
Human being with feelings
 
Join Date: Oct 2014
Posts: 67
Default

I was trying to get the first selected track number. So, GetMediaTrackInfo_Value was what I was looking for. Thanks.
cheyrn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.