Old 01-15-2015, 08:31 AM   #681
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Edufighter, maybe "Xenakios/SWS: reposition selected items" does what you want.

edit-

gwok, not sure if this is the best way...
SWS is needed.

Code:
//select all sub-parents_global

Main_OnCommand(40296, 0);//select all tracks
Main_OnCommand(NamedCommandLookup("_SWS_SELCHILDREN"), 0);

x = CountSelectedTracks(0);
while(x > 0)(
    trk = GetSelectedTrack(0, x - 1);
    GetMediaTrackInfo_Value(trk, "I_FOLDERDEPTH") != 1 ? (
        SetTrackSelected(trk, 0);
    );
    x -= 1;
);

Undo_OnStateChange("select all sub-parents_global");
You can run the following on more than one parent-

Code:
//select all sub-parents

Main_OnCommand(NamedCommandLookup("_SWS_SELCHILDREN"), 0);

x = CountSelectedTracks(0);
while(x > 0)(
    trk = GetSelectedTrack(0, x - 1);
    GetMediaTrackInfo_Value(trk, "I_FOLDERDEPTH") != 1 ? (
        SetTrackSelected(trk, 0);
    );
    x -= 1;
);

Undo_OnStateChange("select all sub-parents");

Last edited by FnA; 01-15-2015 at 11:00 AM.
FnA is offline   Reply With Quote
Old 01-15-2015, 11:01 AM   #682
Edufighter
Human being with feelings
 
Join Date: Feb 2012
Location: Canada
Posts: 35
Default

FnA You got it!! Thanks!
I had the feeling somebody thought about this everyday problem of sfx editor already.
It works exactly as I wanted. prompt for the time between items and nicely space them in the timeline.
Problem solved. thanks to the forum for being always so helpful.
Edufighter is offline   Reply With Quote
Old 01-15-2015, 11:18 AM   #683
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

No prob.

Someone else will have to do vanhazes. IDK.

and JoPos etc.

Last edited by FnA; 01-15-2015 at 12:04 PM.
FnA is offline   Reply With Quote
Old 01-15-2015, 12:24 PM   #684
gwok
Human being with feelings
 
gwok's Avatar
 
Join Date: Jun 2010
Location: canada
Posts: 3,396
Default

Thanks a lot FnA.

Unfortunately I'm getting errors from them both. I seem to often have trouble running scripts people have made for me, and I havent really found out why. For a while I thought it was because Reaper is calling up the wrong version of python (im on osx which has python natively on the os, though I have the newest one on my system too), though I never resolved it with that line of investigation

So it is likly your script is fine, I don' now why my system likes to do this sometimes......

Quote:
Script execution error

Traceback (most recent call last):
File "Select Sub-Parents_Global.py", line 1
//select all sub-parents_global
^
SyntaxError: invalid syntax
gwok is offline   Reply With Quote
Old 01-15-2015, 12:33 PM   #685
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

It's an eel script, not python.
Attached Files
File Type: zip 1-15-15.zip (802 Bytes, 138 views)
FnA is offline   Reply With Quote
Old 01-15-2015, 12:40 PM   #686
gwok
Human being with feelings
 
gwok's Avatar
 
Join Date: Jun 2010
Location: canada
Posts: 3,396
Default

DOh!!

working great, thanks man!!!




Quote:
Originally Posted by FnA View Post
It's an eel script, not python.
gwok is offline   Reply With Quote
Old 01-15-2015, 03:03 PM   #687
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

That's cool. I can do a little more with python, but that's not saying a whole lot. Sometimes they won't work for someone else.
FnA is offline   Reply With Quote
Old 01-23-2015, 11:54 AM   #688
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

Hi guys,
Is this possible with an eel script?

Create time selection from the first marker to the last marker in a project?
Thanks in advance,
Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 01-23-2015, 12:56 PM   #689
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by WyattRice View Post
Hi guys,
Is this possible with an eel script?

Create time selection from the first marker to the last marker in a project?
Thanks in advance,
Wyatt
Here's a simple script for that:

Code:
CountProjectMarkers(0, num_markers, 0);
num_markers > 1 ? (
  Undo_BeginBlock();
  c_pos = GetCursorPosition();
  PreventUIRefresh(1);
  GoToMarker(0, 1, 1);
  start = GetCursorPosition();
  GoToMarker(0, num_markers, 1);
  end = GetCursorPosition();
  GetSet_LoopTimeRange(1, 0, start, end, 0);
  SetEditCurPos(c_pos, 0, 0);
  PreventUIRefresh(-1);
  Undo_EndBlock("Create time selection",-1);
);
Edit: Undo_OnStateChange didn't work - added Undo_Begin/EndBlock
spk77 is offline   Reply With Quote
Old 01-23-2015, 01:35 PM   #690
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,067
Default

Quote:
Originally Posted by spk77 View Post
Here's a simple script for that:
Wonderful!
Many Thanks,
Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 01-28-2015, 10:31 AM   #691
Edufighter
Human being with feelings
 
Join Date: Feb 2012
Location: Canada
Posts: 35
Default Extend all region's length

Hi,
I would need to extend all regions in a project by X amount of seconds.
Let's say all my regions are 2 seconds long and through an .eel script I turn them in a 3 seconds long by extending the right boundary of the region while preserving the region start time.
If this script has a way to input the amount of seconds to extend the region would be perfect.
If any of you coders-magician can help me with this, it might be awesome.
Many thanks in advance.
Edufighter is offline   Reply With Quote
Old 01-28-2015, 11:19 AM   #692
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Edufighter View Post
Hi,
I would need to extend all regions in a project by X amount of seconds.
Let's say all my regions are 2 seconds long and through an .eel script I turn them in a 3 seconds long by extending the right boundary of the region while preserving the region start time.
If this script has a way to input the amount of seconds to extend the region would be perfect.
If any of you coders-magician can help me with this, it might be awesome.
Many thanks in advance.
Here's Extend all region ends by X seconds:

(note: negative values works too)
Code:
// Extend all region ends by X seconds
// EEL script by SPK77 28.1.2015

function move_region_end_to_cursor(new_rgn_end)
(
  i = 0;
  while(EnumProjectMarkers(i, is_region, pos, rgn_end, #name, markrgn_index_number) > 0) (
    is_region ? (
      SetProjectMarker(markrgn_index_number, 1, pos, max(rgn_end+new_rgn_end,pos), #name);
    );
    i += 1;
  );
);

ok = GetUserInputs("Extend all region ends by X seconds", 1, "Extend all region ends by...", #retvals);

ok && match("%f", #retvals, new_rgn_end) ? move_region_end_to_cursor(new_rgn_end);
Undo_OnStateChangeEx("Extend region ends",-1,-1);


Edit: added a limit (0s) for region length

Last edited by spk77; 01-28-2015 at 11:42 AM.
spk77 is offline   Reply With Quote
Old 01-28-2015, 11:25 AM   #693
gwok
Human being with feelings
 
gwok's Avatar
 
Join Date: Jun 2010
Location: canada
Posts: 3,396
Default

hey guys,

do any of you have some suggestions on how to learn to make my own scripts? I have a bit of experience with rudimentary coding, mostly on the lemur. I know a bit about storing variables, making arrays, if statements etc. Haven't dealt with loops too much.

I feel I could probably pick it up quite quick, but it would be nice to just get a clear idea on the basics from the get go. I've never done anything with any api's, so the syntax and formatting of scripts I'm not so clear on. I realize there is documentation for all the functions, but I am not so clear really just how to get started.

Any suggestions would be greatly appreciated!

thx
gwok is offline   Reply With Quote
Old 01-28-2015, 12:43 PM   #694
gwok
Human being with feelings
 
gwok's Avatar
 
Join Date: Jun 2010
Location: canada
Posts: 3,396
Default

script request: actions for alternate grid settings

1/5
1/7
1/9
1/11
1/13

this way one can set alternate grid settings with relative ease. I believe further subdivisions of those should be possible with the actions to double or half the grid settings so theres no need for 2/5 etc

thanks!
gwok is offline   Reply With Quote
Old 01-28-2015, 12:45 PM   #695
Edufighter
Human being with feelings
 
Join Date: Feb 2012
Location: Canada
Posts: 35
Default Extend all region's length

Thank you very much spk77 worked like a charm!!
You're a code wizard indeed
Cheers,
Ed
Edufighter is offline   Reply With Quote
Old 01-28-2015, 03:07 PM   #696
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by gwok View Post
hey guys,

do any of you have some suggestions on how to learn to make my own scripts? I have a bit of experience with rudimentary coding, mostly on the lemur. I know a bit about storing variables, making arrays, if statements etc. Haven't dealt with loops too much.

I feel I could probably pick it up quite quick, but it would be nice to just get a clear idea on the basics from the get go. I've never done anything with any api's, so the syntax and formatting of scripts I'm not so clear on. I realize there is documentation for all the functions, but I am not so clear really just how to get started.

Any suggestions would be greatly appreciated!

thx
I learned from other people's scripts .

3 important functions:
  • CountSelectedMediaItems
  • GetSelectedMediaItem
  • ShowConsoleMsg (useful for debugging)

This EEL script prints selected item's starting positions:
PHP Code:
// EEL: int CountSelectedMediaItems(ReaProject* proj)
// count the number of selected items in the project (proj=0 for active project)
num_sel_items CountSelectedMediaItems(0); // store number of selected items to variable "num_sel_items"

0;
// run loop "num_sel_items" times
loop(num_sel_items,
  
  
// EEL: MediaItem* GetSelectedMediaItem(ReaProject* proj, int selitem)
  // get a selected item by selected item count (zero-based) (proj=0 for active project)
  
item_pointer GetSelectedMediaItem(0i); // store item pointer (MediaItem*) to "item_pointer" variable
  
  // EEL: double GetMediaItemInfo_Value(MediaItem* item, "parmname")
  
item_position GetMediaItemInfo_Value(item_pointer"D_POSITION"); // returns item start position (the position is stored to "item_position" variable
  
  
ShowConsoleMsg(sprintf(#, "%f", item_position)); // convert "item_position" to string and show the value in "ReaScript Console"
  
ShowConsoleMsg("\n"); // print "newline"
  
+= 1// add "1" to i
); 
Quote:
Originally Posted by gwok View Post
script request: actions for alternate grid settings

1/5
1/7
1/9
1/11
1/13

this way one can set alternate grid settings with relative ease. I believe further subdivisions of those should be possible with the actions to double or half the grid settings so theres no need for 2/5 etc

thanks!
This is not very easy at the moment. The grid settings are stored in project files - it's hard to modify them (with EEL).

Quote:
Originally Posted by Edufighter View Post
Thank you very much spk77 worked like a charm!!
You're a code wizard indeed
Cheers,
Ed
Thanks! Glad it worked
spk77 is offline   Reply With Quote
Old 01-28-2015, 04:19 PM   #697
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,874
Default

@gwok
If you want to learn how to script for Reaper, you could read this article :
How to Learn REASCRIPT for REAPER / ExtremRaym

You could also use this script to help you with debugging :
EEL : Console debug messages

Anf your first script EEL, you could use my template !
REAPER-EEL-Scripts/X-Raym_Template.eel at master · X-Raym/REAPER-EEL-Scripts

Hope it can help !

----
There is now way to delete tempo markers ? (I can see Add, Get, Set but no Delete).
I would love a "delete all tempo markers" script :P
X-Raym is offline   Reply With Quote
Old 01-28-2015, 06:52 PM   #698
gwok
Human being with feelings
 
gwok's Avatar
 
Join Date: Jun 2010
Location: canada
Posts: 3,396
Default

Quote:
Originally Posted by X-Raym View Post
@gwok
If you want to learn how to script for Reaper, you could read this article :
How to Learn REASCRIPT for REAPER / ExtremRaym
Holy shitballs! That's perfect thanks!

That site should be a sticky at the top of this forum or something

thanks X-Raym, and spk77
gwok is offline   Reply With Quote
Old 01-29-2015, 12:54 AM   #699
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,874
Default

@gwok
haha thank you !
Because you liked it so much, I just update it with a new chapter dedicated to ReaScript code sharing ! Code conventions, platforms, naming etc...
Don't miss that part, it is mire important than a lot of people know
Good coding !
X-Raym is offline   Reply With Quote
Old 01-29-2015, 05:39 PM   #700
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Needs SWS python, so yeah, python only.

Code:
### sixteenth note quintuplets
from reaper_python import *
from sws_python import *

SNM_SetDoubleConfigVar("projgriddiv", 1/5)
RPR_UpdateTimeline()
Just change 5 to 7, 11, etc. And the comment at top, if you like.
FnA is offline   Reply With Quote
Old 01-29-2015, 08:29 PM   #701
gwok
Human being with feelings
 
gwok's Avatar
 
Join Date: Jun 2010
Location: canada
Posts: 3,396
Default

Quote:
Originally Posted by FnA View Post
Needs SWS python, so yeah, python only.

Code:
### sixteenth note quintuplets
from reaper_python import *
from sws_python import *

SNM_SetDoubleConfigVar("projgriddiv", 1/5)
RPR_UpdateTimeline()
Just change 5 to 7, 11, etc. And the comment at top, if you like.
works great! thanks!
gwok is offline   Reply With Quote
Old 02-04-2015, 10:11 AM   #702
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Does anyone here know if it's possible to create a script that allows you to "slip" the contents of a piece of audio whilst also moving the right edge of the item too?

So the "contents" of the audio item say slip leftwards with the "left edge" staying still but the "right edge" of that item shrinks by the same amount that you have slipped the item's contents by.

This should also be possible the other way too. If you make the item's "contents" slip rightwards the "left edge" of the item stays still but the "right edge" expands rightwards.

This would be so useful for sound design as I often want to slip a sound earlier or later but also increase or decrease the right edge to keep the exact same end time.

Hope that makes sense?
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 02-04-2015, 02:33 PM   #703
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by musicbynumbers View Post
Does anyone here know if it's possible to create a script that allows you to "slip" the contents of a piece of audio whilst also moving the right edge of the item too?

So the "contents" of the audio item say slip leftwards with the "left edge" staying still but the "right edge" of that item shrinks by the same amount that you have slipped the item's contents by.

This should also be possible the other way too. If you make the item's "contents" slip rightwards the "left edge" of the item stays still but the "right edge" expands rightwards.

This would be so useful for sound design as I often want to slip a sound earlier or later but also increase or decrease the right edge to keep the exact same end time.

Hope that makes sense?
This is possible, but I don't know exactly how it should work


I quickly modified the quantize tool to test if it is possible (movement range = +-1 second):





Would this work for you?

EDIT: Saw your request in "v5.0pre - New ReaScript functions/IDE testing"
I think, this isn't possible with BR_functions (there has to be a GUI to get the "mouse click"/"mouse delta x" positions etc. afaik).

Last edited by spk77; 02-04-2015 at 03:00 PM.
spk77 is offline   Reply With Quote
Old 02-05-2015, 03:11 AM   #704
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

That's pretty cool!

If it was accessible as a quick modifier it would be perfect. I think I would need to ask the devs for it

I'll ask them and if it's cool with you, use your video as an example?

EDIT:I've posted it up but let me know if you want me to not use it.

Thanks for doing that though! love what you've been doing so far too!

Quote:
Originally Posted by spk77 View Post
This is possible, but I don't know exactly how it should work


I quickly modified the quantize tool to test if it is possible (movement range = +-1 second):





Would this work for you?

EDIT: Saw your request in "v5.0pre - New ReaScript functions/IDE testing"
I think, this isn't possible with BR_functions (there has to be a GUI to get the "mouse click"/"mouse delta x" positions etc. afaik).
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.

Last edited by musicbynumbers; 02-05-2015 at 03:37 AM.
musicbynumbers is offline   Reply With Quote
Old 02-05-2015, 04:04 AM   #705
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by FnA View Post
Needs SWS python, so yeah, python only.

Code:
### sixteenth note quintuplets
from reaper_python import *
from sws_python import *

SNM_SetDoubleConfigVar("projgriddiv", 1/5)
RPR_UpdateTimeline()
Just change 5 to 7, 11, etc. And the comment at top, if you like.
Could this be modified so that the script asks user's input for the denominator?
amagalma is offline   Reply With Quote
Old 02-05-2015, 05:35 PM   #706
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by amagalma View Post
Could this be modified so that the script asks user's input for the denominator?
Neat idea.

Code:
### Grid: divide quarter note by input
from reaper_python import *
from sws_python import *

def dialog():
    defvalues = ","
    maxreturnlen = 20   # one more than what you expect to get back
    nitems = 1 # number of input boxes
    Query = RPR_GetUserInputs("Divide quarter note grid by",nitems,"enter value",defvalues,maxreturnlen)

    if Query[0] == 1: # user clicked OK
        UserValues = Query[4].split(',')

        if UserValues[0] != []:
            PF = str(UserValues[0])
            PFL.append(PF)

PFL = []
dialog()
input = 0

if PFL == []:
    pass
else:
    input = float(PFL[0])
    SNM_SetDoubleConfigVar("projgriddiv", 1/input)
    RPR_UpdateTimeline()

RPR_Undo_OnStateChange("divide quarter note grid")
FnA is offline   Reply With Quote
Old 02-05-2015, 05:54 PM   #707
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Thank you very much!

It works nice but it doesn't create an undo point. To undo it, I changed your first script:

Code:
### Undo tuplet grid division
from reaper_python import *
from sws_python import *

SNM_SetDoubleConfigVar("projgriddiv", 1/1)
RPR_UpdateTimeline()
Now, it would be nice if the "tuplet" script could save the grid setting before it is applied, and the "undo" script to recall the grid setting before the tuplet! Is this possible?
amagalma is offline   Reply With Quote
Old 02-05-2015, 06:49 PM   #708
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

I think it might be with ExtState, but I've never used that before. If that don't work I think a txt file somewhere could be used to store it.
FnA is offline   Reply With Quote
Old 02-11-2015, 02:24 PM   #709
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Well, like I said, I don't have any experience with this one. Might blow up the pooter.

Code:
### save grid 1
from reaper_python import *
from sws_python import *

grid1_save = SNM_GetDoubleConfigVar("projgriddiv", 1)
RPR_SetExtState("grid", "one", grid1_save, 0)#section,key,value,persist
RPR_Undo_OnStateChange("save grid 1")
Code:
### restore grid 1
from reaper_python import *
from sws_python import *

ES = RPR_GetExtState("grid", "one")
if ES:
    gr = float(ES)
    SNM_SetDoubleConfigVar("projgriddiv", gr)

RPR_UpdateTimeline()
RPR_Undo_OnStateChange("restore grid 1")
Section and key looks like a matrix to refer to. Persist means until next time you open Reaper apparently. 0 for no, 1 for yes.
FnA is offline   Reply With Quote
Old 02-12-2015, 05:20 AM   #710
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Thank you!!!

Works great!
amagalma is offline   Reply With Quote
Old 02-13-2015, 04:17 PM   #711
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,180
Default Zoom out to exact project length

I've got a really simple request this time.

Reapers "Zoom out project" action leaves a fairly large space at the end of the project

Is it possible to make a script that measures the length of the used space in the arrangement and zooms horizontally exactly to that..

I know it's nit pick but.......
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is online now   Reply With Quote
Old 02-13-2015, 05:42 PM   #712
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,874
Default

@Triode
I don't have any problem with the Zoom Out Project action, it adjsut pretty well, no matter what is my project duration, without any unbalanced empty space.
Are you sure you don't have any small lost item at the end of the project ? It can happend, sometimes !
X-Raym is offline   Reply With Quote
Old 02-13-2015, 05:48 PM   #713
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,180
Default

Don't you see empty space after the last item once you use that action? I'd like no empty space at all horizontally..
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is online now   Reply With Quote
Old 02-13-2015, 07:49 PM   #714
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,874
Default

@Triode
Really just a bit, but nothing shocking or disturbing.
But if for some reason you don't want it at all, I cannnot help you on that. I never worked with zoom in Scripts !
X-Raym is offline   Reply With Quote
Old 02-14-2015, 07:30 AM   #715
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,180
Default

Yeah not shocking or disturbing. Just slightly irking
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is online now   Reply With Quote
Old 02-19-2015, 05:00 PM   #716
Brookwood
Human being with feelings
 
Brookwood's Avatar
 
Join Date: May 2014
Location: Brooklyn
Posts: 52
Default Request: Playback Seek

Sometimes I have a long file and, if the track is playing, I just want playback to continue from where I throw down the cursor, marking potential edit points. I don't like using the Ruler for this because although it seeks playback the edit cursor is elsewhere.
The closest I've come using stock commands is
Media Left Click= View: move edit cursor to mouse cursor ignoring snapping
and
Media Left Alt+Click = View: move edit cursor to mouse cursor ignoring snapping & Transport Play
So, there is a "move edit cursor to play cursor"
But no "move play cursor to mouse/edit cursor"
and no "if"s in the action list.

I'm not a programmer but I think the next step would be Rea Script/ Python.
Something like:


# If track is playing, move edit cursor to mouse cursor (taking toggle state of Snap/Grid into account)
# and seek playback from there. So:

if (current play state = false);
RPR_Main_OnCommand(actionnumber, 39614);
#move edit cursor to mouse cursor
if (current play state = true);
PR_Main_OnCommand(actionnumber, 39614);
RPR_OnPlayButton()
#move edit cursor to mouse cursor and continue playing from there

Something like this would go a long way towards me actually working with Reaper instead of just goofing around with it.

I appreciate any replies, including non-script ideas. Working towards a one-click world!
Cheers,
Brookwood
Brookwood is offline   Reply With Quote
Old 02-19-2015, 05:09 PM   #717
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

Quote:
Originally Posted by Brookwood View Post
Sometimes I have a long file and, if the track is playing, I just want playback to continue from where I throw down the cursor, marking potential edit points.
you may love the SWS Breeder actions. Like this one:
SWS/BR: Toggle preview media item under mouse and pause during preview (start from mouse cursor position)
heda is offline   Reply With Quote
Old 02-19-2015, 09:09 PM   #718
Brookwood
Human being with feelings
 
Brookwood's Avatar
 
Join Date: May 2014
Location: Brooklyn
Posts: 52
Default Hmmm

Looks promising...
Brookwood is offline   Reply With Quote
Old 02-19-2015, 11:47 PM   #719
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

There are also SWS/BR actions to play/play or pause/ play or stop from mouse cursor position.
Just search the action list for "sws br play OR sws br preview" to find all the preview and play actions

I'm also working on "perform until shortcut release" versions of these (both for arrange and midi editor) and with some new versions (solo track under mouse cursor while the playback is running etc...)
It will probably appear in the next SWS pre if I make it (the hardest part is to rewrite part of the code that makes "perform until shorcut release" possible so it works with MIDI editor)

Last edited by Breeder; 02-19-2015 at 11:53 PM.
Breeder is offline   Reply With Quote
Old 02-21-2015, 12:21 PM   #720
Brookwood
Human being with feelings
 
Brookwood's Avatar
 
Join Date: May 2014
Location: Brooklyn
Posts: 52
Default Great!

So, what I set up in MouseMods is:
MediaItem:
Left Click:
Default Action:
Select Item and move edit cursor

and

MediaItem:
Alt+Left Click:
SWS/BR Play from mouse cursor position

This might even be better than the script idea I had because, for the price of pressing one alt key I can either couple or decouple the mouse cursor from playback which has more flexibility.
I also set up my up and down arrows to set loop points on the fly which helps my workflow a lot in certain situations.
Finally starting to tame this bronco thanks to such generous posters and contributors.
Thanks!
Brookwood is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.