RPR TrackFX GetParam
From CockosWiki
(→See Also) |
(→Examples) |
||
(6 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
{{API_Doc_Header}} | {{API_Doc_Header}} | ||
- | = = | + | =TrackFX_GetParam()= |
+ | '''double TrackFX_GetParam(MediaTrack* tr, int fx, int param, double* minval, double* maxval)''' | ||
+ | |||
==Parameters== | ==Parameters== | ||
+ | MediaTrack* tr, | ||
+ | int fx, | ||
+ | int param, | ||
+ | double* minval, | ||
+ | double* maxval | ||
==Returns== | ==Returns== | ||
+ | An array, containing | ||
+ | double | ||
+ | MediaTrack* tr, | ||
+ | int fx, | ||
+ | int param, | ||
+ | double* minval, | ||
+ | double* maxval | ||
==Examples== | ==Examples== | ||
+ | ===C++=== | ||
+ | <source lang=cpp> | ||
+ | </source> | ||
+ | |||
+ | |||
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=perl> |
- | </ | + | # Test - Track FX Get Param.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 $FX_Count; | ||
+ | my $FX_Index; | ||
+ | my $FX_Name; | ||
+ | |||
+ | my $FX_Param_Count; | ||
+ | my $FX_Param_Index; | ||
+ | my $FX_Param_Name; | ||
+ | my $FX_Param_Value; | ||
+ | |||
+ | my $FX_MinVal; | ||
+ | my $FX_MaxVal; | ||
+ | |||
+ | 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 | ||
+ | $FX_Count = RPR_TrackFX_GetCount($Track_ID); | ||
+ | |||
+ | # Show summary for current track | ||
+ | RPR_ShowConsoleMsg("Track: $Track_Index\nFX Count: $FX_Count\n"); | ||
+ | |||
+ | # Get name of each effect on track | ||
+ | $FX_Index = 0; | ||
+ | while ($FX_Index < $FX_Count) { | ||
+ | # Get FX name for current FX index | ||
+ | (undef, undef, undef, $FX_Name, undef) = RPR_TrackFX_GetFXName($Track_ID, $FX_Index, "", 1024); | ||
+ | |||
+ | # Get number of FX parameters | ||
+ | $FX_Param_Count = RPR_TrackFX_GetNumParams($Track_ID, $FX_Index); | ||
+ | |||
+ | # Show index and name | ||
+ | RPR_ShowConsoleMsg("\nEffect " . ($FX_Index + 1) . ": $FX_Name\n\n"); | ||
+ | |||
+ | # Get name of each parameter | ||
+ | $FX_Param_Index = 0; | ||
+ | while ($FX_Param_Index < $FX_Param_Count) { | ||
+ | # Get current parameter name | ||
+ | (undef, undef, undef, undef, $FX_Param_Name, undef) = RPR_TrackFX_GetParamName($Track_ID, $FX_Index, $FX_Param_Index, "", 1024); | ||
+ | |||
+ | # Get current parameter value, min. & max. | ||
+ | ($FX_Param_Value, undef, undef, undef, $FX_MinVal, $FX_MaxVal) = RPR_TrackFX_GetParam($Track_ID, $FX_Index, $FX_Param_Index, undef, undef); | ||
+ | |||
+ | # Show summary | ||
+ | RPR_ShowConsoleMsg("\t" . ($FX_Param_Index + 1) . ": $FX_Param_Name\n\tMin: $FX_MinVal\n\tMax: $FX_MaxVal\n\tValue: $FX_Param_Value\n\n"); | ||
+ | |||
+ | $FX_Param_Index++; | ||
+ | } | ||
+ | $FX_Index++; | ||
+ | } | ||
+ | $Selected_Index++; | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | |||
===Python=== | ===Python=== | ||
- | < | + | <source lang=python> |
- | </ | + | </source> |
+ | |||
==See Also== | ==See Also== | ||
- | {{ | + | {{SeeAlso_track}} |
+ | |||
+ | {{SeeAlso_fx}} | ||
- | + | ''(Section automatically generated, edits may be overwritten.)'' | |
==Stuff== | ==Stuff== |
Latest revision as of 11:16, 29 January 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR TrackFX GetParam
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR TrackFX GetParam
Contents |
TrackFX_GetParam()
double TrackFX_GetParam(MediaTrack* tr, int fx, int param, double* minval, double* maxval)
Parameters
MediaTrack* tr, int fx, int param, double* minval, double* maxval
Returns
An array, containing double MediaTrack* tr, int fx, int param, double* minval, double* maxval
Examples
C++
Perl
# Test - Track FX Get Param.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 $FX_Count; my $FX_Index; my $FX_Name; my $FX_Param_Count; my $FX_Param_Index; my $FX_Param_Name; my $FX_Param_Value; my $FX_MinVal; my $FX_MaxVal; 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 $FX_Count = RPR_TrackFX_GetCount($Track_ID); # Show summary for current track RPR_ShowConsoleMsg("Track: $Track_Index\nFX Count: $FX_Count\n"); # Get name of each effect on track $FX_Index = 0; while ($FX_Index < $FX_Count) { # Get FX name for current FX index (undef, undef, undef, $FX_Name, undef) = RPR_TrackFX_GetFXName($Track_ID, $FX_Index, "", 1024); # Get number of FX parameters $FX_Param_Count = RPR_TrackFX_GetNumParams($Track_ID, $FX_Index); # Show index and name RPR_ShowConsoleMsg("\nEffect " . ($FX_Index + 1) . ": $FX_Name\n\n"); # Get name of each parameter $FX_Param_Index = 0; while ($FX_Param_Index < $FX_Param_Count) { # Get current parameter name (undef, undef, undef, undef, $FX_Param_Name, undef) = RPR_TrackFX_GetParamName($Track_ID, $FX_Index, $FX_Param_Index, "", 1024); # Get current parameter value, min. & max. ($FX_Param_Value, undef, undef, undef, $FX_MinVal, $FX_MaxVal) = RPR_TrackFX_GetParam($Track_ID, $FX_Index, $FX_Param_Index, undef, undef); # Show summary RPR_ShowConsoleMsg("\t" . ($FX_Param_Index + 1) . ": $FX_Param_Name\n\tMin: $FX_MinVal\n\tMax: $FX_MaxVal\n\tValue: $FX_Param_Value\n\n"); $FX_Param_Index++; } $FX_Index++; } $Selected_Index++; }
Python
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 GetParam
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR TrackFX GetParam