Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 08-22-2010, 04:42 AM   #1
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
Default Action for "select all items left/right of cursor"?

Is there an action for "select all items left/right of cursor"?

Reason:
I'm editing a bunch of takes of storm sounds I have recorded. I have over 140 edits and it gets to be tricky marquee-selecting all items to the left or right of the desired cross-fade to adjust said cross-fade.

Being able to select all items left/right of the edit cursor with an action would be lovely right about now...lol

Thanks,
Mike
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics is offline   Reply With Quote
Old 08-22-2010, 05:16 AM   #2
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,218
Default

I think there is in the SWS extension here..

http://www.standingwaterstudios.com/

and we also have commands native to reaper to save and recall up to 10 tiem selection sets but forgot the actual name, search in actions for "set" should come up
musicbynumbers is offline   Reply With Quote
Old 08-22-2010, 05:44 AM   #3
bradleyfilms
Human being with feelings
 
bradleyfilms's Avatar
 
Join Date: Aug 2008
Location: Cumbria, UK
Posts: 2,255
Default

A couple of macros will do it. Like

Go to start of project
Set time selection start
Move edit cursor to mouse cursor
Set time selection end
Select all items in time selection


I haven't got the correct wording for each action, but you'll be able to find them easily enough. Then write a macro for the right half, assign a couple of keys and you're done
There's probably an even easier way, but basically the time selection is the way to go
Steve
__________________
Meto ergo psallentes est
bradleyfilms is offline   Reply With Quote
Old 08-22-2010, 06:06 AM   #4
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
Default

Thanks guys! I have trouble building macros in my head, but that will certainly do the trick!

- Mike
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics is offline   Reply With Quote
Old 08-22-2010, 10:25 AM   #5
bradleyfilms
Human being with feelings
 
bradleyfilms's Avatar
 
Join Date: Aug 2008
Location: Cumbria, UK
Posts: 2,255
Default

I've improved it.

Store edit cursor position
Transport Go to start of project
Set time selection start point
Recall edit cursor position
Set time selection end point
Select all items in current time selection

You'll need SWS's extentions for the store and recall. The improvement means you don't have to leave the mouse marking the end point.

For the right hand side it's just

Set time selection start point
Transport Go to end of project
Set time selection end point
Select all items in current time selection

All the best, Steve
__________________
Meto ergo psallentes est
bradleyfilms is offline   Reply With Quote
Old 04-03-2013, 03:39 PM   #6
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,268
Default

Quote:
Originally Posted by bradleyfilms View Post
I've improved it.

Store edit cursor position
Transport Go to start of project
Set time selection start point
Recall edit cursor position
Set time selection end point
Select all items in current time selection

You'll need SWS's extentions for the store and recall. The improvement means you don't have to leave the mouse marking the end point.

For the right hand side it's just

Set time selection start point
Transport Go to end of project
Set time selection end point
Select all items in current time selection

All the best, Steve
is there a way to restore time selection after it? or doing it without using time selection ?
heda is offline   Reply With Quote
Old 04-04-2013, 03:09 AM   #7
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
Default

Thanks, bradleyfilms!

Storm season is back so I'll definitely be using this after I record some more sounds!
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics is offline   Reply With Quote
Old 04-04-2013, 04:04 AM   #8
bradleyfilms
Human being with feelings
 
bradleyfilms's Avatar
 
Join Date: Aug 2008
Location: Cumbria, UK
Posts: 2,255
Default

Quote:
Originally Posted by heda View Post
is there a way to restore time selection after it? or doing it without using time selection ?
Yes, again using SWS' extensions there are by default 5 slots for saving and restoring time selections. You can increase that number if you need more.
Steve
__________________
Meto ergo psallentes est
bradleyfilms is offline   Reply With Quote
Old 04-04-2013, 10:39 AM   #9
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,230
Default

i use this for selected tracks:
Code:
sws: save time selection, slot 1
sws: save current track selection
sws/aw: select from cursor to end of project (items and time selection)
track: select track 01
sws: unselect all items on selected tracks
track: select track 02
sws: unselect all items on selected tracks
sws: restore time selection, slot 1
sws: restore saved track selection
in my workflow i use tracks 1 and 2 as reference tracks so i exempt them from selections.

i use this for all tracks (except 1 and 2):

Code:
sws: save time selection, slot 1
sws: save current track selection
sws: select all tracks
sws/aw: select from cursor to end of project (items and time selection)
track: select track 01
sws: unselect all items on selected tracks
track: select track 02
sws: unselect all items on selected tracks
sws: restore time selection, slot 1
sws: restore saved track selection
BabaG
babag is offline   Reply With Quote
Old 04-04-2013, 08:04 PM   #10
Steve Folta
Human being with feelings
 
Join Date: Aug 2011
Location: Claremont CA
Posts: 117
Default

Quote:
Originally Posted by mikeroephonics View Post
Is there an action for "select all items left/right of cursor"?
This is a ReaScript I made, I called it "Select After.py":

Code:
position = RPR_GetCursorPosition()

which_item = 0
num_items = RPR_CountMediaItems(0)
while which_item < num_items:
  item = RPR_GetMediaItem(0, which_item)
  which_item += 1
  if RPR_GetMediaItemInfo_Value(item, "D_POSITION") >= position:
    RPR_SetMediaItemInfo_Value(item, "B_UISEL", 1)
  else:
    RPR_SetMediaItemInfo_Value(item, "B_UISEL", 0)

RPR_UpdateArrange()
But I really haven't used it since I got comfortable with Ripple Editing.
Steve Folta is offline   Reply With Quote
Old 04-04-2013, 08:09 PM   #11
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,268
Default

I need this but for midi notes. Selecting all midi notes from cursor to end of item.

I can't do a similar custom action for selecting all midi notes until the end of the item... because some sws actions needed for time selecting are not there from the midi editor actions.

Maybe with some script?

it would be great to have ripple editing in the midi editor.
heda is offline   Reply With Quote
Old 10-06-2015, 07:00 AM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Oh... so there is no native action for it.
I thougth I missed it.

Well,
I think we could script in Lua:
  • Select all items before edit cursor
  • Select all items after edit cursor
  • Select all items before edit cursor on selected tracks
  • Select all items after edit cursor on selected track
  • facultative: Unselect items on unselected tracks
Are there some people interested by coding these beginner scripters, or do youwant me to make it ?
X-Raym is offline   Reply With Quote
Old 10-06-2015, 07:59 AM   #13
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Quote:
Originally Posted by heda View Post
I need this but for midi notes. Selecting all midi notes from cursor to end of item.

I can't do a similar custom action for selecting all midi notes until the end of the item... because some sws actions needed for time selecting are not there from the midi editor actions.

Maybe with some script?

it would be great to have ripple editing in the midi editor.
Please count me in on this one : very handy for me also !
vanhaze is offline   Reply With Quote
Old 10-06-2015, 08:30 AM   #14
przemoc
Human being with feelings
 
przemoc's Avatar
 
Join Date: Sep 2015
Location: Poland
Posts: 33
Default

Quote:
Originally Posted by X-Raym View Post
I think we could script in Lua:
  • Select all items before edit cursor
  • Select all items after edit cursor
  • Select all items before edit cursor on selected tracks
  • Select all items after edit cursor on selected track
  • facultative: Unselect items on unselected tracks
Are there some people interested by coding these beginner scripters, or do youwant me to make it ?
They seem useful anyway, so I may do them today or tomorrow, to put something in my poor reascripts repo with 1 script so far. But I would go with EEL.
I would differentiate them further for items beginning vs items ending before/after edit cursor. And I think such scripts should not unselect any prior selection. There is always "Item: Unselect all items" action, if one may want to clear it first.
__________________
@SoundCloud | ReaScripts @GitHub @Forum | SP4-7 ReaBank | Viewing new posts | REQ Samples
REAPER v7.x @ NUC11PHKi7C [Core i7-1165G7 @ 2.8GHz, DDR4-3200 32GB RAM, RTX 2060] | W11
REAPER v5.99 @ ThinkPad T430 [Core i7 3520M @ 2.9GHz, DDR3-1600 8GB RAM, NVS 5400M] | W7
przemoc is offline   Reply With Quote
Old 10-06-2015, 09:26 AM   #15
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

@vanhaze

There is SPk77 Select all MIDI notes and events right of cursor and X-Raym_Select all MIDI notes and events right of mouse.eel
MIDI Editor: workaround? select all notes/events right of cursor



@przemoc
Ok the the rigth title would be Add rigth of the edit cursor into item selection.
EEL, or Lua, as long as it works :P

Thanks for digging the subject, I would have done it but I really missed time (and I must leave some scripts to others he he :P)
X-Raym is offline   Reply With Quote
Old 10-06-2015, 04:43 PM   #16
przemoc
Human being with feelings
 
przemoc's Avatar
 
Join Date: Sep 2015
Location: Poland
Posts: 33
Default

I prepared some scripts. They are available in my ReaScripts repo and I created dedicated thread for them in this forum:
EEL: Bunch of scripts related to (un)selecting items

They're not exactly what OP asked for, but they're IMHO better for combining into more complex actions (not necessarily the ones needed here, but they're good enough for them too).

E.g. Select all items before edit cursor on selected tracks
can be expressed via custom action:
  • Item: Unselect all items
  • PPP - Add whole items on the left of edit cursor to selection.eel
  • PPP - Unselect items on unselected tracks.eel
(or use "Add all items..." instead of "Add whole items..." depending on what you need, the difference should be obvious, but it's explained in the dedicated thread just in case)
__________________
@SoundCloud | ReaScripts @GitHub @Forum | SP4-7 ReaBank | Viewing new posts | REQ Samples
REAPER v7.x @ NUC11PHKi7C [Core i7-1165G7 @ 2.8GHz, DDR4-3200 32GB RAM, RTX 2060] | W11
REAPER v5.99 @ ThinkPad T430 [Core i7 3520M @ 2.9GHz, DDR3-1600 8GB RAM, NVS 5400M] | W7

Last edited by przemoc; 10-06-2015 at 05:07 PM. Reason: Fix thread URL - relative ones are apparently not supported.
przemoc is offline   Reply With Quote
Old 10-06-2015, 05:04 PM   #17
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Seems quite good, but the URL is wrong :P
X-Raym is offline   Reply With Quote
Old 10-06-2015, 05:08 PM   #18
przemoc
Human being with feelings
 
przemoc's Avatar
 
Join Date: Sep 2015
Location: Poland
Posts: 33
Default

Quote:
Originally Posted by X-Raym View Post
Seems quite good, but the URL is wrong :P
Thanks, fixed.
__________________
@SoundCloud | ReaScripts @GitHub @Forum | SP4-7 ReaBank | Viewing new posts | REQ Samples
REAPER v7.x @ NUC11PHKi7C [Core i7-1165G7 @ 2.8GHz, DDR4-3200 32GB RAM, RTX 2060] | W11
REAPER v5.99 @ ThinkPad T430 [Core i7 3520M @ 2.9GHz, DDR3-1600 8GB RAM, NVS 5400M] | W7
przemoc is offline   Reply With Quote
Old 04-14-2019, 08:43 AM   #19
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
Default

Hi. Could someone tell me how to adjust this script to simply select all items to the LEFT of cursor? Obviously this right one works fine but oddly enough there is no "select all items left of cursor" anywhere in Reaper. Here is the working script. What do I need to change to get right select please? Or is there another script that does this because I can't find it lol.

Code:
// Select all MIDI notes and events right of mouse
// EEL Script for Reaper
// Author : X-Raym
// Author URI : http://extremraym.com
// Source : GitHub > X-Raym > EEL Scripts for Cockos REAPER
// Source URI : https://github.com/X-Raym/REAPER-EEL-Scripts
// Licence : GPL v3
// Release Date : 24-01-2015
// Version : 1.0
// Version Date : 03-02-2015
// Required : Reaper 5.0 pre 10; SWS 2.6.2

// Based on Select all MIDI notes and events right of cursor
// by spk77
// http://forum.cockos.com/showthread.php?p=1465307#post1465307

function select() 
  local(take, i, cursor_ppq_pos, notes, ccs, sysex, sel, muted, start, end, chan, pitch, vel, chanmsg, msg2, msg3, type)
(
  (take = MIDIEditor_GetTake(MIDIEditor_GetActive())) ? (
    MIDIEditor_OnCommand(MIDIEditor_GetActive(), 40214); // unselect all
    extension_api("BR_GetMouseCursorContext", #window, #segment, #details, char_sz);
    time = extension_api("BR_GetMouseCursorContext_Position");
    cursor_ppq_pos = MIDI_GetPPQPosFromProjTime(take, time);
    MIDI_CountEvts(take, notes, ccs, sysex);
    
    i = 0;
    loop(notes,
      MIDI_GetNote(take, i, sel, muted, start, end, chan, pitch, vel);
      start >= cursor_ppq_pos ? MIDI_SetNote(take, i, 1, muted, start, end, chan, pitch, vel);
      i += 1;
    );
    
    i = 0;
    loop(ccs,
      MIDI_GetCC(take, i, sel, muted, start, chanmsg, chan, msg2, msg3);
      start >= cursor_ppq_pos ? MIDI_SetCC(take, i, 1, muted, start, chanmsg, chan, msg2, msg3);
      i += 1;
    );
    
    i = 0;
    loop(sysex,
      MIDI_GetTextSysexEvt(take, i, sel, muted, start, type, #msg);
      start >= cursor_ppq_pos ? MIDI_SetTextSysexEvt(take, i, 1, muted, start, type, #msg);
      i += 1;
    );
  );
  Undo_OnStateChange("Select events right of cursor");
);

select();
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 04-14-2019, 10:39 AM   #20
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

check przemoc link...
X-Raym is offline   Reply With Quote
Old 04-14-2019, 11:15 AM   #21
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
Default

Quote:
Originally Posted by X-Raym View Post
check przemoc link...
I did. Those are for items, not MIDI notes and CCs.
Right?
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 05-07-2019, 03:47 PM   #22
Farlon
Human being with feelings
 
Join Date: Jun 2018
Posts: 24
Default Selecting last item left of mouse

I want to make it so when I press the middle mouse button, a copy of the last item left of the mouse cursor appears at the mouse cursor. I wanted to build a custom action but I can't find something to select the last item before the mouse cursor. Help?
Farlon is offline   Reply With Quote
Old 05-07-2019, 04:11 PM   #23
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

SWS/BR: Save edit cursor position, slot 01 (16 slots available)
Item navigation: Select and move to previous item
Edit: Copy items
SWS/BR: Restore edit cursor position, slot 01
Item: Paste items/tracks
xpander is offline   Reply With Quote
Old 05-08-2019, 01:30 PM   #24
Farlon
Human being with feelings
 
Join Date: Jun 2018
Posts: 24
Default

Aaaww you are awesome, thanks, it works! But I have to add "Track: Select track under mouse" in the beginning.
Farlon is offline   Reply With Quote
Old 05-08-2019, 02:46 PM   #25
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

@Farlon
Funny thing, i made a simimar scriprs few days ago:





It is very handy I used it a lot.



Ill surely release it soon.
X-Raym 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 03:32 PM.


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