sref vs tapv/feedback-delay/etc

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Mac OS X
GNU/Linux and Unix-like
Post Reply
Posts: 9
Joined: Thu Jun 01, 2017 3:15 pm
Operating System: Windows 7

sref vs tapv/feedback-delay/etc

Post by Koss » Wed Jun 07, 2017 4:16 pm

Is there a particular reason to use feedback-delay() or tapv() if you dont want to modulate your delay time or have feedback ?

Inside nyquist proper in the source files it seems to be the case that the dsp route is preferred over simply tagging the sound with a new start time with sref.

I'm wondering why that is. Anyone?

Site Admin
Posts: 47274
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: sref vs tapv/feedback-delay/etc

Post by steve » Wed Jun 07, 2017 4:52 pm

sref is for accessing a sound at a specific point in time. For example, if you wish to know the value of a control signal "cs" at time "t1", you could use:

Code: Select all

(setf val (sref cs t1))

Code: Select all

;version 4

(setf cs
  (abs-env (pwev 1 10 0.001)))

(format t "level of cs at 2.5 seconds is ~a~%" (abs-env (sref cs 2.5)))
I'm unclear what this has to do with the rest of your question.

If you simply want to delay a sound, you could "cue" it "at" a specified time, but note that when returning the sound to Audacity, it must be delayed relative to something, otherwise Audacity will just put it at the beginning of the selection.

Example using the Nyquist prompt, to delay the track by 0.5 seconds:

Code: Select all

;version 4
(sim (s-rest 0) ; null sound starting at time=0 as a reference
     (at-abs 0.5 (cue *track*)))
or to add an echo at 0.5 seconds:

Code: Select all

;version 4
(setf echo-gain 0.5)
(sim *track*; original sound at time zero
     (at-abs 0.5 (cue (mult echo-gain *track*))))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply