Fluxa is the fluxus audio synth for livecoding, it contains quite basic atomic components which can be used together to create more complicated sounds. It uses an experimental and fairly brutal method of graph node garbage collection which gives it certain non-deterministic qualities. It's also been battle tested in many a live performance. The fluxa server needs to be run and connected to jack in order for you to hear anything. Also, fluxa is not in the default namespace, so use eg (require fluxus-017/fluxa).
Returns void
Causes samples to be reloaded if you need to restart the fluxa server
Example
(reload)
Returns node-id-number
Creates a sine wave generator node
Example
(play-now (mul (sine 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a saw wave generator node
Example
(play-now (mul (saw 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a triangle wave generator node
Example
(play-now (mul (tri 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a square wave generator node
Example
(play-now (mul (squ 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a white noise generator node
Example
(play-now (mul (white 5) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a pink noise generator node
Example
(play-now (mul (pink 5) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - adds two signals together
Example
(play-now (mul (add (sine 440) (sine 220)) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - subtracts two signals
Example
(play-now (mul (sub (sine 440) (sine 220)) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - multiplies two signals
Example
(play-now (mul (mul (sine 440) (sine 220)) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - divides two signals
Example
(play-now (mul (div (sine 440) 2) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - produces a signal raised to the power of another
Example
(play-now (mul (pow (adsr 0 0.1 0 0) 10) (sine 440)))
Returns node-id-number
Creates an envelope generator node
Example
(play-now (mul (sine 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates an low pass moog filter node
Example
(play-now (mul (mooglp (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates an band pass moog filter node
Example
(play-now (mul (moogbp (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates an high pass moog filter node
Example
(play-now (mul (mooghp (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a formant filter node
Example
(play-now (mul (formant (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a sample playback node
Example
(play-now (sample "helicopter.wav" 440))
Returns node-id-number
Creates a crush effect node
Example
(play-now (crush (sine 440) 0.4 8))
Returns node-id-number
Creates a distortion effect node
Example
(play-now (distort (sine 440) 0.9))
Returns node-id-number
Creates a hard clipping distortion effect node
Example
(play-now (klip (sine 440) 0.9))
Returns node-id-number
Creates a echo effect node
Example
(play-now (echo 3 (sine 440)))
Returns void
Plays a supplied node at the specified time.
Example
(play (+ (time-now) 10) (mul (adsr 0 0.1 0 0) (sine 440)))
Returns void
Plays a supplied node as soon as possible
Example
(play-now (mul (adsr 0 0.1 0 0) (sine 440)))
Returns void
Turns on or off fluxa debugging, the server will print information out to stdout
Example
(fluxa-debug #t)
Returns void
Sets the global volume
Example
(volume 2.5)
Returns void
Sets the global pan where -1 is left and 1 is right (probably)
Example
(pan 0)
Returns void
Sets the maximum amount of synth graphs fluxa will run at the same time. This is a processor usage safeguard, when the count is exceeded the oldest synth graph will be stopped so it's nodes can be recycled. The default count is 10.
Example
(max-synths 10)
Returns void
Add a searchpath to use when looking for samples
Example
(searchpath "/path/to/my/samples/)
Returns void
Sets a simple global equaliser. This is more as a last resort when performing without a mixer.
Example
(eq 2 1 0.5) ; bass boost
Returns void
A global compressor. Not sure if this works yet.
Example
(comp 0.1 0.1 0.5 3)
Returns frequency-number
Returns the frequency for the supplied note. Fluxa uses just intonation by default.
Example
(note 35)
Returns void
Resets the fluxa server.
Example
(reset)
Returns void
A way of using lists as sequences. The lists can be of differing length, leading to polyrhythms.
Example
(seq (lambda (time clock) (clock-map (lambda (nt cutoff) (play time (mul (adsr 0 0.1 0 0) (mooglp (saw (note nt)) cutoff 0.4)))) clock (list 39 28 3) (list 0.1 0.1 0.4 0.9))))
Returns true-or-false
Just shorthand for (zero? (modulo clock-number count-number)), as it can be used a lot.
Example
(seq (lambda (time clock) (when (zmod clock 4) ; play the note every 4th beat (play time (mul (adsr 0 0.1 0 0) (sine (note nt)))))))
Returns void
Sets the global fluxa sequence procedure, which will be called automatically in order to create new events. seq can be repeatedly called to update the procedure as in livecoding.
Example
(seq (lambda (time clock) (when (zmod clock 4) ; play the note every 4th beat (play time (mul (adsr 0 0.1 0 0) (sine (note nt)))))))
Returns void
Causes samples to be reloaded if you need to restart the fluxa server
Example
(reload)
Returns node-id-number
Creates a sine wave generator node
Example
(play-now (mul (sine 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a saw wave generator node
Example
(play-now (mul (saw 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a triangle wave generator node
Example
(play-now (mul (tri 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a square wave generator node
Example
(play-now (mul (squ 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a white noise generator node
Example
(play-now (mul (white 5) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a pink noise generator node
Example
(play-now (mul (pink 5) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - adds two signals together
Example
(play-now (mul (add (sine 440) (sine 220)) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - subtracts two signals
Example
(play-now (mul (sub (sine 440) (sine 220)) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - multiplies two signals
Example
(play-now (mul (mul (sine 440) (sine 220)) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - divides two signals
Example
(play-now (mul (div (sine 440) 2) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Maths node - produces a signal raised to the power of another
Example
(play-now (mul (pow (adsr 0 0.1 0 0) 10) (sine 440)))
Returns node-id-number
Creates an envelope generator node
Example
(play-now (mul (sine 440) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates an low pass moog filter node
Example
(play-now (mul (mooglp (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates an band pass moog filter node
Example
(play-now (mul (moogbp (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates an high pass moog filter node
Example
(play-now (mul (mooghp (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a formant filter node
Example
(play-now (mul (formant (squ 440) 0.1 0.4) (adsr 0.1 0.1 0 0)))
Returns node-id-number
Creates a sample playback node
Example
(play-now (sample "helicopter.wav" 440))
Returns node-id-number
Creates a crush effect node
Example
(play-now (crush (sine 440) 0.4 8))
Returns node-id-number
Creates a distortion effect node
Example
(play-now (distort (sine 440) 0.9))
Returns node-id-number
Creates a hard clipping distortion effect node
Example
(play-now (klip (sine 440) 0.9))
Returns node-id-number
Creates a echo effect node
Example
(play-now (echo 3 (sine 440)))
Returns node-id-number
Karplus strong "ocillator" node. Plucks virtual strings by filtering white noise in a feedback delay loop set resonate at the desired frequency.
Example
(play-now (ks (random 1000) 0.9 0.1))
Returns void
Plays a supplied node at the specified time.
Example
(play (+ (time-now) 10) (mul (adsr 0 0.1 0 0) (sine 440)))
Returns void
Plays a supplied node as soon as possible
Example
(play-now (mul (adsr 0 0.1 0 0) (sine 440)))
Returns void
Turns on or off fluxa debugging, the server will print information out to stdout
Example
(fluxa-debug #t)
Returns void
Sets the global volume
Example
(volume 2.5)
Returns void
Sets the global pan where -1 is left and 1 is right (probably)
Example
(pan 0)
Returns void
Sets the maximum amount of synth graphs fluxa will run at the same time. This is a processor usage safeguard, when the count is exceeded the oldest synth graph will be stopped so it's nodes can be recycled. The default count is 10.
Example
(max-synths 10)
Returns void
Add a searchpath to use when looking for samples
Example
(searchpath "/path/to/my/samples/)
Returns void
Sets a simple global equaliser. This is more as a last resort when performing without a mixer.
Example
(eq 2 1 0.5) ; bass boost
Returns void
A global compressor. Not sure if this works yet.
Example
(comp 0.1 0.1 0.5 3)
Returns frequency-number
Returns the frequency for the supplied note. Fluxa uses just intonation by default.
Example
(note 35)
Returns void
Resets the fluxa server.
Example
(reset)
Returns void
A way of using lists as sequences. The lists can be of differing length, leading to polyrhythms.
Example
(seq (lambda (time clock) (clock-map (lambda (nt cutoff) (play time (mul (adsr 0 0.1 0 0) (mooglp (saw (note nt)) cutoff 0.4)))) clock (list 39 28 3) (list 0.1 0.1 0.4 0.9))))
Returns true-or-false
Just shorthand for (zero? (modulo clock-number count-number)), as it can be used a lot.
Example
(seq (lambda (time clock) (when (zmod clock 4) ; play the note every 4th beat (play time (mul (adsr 0 0.1 0 0) (sine (note nt)))))))
Returns void
Sets the global fluxa sequence procedure, which will be called automatically in order to create new events. seq can be repeatedly called to update the procedure as in livecoding.
Example
(seq (lambda (time clock) (when (zmod clock 4) ; play the note every 4th beat (play time (mul (adsr 0 0.1 0 0) (sine (note nt)))))))