a little bit of pseudo code...
I am a newbie to the reaper API, would anyone knowledable mind helping me check if I am on the right path getting to extracting midi info from a track with this little bit of pseudo code:
n = GetNumTracks()
for( i = 0; i < n; i++ )
mediaTrack = CSurf_TrackFromID( i + 1, false )
m = GetTrackNumMediaItems( mediaTrack )
for ( j = 0; j < m; j++ )
mediaItem = GetTrackMediaItem( mediaTrack, j );
str = ""
len = 0
GetSetItemState( mediaItem, str, len )
At this point str holds an "rpp chunk", correct? Is there a way to determine if mediaItem is a audio or midi item before calling GetSetItemState()?
There is no possibility of loading more than 1 project at the time in Reaper is there? There functions mentioned in the online doc which require a project pointer of sorts (such as MediaTrack* GetTrack(ReaProject* proj, int trackidx) Is "proj" a real thing or just always set to zero?
By the way, I cannot seem to find GetTrack() in the include files, whats up with that?
|