-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new script, better 7.1 panning in 15.1 GUI panner
- Loading branch information
Showing
3 changed files
with
70 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
desc="" | ||
by="junh1024" | ||
|
||
from reaper_python import * | ||
from contextlib import contextmanager | ||
|
||
@contextmanager | ||
def undoable(message): | ||
RPR_Undo_BeginBlock2(0) | ||
try: | ||
yield | ||
finally: | ||
RPR_Undo_EndBlock2(0, message, -1) | ||
|
||
debug = True | ||
|
||
def msg(m): | ||
if 'debug' in globals(): | ||
RPR_ShowConsoleMsg(m) | ||
|
||
# msg(RPR_CountSelectedMediaItems(0)) | ||
|
||
with undoable(desc): | ||
# RPR_ShowConsoleMsg(BPM_proj) | ||
|
||
#get file BPM | ||
# dialogstring="amount" | ||
# theoffset = RPR_GetUserInputs("Adjust take by how many semitones?",1,dialogstring,"",64)[4] | ||
# theoffset = float(theoffset.strip()) | ||
# RPR_ShowConsoleMsg(new_gain_bits) | ||
|
||
#get items | ||
for i in range (RPR_CountSelectedMediaItems( 0)): | ||
MI=RPR_GetSelectedMediaItem(0,i) | ||
|
||
# set gain | ||
take=RPR_GetActiveTake(MI) | ||
original=RPR_GetMediaItemTakeInfo_Value( take, "D_PAN" ) | ||
RPR_SetMediaItemTakeInfo_Value( take, "D_PAN", -original ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters