RPR CountTracks
From CockosWiki
(→) |
Klankschap (Talk | contribs) m (→Python) |
||
(9 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
{{API_Doc_Header}} | {{API_Doc_Header}} | ||
- | =int RPR_CountTracks(ReaProject* proj) | + | =RPR_CountTracks()= |
+ | '''int RPR_CountTracks(ReaProject* proj)''' | ||
+ | |||
Counts the number of tracks in the specified project. | Counts the number of tracks in the specified project. | ||
==Parameters== | ==Parameters== | ||
Line 7: | Line 9: | ||
integer, the number of tracks in the specified project. | integer, the number of tracks in the specified project. | ||
==Examples== | ==Examples== | ||
+ | ===C++=== | ||
+ | <source lang=cpp> | ||
+ | </source> | ||
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=perl> |
# | # | ||
# CountTracks.pl | # CountTracks.pl | ||
Line 19: | 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 | ||
+ | # | ||
+ | |||
+ | num_tracks = RPR_CountTracks( 0 ) | ||
+ | |||
+ | RPR_ShowConsoleMsg( "There are " + str(num_tracks) + " tracks in the current project" ) | ||
+ | </source> | ||
+ | |||
==See Also== | ==See Also== | ||
- | + | {{SeeAlso_track}} | |
+ | |||
+ | ''(Section automatically generated, edits may be overwritten.)'' | ||
==Stuff== | ==Stuff== | ||
Line 33: | Line 48: | ||
[[Category:Perl]] | [[Category:Perl]] | ||
[[Category:Python]] | [[Category:Python]] | ||
+ | [[Category:ReaPerl]] | ||
+ | [[Category:ReaPython]] |
Latest revision as of 20:48, 9 December 2011
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