RPR SetMediaItemInfo Value
From CockosWiki
(→Perl) |
(→Examples) |
||
(One intermediate revision not shown) | |||
Line 32: | Line 32: | ||
==Examples== | ==Examples== | ||
===C++=== | ===C++=== | ||
- | < | + | <source lang=cpp> |
- | </ | + | </source> |
+ | |||
+ | |||
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=perl> |
use strict; | use strict; | ||
use warnings; | use warnings; | ||
Line 53: | Line 55: | ||
RPR_SetMediaItemInfo_Value($MediaItem, "D_VOL", $D_VOL); | RPR_SetMediaItemInfo_Value($MediaItem, "D_VOL", $D_VOL); | ||
RPR_UpdateItemInProject($MediaItem); | RPR_UpdateItemInProject($MediaItem); | ||
- | </ | + | </source> |
+ | |||
===Python=== | ===Python=== | ||
- | < | + | <source lang=python> |
- | </ | + | </source> |
+ | |||
==See Also== | ==See Also== | ||
- | + | {{SeeAlso_item}} | |
- | + | ||
- | + | ||
- | + | ''(Section automatically generated, edits above this line may be overwritten.)'' | |
==Stuff== | ==Stuff== |
Latest revision as of 10:48, 29 January 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR SetMediaItemInfo Value
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR SetMediaItemInfo Value
Contents |
SetMediaItemInfo_Value()
bool SetMediaItemInfo_Value(MediaItem* item, const char* parmname, double newvalue)
Set media item numerical-value attributes.
- B_MUTE : bool * to muted state
- B_LOOPSRC : bool * to loop source
- B_ALLTAKESPLAY : bool * to all takes play
- B_UISEL : bool * to ui selected
- C_BEATATTACHMODE : char * to one char of beat attached mode, -1=def, 0=time, 1=allbeats, 2=beatsosonly
- C_LOCK : char * to one char of lock flags (&1 is locked, currently)
- D_VOL : double * of item volume (volume bar)
- D_POSITION : double * of item position (seconds)
- D_LENGTH : double * of item length (seconds)
- D_SNAPOFFSET : double * of item snap offset (seconds)
- D_FADEINLEN : double * of item fade in length (manual, seconds)
- D_FADEOUTLEN : double * of item fade out length (manual, seconds)
- D_FADEINLEN_AUTO : double * of item autofade in length (seconds, -1 for no autofade set)
- D_FADEOUTLEN_AUTO : double * of item autofade out length (seconds, -1 for no autofade set)
- C_FADEINSHAPE : char * to fadein shape, 0=linear, ...
- C_FADEOUTSHAPE : char * to fadeout shape
- I_GROUPID : int * to group ID (0 = no group)
- I_LASTY : int * to last y position in track (readonly)
- I_LASTH : int * to last height in track (readonly)
- I_CUSTOMCOLOR : int * : custom color, windows standard color order (i.e. RGB(r,g,b)|0x100000). if you do not |0x100000, then it will not be used (though will store the color anyway)
- I_CURTAKE : int * to active take
- F_FREEMODE_Y : float * to free mode y position (0..1)
- F_FREEMODE_H : float * to free mode height (0..1)
Parameters
Returns
bool 1=ok, 0=fail?
Examples
C++
Perl
use strict; use warnings; use constant CURR_PROJ => 0; use constant FIRST_SELECTED => 0; $MediaItem = RPR_GetSelectedMediaItem(CURR_PROJ, FIRST_SELECTED); $D_VOL = RPR_GetMediaItemInfo_Value($MediaItem, "D_VOL"); $Item_Vol = (20 * log($D_VOL)) / log(10); $Item_Vol = sprintf "%.0f", $Item_Vol; $Item_Vol++; $D_VOL = 10 ** ($Item_Vol / 20); RPR_SetMediaItemInfo_Value($MediaItem, "D_VOL", $D_VOL); RPR_UpdateItemInProject($MediaItem);
Python
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,
(Section automatically generated, edits above this line may be overwritten.)
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR SetMediaItemInfo Value
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR SetMediaItemInfo Value