RPR GetSelectedTrackEnvelope

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(See Also)
(Examples)
 
(7 intermediate revisions not shown)
Line 1: Line 1:
{{API_Doc_Header}}
{{API_Doc_Header}}
=GetSelectedTrackEnvelope()=
=GetSelectedTrackEnvelope()=
-
void* GetSelectedTrackEnvelope(ReaProject* proj)
+
'''void* GetSelectedTrackEnvelope(ReaProject* proj)'''
-
Get the currently selected track envelope as an opaque pointer (can be passed to GetSetObjectState), returns 0 if no envelope is selected
+
Get the currently selected track envelope as an opaque pointer, returns 0 if no envelope is selected
==Parameters==
==Parameters==
-
  ReaProject* pro
+
  ReaProject* proj
 +
 
==Returns==
==Returns==
  void* a pointer to the currently selected track envelope
  void* a pointer to the currently selected track envelope
==Examples==
==Examples==
 +
===C++===
 +
<source lang=cpp>
 +
</source>
===Perl===
===Perl===
-
<pre>
+
<source lang=perl>
-
#
+
</source>
-
# Adds an envelope point at time=1 second, value=1.0:
+
-
#
+
-
use strict;
+
-
use warnings;
+
-
 
+
-
use constant CURR_PROJ => 0;
+
-
 
+
-
my ($env, $chunk);
+
-
 
+
-
$env = RPR_GetSelectedTrackEnvelope(CURR_PROJ);
+
-
($chunk) = RPR_GetSetObjectState($env, "");
+
-
RPR_ShowConsoleMsg("input rppxml:\n" . $chunk . "\n");
+
-
 
+
-
$chunk =~ s/>/PT 1.0 1.0 0 0 1\n>/;
+
-
RPR_ShowConsoleMsg("output rppxml:\n" . $chunk . "\n");
+
-
 
+
-
RPR_GetSetObjectState($env, $chunk);
+
-
</pre>
+
-
 
+
===Python===
===Python===
-
<pre>
+
<source lang=python>
env = RPR_GetSelectedTrackEnvelope(0)
env = RPR_GetSelectedTrackEnvelope(0)
chunk = RPR_GetSetObjectState(env, 0)[0]
chunk = RPR_GetSetObjectState(env, 0)[0]
Line 42: Line 27:
RPR_GetSetObjectState(env, chunk)
RPR_GetSetObjectState(env, chunk)
-
</pre>
+
</source>
==See Also==
==See Also==
-
[[RPR_GetSetObjectState|GetSetObjectState]],
+
{{SeeAlso_item}}
-
[[RPR_ShowConsoleMsg|ShowConsoleMsg]]
+
 
 +
{{SeeAlso_envelope}}
-
{{SeeAlsoTrackFunctions}}
+
''(Section automatically generated, edits may be overwritten.)''
==Stuff==
==Stuff==

Latest revision as of 09:32, 29 January 2010

Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetSelectedTrackEnvelope
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetSelectedTrackEnvelope

Contents

GetSelectedTrackEnvelope()

void* GetSelectedTrackEnvelope(ReaProject* proj)

Get the currently selected track envelope as an opaque pointer, returns 0 if no envelope is selected

Parameters

ReaProject* proj

Returns

void* a pointer to the currently selected track envelope

Examples

C++

 

Perl

 

Python

env = RPR_GetSelectedTrackEnvelope(0)
chunk = RPR_GetSetObjectState(env, 0)[0]
RPR_ShowConsoleMsg("input rppxml:\n"+chunk+"\n")
 
chunk = re.sub(">", "PT 1.0 1.0 0 0 1\n>", chunk)
RPR_ShowConsoleMsg("output rppxml:\n"+chunk+"\n")
 
RPR_GetSetObjectState(env, chunk)

See Also

item: AddMediaItemToTrack, AddTakeToMediaItem, GetTrackMediaItem, GetTrackNumMediaItems, CountMediaItems, CountSelectedMediaItems, GetItemProjectContext, SetMediaItemInfo_Value, CountTrackMediaItems, SetMediaItemTakeInfo_Value, GetMediaItem, GetMediaItem_Track, GetMediaItemInfo_Value, GetMediaItemNumTakes, GetMediaItemTake, GetMediaItemTake_Item, GetMediaItemTake_Source, GetMediaItemTake_Track, GetMediaItemTakeInfo_Value, SplitMediaItem, MoveMediaItemToTrack, GetSelectedMediaItem, DeleteTrackMediaItem, GetSetItemState, GetSetMediaItemTakeInfo_String, Undo_OnStateChange_Item, UpdateItemInProject,

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 GetSelectedTrackEnvelope
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetSelectedTrackEnvelope

Personal tools