[Audacity-nyquist] Reverse in Nyquist
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Roger B. D. <rb...@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 = SHAPE. You can get away with large sounds when writing to disk, but tables = evaluate 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, = so 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 = memory in order to get access to the end, so you'll need 4 bytes-of-RAM/sample = plus a 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* = such as PWL, LFO, OSC, PLUCK, etc. return longer duration sounds, but sounds themselves are not changed. For example: (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 = anyway (play (stretch 2 my-sound)) ; plays my-sound without change, 1 sec = duration Alternatively: (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 |