RPR GetTrackEnvelopeByName
From CockosWiki
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetTrackEnvelopeByName
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetTrackEnvelopeByName
Contents |
GetTrackEnvelopeByName()
TrackEnvelope* GetTrackEnvelopeByName(MediaTrack* track, const char* envname)
This function returns an opaque pointer to a track envelope. To use this pointer it must be passed to a function such as GetSetEnvelopeState() which allows you to Get or Set the contents of an envelope.
Envelope names can be found in a project's .rpp file.
Parameters
MediaTrack* track, - a pointer to a track const char* envname - the name of the envelope required
Returns
TrackEnvelope* - an opaque pointer to a track envelope
Examples
C++
Perl
Python
""" The pointer returned by RPR_GetTrackEnvelopeByName() can't be accessed directly. Instead, you need to call RPR_GetSetEnvelopeState(), which returns a text representation similar to the RPP file. Changes to the envelope data are made by calling RPR_GetSetEnvelopeState() with the changed envelope data. (Courtesy Xenakios) """ # define msg alias (custom) def msg(m): RPR_ShowConsoleMsg(m+'\n') envstr = "" maxlen = 256 trkptr = RPR_GetSelectedTrack( 0, 0 ) envptr = RPR_GetTrackEnvelopeByName( trkptr, 'Volume' ) # valid = RPR_ValidatePtr( envptr, 'TrackEnvelope*') # msg( str(valid) ) envstate = RPR_GetSetEnvelopeState( envptr, envstr, maxlen) msg( str(envstate)) """ envstate will look something like this: (1, '(TrackEnvelope*)0x13F229AC', '<VOLENV2\n ACT 1\n VIS 1 1 1.000000\n LANEHEIGHT 236 0\n ARM 1\n DEFSHAPE 0\n PT 0.000000 1.000000 0\n PT 2.000000 1.649123 0\n PT 2.970000 1.570175 5\n PT 3.490000 1.640351 0\n PT 4.000000 1.578947 0\n PT 4.670000 1.342105 0\n PT 5.250000 1.000000 0 0 1\n>\n', 256) """
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,
envelope: GetEnvelopeName, GetSelectedTrackEnvelope, GetSetEnvelopeState, GetTakeEnvelopeByName, GetTrackEnvelope, GetTrackEnvelopeByName, CountTrackEnvelopes,
(Section automatically generated, edits may be overwritten.)
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetTrackEnvelopeByName
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetTrackEnvelopeByName