reaper-oss / sws

The SWS extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc
https://www.sws-extension.org/
MIT License
455 stars 85 forks source link

copy/cut/split item or time selection, depending on last selected #106

Closed Jeff0S closed 10 years ago

Jeff0S commented 10 years ago

From screwlaw...@gmail.com on April 06, 2010 10:54:47

Tim and Jeffos, I posted sometime ago an idea of better editing actions similar to "cut/copy/split , obeying time sel" , yet quite different. My idea was prodding the possibility of detecting last selection, if it's an item selection , or a time selection, and then have the editing action applied to it.

For example, if my last action was clicking on an item, cut/copy/split will apply to edit cursor, even if there is a time selection active. But if my last action was creating time selection, cut/copy/split will be applied to time selection. I believe this could be implemented, since the success of obey time selection actions?

Here's the thread that I posted awhile back : http://forum.cockos.com/showthread.php?t=49634 Thank you for listening. You make Reaper a better place to be in.

Original issue: http://code.google.com/p/sws-extension/issues/detail?id=106

Jeff0S commented 10 years ago

From swstim on April 06, 2010 08:05:15

Yo lawrs,

Well, there's some technical difficulties in doing exactly what you're asking for. Reaper doesn't notify when there's any activity with item or time selections, so my extension would have to continuously poll (ask) reaper "Hey, what's the current item selection?" "What's the current time selection?". This of course uses CPU, perhaps a lot, and there's going to be "holes" where if you change selections quickly I won't know what the actual "last selection" is.

You do know that the "obey time sel" actions ignore the time selection if you don't have items selected inside the time selection, right? Maybe with a slight workflow change you could make those work for you.

Tim

Jeff0S commented 10 years ago

From airo...@googlemail.com on April 06, 2010 08:41:20

You want us to pester Cockos to make a flag available that gives you this information ?

The distinction between time selection (+item selection) or just item selection might be beneficial, even when area selection is implemented.

Jeff0S commented 10 years ago

From swstim on April 06, 2010 10:32:30

Well it'll take much more than a flag. I can pester them after they're back; in the meantime this is going on hold.

Status: OnHold

Jeff0S commented 10 years ago

From screwlaw...@gmail.com on April 06, 2010 19:31:02

Thanks for looking into it Tim. Please update us if the Cockos team replies your queries.

Currently I've made custom actions with the new cut/copy/split , to clear time selection after every action applied. An example :

  1. cut item/track/env obey time selection
  2. remove time selection

This helps the workflow a little faster.

Coming with some basic Java knowledge, I remembered there was something like "get.nextUserInput();" command which basically detects the last user input, be it a mouse click, or a keyboard input, therefore I was wondering if this could be applied in Reaper Script as well. In any case, thank you for explaining the difficulties of my suggestion. I hope to hear more from you if there's any updates. Thanks again Tim. You're a real hero!