RPR TrackFX GetFXName
From CockosWiki
(→Examples format) |
(→Python) |
||
(One intermediate revision not shown) | |||
Line 17: | Line 17: | ||
==Examples== | ==Examples== | ||
===C++=== | ===C++=== | ||
- | < | + | <source lang=cpp> |
- | </ | + | </source> |
+ | |||
+ | |||
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=perl> |
# | # | ||
# Test - Track FX Get Name.pl | # Test - Track FX Get Name.pl | ||
Line 72: | Line 74: | ||
$Selected_Index++; | $Selected_Index++; | ||
} | } | ||
- | </ | + | </source> |
+ | |||
===Python=== | ===Python=== | ||
- | < | + | <source lang=python> |
# | # | ||
# TrackFX_GetFXName.py | # TrackFX_GetFXName.py | ||
Line 82: | Line 85: | ||
numTracks = RPR_CountSelectedTracks(0) | numTracks = RPR_CountSelectedTracks(0) | ||
for TrIndex in range(0,numTracks-1): | for TrIndex in range(0,numTracks-1): | ||
- | + | tr = RPR_GetSelectedTrack(0,TrIndex) | |
- | + | rc=RPR_TrackFX_GetFXName(tr, 0, "", 64) | |
- | + | plugname=rc[3] | |
- | + | #RPR_ShowConsoleMsg(plugname+'\n') | |
- | + | if "JS: IX/Mixer_8xM-1xS" in plugname: | |
- | + | # set volumes in ix mixer to rising values | |
- | + | for x in range(0,8): | |
- | + | basevolume=-48+48.0/(numTracks-1)*TrIndex | |
- | + | paramval=basevolume+24.0/7*x | |
- | + | RPR_TrackFX_SetParam(tr, 0, x, paramval); | |
- | + | # set pans to decreasing values | |
- | + | for x in range(0,8): | |
- | + | panval=1.0-1.0/7*x | |
- | + | RPR_TrackFX_SetParam(tr, 0, x+8, panval); | |
- | </ | + | |
+ | |||
+ | </source> | ||
==See Also== | ==See Also== |
Latest revision as of 11:14, 29 January 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR TrackFX GetFXName
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR TrackFX GetFXName
Contents |
TrackFX_GetFXName()
bool TrackFX_GetFXName(MediaTrack* tr, int fx, char* buf, int buflen)
Parameters
MediaTrack* tr, int fx, char* buf, int buflen
Returns
An array, containing bool MediaTrack* tr, int fx, char* buf, int buflen
Examples
C++
Perl
# # Test - Track FX Get Name.pl # use strict; use warnings; use constant CURR_PROJ => 0; # Get number of selected tracks my $Track_Count = RPR_CountSelectedTracks(CURR_PROJ); # Exit if no tracks selected exit if ($Track_Count == 0); my $Track_ID; my $Track_Index; my $Track_FX_Count; my $FX_Index; my $FX_Name; # Show number of FXs for each selected track my $Selected_Index = 0; while ($Selected_Index < $Track_Count) { # Get selected track pointer $Track_ID = RPR_GetSelectedTrack(CURR_PROJ, $Selected_Index); # Get selected track index $Track_Index = RPR_GetMediaTrackInfo_Value($Track_ID, "IP_TRACKNUMBER"); # Get selected track index $Track_FX_Count = RPR_TrackFX_GetCount($Track_ID); # Show summary for current track RPR_ShowConsoleMsg("Track: $Track_Index\nFX Count: $Track_FX_Count\n"); # Get name of each effect on track $FX_Index = 0; while ($FX_Index < $Track_FX_Count) { # Get FX name for current FX index (undef, undef, undef, $FX_Name, undef) = RPR_TrackFX_GetFXName($Track_ID, $FX_Index, "", 1024); # Show summary RPR_ShowConsoleMsg("FX index: $FX_Index\nFX name: $FX_Name\n"); $FX_Index++; } $Selected_Index++; }
Python
# # TrackFX_GetFXName.py # numTracks = RPR_CountSelectedTracks(0) for TrIndex in range(0,numTracks-1): tr = RPR_GetSelectedTrack(0,TrIndex) rc=RPR_TrackFX_GetFXName(tr, 0, "", 64) plugname=rc[3] #RPR_ShowConsoleMsg(plugname+'\n') if "JS: IX/Mixer_8xM-1xS" in plugname: # set volumes in ix mixer to rising values for x in range(0,8): basevolume=-48+48.0/(numTracks-1)*TrIndex paramval=basevolume+24.0/7*x RPR_TrackFX_SetParam(tr, 0, x, paramval); # set pans to decreasing values for x in range(0,8): panval=1.0-1.0/7*x RPR_TrackFX_SetParam(tr, 0, x+8, panval);
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,
fx: PluginWantsAlwaysRunFx, TrackFX_FormatParamValue, TrackFX_GetCount, TrackFX_GetFXName, TrackFX_GetNumParams, TrackFX_GetParam, TrackFX_GetParamName, TrackFX_SetParam, BypassFxAllTracks, CSurf_OnFXChange,
(Section automatically generated, edits may be overwritten.)
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR TrackFX GetFXName
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR TrackFX GetFXName