Go Back   Cockos Incorporated Forums > REAPER Forums > newbieland

Reply
 
Thread Tools Display Modes
Old 07-21-2019, 10:57 AM   #1
gruffalo
Human being with feelings
 
Join Date: Jul 2019
Posts: 7
Default create time selection on the fly

i want to make a custom action which creates/starts a time selection (of, say, 1 second) at the current playback position. i played around with some custom action functions but i did not succeed (i managed to create one where the cursor is, but that is not the current playback position of course). any tips??

thanks so much
gruffalo is offline   Reply With Quote
Old 07-21-2019, 11:02 AM   #2
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,852
Default

Welcome to the Reaper forums!

Have a look at some time selection scripts available via ReaPack: https://reapack.com/

For instance, something like Lokasenna's Create time selection at edit cursor... script might be interesting in general.
Although this one is using the edit cursor as reference, you might try to combine it in a custom Action which moves the edit cursor to the play cursor position first:
Quote:
View: Move edit cursor to play cursor
Script: Lokasenna_Create time selection 1 seconds long, right of the edit cursor.lua <-- created with the script mentioned above
There are also Actions like Time selection: Set start point and Time selection: Set end point for setting the start/end points manually.
__________________
ReaLauncher

Last edited by solger; 07-21-2019 at 11:14 AM.
solger is offline   Reply With Quote
Old 07-21-2019, 11:10 AM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Hang on a minute, I'll upload a play cursor version of the script Solger mentioned.

Edit: Done. As Solger mentioned, you'll need the ReaPack extension. Install that, then in Extensions -> ReaPack -> Browse packages search for "create time selection at play cursor".
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 07-21-2019 at 11:21 AM.
Lokasenna is offline   Reply With Quote
Old 07-21-2019, 01:33 PM   #4
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
Default

Quote:
Originally Posted by Lokasenna View Post
Hang on a minute, I'll upload a play cursor version of the script Solger mentioned.

Edit: Done. As Solger mentioned, you'll need the ReaPack extension. Install that, then in Extensions -> ReaPack -> Browse packages search for "create time selection at play cursor".
Nice script, but in my case it creates time selection not perfectly with the grid.
Attached Images
File Type: jpg time sel.JPG (26.4 KB, 128 views)
Skorobagatko is offline   Reply With Quote
Old 07-21-2019, 02:44 PM   #5
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Quote:
Originally Posted by Skorobagatko View Post
Nice script, but in my case it creates time selection not perfectly with the grid.
I'm a little surprised that Reaper doesn't have native actions for snapping the time selection. Oh well - I've just uploaded "Lokasenna_Snap time selection or loop points to grid" which will install a few different actions.

You should be able to make a custom action using a preset exported from "Create time selection at play cursor" followed by "snap time selection to grid".
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 07-21-2019, 02:59 PM   #6
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
Default

Quote:
Originally Posted by Lokasenna View Post
I'm a little surprised that Reaper doesn't have native actions for snapping the time selection. Oh well - I've just uploaded "Lokasenna_Snap time selection or loop points to grid" which will install a few different actions.

You should be able to make a custom action using a preset exported from "Create time selection at play cursor" followed by "snap time selection to grid".
Thank you!
Skorobagatko is offline   Reply With Quote
Old 07-21-2019, 03:47 PM   #7
gruffalo
Human being with feelings
 
Join Date: Jul 2019
Posts: 7
Default

this is seriously amazing. did not anticipate such a fast response!!!
see if i understand the way the script operates: it always prompts the user for the desired length and so on, right? is there a way for me to modify it so that it always creates the time selection with a predefined length? ideally i would like to trigger it via MIDI cc and then, if possible, modify the end point as it plays/loops. would i need to modify the script? sorry if this is a silly question
thanks again!
gruffalo is offline   Reply With Quote
Old 07-21-2019, 04:01 PM   #8
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

There's an "Export" button at the bottom specifically for that reason.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 07-21-2019, 04:25 PM   #9
gruffalo
Human being with feelings
 
Join Date: Jul 2019
Posts: 7
Default

silly me. i tried that but did not work the first time for some reason. my bad!!! amazing, Lokasenna!
gruffalo 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 10:53 PM.


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