

For this reason, you should normally use the audio sample rate (typically 44,100 Hz) for the rate of the snd-slider output SOUND. If you give the slider a very low sample rate, say 1000, then slider value changes will only be noticed by Nyquist approximately once per second. When the slider value is read, the same value is used to fill a block of 1000 samples, so even if the sample rate is 44,100 Hz, the effective slider sample rate is 44,100/1000, or 44.1 Hz. However, one thing that can interfere with this is that SOUND samples are computed in blocks of about 1000 samples.


Normally, if the slider is used to control a sound, you will hear changes in the sound pretty soon after the slider value changes. Samples are only computed when something tries to use this signal. So the result returned by snd-slider does not immediately compute any samples. To fully understand this function, you need to know something about how Nyquist is actually computing sounds. The function snd-slider, described in Section "Creating Sounds", takes a slider number and returns a SOUND type representing the current value of the slider. To control something in (near) real-time, you need to access a slider value as if it a signal, or more properly, a Nyquist SOUND type. If this fails under Windows, see the installation instructions regarding SystemRoot. Note: Open Sound Control must be enabled by calling (osc-enable t). The Nyquist implementation of Open Sound Control is simple: an array of floats can be set by OSC messages and read by Nyquist functions.
Open sound control software#
Open Sound Control (OSC) is a simple protocol for communicating music control parameters between software applications and across networks. Appendix 2: Open Sound Control and Nyquist Appendix 2: Open Sound Control and Nyquist
