Moving Selection

Hi people,
I’m a very very new in Nyquist. I was wondering Is it possible to move (or set a new selection) with Nyquist. I’d like to halve/double selection and to shift it to left/right. I solved my problem using labels, using this code:

(list (* -1 (get-duration 1)) "A1")
(list (get-duration 0) "B1")
(list (get-duration 0.25) "B2")
(list (get-duration 0.5) "B3")
(list (get-duration 0.75) "B4")
(list (get-duration 1) "C1")
(list (get-duration 2) "D1")

Don’t laugh at me, please! :smiley:

Unfortunately no, though I’d very much like this to be possible in a future version.

The way that Nyquist in Audacity currently works is that, for “process” and “analyze” type plug-ins, Audacity passes the selected audio from one audio track to Nyquist. This is then repeated for each selected track. The audio is passed as the value of the symbol “S”. Nyquist sees the start of that sound as time=0 and the end of that sound as time=1. Nyquist is totally unaware of “track time” in Audacity.

If Nyquist returns audio as the “result”, then Audacity replaces the selected audio with that returned by Nyquist.

Oh, thanks a bunch for the quick response, Steve! :slight_smile: Maybe you remember I suggested that “Acid Looping” feature in this topic a few months ago. I guess at some point it could be added “halve selection”, “double selection”, “shift selection left” and “shift selection right” options to the “Edit > Select” menu. But for now, I’m goin’ to use my funny code to split selection with labels. Thanks again! Much love!

Actually you can move the selection from the Selection Toolbar
Select the “Length” radio button, then type the required start time into the “Selection Start” box.

Ah, this is amazing!!! :nerd: It works like magic in samples format!! :sunglasses: Thank you again, Steve!!! :smiley:

You just have to remember to select “Length” rather than “End”, otherwise you loose the selection as soon as you start typing, which is really annoying.