HomePage RecentChanges

nyquist

*nyquist:*

desc:

http://www.cs.cmu.edu/~music/nyquist

Nyquist is a language for sound synthesis and music composition. Unlike score languages that tend to deal only with events, or signal processing languages that tend to deal only with signals and synthesis, Nyquist handles both in a single integrated system. Nyquist is also flexible and easy to use because it is based on an interactive Lisp interpreter.

With Nyquist, you can design instruments by combining functions (much as you would using the orchestra languages of Music V, cmusic, or Csound). You can call upon these instruments and generate a sound just by typing a simple expression. You can combine simple expressions into complex ones to create a whole composition.

Nyquist is XLISP interpreter coded in C

install

1) downloaded zip

instructions:

gunzip nyquist2nn.zip ln -s sys/unix/linux/Makefile Makefile setenv XLISPPATH `pwd`/runtime:`pwd`/lib make

BUT:

must be in c shell [csh] for setenv. also do make in misc directory first otherwise intgen segfaults

run as ./ny gives prompt

or:

http://audacity.fuchsi.de/download/edgar/nyquist/nyquist-doc/examples/emacs/how-to/nyquist-in-an-emacs-buffer.html

gives details of running in Emacs buffer (untested)

source

simplest example: (play (osc 60))

play code is:

in runtime/system.lsp

(defmacro play (expr) `(s-save-autonorm ,expr NY:ALL default-sound-file :play soundenable))

wrapping:

fileio.lsp

(defmacro s-save-autonorm (expression &rest arglist) `(let ((peak (s-save (scale autonorm ,expression) ,@arglist))) (autonorm-update peak)))

wrapping:

 s-save

which embeds

snd-save:

heads into C territory:

xlc_snd_save in:

/nyqsrc/sndfnint.c