From: Roger B. Dannenberg <rbd@cs...> - 2005-03-02 05:55:27
I'll try to write and post a reverse function for Nyquist sometime soon.
The SHAPE idea was a good one, but Nyquist limits tables to (I think) 1M
samples to avoid disaster when someone passes a huge sound to OSC or =
You can get away with large sounds when writing to disk, but tables =
sounds in memory and are best suited to small things like wavetables.
Reverse would work well on a sound file, where you have random access, =
you can read from the end to the front, incrementally. I think with
Audacity, you'll have to read the entire sound to be reversed into =
order to get access to the end, so you'll need 4 bytes-of-RAM/sample =
couple percent overhead. -Roger
PS (STRETCH x my-sound) has no effect on my-sound if my-sound is of type
SOUND. STRETCH changes the evaluation environment so that *behaviors* =
as PWL, LFO, OSC, PLUCK, etc. return longer duration sounds, but sounds
themselves are not changed.
(setf my-sound (osc c4)) ; computes 1 sec of middle C
;; it's a bad practice to assign sounds to globals, but we did it =
(play (stretch 2 my-sound)) ; plays my-sound without change, 1 sec =
(play (stretch 2 (osc c4))) ; evaluate OSC in an environment with a=20
;; stretch factor of 2, so the result is 2 sec of middle C