RPR CountTracks

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(See Also)
(Python)
Line 28: Line 28:
===Python===
===Python===
<pre>
<pre>
 +
#
 +
# CountTracks.py
 +
#
 +
 +
num_tracks = RPR_CountTracks(0);
 +
 +
RPR_ShowConsoleMsg("There are "+str(num_tracks)+" tracks in the current project");
</pre>
</pre>

Revision as of 15:45, 13 December 2009

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

Personal tools