RPR CountTracks
From CockosWiki
(→Stuff) |
(→Examples) |
||
Line 10: | Line 10: | ||
==Examples== | ==Examples== | ||
===C++=== | ===C++=== | ||
- | < | + | <source lang=cpp> |
- | </ | + | </source> |
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=perl> |
# | # | ||
# CountTracks.pl | # CountTracks.pl | ||
Line 24: | Line 24: | ||
RPR_ShowConsoleMsg("There are $num_tracks tracks in the current project"); | RPR_ShowConsoleMsg("There are $num_tracks tracks in the current project"); | ||
- | </ | + | </source> |
===Python=== | ===Python=== | ||
- | < | + | <source lang=python> |
# | # | ||
# CountTracks.py | # CountTracks.py | ||
Line 35: | Line 35: | ||
RPR_ShowConsoleMsg("There are "+str(num_tracks)+" tracks in the current project"); | RPR_ShowConsoleMsg("There are "+str(num_tracks)+" tracks in the current project"); | ||
- | </ | + | </source> |
==See Also== | ==See Also== |
Revision as of 11:42, 28 January 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR CountTracks
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR CountTracks
Contents |
RPR_CountTracks()
int RPR_CountTracks(ReaProject* proj)
Counts the number of tracks in the specified project.
Parameters
proj, the specified project, 0 for the current project
Returns
integer, the number of tracks in the specified project.
Examples
C++
Perl
# # CountTracks.pl # use strict; use warnings; my $num_tracks = RPR_CountTracks(0); RPR_ShowConsoleMsg("There are $num_tracks tracks in the current project");
Python
# # CountTracks.py # num_tracks = RPR_CountTracks(0); RPR_ShowConsoleMsg("There are "+str(num_tracks)+" tracks in the current project");
See Also
track: GetLastTouchedTrack, GetMediaItemTake_Track, GetMediaItem_Track, GetMediaTrackInfo_Value, GetNumTracks, GetSelectedTrack, GetSelectedTrackEnvelope, GetSetMediaTrackInfo_String, GetSetTrackState, GetTrack, GetTrackAutomationMode, GetTrackEnvelope, GetTrackEnvelopeByName, GetTrackGUID, GetTrackMIDINoteName, GetTrackMIDINoteNameEx, GetTrackMediaItem, GetTrackNumMediaItems, GetTrackState, GetTrackUIVolPan, HasTrackMIDIPrograms, HasTrackMIDIProgramsEx, InsertTrackAtIndex, MoveMediaItemToTrack, MuteAllTracks, PlayTrackPreview, PlayTrackPreview2, SetMediaTrackInfo_Value, SetTrackAutomationMode, SetTrackMIDINoteName, SetTrackMIDINoteNameEx, SetTrackSelected, SoloAllTracks, StopTrackPreview, StopTrackPreview2, TrackFX_FormatParamValue, TrackFX_GetCount, TrackFX_GetFXName, TrackFX_GetNumParams, TrackFX_GetParam, TrackFX_GetParamName, TrackFX_SetParam, TrackList_AdjustWindows, TrackList_UpdateAllExternalSurfaces, Track_GetPeakInfo, AddMediaItemToTrack, BypassFxAllTracks, CSurf_NumTracks, CSurf_OnTrackSelection, CSurf_SetTrackListChange, CSurf_TrackFromID, CSurf_TrackToID, CountSelectedTracks, CountTrackEnvelopes, CountTrackMediaItems, CountTracks, DeleteTrack, DeleteTrackMediaItem, EnumTrackMIDIProgramNames, EnumTrackMIDIProgramNamesEx,
(Section automatically generated, edits may be overwritten.)
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR CountTracks
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR CountTracks