The collidxr Reference Manual

This is the collidxr Reference Manual, version 0.8, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 12:10:38 2026 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 collidxr

A collection of syntax sugar and conveniences extending cl-collider, a Common Lisp interface to the SuperCollider sound synthesis server.

Author

modula t.

Contact

Home Page

https://github.com/defaultxr/collidxr

Source Control

(GIT git@github.com:defaultxr/collidxr.git)

Bug Tracker

https://github.com/defaultxr/collidxr/issues

License

MIT

Version

0.8

Defsystem Dependency

mutility (system).

Dependencies
  • alexandria (system).
  • mutility (system).
  • trivial-types (system).
  • cl-collider (system).
  • vgplot (system).
Source

collidxr.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 collidxr/collidxr.asd

Source

collidxr.asd.

Parent Component

collidxr (system).

ASDF Systems

collidxr.


3.1.2 collidxr/package.lisp

Source

collidxr.asd.

Parent Component

collidxr (system).

Packages

collidxr.


3.1.3 collidxr/collidxr.lisp

Dependency

package.lisp (file).

Source

collidxr.asd.

Parent Component

collidxr (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 collidxr

Source

package.lisp.

Use List
  • alexandria.
  • cl-collider.
  • common-lisp.
  • mutility.
  • trivial-types.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: dn (name &optional params &body body)

"Define Node"–define a named node proxy. Similar to ‘cl-collider:proxy’, but with the following additional features:

- Provides a more concise syntax for writing proxies; BODY is simply a plist mapping variable names to their values. No ‘let*’ needed!
- PARAMS are inserted as ‘with-controls’.
- Without BODY, just returns the node.
- If not specified by the user, auto-inserts parameters for dur, tempo, pan, amp, and out with sensible defaults, marked as ignorable, to avoid warnings if they aren’t used. - Bindings named - or _ are automatically declared ignorable.
- :pos binding can be used to specify the :pos of the node within its group (i.e. :head, :tail, etc).
- When :fx is the first element of PARAMS, allocate a 2-channel bus and bind sig to (in.ar BUS 2).
- If out is bound in BODY, its value is automatically used as the input for an ‘out.ar’.
- If there is no out in BODY but there is a sig, sig is automatically fed into a ‘b2’ inside an ‘out.ar’. In other words, the pan, amp, and out arguments will "just work". - Can be provided as an :instrument in a ‘cl-patterns:pbind’ to set the parameters of the node.
- Can be provided as an :out in a ‘cl-patterns:pbind’ to send the output of triggered synths to the node (for use with :fx nodes).

Example:

;; (dn :echo (:fx (time 1.0) (decay 0.5))
;; :sig (comb-c.ar sig 1 time decay))

See also: ‘ds’

Package

collidxr.

Source

collidxr.lisp.

Macro: ds (name params &body body)

"Define Synth"; syntax sugar wrapping ‘defsynth’. It does the following:

- Provides a more concise syntax for writing synthdefs; BODY is simply a plist mapping variable names to their values. No ‘let*’ needed!
- If not specified by the user, auto-inserts parameters for dur, tempo, pan, amp, and out with sensible defaults, marked as ignorable, to avoid warnings if they aren’t used. - Bindings named - or _ are automatically declared ignorable.
- If out is bound in BODY, its value is automatically used as the input for an ‘out.ar’.
- If there is no out in BODY but there is a sig, sig is automatically fed into a ‘b2’ inside an ‘out.ar’. In other words, the pan, amp, and out arguments will "just work".

Example:

;; (ds :foo ((gate 1) (freq 440))
;; :env (env-gen.kr (env-adsr 0.01 0.1 0.5 0.1) :gate gate :act :free)
;; :sig (pulse.ar freq)
;; :sig (rlpf.ar sig (* freq 2) 0.5)
;; :- (poll.kr (impulse.kr 1) sig)
;; :sig (pan2.ar sig pan (* amp env))
;; :out sig)

See also: ‘dn’

Package

collidxr.

Source

collidxr.lisp.


5.1.2 Ordinary functions

Function: b2 (in &optional pan level)

Get IN wrapped in a ‘pan2.ar’ or ‘balance2.ar’ as appropriate. In other words, if IN is mono, wrap it in ‘pan2.ar’, and if IN is stereo, wrap it in ‘balance2.ar’. PAN and LEVEL are the panning and amplitude arguments, respectively.

Package

collidxr.

Source

collidxr.lisp.

Function: fbn (&optional num-channels max-delay-time interpolation)

Create a ‘fbnode’ for doing feedback within synthdefs. NUM-CHANNELS is the number of channels of the internal delay buffer. MAX-DELAY-TIME is the length in seconds that the delay buffer should be allocated to, defaulting to the minimum delay possible (one block). INTERPOLATION is the type of interpolation to use when reading from the delay, as per ‘buf-rd.ar’.

Example:

;; (defsynth :echoed ((freq 440) (delay 0.5) (feed 0.5) (amp 0.5) (out 0))
;; (let* ((fbn (fbn 2 0.5))
;; (sig (var-saw.ar (+ (rand.ir -2.0 (list 2.0 2.0)) freq) 0 0.5 (env-gen.kr (perc 0.01 0.25))))
;; (sig (rlpf.ar (+ sig (* feed (fbn-read fbn delay)))
;; (* freq 0.9) 0.9)))
;; (fbn-write fbn sig)
;; (detect-silence.ar (leak-dc.ar sig) 1.0e-4 :time delay :act :free)
;; (out.ar out (* sig amp))))

See also: ‘fbnode’, ‘fbn-read’, ‘fbn-write’

Package

collidxr.

Source

collidxr.lisp.

Function: fbn-read (fbnode &optional delay)

Read from FBNODE at a time DELAY seconds from its input. DELAY defaults to the ‘fbnode”s max delay time.

See also: ‘fbnode’, ‘fbn’, ‘fbn-write’

Package

collidxr.

Source

collidxr.lisp.

Function: fbn-write (fbnode input)

Write INPUT to FBNODE.

See also: ‘fbnode’, ‘fbn’, ‘fbn-read’

Package

collidxr.

Source

collidxr.lisp.

Function: synth-variant (name &rest args)

Like ‘cl-collider:synth’, but can also start a synth variant. To specify a variant, NAME should be in the format NAME.VARIANT.

Synth variants are specified in the synthdef metadata. Set the metadata key :VARIANTS to a plist mapping the name of the variant to the plist of arguments to the synthdef.

Example:

;; ;; define the "noisy" variant for the :tb303 synth:
;; (setf (synthdef-metadata :tb303 :variants) (list :noisy (list :dist 1 :clip 1 :bias 1)))
;; ;; play the variant:
;; (synth-variant :tb303.noisy :freq 420 :dist 0)
;; ;; notice that you can override the arguments set in the variant.

See also: ‘cl-collider:synth’

Package

collidxr.

Source

collidxr.lisp.


5.1.3 Generic functions

Generic Function: plot (object &rest args &key backend &allow-other-keys)

Plot OBJECT.

Package

collidxr.

Source

collidxr.lisp.

Methods
Method: plot ((buffer buffer) &rest args &key &allow-other-keys)
Method: plot ((list list) &rest args &key backend &allow-other-keys)

5.2 Internals


5.2.1 Special variables

Special Variable: *ds-synth-package*

The package that ‘ds’ will define synths in.

Package

collidxr.

Source

collidxr.lisp.


5.2.2 Ordinary functions

Function: body-plist-code (body)

Convert BODY, a plist of keys and values a la ‘pbind’. Any key with the name _ or - is changed into a gensym. All gensyms and ignorable symbols are returned as a second value. Metadata such as synthdef variant information is provided as the third return value.

Package

collidxr.

Source

collidxr.lisp.

Function: find-proxy (name)

Get the node for the ‘proxy’ named NAME.

Package

collidxr.

Source

collidxr.lisp.

Function: standard-params (params &key out)

Get PARAMS, a ‘defsynth’ argument list, altered to include dur, tempo, amp, pan, and out arguments if they’re not already specified.

See also: ‘ds’

Package

collidxr.

Source

collidxr.lisp.


5.2.3 Generic functions

Generic Function: plot* (backend input &rest args &key &allow-other-keys)

Plot INPUT with BACKEND. Typically you can just call ‘plot’ instead.

Package

collidxr.

Source

collidxr.lisp.

Methods
Method: plot* ((backend (eql :vgplot)) (list list) &rest args &key &allow-other-keys)

5.2.4 Standalone methods

Method: floatfy ((fbnode fbnode))
Package

cl-collider.

Source

collidxr.lisp.


5.2.5 Classes

Class: fbnode

Feedback node, for creating feedback loops within synthdefs. It’s recommended to use ‘fbn’ to create an ‘fbnode’, and then ‘fbn-read’ and ‘fbn-write’ to read and write to it.

See also: ‘fbn’, ‘fbn-read’, ‘fbn-write’

Package

collidxr.

Source

collidxr.lisp.

Direct methods

floatfy.

Direct slots
Slot: num-channels
Initform

1

Initargs

:num-channels

Slot: frames
Package

cl-collider.

Initform

1024

Initargs

:frames

Slot: phase
Package

common-lisp.

Initargs

:phase

Slot: max-delay-time
Initargs

:max-delay-time

Slot: local-buf
Package

cl-collider.

Initargs

:local-buf

Slot: interpolation
Initform

2

Initargs

:interpolation


Appendix A Indexes


A.1 Concepts