Hello.
Can someone give me the Nyquist script that converts the sample rate like in Windows XP?
Nyquist plug-ins run in Audacity, they are not stand-alone effects. For stand-alone Nyquist see: https://www.cs.cmu.edu/~music/nyquist/
Windows XP does not support current versions of Audacity. See here for the Windows compatibility table: https://wiki.audacityteam.org/wiki/Audacity_Versions#Compatibility
For current and recent versions of Audacity, the code for resamplng a track:
(resample *track* srate)
where “srate” is the numeric value of the new sample rate. For example, to resample to 48000 Hz:
(resample *track* 48000)
For very old versions of Audacity, use “S” rather than “track”:
(resample s 48000)
Note that resampling the audio does not change the track’s sample rate, so the processed track will be stretched by Audacity to the track’s sample rate. To change the track’s sample rate, use the “Rate” option in the track’s dropdown menu.
Resampling in Nyquist uses this function (Audacity 3.1.3 version):
(defun resample (snd rate)
(ny:typecheck (not (or (soundp snd) (multichannel-soundp snd)))
(ny:error "RESAMPLE" 1 '((SOUND) nil) snd t))
(ny:typecheck (not (numberp rate))
(ny:error "RESAMPLE" 2 '((NUMBER) "rate") rate))
(cond ((arrayp snd)
(let* ((len (length snd))
(result (make-array len)))
(dotimes (i len)
(setf (aref result i)
(snd-resample (aref snd i) rate)))
result))
(t
(snd-resample snd rate))))
which ultimately calls this C code: https://github.com/audacity/audacity/blob/master/lib-src/libnyquist/nyquist/nyqsrc/resampv.c
Do I have to paste only (resample track 48000) or is there a full script?
Also, I’m looking for the script that makes the audio sound like bitcrushed, that’s how Windows XP’s audio resampling worked.
Which version of Audacity are you using?
See this topic: https://forum.audacityteam.org/t/bit-crusher/62001/1
3.1.2
In Audacity 3.1.2 you can resample a track with Nyquist by:
- Select the track
- Open the “Nyquist Prompt” (in the “Tools” menu)
- Enter the code:
(resample *track* 48000)
(or whatever sample rate you want)
4. Click the “OK” button
However, I suspect what you really want is the “BitCrusher.ny” plug-in.
Instructions to install and enable Nyquist plug-ins on Windows: https://manual.audacityteam.org/man/installing_effect_generator_and_analyzer_plug_ins_on_windows.html#nyquist_install
I’d also suggest updating to the current Audacity 3.1.3.
I’d also suggest updating to the current Audacity 3.1.3.
I’ve updated to Audacity 3.1.3.
Also, no, I’m not looking for a bitcrusher, I just want to resample the sound how Windows XP resamples.
By the way, I’ve found a Nyquist script that makes what I want, but I don’t know if it’s compatible with 3.1.3.
Link: https://github.com/Kippykip/Kippykip-2009/blob/master/audacity_bitcrush.ny.txt
Bump
By the way, I’ve found a Nyquist script that makes what I want, but I don’t know if it’s compatible with 3.1.3.
Link: https://github.com/Kippykip/Kippykip-2009/blob/master/audacity_bitcrush.ny.txt
Interesting, I recognise that code. I wrote it : https://forum.audacityteam.org/t/nearest-neighbor-upsampling/26710/4
Add this line at the top of the script, so that it is on the first line, on its own, and the script will work with Audacity 3.1.3
;version 3
Add this line at the top of the script, so that it is on the first line, on its own, and the script will work with Audacity 3.1.3
;version 3
I’ve did it, and it gave me the result I wanted. Thanks!
By the way, I’ve found a Nyquist script that makes what I want, but I don’t know if it’s compatible with 3.1.3.
If you use the “debug” button to run it, you will see that it is not.
However, somebody provided a version that works: https://github.com/Kippykip/Kippykip-2009/issues/1 (assuming that’s what you want)