The cl-patterns Reference Manual

This is the cl-patterns Reference Manual, version 0.7, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:15:30 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-patterns

Pattern library for algorithmic music composition and performance in Common Lisp

Author

modula t.

Contact

Home Page

https://w.struct.ws/cl-patterns/

Source Control

(GIT git@github.com:defaultxr/cl-patterns.git)

Bug Tracker

https://github.com/defaultxr/cl-patterns/issues

License

MIT

Version

0.7

Dependencies
  • alexandria (system).
  • mutility (system).
  • mutility/loopy (system).
  • bordeaux-threads (system).
  • closer-mop (system).
  • named-readtables (system).
  • local-time (system).
Source

cl-patterns.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-patterns/patterns

Dependency

event.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 cl-patterns/cl-patterns.asd

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

ASDF Systems

cl-patterns.


4.1.2 cl-patterns/package.lisp

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Packages

cl-patterns.


4.1.3 cl-patterns/utility.lisp

Dependency

package.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

4.1.4 cl-patterns/conversions.lisp

Dependency

utility.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

4.1.5 cl-patterns/scales.lisp

Dependency

conversions.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

4.1.6 cl-patterns/event.lisp

Dependency

scales.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

4.1.7 cl-patterns/patterns/patterns.lisp

Source

cl-patterns.asd.

Parent Component

patterns (module).

Public Interface
Internals

4.1.8 cl-patterns/patterns/pdef.lisp

Source

cl-patterns.asd.

Parent Component

patterns (module).

Public Interface
Internals

4.1.9 cl-patterns/patterns/pmeta.lisp

Source

cl-patterns.asd.

Parent Component

patterns (module).

Public Interface
Internals

4.1.10 cl-patterns/patterns/bjorklund.lisp

Source

cl-patterns.asd.

Parent Component

patterns (module).

Public Interface

4.1.11 cl-patterns/patterns/cycles.lisp

Source

cl-patterns.asd.

Parent Component

patterns (module).

Public Interface
Internals

4.1.12 cl-patterns/patterns/track.lisp

Source

cl-patterns.asd.

Parent Component

patterns (module).

Public Interface
Internals

4.1.13 cl-patterns/patterns/export.lisp

Source

cl-patterns.asd.

Parent Component

patterns (module).


4.1.14 cl-patterns/eseq.lisp

Dependency

patterns (module).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

4.1.15 cl-patterns/backend.lisp

Dependency

eseq.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

4.1.16 cl-patterns/render.lisp

Dependency

backend.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

find-backend-supporting-render (function).


4.1.17 cl-patterns/clock.lisp

Dependency

render.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface
Internals

4.1.18 cl-patterns/extensions/sequence.lisp

Dependency

clock.lisp (file).

Source

cl-patterns.asd.

Parent Component

cl-patterns (system).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 cl-patterns

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • mutility.
Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Special variables

Special Variable: *c4-midinote*

The MIDI note number of note C, octave 4. This sets the global tuning of the various pitch conversion functions.

Package

cl-patterns.

Source

conversions.lisp.

Special Variable: *cl-patterns-temporary-directory*

The default directory to store ‘render’ed files in.

Package

cl-patterns.

Source

render.lisp.

Special Variable: *clock*

The default clock to run tasks on.

Package

cl-patterns.

Source

utility.lisp.

Special Variable: *default-pattern-length*

The default value of a pattern’s LENGTH parameter.

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *default-pattern-repeats*

The default value of a pattern’s REPEATS parameter.

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *display-server*

The display server type that ‘mouse-location’ should default to. Attempts to auto-detect the correct display server on load.

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *event*

The event special variable. Can be referenced inside a pattern’s code.

Package

cl-patterns.

Source

utility.lisp.

Special Variable: *max-pattern-yield-length*

The default maximum number of events or values that will be used by functions like ‘next-n’ or patterns like ‘protate’, in order to prevent hangs caused by infinite-length patterns.

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *note-names*

List of note names in the equal temperament 12-tone tuning.

Package

cl-patterns.

Source

conversions.lisp.

Special Variable: *post-pattern-output-processors*

List of functions that are applied as the last step of pattern output generation. Each output yielded by an "outermost" pattern (i.e. one without a ‘pattern-parent’) will be processed (along with the pstream as a second argument) through each function in this list, allowing for arbitrary transformations of the generated outputs. The return value of each function is used as the input to the next function, and the return value of the last function is used as the output yielded by the pattern.

This can be used, for example, to implement mappings from friendly instrument names to the full parameters needed to specify the instrument in question for backends such as MIDI which require it; in fact this feature is already implemented more conveniently with the setf-able ‘instrument-mapping’ function.

See also: ‘*instrument-map*’, ‘remap-instrument-to-parameters’

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *screen-size*

The combined size of all monitors plugged into the machine that cl-patterns is running on. If you add or remove displays after loading cl-patterns, you may have to update this variable. To set the correct value, run (setf *screen-size* (screen-size)).

See also: ‘*display-server*’, ‘screen-size’, ‘mouse-location’, ‘pmouse’

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: eop

End Of Pattern; the symbol yielded by patterns after their last output.

Package

cl-patterns.

Source

utility.lisp.


6.1.2 Macros

Macro: cycles (spec map &rest list)

Convenience macro to specify a rhythm or melody using symbols. Outputs a list of events with :type, :dur, and another parameter which is specifiable. Usually used to :embed into a pattern.

SPEC is a symbol representing the type of output you’re going to send. It can be midinote, freq, note, instrument, or buffer/bufnum. It can also be a list, which provides the spec as the first element, and keywords (such as :dur for the total dur) for the rest.

MAP is a plist specifying the mapping from symbols to SPEC’s parameter. It can be blank if you’re just making a melody. By default, the map includes keys that map - and _ to rests.

LIST is the actual pattern to generate.

Package

cl-patterns.

Source

cycles.lisp.

Macro: defpattern (name superclasses slots &key documentation defun)

Define a pattern. This macro automatically generates the pattern’s class, its pstream class, and the function to create an instance of the pattern, and makes them external in the cl-patterns package.

NAME is the name of the pattern. Typically a word or two that describes its function, prefixed with p.

SUPERCLASSES is a list of superclasses of the pattern. Most patterns just subclass the ’pattern’ class.

SLOTS is a list of slots that the pattern and pstreams derived from it have. Each slot can either be just a symbol, or a slot definition a la ‘defclass’. You can provide a default for the slot with the :initform key as usual, and you can set a slot as a state slot (which only appears in the pattern’s pstream class) by setting the :state key to t.

DOCUMENTATION is a docstring describing the pattern. We recommend providing at least one example, and a "See also" section to refer to similar pattern classes.

DEFUN can either be a full defun form for the pattern, or an expression which will be inserted into the pattern creation function prior to initialization of the instance. Typically you’d use this for inserting ‘assert’ statements, for example.

See also: ‘pattern’, ‘pdef’, ‘all-patterns’

Package

cl-patterns.

Source

patterns.lisp.

Macro: pb (name &body pairs)

pb is a convenience macro, wrapping the functionality of ‘pbind’ and ‘pdef’ while also providing additional syntax sugar. NAME is the name of the pattern (same as pbind’s :pdef key or ‘pdef’ itself), and PAIRS is the same as in regular pbind. If PAIRS is only one element, pb operates like ‘pdef’, otherwise it operates like ‘pbind’.

The expressions in PAIRS are also automatically translated to equivalent patterns if applicable; for example:

;; (pb :foo :bar (+ (pseries) (pseq (list -1 0 1))))

...is the same as:

;; (pb :foo :bar (p+ (pseries) (pseq (list -1 0 1))))

See also: ‘pbind’, ‘pdef’

Package

cl-patterns.

Source

patterns.lisp.

Macro: pf (&body body)

Convenience macro for ‘pfunc’ that automatically wraps BODY in a lambda.

Package

cl-patterns.

Source

patterns.lisp.

Macro: ppc (&body pairs)

Syntax sugar for ‘pparchain’ that automatically splits PAIRS by :- symbols.

Example:

;; (ppc :foo (pseq (list 1 2 3) 1)
;; :-
;; :bar (p+ (pk :foo) 2))
;; ;=> (((EVENT :FOO 1) (EVENT :FOO 1 :BAR 3))
;; ((EVENT :FOO 2) (EVENT :FOO 2 :BAR 4))
;; ((EVENT :FOO 3) (EVENT :FOO 3 :BAR 5)))

See also: ‘pparchain’

Package

cl-patterns.

Source

patterns.lisp.

Macro: pt (header &rest rows)

Syntax sugar for ‘ptrack’. Avoids the need to quote or use ‘list’.

Example:

;; (pt (:foo 1 :bar (pseries) :dur 1/4)
;; (2) ; (:foo 2 :bar 0 :dur 1/4)
;; () ; (:foo 1 :bar 1 :dur 1/4)
;; (9 :bar 90) ; (:foo 9 :bar 90 :dur 1/2)
;; (-) ; extends the previous note by 1/4 beat
;; :r ; (:foo 1 :bar 4 :dur 1/4 :type :rest)
;; )

See also: ‘ptrack’

Package

cl-patterns.

Source

track.lisp.


6.1.3 Compiler macros

Compiler Macro: events-lists-differing-keys (&rest args)
Package

cl-patterns.

Source

event.lisp.

Compiler Macro: parp (&rest args)
Package

cl-patterns.

Source

patterns.lisp.


6.1.4 Ordinary functions

Function: all-backend-types ()

Get a list of names of all defined backend types. A backend type is any class that inherits from ‘backend’.

See also: ‘all-backends’, ‘enabled-backends’

Package

cl-patterns.

Source

backend.lisp.

Function: all-backends (&key enabled-p started-p)

Get a list of all backends made with ‘make-backend’ or ‘backend-start’. ENABLED-P and STARTED-P can be used to limit the results only to backends with matching status.

See also: ‘all-backend-types’, ‘enabled-backends’

Package

cl-patterns.

Source

backend.lisp.

Function: all-chords ()

Get a list of all defined chords.

Package

cl-patterns.

Source

scales.lisp.

Function: all-instruments (&optional backend)

Get a list of the names of all instruments defined for BACKEND, or all enabled backends if none specified.

See also: ‘playing-nodes’, ‘all-patterns’, ‘all-pdefs’, ‘enabled-backends’

Package

cl-patterns.

Source

utility.lisp.

Function: all-patterns ()

Get a list of the names of all defined pattern classes.

See also: ‘all-pdefs’

Package

cl-patterns.

Source

patterns.lisp.

Function: all-pdef-names (&key include-aliases package dictionary)

Get a list of the names of all defined pdef objects.

See also: ‘all-pdefs’, ‘pdef-names’

Package

cl-patterns.

Source

pdef.lisp.

Function: all-pdefs (&key package dictionary)

Get a list of all defined pdef objects in DICTIONARY. With PACKAGE, get only pdefs whose name is a symbol in that package.

See also: ‘all-pdef-names’, ‘pdef-names’, ‘find-pdef’

Package

cl-patterns.

Source

pdef.lisp.

Function: all-scales ()

Get a list of all defined scales.

Package

cl-patterns.

Source

scales.lisp.

Function: all-tunings ()

Get a list of all defined tunings.

Package

cl-patterns.

Source

scales.lisp.

Function: amp-db (amp)

Convert amplitude to decibels.

Package

cl-patterns.

Source

conversions.lisp.

Function: backend-p (object)

Test whether OBJECT is a ‘backend’.

See also: ‘find-backend’, ‘all-backends’

Package

cl-patterns.

Source

backend.lisp.

Function: bipolar-1-to-midi (number)

Convert the range -1..1 to 0..127.

Package

cl-patterns.

Source

conversions.lisp.

Function: bipolar-1-to-midi-pitchbend (number)

Convert the range -1..1 to pitchbend message values used by the alsa-midi backend.

Package

cl-patterns.

Source

conversions.lisp.

Function: bipolar-unipolar (number)

Convert a bipolar number (-1 to 1) to a unipolar number (0 to 1).

See also: ‘unipolar-bipolar’

Package

cl-patterns.

Source

conversions.lisp.

Function: bjorklund (pulses &optional steps offset)

Generate a list representing a Euclidean rhythm using the Bjorklund algorithm. PULSES is the number of "hits" in the sequence, STEPS is number of divisions of the sequence, and OFFSET is the number to rotate the sequence by. This function returns a list, where 1 represents a note and 0 represents a rest. If you want to use bjorklund in a pattern, you may be more interested in ‘pbjorklund’ instead, which returns events with the correct duration and type.

Example: (bjorklund 3 7) ;=> (1 0 1 0 1 0 0)

See also: ‘pbjorklund’

Package

cl-patterns.

Source

bjorklund.lisp.

Function: chord-midinotes (chord &optional root octave)

Get a list of the midi note numbers in the specified chord.

Package

cl-patterns.

Source

scales.lisp.

Function: chord-notes (chord)

Return a list consisting of the note numbers for CHORD.

Package

cl-patterns.

Source

scales.lisp.

Function: chromatic-index-degree (chromatic-index &rest args &key root scale)

Get the degree of CHROMATIC-INDEX.

Package

cl-patterns.

Source

conversions.lisp.

Function: chromatic-index-freq (chromatic-index &optional octave)

Get the frequency of CHROMATIC-INDEX.

Package

cl-patterns.

Source

conversions.lisp.

Function: chromatic-index-midinote (chromatic-index &optional octave)

Get the midinote of CHROMATIC-INDEX.

Package

cl-patterns.

Source

conversions.lisp.

Function: chromatic-index-note (chromatic-index)

Get the note of CHROMATIC-INDEX.

Note that this function is not aware of context and thus always returns the first known name of each note, not necessarily the one that is "correct".

Package

cl-patterns.

Source

conversions.lisp.

Function: clock-caught-conditions (&optional clock)

A list of conditions caught by the clock while processing tasks when its condition-handler is non-nil. Each entry in the list is a plist containing the the condition and additional data generated by the ‘caught-conditions-extra-data-function’ slot’s function.

See also: ‘clock-condition-handler’

Package

cl-patterns.

Source

clock.lisp.

Function: (setf clock-caught-conditions) (&optional clock)
Package

cl-patterns.

Source

clock.lisp.

Function: clock-condition-handler (&optional clock)

The restart to invoke when a condition occurs during task processing. If nil, the clock will not attempt to handle any conditions. If non-nil, all conditions signaled within a task will be caught and the specified restart will be invoked automatically to prevent the clock from pausing. Caught conditions will be printed as a warning and recorded in the clock’s caught-conditions slot with the condition and any extra data generated by the function in the clock’s ‘caught-conditions-extra-data-function’ slot.

See also: ‘clock-caught-conditions’

Package

cl-patterns.

Source

clock.lisp.

Function: (setf clock-condition-handler) (&optional clock)
Package

cl-patterns.

Source

clock.lisp.

Function: clock-latency (&optional clock)

The default latency for events played on the clock; the number of seconds added onto the event’s scheduled time, in order to allow the backend to process it without being "late".

Package

cl-patterns.

Source

clock.lisp.

Function: (setf clock-latency) (&optional clock)
Package

cl-patterns.

Source

clock.lisp.

Function: clock-loop (clock &key granularity)

Convenience method for processing a clock’s tasks in a loop.

To run the clock in a new thread, you can call ‘start-clock-loop’.

See also: ‘start-clock-loop’, ‘clock-process’

Package

cl-patterns.

Source

clock.lisp.

Function: clock-process (clock beats)

Process tasks on CLOCK for the next BEATS beats.

See also: ‘clock-loop’, ‘clock-tasks’, ‘make-clock’

Package

cl-patterns.

Source

clock.lisp.

Function: clock-tasks (&optional clock)

Get a list of all tasks running on CLOCK.

See also: ‘pattern-tasks’

Package

cl-patterns.

Source

clock.lisp.

Function: (setf clock-tasks) (&optional clock)
Package

cl-patterns.

Source

clock.lisp.

Function: combine-events (&rest events)

Get a new event that inserts all the items in each event of EVENTS. Keys from the events listed first will be overwritten by later events.

See also: ‘copy-event’, ‘split-event-by-lists’, ‘combine-events-via-lists’

Package

cl-patterns.

Source

event.lisp.

Function: combine-events-via-lists (&rest events)

Combine EVENTS together to produce one event. Any keys that differ between the events will have be set to lists containing all the values from each event (unless the value is null). This is the opposite of ‘split-event-by-lists’.

Example:

;; (combine-events-via-lists (event :foo 1 :bar 2 :qux 4) (event :foo 1 :bar 3 :baz 5))
;; => (EVENT :FOO 1 :BAR (2 3) :QUX 4 :BAZ 5)

See also: ‘split-event-by-lists’, ‘combine-events’

Package

cl-patterns.

Source

event.lisp.

Function: copy-event (event)

Get a new event that is a copy of EVENT.

See also: ‘combine-events’

Package

cl-patterns.

Source

event.lisp.

Function: db-amp (db)

Convert decibels to amplitude.

Package

cl-patterns.

Source

conversions.lisp.

Function: define-chord (name indexes scale &optional aliases)

Define a musical chord.

See also: ‘scale’, ‘define-tuning’, ‘define-scale’

Package

cl-patterns.

Source

scales.lisp.

Function: define-scale (name notes &optional tuning aliases)

Define a musical scale.

See also: ‘scale’, ‘define-tuning’, ‘define-chord’

Package

cl-patterns.

Source

scales.lisp.

Function: define-tuning (name pitches octave-ratio &optional aliases)

Define a musical tuning.

See also: ‘tuning’, ‘define-scale’, ‘define-chord’

Package

cl-patterns.

Source

scales.lisp.

Function: degree-chromatic-index (degree &rest args &key scale steps-per-octave mtranspose)

Get the chromatic index of DEGREE.

Package

cl-patterns.

Source

conversions.lisp.

Function: degree-freq (degree &rest args &key root octave scale)

Get the frequency of DEGREE, based on the ROOT, OCTAVE, and SCALE, if provided.

Package

cl-patterns.

Source

conversions.lisp.

Function: degree-key (degree &key scale steps-per-octave accidental)

Get the note in SCALE at the index DEGREE, possibly overriding STEPS-PER-OCTAVE.

Package

cl-patterns.

Source

conversions.lisp.

Function: degree-midinote (degree &key root octave scale)

Get the midi note number of DEGREE, taking into account the ROOT, OCTAVE, and SCALE, if provided.

Package

cl-patterns.

Source

conversions.lisp.

Function: degree-note (degree &key scale steps-per-octave mtranspose)

Get the note number of DEGREE in SCALE.

Package

cl-patterns.

Source

conversions.lisp.

Function: degree-octave (degree)

Get the octave of DEGREE.

Package

cl-patterns.

Source

conversions.lisp.

Function: dur-freq (dur &optional tempo)

Convert DUR in beats to frequency in Hz according to TEMPO in beats per second.

Package

cl-patterns.

Source

conversions.lisp.

Function: dur-time (dur &optional tempo)

Convert DUR in beats to time in seconds according to TEMPO in beats per second.

Package

cl-patterns.

Source

conversions.lisp.

Function: e (key)

Syntax sugar; like ‘event-value’, but always gets the value from ‘*event*’.

See also: ‘event-value’, ‘event’, ‘*event*’

Package

cl-patterns.

Source

event.lisp.

Function: (setf e) (key)
Package

cl-patterns.

Source

event.lisp.

Function: enabled-backends ()

Get a list of all enabled backends.

See also: ‘all-backends’, ‘backend-enabled-p’

Package

cl-patterns.

Source

backend.lisp.

Function: eseq (&optional events &key source metadata)

Create an eseq containing the specified events and metadata.

Package

cl-patterns.

Source

eseq.lisp.

Function: eseq-length (eseq)

Get the number of events in ESEQ.

Package

cl-patterns.

Source

eseq.lisp.

Function: eseq-p (object)

True if OBJECT is an eseq.

See also: ‘eseq’

Package

cl-patterns.

Source

eseq.lisp.

Function: event (&rest params)

Create an event, using the PARAMS as its keys/values.

See also: ‘event-value’, ‘event-p’, ‘e’, ‘*event*’

Package

cl-patterns.

Source

event.lisp.

Function: event-equal (event-1 event-2)

Test if EVENT-1 and EVENT-2 are equivalent.

See also: ‘every-event-equal’

Package

cl-patterns.

Source

event.lisp.

Function: event-p (object)

True if OBJECT is an event.

See also: ‘event’, ‘event-value’

Package

cl-patterns.

Source

event.lisp.

Function: event-value (event key)

Get the value of KEY in EVENT, running any necessary conversion functions.

Returns 2 values: the value of the key, and the name of the key the value was derived from (or t if the default value of the key was used, or nil if no value or default was provided).

See also: ‘event’, ‘e’, ‘raw-event-value’

Package

cl-patterns.

Source

event.lisp.

Function: (setf event-value) (event key)

Set the value of KEY to VALUE in EVENT, running any conversion functions that exist.

Package

cl-patterns.

Source

event.lisp.

Function: events-differing-keys (&rest events)

Get a list of keys that differ between EVENTS.

See also: ‘every-event-equal’

Package

cl-patterns.

Source

event.lisp.

Function: events-lists-differing-keys (&rest lists)

Get a list of the keys that differ between respective event in LISTS.

Example:

;; (events-lists-differing-keys (list (event :foo 1 :bar 2) (event :bar 3) (event :foo 1 :bar 3)) ;; (list (event :foo 1 :bar 2) (event :foo 1 :bar 3) (event :foo 2 :bar 3))) ;; => (NIL (:FOO) (:FOO))

See also: ‘every-event-equal’

Package

cl-patterns.

Source

event.lisp.

Function: every-event-equal (&rest lists)

Test if all the events in LISTS are equivalent. Like (every #’event-equal LIST-1 LIST-2 ...) but returns false if the lists are not the same length.

See also: ‘event-equal’, ‘events-differing-keys’

Package

cl-patterns.

Source

event.lisp.

Function: find-backend (backend &rest args &key enabled-p started-p)

Find a registered backend whose name or type matches BACKEND. With ENABLED-P, only search through currently enabled backends; with STARTED-P, only backends that have been started.

See also: ‘all-backends’, ‘enabled-backends’

Package

cl-patterns.

Source

backend.lisp.

Function: find-pdef (name &key errorp dictionary)

Get the object named NAME in the pdef dictionary. If ERRORP is true, signals an error when NAME isn’t found in the dictionary. Returns t or nil as a second value showing whether the symbol was found.

See also: ‘pdef-p’, ‘all-pdefs’, ‘all-pdef-names’

Package

cl-patterns.

Source

pdef.lisp.

Function: (setf find-pdef) (name &key errorp dictionary)
Package

cl-patterns.

Source

pdef.lisp.

Function: freq-chromatic-index (freq)

Get the chromatic index of FREQ.

Package

cl-patterns.

Source

conversions.lisp.

Function: freq-degree (freq &key root scale)

Convert a frequency to a scale degree.

Package

cl-patterns.

Source

conversions.lisp.

Function: freq-dur (freq &optional tempo)

Convert FREQ in Hz to duration in beats according to TEMPO in beats per second.

Package

cl-patterns.

Source

conversions.lisp.

Function: freq-midinote (freq)

Convert a frequency to a midi note number.

Package

cl-patterns.

Source

conversions.lisp.

Function: freq-note (freq)

Get the note for the frequency provided.

Package

cl-patterns.

Source

conversions.lisp.

Function: freq-octave (freq)

Get the octave number that the frequency FREQ occurs in.

Package

cl-patterns.

Source

conversions.lisp.

Function: freq-rate (freq &optional base-freq)

Convert the frequency FREQ to a playback rate, based on BASE-FREQ. Useful to convert musical pitch information to a number usable for sample playback synths.

Package

cl-patterns.

Source

conversions.lisp.

Function: frequency-to-midi (frequency)

Convert FREQUENCY to a MIDI note number (rounding to ensure it’s an integer).

Note that this function is meant for use with the MIDI backend; for frequency-to-midinote conversion without rounding, see ‘freq-midinote’ instead.

Package

cl-patterns.

Source

conversions.lisp.

Function: instrument-mapping (instrument)

Get a mapping from INSTRUMENT (an instrument name as a string or symbol) to a plist of parameters which should be set in the event by ‘remap-instrument-to-parameters’.

See also: ‘remap-instrument-to-parameters’, ‘*instrument-map*’

Package

cl-patterns.

Source

patterns.lisp.

Function: (setf instrument-mapping) (instrument)

Set a mapping from INSTRUMENT (an instrument name as a string or symbol) to a plist of parameters which will be set in the event by ‘remap-instrument-to-parameters’. Setting an instrument to nil with this function removes it from the map.

See also: ‘instrument-mapping’, ‘remap-instrument-to-parameters’, ‘*instrument-map*’

Package

cl-patterns.

Source

patterns.lisp.

Function: ipstream (&optional patterns end-when-empty granularity)

Insertable pstream; a pstream that can be changed while it’s running by inserting new patterns at a specified beat.

Package

cl-patterns.

Source

patterns.lisp.

Function: load-scala-scale (file &optional aliases)

Load a Scala (.scl) scale file and define a tuning and scale from it.

Note that Scala refers to these as "scales" but in cl-patterns they are known as tunings.

Package

cl-patterns.

Source

scales.lisp.

Function: make-clock (&optional tempo &key latency play-expired-events condition-handler)

Create a clock with a tempo of TEMPO in beats per second (Hz).

Use ‘start-clock-loop’ to start the clock so that it begins processing its tasks in a new thread, or call ‘clock-loop’ to start the loop in the current thread. Alternatively, the clock can be advanced manually an arbitrary number of beats at a time using ‘clock-process’.

See also: ‘clock-process’, ‘clock-loop’, ‘start-clock-loop’

Package

cl-patterns.

Source

clock.lisp.

Function: midi-ratio (midi)

Convert a MIDI note number difference to a frequency ratio.

Package

cl-patterns.

Source

conversions.lisp.

Function: midi-truncate-clamp (number &optional max)

Truncate NUMBER and clamp it to the range 0..MAX (default 127).

Package

cl-patterns.

Source

conversions.lisp.

Function: midinote-chromatic-index (midinote)

Get the chromatic index of MIDINOTE.

Package

cl-patterns.

Source

conversions.lisp.

Function: midinote-degree (midinote &key root scale)

Get the degree of MIDINOTE, taking into account the ROOT, OCTAVE, and SCALE, if provided.

Package

cl-patterns.

Source

conversions.lisp.

Function: midinote-freq (midinote)

Convert a midi note number to a frequency.

Package

cl-patterns.

Source

conversions.lisp.

Function: midinote-note (midinote)

Get the note name of MIDINOTE.

Package

cl-patterns.

Source

conversions.lisp.

Function: midinote-octave (midinote)

Get the octave number that MIDINOTE occurs in.

Package

cl-patterns.

Source

conversions.lisp.

Function: midinote-rate (midinote &optional base-note)

Convert a midinote to a playback rate.

Package

cl-patterns.

Source

conversions.lisp.

Function: mouse-location (&optional display-server)

Get a plist of the mouse location, total display size, and other information gleaned about DISPLAY-SERVER. DISPLAY-SERVER can be :x11, :wayland, etc, but should default to the correct display server detected when cl-patterns is loaded. Will signal an error if the information cannot be determined (i.e. when the display server is not detected or not supported).

NOTE: This is currently only implemented on X-based systems, so will not work on Windows, MacOS, and Wayland.

Package

cl-patterns.

Source

patterns.lisp.

Function: multi-channel-funcall (function &rest args)

Call FUNCTION on the provided arguments. If one or more of the arguments is a list, funcall for each element of the list(s). The length of the resulting list will be the same as the longest input list.

Example:

;; (multi-channel-funcall #’+ 1 (list 1 2 3))
;; => (2 3 4)

See also: ‘mutility:mapwrap’, ‘split-event-by-lists’

Package

cl-patterns.

Source

utility.lisp.

Function: next-beat-for-quant (&optional quant beat direction)

Get the next valid beat for QUANT after BEAT. If DIRECTION is negative, finds the previous valid beat for QUANT.

See also: ‘quant’

Package

cl-patterns.

Source

utility.lisp.

Function: next-n (pstream &optional n)

Get the next N outputs of a pstream, function, or other object, advancing the pstream forward N times in the process.

See also: ‘next’, ‘next-upto-n’, ‘peek’, ‘peek-n’

Package

cl-patterns.

Source

patterns.lisp.

Function: next-upto-n (pstream &optional n)

Get a list of up to N results from PSTREAM, not including the end of pattern.

See also: ‘next’, ‘next-n’, ‘peek’, ‘peek-upto-n’

Package

cl-patterns.

Source

patterns.lisp.

Function: note-chromatic-index (note)

Get the chromatic index of NOTE.

Package

cl-patterns.

Source

conversions.lisp.

Function: note-degree (note &key root scale)

Get the degree of a note in the provided scale. If the note is not in the provided scale, truncate to the nearest note that is.

Package

cl-patterns.

Source

conversions.lisp.

Function: note-freq (note &rest args &key root octave steps-per-octave gtranspose octave-ratio)

Given a note, return its frequency in hertz, taking into account the ROOT and OCTAVE if provided.

See also: ‘note-midinote’

Package

cl-patterns.

Source

conversions.lisp.

Function: note-midinote (note &key root octave steps-per-octave gtranspose octave-ratio)

Given a note, return its midi note number, taking into account the OCTAVE if provided.

See also: ‘note-freq’

Package

cl-patterns.

Source

conversions.lisp.

Function: note-name-and-octave (note)

Given a note name, return a list consisting of its note number and its octave (defaulting to 4 if it’s not specified).

Examples:

;; (note-name-and-octave :c4) ;=> (:C 4)
;; (note-name-and-octave :a#7) ;=> (:A# 7)
;; (note-name-and-octave :c-1) ;=> (:C -1)
;; (note-name-and-octave :d) ;=> (:D 4)

See also: ‘note-midinote’, ‘chromatic-index-note’

Package

cl-patterns.

Source

utility.lisp.

Function: note-octave (note)

Get the octave of NOTE.

Package

cl-patterns.

Source

conversions.lisp.

Function: octave-degree (octave)

Get the degree of OCTAVE.

Package

cl-patterns.

Source

conversions.lisp.

Function: octave-freq (octave)

Get the base frequency of OCTAVE.

Package

cl-patterns.

Source

conversions.lisp.

Function: octave-midinote (octave)

Get the base (lowest) midi note number for OCTAVE.

Package

cl-patterns.

Source

conversions.lisp.

Function: octave-note (octave)

Get the note of OCTAVE.

Package

cl-patterns.

Source

conversions.lisp.

Function: p* (&rest numbers)

Syntax sugar for (pnary #’* ...).

See also: ‘pnary’, ‘common-lisp:*’

Package

cl-patterns.

Source

patterns.lisp.

Function: p+ (&rest numbers)

Syntax sugar for (pnary #’+ ...).

See also: ‘pnary’, ‘common-lisp:+’

Package

cl-patterns.

Source

patterns.lisp.

Function: p- (number &rest more-numbers)

Syntax sugar for (pnary #’- ...).

See also: ‘pnary’, ‘common-lisp:-’

Package

cl-patterns.

Source

patterns.lisp.

Function: p/ (number &rest more-numbers)

Syntax sugar for (pnary #’/ ...).

See also: ‘pnary’, ‘common-lisp:/’

Package

cl-patterns.

Source

patterns.lisp.

Function: p/= (number &rest more-numbers)

Syntax sugar for (pnary #’/= ...).

See also: ‘pnary’, ‘common-lisp:/=’

Package

cl-patterns.

Source

patterns.lisp.

Function: p< (number &rest more-numbers)

Syntax sugar for (pnary #’< ...).

See also: ‘pnary’, ‘common-lisp:<’

Package

cl-patterns.

Source

patterns.lisp.

Function: p<= (number &rest more-numbers)

Syntax sugar for (pnary #’<= ...).

See also: ‘pnary’, ‘common-lisp:<=’

Package

cl-patterns.

Source

patterns.lisp.

Function: p= (number &rest more-numbers)

Syntax sugar for (pnary #’= ...).

See also: ‘pnary’, ‘common-lisp:=’

Package

cl-patterns.

Source

patterns.lisp.

Function: p> (number &rest more-numbers)

Syntax sugar for (pnary #’> ...).

See also: ‘pnary’, ‘common-lisp:>’

Package

cl-patterns.

Source

patterns.lisp.

Function: p>= (number &rest more-numbers)

Syntax sugar for (pnary #’>= ...).

See also: ‘pnary’, ‘common-lisp:>=’

Package

cl-patterns.

Source

patterns.lisp.

Function: paccum (&optional operator start step length &key lo hi bound-by)

Numeric accumulator. Each output and STEP is used as the input for OPERATOR to generate the next output. When LO, HI, and BOUND-BY are provided, outputs that fall outside the range LO..HI are wrapped back inside with the BOUND-BY function; the value is provided as its first argument, and LO and HI are provided as its second and third.

Based on the pattern originally from the ddwPatterns SuperCollider library.

Example:

;; (next-upto-n (paccum #’+ 0 1) 5) ; same as (pseries 0 1)
;; ;=> (0 1 2 3 4)

;; (next-upto-n (paccum #’+ 0 1 :inf :lo 0 :hi 3 :bound-by #’wrap) 9) ; same as above, wrapping between 0 and 3.
;; ;=> (0 1 2 0 1 2 0 1 2)

See also: ‘pseries’, ‘pgeom’, ‘pwalk’

Package

cl-patterns.

Source

patterns.lisp.

Function: paclump (pattern)

Automatically group outputs of the source pattern into lists of up to N items each. Unlike ‘pclump’, clump size is automatically set to the length of the longest list in the values of ‘*event*’, or 1 if there are no lists.

Example:

;; (next-upto-n (pbind :foo (pseq ’((1) (1 2) (1 2 3)) 1) :bar (paclump (pseries))))
;; ;=> ((EVENT :FOO (1) :BAR (0)) (EVENT :FOO (1 2) :BAR (1 2)) (EVENT :FOO (1 2 3) :BAR (3 4 5)))

See also: ‘pclump’

Package

cl-patterns.

Source

patterns.lisp.

Function: parp (&rest rest)

Deprecated alias for ‘pfor’.

Package

cl-patterns.

Source

patterns.lisp.

Function: pattern-as-pstream (thing)

Like ‘as-pstream’, but only converts THING to a pstream if it is a pattern.

Package

cl-patterns.

Source

patterns.lisp.

Function: pattern-children (pattern &key num accumulate class)

Get a list of all the direct child patterns of PATTERN, including any in slots or lists.

See also: ‘pattern-parent’

Package

cl-patterns.

Source

patterns.lisp.

Function: (setf pattern-metadata) (pattern key)
Package

cl-patterns.

Source

patterns.lisp.

Function: pattern-p (object)

True if OBJECT is a pattern.

See also: ‘pattern’, ‘defpattern’

Package

cl-patterns.

Source

patterns.lisp.

Function: pattern-parent (pattern &key num accumulate class)

Get the NUM-th containing pattern of PATTERN, or nil if there isn’t one. If CLASS is specified, only consider patterns of that class.

See also: ‘pattern-children’

Package

cl-patterns.

Source

patterns.lisp.

Function: pattern-tasks (pattern &optional clock)

Attempt to get the tasks on CLOCK that are playing PATTERN.

See also: ‘task-pattern’, ‘clock-tasks’

Package

cl-patterns.

Source

clock.lisp.

Function: pbeat ()

Yield the number of beats elapsed since the pbeat was embedded in the pstream.

Example:

;; (next-n (pbind :dur (pseq ’(1 2 3)) :foo (pbeat)) 3)
;; ;=> ((EVENT :DUR 1 :FOO 0) (EVENT :DUR 2 :FOO 1) (EVENT :DUR 3 :FOO 3))

See also: ‘pbeat*’, ‘beat’, ‘prun’

Package

cl-patterns.

Source

patterns.lisp.

Function: pbeat* ()

Yield the number of beats on the ‘*clock*’ of the current pattern. In other words, pbeat* is clock-synced, unlike ‘pbeat’, which is pattern-synced.

Example:

;; (next-n (pbind :dur (pseq ’(1 2 3)) :foo (pbeat*)) 3)
;; ;=> ((EVENT :DUR 1 :FOO 200) (EVENT :DUR 2 :FOO 201) (EVENT :DUR 3 :FOO 203))

See also: ‘pbeat’, ‘beat’, ‘prun’

Package

cl-patterns.

Source

patterns.lisp.

Function: pbind (&rest pairs)

pbind yields events determined by its PAIRS, which are a list of keys and values. Each key corresponds to a key in the resulting events, and each value is treated as a pattern that is evaluated for each step of the pattern to generate the value for its key.

Example:

;; (next-n (pbind :foo (pseq ’(1 2 3)) :bar :hello) 4)
;;
;; ;=> ((EVENT :FOO 1 :BAR :HELLO) (EVENT :FOO 2 :BAR :HELLO) (EVENT :FOO 3 :BAR :HELLO) EOP)

See also: ‘pmono’, ‘pb’

Package

cl-patterns.

Source

patterns.lisp.

Function: pbjorklund (pulses steps &key offset dur repeats)

pbjorklund generates Euclidean rhythms using the Bjorklund algorithm. PULSES is the number of notes in the sequence, and STEPS is number of steps in the sequence. Additionally, OFFSET is the number to rotate the sequence by, DUR is the total duration one repeat of the sequence should be, and REPEATS is the number of repeats that should be yielded. This pattern outputs events which can be embedded into another pattern. Each pulse is a note, and each subdivision of the sequence that is not a pulse is a rest. If you just want the raw output from the Bjorklund algorithm (not in pattern form), use ‘bjorklund’ instead.

Example:

;; (next-upto-n (pbjorklund 3 7))
;; => ((EVENT :TYPE :NOTE :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7) (EVENT :TYPE :NOTE :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7) (EVENT :TYPE :NOTE :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7))

See also: ‘bjorklund’

Package

cl-patterns.

Source

bjorklund.lisp.

Function: pbrown (&optional lo hi step length)

Brownian motion within a range; each output randomly a maximum of STEP away from the previous. LO and HI define the lower and upper bounds of the range. STEP defaults to 1 if LO and HI are integers.

Example:

;; (next-upto-n (pbrown 0 10 1 10))
;; ;=> (2 3 3 3 4 3 4 5 6 5)

See also: ‘pwhite’, ‘pexprand’, ‘pgauss’

Package

cl-patterns.

Source

patterns.lisp.

Function: pchain (&rest patterns)

Combine multiple patterns into one event stream.

Example:

;; (next-n (pchain (pbind :foo (pseq ’(1 2 3))) (pbind :bar (pseq ’(7 8 9) 1))) 4) ;;
;; ;=> ((EVENT :FOO 1 :BAR 7) (EVENT :FOO 2 :BAR 8) (EVENT :FOO 3 :BAR 9) NIL)

See also: ‘pbind”s :embed key

Package

cl-patterns.

Source

patterns.lisp.

Function: pclump (pattern &optional n)

Group outputs of the source pattern into lists of up to N items each.

Example:

;; (next-upto-n (pclump (pseries 0 1 5) 2))
;; ;=> ((0 1) (2 3) (4))

See also: ‘paclump’

Package

cl-patterns.

Source

patterns.lisp.

Function: pcycles (list &key map key dur repeats)

Divide DUR between the elements in LIST. Child lists are recursively divided by the dur of their step. LIST can also be a string, in which case it is split into a list, each character converted into an integer or symbol.

pcycles also supports the following keyword arguments:

- MAP - Plist mapping symbols to the event to yield for that symbol. The symbols - (dash), _ (underscore), and . (period) are mapped to rest events by default.
- KEY - The event key that should hold the value of that step. Can be convenient if you’re :embed-ing pcycles into another pattern. Defaults to :value.
- DUR - The total duration in beats of one cycle of LIST.
- REPEATS - The number of times that LIST should be repeated before the pattern ends.

Examples:

;; (next-upto-n (pcycles ’(1 - 2 - ) :repeats 1)) ; 4 items in LIST, so each output will be 1/4 beats long.
;; ;=> ((EVENT :VALUE 1 :DUR 1/4)
;; ; (EVENT :TYPE :REST :DUR 1/4)
;; ; (EVENT :VALUE 2 :DUR 1/4)
;; ; (EVENT :TYPE :REST :DUR 1/4))

;; (next-upto-n (pcycles ’(1 - (2 3)) :repeats 1)) ; 3 items in LIST, so each will fit into 1/3 beats.
;; ;=> ((EVENT :VALUE 1 :DUR 1/3)
;; ; (EVENT :TYPE :REST :DUR 1/3)
;; ; (EVENT :VALUE 2 :DUR 1/6) ; since 2 and 3 are a sublist, they will each be 1/2 of 1/3 beats long, thus 1/6.
;; ; (EVENT :VALUE 3 :DUR 1/6))

;; (next-upto-n (pcycles ’(foo 2 3) :map (list :foo (event :midinote 60)) :repeats 1)) ; map the symbol "FOO" to (event :midinote 60)
;; ;=> ((EVENT :MIDINOTE 60 :DUR 1/3) ; note that the mapped event still contains the correct :dur.
;; ; (EVENT :VALUE 2 :DUR 1/3)
;; ; (EVENT :VALUE 3 :DUR 1/3))

;; (next-upto-n (pcycles ’(1 2) :key :bar :repeats 1)) ; the value of each item will be used as the value of the :key key – in this case, :bar.
;; ;=> ((EVENT :BAR 1 :DUR 1/2)
;; ; (EVENT :BAR 2 :DUR 1/2))

;; (next-upto-n (pcycles ’(1 2) :dur 4 :repeats 1)) ; set the total duration of each cycle of LIST to 4 beats.
;; ;=> ((EVENT :VALUE 1 :DUR 2) ; 4 beats divided by 2 events = each event is 2 beats in length.
;; ; (EVENT :VALUE 2 :DUR 2))

;; (next-upto-n (pcycles ’(1 2) :repeats 2)) ; repeat the list 2 times before ending the pattern.
;; ;=> ((EVENT :VALUE 1 :DUR 1/2) ; 2 items in list and 2 repeats results in 4 total outputs.
;; ; (EVENT :VALUE 2 :DUR 1/2)
;; ; (EVENT :VALUE 1 :DUR 1/2)
;; ; (EVENT :VALUE 2 :DUR 1/2))

pcycles is based on and inspired by the TidalCycles live coding environment (see https://tidalcycles.org/ ), however most TidalCycles notation is not supported.

See also: ‘cycles’, ‘ptrack’

Package

cl-patterns.

Source

cycles.lisp.

Function: pdef (name &optional pattern)

Define a named pattern, with NAME being the name of the pattern and PATTERN the pattern itself. Named patterns are stored in a global dictionary and can be referred back to by calling ‘pdef’ without supplying PATTERN. The global dictionary also keeps track of the pdef’s pstream when ‘play’ is called on it. If a pdef is redefined while it is being played, the changes won’t be audible until either PATTERN ends, or the pdef’s ‘end-quant’ time is reached (if non-nil). Note that, unlike bare patterns, pdefs loop by default when played (‘loop-p’).

Example:

;; (pdef :foo (pbind :degree (pseries 0 1 4)))
;;
;; (play (pdef :foo))
;; ;; redefine the pdef’s pattern... note that the redefinition doesn’t become audible until the current loop finishes playing:
;; (pdef :foo (pbind :degree (pseries 4 -1 4)))

See also: ‘find-pdef’, ‘all-pdefs’, ‘pb’, ‘pmeta’, ‘ps’

Package

cl-patterns.

Source

pdef.lisp.

Function: pdef-p (object)

Test whether OBJECT is a pdef.

See also: ‘find-pdef’

Package

cl-patterns.

Source

pdef.lisp.

Function: pdelta (pattern &optional cycle)

Output the difference between successive outputs of PATTERN, assuming PATTERN restarts every CYCLE outputs.

Unlike ‘pdiff’, pdelta is written with its use as input for ‘pbind”s :delta key in mind. If PATTERN’s successive values would result in a negative difference, pdelta instead wraps the delta around to the next multiple of CYCLE. This would allow you to, for example, supply the number of the beat that each event occurs on, rather than specifying the delta between each event. This is of course achievable using pbind’s :beat key as well, however that method requires the pbind to peek at future values, which is not always desirable.

Based on the pattern originally from the ddwPatterns SuperCollider library.

Example:

;; (next-n (pdelta (pseq ’(0 1 2 3)) 4) 8)
;;
;; ;=> (1 1 1 1 1 1 1 1)
;;
;; (next-n (pdelta (pseq ’(0 1 2 5)) 4) 8)
;;
;; ;=> (1 1 3 3 1 1 3 3)

See also: ‘pdiff’, ‘pbind”s :beat key

Package

cl-patterns.

Source

patterns.lisp.

Function: pdiff (pattern)

Output the difference between successive outputs of PATTERN.

Example:

;; (next-n (pdiff (pseq ’(3 1 4 3) 1)) 4)
;;
;; ;=> (-2 3 -1 NIL)

See also: ‘pdelta’

Package

cl-patterns.

Source

patterns.lisp.

Function: pdrop (pattern &optional n)

Drop the first N outputs from PATTERN and yield the rest. If N is negative, drop the last N outputs from PATTERN instead.

Example:

;; (next-n (pdrop (pseq ’(1 2 3 4) 1) 2) 4)
;;
;; ;=> (3 4 NIL NIL)

See also: ‘protate’

Package

cl-patterns.

Source

patterns.lisp.

Function: pdurstutter (pattern n)

Yield each output from PATTERN N times, dividing it by N. If the output from PATTERN is an event, its dur is divided; if it’s a number, the number itself is divided instead of being yielded directly.

Example:

;; (next-n (pdurstutter (pseq ’(1 2 3 4 5)) (pseq ’(3 2 1 0 2))) 9)
;; ;=> (1/3 1/3 1/3 1 1 3 5/2 5/2 NIL)
;;
;; (next-n (pdurstutter (pbind :dur (pseq ’(1 2 3 4 5)))
;; (pseq ’(3 2 1 0 2)))
;; 9)
;; ;=> ((EVENT :DUR 1/3) (EVENT :DUR 1/3) (EVENT :DUR 1/3) (EVENT :DUR 1) (EVENT :DUR 1) (EVENT :DUR 3) (EVENT :DUR 5/2) (EVENT :DUR 5/2) NIL)

See also: ‘pr’

Package

cl-patterns.

Source

patterns.lisp.

Function: peek-n (pstream &optional n)

Peek at the next N results of a pstream, without advancing it forward in the process.

See also: ‘peek’, ‘peek-upto-n’, ‘next’, ‘next-n’

Package

cl-patterns.

Source

patterns.lisp.

Function: peek-upto-n (pstream &optional n)

Peek at up to the next N results of a pstream, without advancing it forward in the process.

See also: ‘peek’, ‘peek-n’, ‘next’, ‘next-upto-n’

Package

cl-patterns.

Source

patterns.lisp.

Function: peql (x y)

Syntax sugar for (pnary #’eql ...).

See also: ‘pnary’, ‘common-lisp:eql’

Package

cl-patterns.

Source

patterns.lisp.

Function: pexprand (&optional lo hi length)

Exponentially-distributed random numbers between LO and HI. Note that LO and HI cannot be 0, and that LO and HI must have the same sign or else complex numbers will be output.

Example:

;; (next-upto-n (pexprand 1.0 8.0 4))
;; ;=> (1.0420843091865208d0 1.9340168112124456d0 2.173209129035095d0 4.501371557329618d0)

See also: ‘pwhite’, ‘pbrown’, ‘pgauss’, ‘prand’

Package

cl-patterns.

Source

patterns.lisp.

Function: pfilter (pattern &optional predicate)

Skip elements of a source pattern that PREDICATE returns false for. If PREDICATE is not a function, skip items that are ‘eql’ to it.

Example:

;; (next-n (pfilter (pseq (list 1 2 3))
;; 2)
;; 6)
;; ;=> (1 3 1 3 1 3)

;; (next-n (pfilter (pseries 0 1) ’evenp)
;; 6)
;; ;=> (1 3 5 7 9 11)

See also: ‘pfilter-out’, ‘pr’, ‘pdurstutter’

Package

cl-patterns.

Source

patterns.lisp.

Function: pfilter-out (pattern predicate)

Skip elements of a source pattern that PREDICATE returns true for. If PREDICATE is not a function, skip items that are ‘eql’ to it.

See also: ‘pfilter’

Package

cl-patterns.

Source

patterns.lisp.

Function: pfin (pattern count)

Yield up to COUNT outputs from PATTERN.

Example:

;; (next-n (pfin (pseq ’(1 2 3) :inf) 3) 5) ;; ;=> (1 2 3 NIL NIL)

See also: ‘pfindur’

Package

cl-patterns.

Source

patterns.lisp.

Function: pfindur (pattern dur &optional tolerance)

Yield events from PATTERN until their total duration is within TOLERANCE of DUR, or greater than DUR. Any events that would end beyond DUR are cut short. If PATTERN outputs numbers, their total sum is limited instead.

Example:

;; (next-n (pfindur (pbind :dur 1 :foo (pseries)) 2) 3)
;; ;=> ((EVENT :DUR 1 :FOO 0) (EVENT :DUR 1 :FOO 1) EOP)
;;
;; (next-upto-n (pfindur (pwhite 0 4) 16))
;; ;=> (1 3 0 1 2 2 1 3 0 1 2)
;; (reduce #’+ *)
;; ;=> 16

See also: ‘pfin’, ‘psync’

Package

cl-patterns.

Source

patterns.lisp.

Function: pfor (pattern arpeggiator)

Arpeggiator pattern; each event yielded by PATTERN is bound to ‘*event*’ and then the entirety of the ARPEGGIATOR pattern is yielded.

Example:

;; (next-upto-n (pfor (pbind :foo (pseq ’(1 2 3) 1))
;; (pbind :bar (pseq ’(4 5 6) 1))))
;; ;=> ((EVENT :FOO 1 :BAR 4) (EVENT :FOO 1 :BAR 5) (EVENT :FOO 1 :BAR 6)
;; (EVENT :FOO 2 :BAR 4) (EVENT :FOO 2 :BAR 5) (EVENT :FOO 2 :BAR 6)
;; (EVENT :FOO 3 :BAR 4) (EVENT :FOO 3 :BAR 5) (EVENT :FOO 3 :BAR 6))

See also: ‘psym’, ‘pmeta’, ‘pr’

Package

cl-patterns.

Source

patterns.lisp.

Function: pfunc (func &optional length)

Yield the result of evaluating FUNC. Note that the current event of the parent pattern is still accessible via the ‘*event*’ special variable.

Example:

;; (next-upto-n (pfunc (lambda () (random 10)) 4))
;; ;=> ((5 2 8 9))
;;
;; (next-upto-n (pbind :foo (pwhite 0 10 4)
;; :bar (pfunc (lambda ()
;; (if (> (event-value *event* :foo) 5) :greater :lesser)))))
;; ;=> ((EVENT :FOO 0 :BAR :LESSER) (EVENT :FOO 6 :BAR :GREATER)
;; (EVENT :FOO 7 :BAR :GREATER) (EVENT :FOO 8 :BAR :GREATER))

See also: ‘pf’, ‘pnary’, ‘plazy’, ‘pif’

Package

cl-patterns.

Source

patterns.lisp.

Function: pgauss (&optional mean deviation length)

Random numbers distributed along a normal (gaussian) curve. MEAN is the "center" of the distribution, DEVIATION is the standard deviation (i.e. the higher the value, the further the outputs are spread from MEAN).

Example:

;; (next-n (pgauss) 4)
;; ;=> (0.08918811646370092d0 0.1745957067161632d0 0.7954678768273173d0 -1.2215823449671597d0)

See also: ‘pwhite’, ‘pexprand’, ‘pbrown’

Package

cl-patterns.

Source

patterns.lisp.

Function: pgeom (&optional start grow length)

Yield START, then generate subsequent outputs by multiplying by GROW, for a total of LENGTH outputs.

Example:

;; (next-upto-n (pgeom 1 2 4))
;; ;=> (1 2 4 8)

See also: ‘pseries’, ‘paccum’

Package

cl-patterns.

Source

patterns.lisp.

Function: pgeom* (&optional start end length)

Syntax sugar to generate a ‘pgeom’ whose values go from START to END exponentially over LENGTH steps. LENGTH cannot be infinite since delta calculation requires dividing by it.

Based on the Pgeom extension from the ddwPatterns SuperCollider library.

Example:

;; (pgeom* 1 100 8)
;; ;=> (pgeom 1 1.9306977 8)
;;
;; (next-upto-n *)
;; ;=> (1 1.9306977 3.7275934 7.196856 13.894953 26.826954 51.79474 99.999985)
;; ;; Note that due to floating point rounding errors the last output may not always be exactly END.

See also: ‘pgeom’, ‘pseries’, ‘pseries*’

Package

cl-patterns.

Source

patterns.lisp.

Function: phistory (pattern step-pattern)

Refer back to PATTERN’s history, yielding the output at the index provided by STEP-PATTERN.

Note that PATTERN is still advanced once per event, and if STEP-PATTERN yields a number pointing to an event in PATTERN that hasn’t been yielded yet (i.e. if PATTERN has only advanced once but STEP-PATTERN yields 3 for its output), phistory yields nil.

Example:

;; (next-n (phistory (pseries) (pseq ’(0 2 1))) 3)
;; ;=> (0 NIL 1)

See also: ‘pscratch’

Package

cl-patterns.

Source

patterns.lisp.

Function: pif (test true &optional false)

"If" expression for patterns. TEST is evaluated for each step, and if it’s non-nil, the value of TRUE will be yielded, otherwise the value of FALSE will be. Note that TRUE and FALSE can be patterns, and if they are, they are only advanced in their respective cases, not for every step.

Example:

;; (next-n (pif (pseq ’(t t nil nil nil)) (pseq ’(1 2 3)) (pseq ’(9 8 7))) 8)
;; ;=> (1 2 9 8 7 3 1 9)

See also: ‘plazy’, ‘pfunc’

Package

cl-patterns.

Source

patterns.lisp.

Function: pindex (list-pat index-pat &optional wrap-p)

Use INDEX-PAT to index into the list returned by LIST-PAT. WRAP-P is whether indexes that are out of range will be wrapped (if t) or will simply return nil.

Example:

;; (next-n (pindex (list 99 98 97) (pseq (list 0 1 2 3))) 4)
;;
;; ;=> (99 98 97 NIL)
;;
;; (next-upto-n (pindex (list 99 98 97) (pseries 0 1 6) t))
;;
;; ;=> (99 98 97 99 98 97)

See also: ‘pwalk’

Package

cl-patterns.

Source

patterns.lisp.

Function: pk (key &optional default)

Yield the value of KEY in the current ‘*event*’ context, returning DEFAULT if that value is nil.

Example:

;; (next-upto-n (pbind :foo (pseq ’(1 2 3) 1) :bar (pk :foo)))
;; ;=> ((EVENT :FOO 1 :BAR 1) (EVENT :FOO 2 :BAR 2) (EVENT :FOO 3 :BAR 3))

See also: ‘pbind’, ‘event-value’, ‘*event*’

Package

cl-patterns.

Source

patterns.lisp.

Function: place (list &optional repeats)

Yield each value from LIST in sequence. If the value is a list, the first element of that list is yielded. The second time that sub-list is encountered, its second element will be yielded; the third time, the third element, and so on. REPEATS controls the number of times LIST is repeated.

Example:

;; (next-upto-n (place (list 1 2 (list 3 4 5)) 3))
;; ;=> (1 2 3 1 2 4 1 2 5)

See also: ‘ppatlace’

Package

cl-patterns.

Source

patterns.lisp.

Function: play-or-end (object)

‘play’ an object, or ‘end’ it if it’s already playing. Returns the task if the object will start playing, or NIL if it will end.

Package

cl-patterns.

Source

utility.lisp.

Function: play-or-stop (object)

‘play’ an object, or ‘stop’ it if it is already playing. Returns the task if the object will start playing, or NIL if it will stop.

Package

cl-patterns.

Source

utility.lisp.

Function: play-solo (object &key stop-type clock)

End or stop all tasks on CLOCK and play OBJECT (or simply let it continue playing if it’s already playing).

See also: ‘play’, ‘end’, ‘stop’, ‘play-swap’

Package

cl-patterns.

Source

utility.lisp.

Function: play-swap (play end &key stop-type clock)

Play PLAY, and end (or stop) END.

See also: ‘play’, ‘end’, ‘stop’, ‘play-solo’

Package

cl-patterns.

Source

utility.lisp.

Function: playing-nodes (&optional backend)

Get a list of all nodes on BACKEND that are currently playing. Without BACKEND, get all playing nodes on all backends.

See also: ‘all-instruments’, ‘playing-pdefs’, ‘playing-p’

Package

cl-patterns.

Source

utility.lisp.

Function: playing-pdef-names (&optional clock)

Get a list of the names of all pdefs playing on CLOCK.

See also: ‘playing-pdefs’, ‘all-pdefs’, ‘playing-nodes’, ‘playing-p’

Package

cl-patterns.

Source

pdef.lisp.

Function: playing-pdefs (&optional clock)

Get a list of the names of all pdefs playing on CLOCK.

See also: ‘playing-pdef-names’, ‘all-pdefs’, ‘playing-nodes’, ‘playing-p’

Package

cl-patterns.

Source

pdef.lisp.

Function: plazy (func &optional repeats)

Evaluates FUNC to generate a pattern, which is then yielded from until its end, at which point FUNC is evaluated again to generate the next pattern. The pattern is generated a total of REPEATS times.

Example:

;; (next-n (plazy (lambda () (if (= 0 (random 2)) (pseq ’(1 2 3) 1) (pseq ’(9 8 7) 1)))) 6)
;; ;=> (9 8 7 1 2 3)

See also: ‘pfunc’

Package

cl-patterns.

Source

patterns.lisp.

Function: pmeta (&rest pairs)

Meta-control patterns using the events output by PATTERN. In other words, instead of triggering synths directly, the events output by PATTERN are used to embed patterns into the pmeta’s pstream.

The following keys are supported:

- :pattern or :instrument - name of the source pattern for this "step".
- :dur - set the duration of the embedded pattern (defaults to :inf, which causes the pattern to play to its end).
- :findur - limit the duration of the embedded pattern.
- :sync - sync the duration of the embedded pattern to a multiple of the provided value, similar to ‘psync’
- :stretch - multiply the duration of each of the source pattern’s events.
- :ts or :fit - timestretch a pattern so its total duration is the number specified, a la ‘pts’.
- :r or :repeat - repeat each event the number of times returned by the function when the event is applied to it, similar to ‘pr’.
- :inject - inject key/value pairs from the output of this value into the source pattern.
- :step-inject or :sinject - inject one output from this value per step.

The following keys are planned for future implementation:

- :start or :end - adjust the start or end points of the source pattern (i.e. to skip the first half, set :start to 0.5).
- :start-beat or :end-beat - adjust the start or end points of the source pattern in number of beats (i.e. to end the pattern 2 beats early, set :end-beat to -2).
- :start-nth or :end-nth - adjust the start or end points of the source pattern by skipping the first or last N events.
- :filter or :remove-if-not - skip all events from the source pattern that return nil when applied to the specified function or pattern.
- :mapcar or :nary - process each event from the source pattern with a function or another pattern.

See doc/special-keys.org for more information on these keys.

Example:

;; ;; define a few patterns...
;; (pdef :foo (pbind :x (pseq ’(1 2 3) 1) :dur 1))
;; (pdef :bar (pbind :y (pseries) :dur (pwhite 0.1 1.0 3)))
;;
;; ;; use pmeta to play pattern foo and then pattern bar, ensuring each are 2 beats long in total by way of pmeta’s sync key, which works similarly to ‘psync’
;; (next-upto-n (pmeta :pattern (pseq (list :foo :bar) 1) :sync 2))
;; ;=> ((EVENT :X 1 :DUR 1) (EVENT :X 2 :DUR 1) ; from (pdef :foo)
;; (EVENT :Y 0 :DUR 0.76958686) (EVENT :Y 1 :DUR 0.94850993) (EVENT :Y 2 :DUR 0.28190327)) ; from (pdef :bar)

See also: ‘psym’, ‘pfor’, ‘pdef’, ‘pbind’

Package

cl-patterns.

Source

pmeta.lisp.

Function: pmono (instrument &rest pairs)

pmono defines a mono instrument event pstream. It’s effectively the same as ‘pbind’ with its :type key set to :mono.

See also: ‘pbind’

Package

cl-patterns.

Source

patterns.lisp.

Function: pmouse (orientation &optional format)

Get the mouse position of the display server (GUI). ORIENTATION can be :x or :y, and FORMAT can be either :relative (in which case the output is a number from 0 to 1 as a fraction of total display size) or :absolute (in which case the output is the actual X or Y position of the mouse).

See also: ‘pmousex’, ‘pmousey’, ‘mouse-location’

Package

cl-patterns.

Source

patterns.lisp.

Function: pmousex (&optional format)

Get the mouse’s x position on screen. FORMAT can be either :relative (in which case the output is a number from 0 to 1 as a fraction of total display size) or :absolute (in which case the output is the actual X or Y position of the mouse).

See also: ‘pmouse’, ‘pmousey’, ‘mouse-location’

Package

cl-patterns.

Source

patterns.lisp.

Function: pmousey (&optional format)

Get the mouse’s y position on screen. FORMAT can be either :relative (in which case the output is a number from 0 to 1 as a fraction of total display size) or :absolute (in which case the output is the actual X or Y position of the mouse).

See also: ‘pmouse’, ‘pmousex’, ‘mouse-location’

Package

cl-patterns.

Source

patterns.lisp.

Function: pn (pattern &optional repeats)

Embed the full PATTERN into the pstream REPEATS times.

Example:

;; (next-upto-n (pn (pwhite 0 5 1) 5))
;; ;=> (2 4 2 1 0)

See also: ‘pr’

Package

cl-patterns.

Source

patterns.lisp.

Function: pnary (operator &rest patterns)

Yield the result of applying OPERATOR to each value yielded by each pattern in PATTERNS.

Example:

;; (next-upto-n (pnary (pseq (list ’+ ’- ’* ’/) 2) 2 2))
;; ;=> (4 0 4 1)

See also: ‘pfunc’, ‘p+’, ‘p-’, ‘p*’, ‘p/’

Package

cl-patterns.

Source

patterns.lisp.

Function: ppar (patterns)

Combine multiple event patterns into one pstream with all events in temporal order. PATTERNS is the list of patterns, or a pattern yielding lists of patterns. The ppar ends when all of the patterns in PATTERNS end.

Example:

;; (next-upto-n (ppar (list (pbind :dur (pn 1/2 4))
;; (pbind :dur (pn 2/3 4)))))
;;
;; ;=> ((EVENT :DUR 1/2 :DELTA 0) (EVENT :DUR 2/3 :DELTA 1/2)
;; (EVENT :DUR 1/2 :DELTA 1/6) (EVENT :DUR 2/3 :DELTA 1/3)
;; (EVENT :DUR 1/2 :DELTA 1/3) (EVENT :DUR 2/3 :DELTA 1/6)
;; (EVENT :DUR 1/2 :DELTA 1/2) (EVENT :DUR 2/3 :DELTA 2/3))

See also: ‘psym’

Package

cl-patterns.

Source

patterns.lisp.

Function: pparchain (&rest patterns)

Combine multiple patterns into several event streams. The event yielded by the first pattern will be used as the input event to the second pattern, and so on. The events yielded by each pattern will be collected into a list and yielded by the pparchain. This pattern is effectively ‘ppar’ and ‘pchain’ combined.

Example:

;; (next-upto-n (pparchain (pbind :foo (pseries 0 1 3)) (pbind :baz (p+ (pk :foo) 1) :foo (p+ (pk :foo) 3))))
;; ;=> (((EVENT :FOO 0) (EVENT :FOO 3 :BAZ 1))
;; ((EVENT :FOO 1) (EVENT :FOO 4 :BAZ 2))
;; ((EVENT :FOO 2) (EVENT :FOO 5 :BAZ 3)))

See also: ‘ppc’, ‘ppar’, ‘pchain’, ‘pbind”s :embed key

Package

cl-patterns.

Source

patterns.lisp.

Function: ppatlace (list &optional repeats)

Yield each value from LIST in sequence, or one output from each pattern in LIST per cycle of the list. If one of the patterns embedded in LIST ends sooner than the others, it is simply removed and the ppatlace continues to yield from the rest of the LIST. The entire LIST is yielded through a total of REPEATS times.

Example:

;; (next-upto-n (ppatlace (list (pseq (list 1 2 3) 1)
;; (pseq (list 4 5 6) 2))))
;; ;=> (1 4 2 5 3 6 4 5 6)

See also: ‘place’

Package

cl-patterns.

Source

patterns.lisp.

Function: pr (pattern &optional repeats)

Repeat each value from PATTERN REPEATS times. If REPEATS is 0, the value is skipped.

Example:

;; (next-upto-n (pr (pseries) (pseq ’(1 3 0 2) 1)))
;; ;=> (0 1 1 1 3 3)

See also: ‘pdurstutter’, ‘pn’, ‘pdrop’, ‘pfor’

Package

cl-patterns.

Source

patterns.lisp.

Function: prand (list &optional length)

Yield random values from LIST.

Example:

;; (next-n (prand ’(1 2 3) 5) 6)
;; ;=> (3 2 2 1 1 EOP)

See also: ‘pxrand’, ‘pwrand’, ‘pwxrand’

Package

cl-patterns.

Source

patterns.lisp.

Function: prerange (input from-range to-range)

Remap INPUT from one range, specified by FROM-RANGE, to another range, specified by TO-RANGE.

Note that this is effectively a convenience wrapper over ‘pnary’ and ‘rerange’; thus you should see ‘rerange’ for more information.

See also: ‘rerange’, ‘pnary’

Package

cl-patterns.

Source

patterns.lisp.

Function: prest (&optional value)

Make a prest object, which, when used in a ‘pbind’ or similar event pattern, turns the current event into a rest and yields VALUE for the key’s value.

Note that this is not a pattern; it is just a regular function that returns a prest object.

Example:

;; (next-upto-n (pbind :degree (pseq (list 0 1 (prest 2) 3) 1)))
;; ;=> ((EVENT :DEGREE 0) (EVENT :DEGREE 1) (EVENT :TYPE :REST :DEGREE 2) (EVENT :DEGREE 3))

See also: ‘pbind’, ‘pbind”s :type key

Package

cl-patterns.

Source

patterns.lisp.

Function: protate (pattern &optional shift)

Rotate PATTERN N outputs forward or backward, wrapping the shifted items to the other side, a la ‘alexandria:rotate’.

Example:

;; (next-upto-n (protate (pseq ’(1 2 3 4 5) 1) 2))
;; ;=> (4 5 1 2 3)

See also: ‘pdrop’, ‘phistory’, ‘pscratch’

Package

cl-patterns.

Source

patterns.lisp.

Function: prs (pattern &optional repeats)

Syntax sugar for (pr (ps PATTERN) REPEATS). Useful, for example, to ensure that each loop of a pattern only gets one value from the ‘ps’.

See also: ‘pr’, ‘ps’

Package

cl-patterns.

Source

patterns.lisp.

Function: prun (pattern &optional dur)

Run PATTERN "independently" of its parent, holding each value for DUR beats. Each of PATTERN’s outputs is treated as if it lasted DUR beats, being continuously yielded during that time before moving on to the next output.

Example:

;; (next-upto-n (pbind :foo (pseq ’(1 2 3 4 5))
;; :bar (prun (pseq ’(4 5 6 7 8))
;; (pseq ’(1 2 0.5 0.5 1)))))
;; ;=> ((EVENT :FOO 1 :BAR 4)
;; (EVENT :FOO 2 :BAR 5)
;; (EVENT :FOO 3 :BAR 5)
;; (EVENT :FOO 4 :BAR 6)
;; (EVENT :FOO 5 :BAR 8))

See also: ‘beat’, ‘pbeat’

Package

cl-patterns.

Source

patterns.lisp.

Function: ps (pattern)

Preserve pstream state across subsequent calls to ‘as-pstream’. To reset the pstream, simply re-evaluate the ps definition.

Based on the pattern originally from the miSCellaneous SuperCollider library.

Example:

;; (defparameter *pst* (ps (pseries)))
;;
;; (next-upto-n *pst* 4)
;; ;=> (0 1 2 3)
;;
;; (next-upto-n *pst* 4)
;; ;=> (4 5 6 7)
;;
;; (defparameter *pst* (ps (pseries)))
;;
;; (next-upto-n *pst* 4)
;; ;=> (0 1 2 3)

See also: ‘prs’, ‘pdef’

Package

cl-patterns.

Source

patterns.lisp.

Function: pscratch (pattern step-pattern)

"Scratches" across the values yielded by a pstream, similar in concept to how a DJ might scratch a record, altering the normal flow of playback. PATTERN is the source pattern, and STEP-PATTERN determines the increment of the index into the pstream history.

Based on the pattern originally from the ddwPatterns SuperCollider library.

Example:

;; (next-upto-n (pscratch (pseries) (pseq ’(0 1 1 -1 2) 2)))
;; ;=> (0 0 1 2 1 3 3 4 5 4)

See also: ‘phistory’

Package

cl-patterns.

Source

patterns.lisp.

Function: pseq (list &optional repeats offset)

Sequentially yield items from LIST, repeating the whole list REPEATS times. OFFSET is the offset to index into the list.

Example:

;; (next-n (pseq ’(5 6 7) 2) 7)
;; ;=> (5 6 7 5 6 7 EOP)
;;
;; (next-upto-n (pseq ’(5 6 7) 2 1))
;; ;=> (6 7 5 6 7 5)

See also: ‘pser’, ‘eseq’

Package

cl-patterns.

Source

patterns.lisp.

Function: pser (list &optional length offset)

Sequentially yield values from LIST, yielding a total of LENGTH values.

Example:

;; (next-n (pser ’(5 6 7) 2) 3)
;;
;; ;=> (5 6 EOP)

See also: ‘pseq’

Package

cl-patterns.

Source

patterns.lisp.

Function: pseries (&optional start step length)

Yield START, then generate subsequent outputs by adding STEP, for a total of LENGTH outputs.

Example:

;; (next-upto-n (pseries 1 2 4))
;; ;=> (1 3 5 7)

See also: ‘pseries*’, ‘pgeom’, ‘paccum’

Package

cl-patterns.

Source

patterns.lisp.

Function: pseries* (&optional start end length)

Syntax sugar to generate a ‘pseries’ whose values go from START to END linearly over LENGTH steps. If LENGTH is not provided, it is calculated such that the step will be 1. Note that LENGTH cannot be infinite since delta calculation requires dividing by it.

Based on the Pseries extension from the ddwPatterns SuperCollider library.

Example:

;; (pseries* 0 10 16)
;; ;=> (pseries 0 2/3 16)
;;
;; (next-upto-n *)
;; ;=> (0 2/3 4/3 2 8/3 10/3 4 14/3 16/3 6 20/3 22/3 8 26/3 28/3 10)

See also: ‘pseries’, ‘pgeom’, ‘pgeom*’

Package

cl-patterns.

Source

patterns.lisp.

Function: pshuf (list &optional repeats)

Shuffle LIST, then yield each item from the shuffled list, repeating it REPEATS times.

Example:

;; (next-upto-n (pshuf ’(1 2 3) 2))
;;
;; ;=> (3 1 2 3 1 2)

See also: ‘prand’

Package

cl-patterns.

Source

patterns.lisp.

Function: pslide (list &optional repeats len step start wrap-at-end)

"Slide" across sections of LIST. REPEATS is the total number of sections to output, LEN the length of the section. STEP is the number to increment the start index by after each section, and START is the initial index into LIST that the first section starts from. WRAP-AT-END, when true, means that an index outside of the list will wrap around. When false, indexes outside of the list result in nil.

Example:

;; (next-upto-n (pslide (list 0 1 2 3 4 5 6) 3 3 2 1 t))
;; ;=> (1 2 3 3 4 5 5 6 0)

See also: ‘pscratch’

Package

cl-patterns.

Source

patterns.lisp.

Function: pstream-elt (pstream n)

Get the Nth item in PSTREAM’s history. For negative N, get the -Nth most recent item.

Example:

;; (let ((pstream (as-pstream (pseq ’(1 2 3)))))
;; (next pstream) ;=> 1
;; (pstream-elt pstream 0) ;=> 1 ; first item in the pstream’s history
;; (next pstream) ;=> 2
;; (pstream-elt pstream 1) ;=> 2 ; second item in the pstream’s history
;; (pstream-elt pstream -1)) ;=> 2 ; most recent item in the pstream’s history

See also: ‘pstream-elt-future’, ‘phistory’

Package

cl-patterns.

Source

patterns.lisp.

Function: pstream-elt-future (pstream n)

Get the element N away from the most recent in PSTREAM’s history. Unlike ‘pstream-elt’, this function will automatically peek into the future for any positive N.

Example:

;; (let ((pstream (as-pstream (pseq ’(1 2 3)))))
;; (pstream-elt-future pstream 0) ;=> 1
;; (next pstream) ;=> 1
;; (pstream-elt-future pstream 1) ;=> 2
;; (next pstream)) ;=> 2

See also: ‘pstream-elt’, ‘phistory’

Package

cl-patterns.

Source

patterns.lisp.

Function: pstream-p (object)

True if OBJECT is a pstream.

See also: ‘pstream’, ‘as-pstream’

Package

cl-patterns.

Source

patterns.lisp.

Function: psym (pattern)

Use a pattern of symbols to embed ‘pdef’s. PATTERN is the source pattern that yields symbols naming the pdef to embed.

Example:

;; (pdef :foo (pseq ’(1 2 3) 1))
;;
;; (pdef :bar (pseq ’(4 5 6) 1))
;;
;; (next-upto-n (psym (pseq ’(:foo :bar) 1)))
;;
;; ;=> (1 2 3 4 5 6)

See also: ‘pdef’, ‘ppar’, ‘pmeta’

Package

cl-patterns.

Source

patterns.lisp.

Function: psync (pattern sync-quant &optional maxdur tolerance)

Yield events from PATTERN until their total duration is within TOLERANCE of MAXDUR, cutting off any events that would extend past MAXDUR. If PATTERN ends before MAXDUR, a rest is added to the pstream to round its duration up to the nearest multiple of SYNC-QUANT.

Example:

;; (next-upto-n (psync (pbind :dur (pseq ’(5) 1)) 4 16))
;;
;; ;=> ((EVENT :DUR 5) (EVENT :TYPE :REST :DUR 3))
;;
;; (next-upto-n (psync (pbind :dur (pseq ’(5) 5)) 4 16))
;;
;; ;=> ((EVENT :DUR 5) (EVENT :DUR 5) (EVENT :DUR 5) (EVENT :DUR 5 :DELTA 1))

See also: ‘pfindur’

Package

cl-patterns.

Source

patterns.lisp.

Function: ptime ()

Yield the number of seconds elapsed since ptime was embedded in the pstream.

Note: May give inaccurate results if the clock’s tempo changes occur more frequently than events in the parent pbind.

Example:

;; (setf (tempo *clock*) 1) ; 60 BPM
;; (next-n (pbind :dur 1 :time (ptime)) 2)
;; ;=> ((EVENT :DUR 1 :TIME 0) (EVENT :DUR 1 :TIME 1.0))

See also: ‘pbeat’, ‘prun’, ‘beat’

Package

cl-patterns.

Source

patterns.lisp.

Function: ptrace (&optional trace prefix stream)

Print the PREFIX and each output of TRACE to STREAM. If TRACE is t, print ‘*event*’. If TRACE is a different symbol, print the value of that symbol in ‘*event*’. Otherwise, ptrace yields TRACE unaffected.

See also: ‘debug-backend’, ‘debug-backend-recent-events’

Package

cl-patterns.

Source

patterns.lisp.

Function: ptrack (header rows &key repeats)

Defines an event pattern via a tracker-inspired notation. HEADER is a plist mapping the pattern’s "columns" (keys) to their default values or to patterns that are used to generate the key’s values for each output. ROWS is a list of lists, each sublist specifying the values for a step. Values can be specified on their own (in which case they’re matched in order to the columns specified in the header) or by using Lisp’s traditional key/value notation.

By default, the pattern repeats infinitely, however it can be limited by providing a :repeats argument in the header specifying the number of repeats.

Example:

;; (ptrack (list :freq 440 :dur 1/4)
;; ’((100) ; play a note with a frequency of 100
;; :r ; rest for 1/4 beat
;; (:midinote 70 :dur 1/2) ; play a note at midinote 70 for 1/2 beat
;; (-) ; continue previous note for an additional 1/4 beat
;; (600 3/4) ; play a note with a frequency of 600 for 3/4 beat
;; :r ; rest for 1/4 beat
;; (750 :foo 3) ; play a note at frequency 750, dur 1/4, and additional :foo key with value 3
;; ))

See also: ‘pt’, ‘pcycles’, ‘pbind’

Package

cl-patterns.

Source

track.lisp.

Function: pts (pattern &optional dur)

Timestretch PATTERN so its total duration is DUR. Note that only the first ‘*max-pattern-yield-length*’ events from PATTERN are considered, and that they are calculated immediately at pstream creation time rather than lazily as the pstream yields.

Example:

;; (next-upto-n (pts (pbind :dur (pn 1 4)) 5))
;;
;; ;=> ((EVENT :DUR 5/4) (EVENT :DUR 5/4) (EVENT :DUR 5/4) (EVENT :DUR 5/4))

See also: ‘pfindur’, ‘psync’

Package

cl-patterns.

Source

patterns.lisp.

Function: pwalk (list step-pattern &optional direction-pattern start-pos)

"Walk" over the values in LIST by using the accumulated value of the outputs of STEP-PATTERN as the index. At the beginning of the pwalk and each time the start or end of the list is passed, the output of DIRECTION-PATTERN is taken and used as the multiplier for values from STEP-PATTERN. START-POS is the index in LIST for pwalk to take its first output from.

Example:

;; ;; using (pseq (list 1 -1)) as the DIRECTION-PATTERN causes the pwalk’s output to "ping-pong":
;; (next-n (pwalk (list 0 1 2 3) (pseq (list 1)) (pseq (list 1 -1))) 10)
;;
;; ;=> (0 1 2 3 2 1 0 1 2 3)

See also: ‘pindex’, ‘pbrown’, ‘paccum’

Package

cl-patterns.

Source

patterns.lisp.

Function: pwhite (&optional lo hi length)

Linearly-distributed random numbers between LO and HI, inclusive.

Example:

;; (next-upto-n (pwhite 0 10 16))
;; ;=> (7 2 4 5 7 10 4 8 10 2 3 5 9 2 5 4)

See also: ‘pexprand’, ‘pbrown’, ‘pgauss’, ‘prand’

Package

cl-patterns.

Source

patterns.lisp.

Function: pwrand (list &optional weights length)

Yield random elements from LIST weighted by respective values from WEIGHTS.

Example:

;; (next-upto-n (pwrand ’(1 2 3) ’(7 5 3) 10))
;; ;=> (1 1 2 2 2 1 2 1 1 3)

See also: ‘prand’, ‘pxrand’, ‘pwxrand’

Package

cl-patterns.

Source

patterns.lisp.

Function: pwrap (number &optional bottom top)

Syntax sugar for (pnary #’wrap ...).

See also: ‘pnary’, ‘mutility:wrap’

Package

cl-patterns.

Source

patterns.lisp.

Function: pwxrand (list &optional weights length)

Yield random elements from LIST weighted by respective values from WEIGHTS, never repeating equivalent values twice in a row. This is effectively ‘pxrand’ and ‘pwrand’ combined.

Example:

;; (next-upto-n (pwxrand ’(1 2 3) ’(7 5 3) 10))
;; ;=> (1 2 1 2 1 3 1 2 1 2)

See also: ‘prand’, ‘pxrand’, ‘pwrand’

Package

cl-patterns.

Source

patterns.lisp.

Function: pxrand (list &optional length)

Yield random values from LIST, never repeating equal values twice in a row.

Example:

;; (next-upto-n (pxrand ’(1 2 3) 4))
;; ;=> (3 1 2 1)

See also: ‘prand’, ‘pwrand’, ‘pwxrand’

Package

cl-patterns.

Source

patterns.lisp.

Function: pyramid (sequence &optional pattern-type)

Return a new list whose elements have been reordered via one of 10 "counting" algorithms. This is based on and tested against SuperCollider’s Array.pyramid method.

Package

cl-patterns.

Source

utility.lisp.

Function: rate-freq (rate &optional base-freq)

Convert a playback rate RATE to a frequency, based on BASE-FREQ.

Package

cl-patterns.

Source

conversions.lisp.

Function: rate-midinote (rate &optional base-note)

Convert a playback rate to a midinote.

Package

cl-patterns.

Source

conversions.lisp.

Function: ratio-midi (ratio)

Convert a frequency ratio to a difference in MIDI note numbers.

Package

cl-patterns.

Source

conversions.lisp.

Function: redefining-melodic-alias (alias existing new)

Signal a warning when changing an alias for a ‘tuning’, ‘scale’, or ‘chord’.

Package

cl-patterns.

Source

scales.lisp.

Function: remove-event-value (event key)

Removes KEY from EVENT.

Package

cl-patterns.

Source

event.lisp.

Function: rerange (input from-range to-range)

Remap INPUT from one range, specified by FROM-RANGE, to another range, specified by TO-RANGE.

Example:

;; (rerange 64 (list 0 127) (list 0 1)) ; map from [0..127] to [0..1]
;; => 0.503937

See also: ‘to-range’, ‘from-range’, ‘prerange’

Package

cl-patterns.

Source

utility.lisp.

Function: scale-midinotes (scale &key root octave)

Given a scale, return its midi note numbers. OCTAVE can be a number, a 2-element list denoting an octave range, or :all, for the full octave range (0-9).

Package

cl-patterns.

Source

scales.lisp.

Function: screen-size (&optional display-server)

Get the total dimensions of all monitors known by DISPLAY-SERVER.

Package

cl-patterns.

Source

patterns.lisp.

Function: split-event-by-lists (event)

Split an event up by any lists in its values. Also known as multichannel expansion.

Example:

;; (split-event-by-lists (event :foo 1 :bar (list 1 2) :baz (list 3 4 5)))
;;
;; => ((EVENT :FOO 1 :BAR 1 :BAZ 3)
;; (EVENT :FOO 1 :BAR 2 :BAZ 4)
;; (EVENT :FOO 1 :BAR 1 :BAZ 5))

See also: ‘multi-channel-funcall’, ‘combine-events-via-lists’, ‘combine-events’

Package

cl-patterns.

Source

event.lisp.

Function: start-clock-loop (&rest clock-initargs &key tempo force &allow-other-keys)

Convenience method to make a clock and start its loop in a new thread if one isn’t already started.

With FORCE, make a new clock and thread even if one already appears to be running.

See also: ‘clock-loop’, ‘*clock*’

Package

cl-patterns.

Source

clock.lisp.

Function: t-pstream (value &optional length)

Make a t-pstream object with the value VALUE.

Package

cl-patterns.

Source

patterns.lisp.

Function: t-pstream-p (object)

True if OBJECT is a ‘t-pstream’.

See also: ‘t-pstream’, ‘as-pstream’

Package

cl-patterns.

Source

patterns.lisp.

Function: task-pattern (task)

Attempt to get the pattern that TASK is playing. Returns nil if the pattern couldn’t be found.

See also: ‘pattern-tasks’, ‘clock-tasks’

Package

cl-patterns.

Source

clock.lisp.

Function: time-dur (time &optional tempo)

Convert TIME in seconds to duration in beats according to TEMPO in beats per second.

Package

cl-patterns.

Source

conversions.lisp.

Function: tone-matrix (tones &optional transformation)

Generate a tone matrix from TONES. Supports symbols t and e for 10 and 11, respectively, but only returns numbers. TRANSFORMATION can be :inversion, :retrograde, or :retrograde-inversion (or a 3-letter abbreviation of any of the above).

Package

cl-patterns.

Source

scales.lisp.

Function: transpose (freq &optional semitones octaves)

Transpose FREQ the specified number of SEMITONES and OCTAVES.

Package

cl-patterns.

Source

utility.lisp.

Function: unipolar-1-to-midi (number)

Convert the range 0..1 to 0..127.

Package

cl-patterns.

Source

conversions.lisp.

Function: unipolar-bipolar (number)

Convert a bipolar number (-1 to 1) to a unipolar number (0 to 1).

See also: ‘bipolar-unipolar’

Package

cl-patterns.

Source

conversions.lisp.


6.1.5 Generic functions

Generic Function: amp (object)

Volume in amplitude, from 0 to 1.

Package

cl-patterns.

Source

event.lisp.

Methods
Method: amp ((event event))
Generic Function: (setf amp) (event)
Package

cl-patterns.

Methods
Method: (setf amp) ((event event))
Source

event.lisp.

Generic Function: as-eseq (object)

Convert OBJECT to an ‘eseq’.

See also: ‘as-pstream’

Package

cl-patterns.

Source

eseq.lisp.

Methods
Method: as-eseq ((pattern pattern))
Method: as-eseq ((pstream pstream))
Method: as-eseq ((event event))
Method: as-eseq ((list list))
Method: as-eseq ((symbol symbol))
Generic Function: as-pstream (thing)

Return THING as a pstream object.

See also: ‘pattern-as-pstream’

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: as-pstream ((eseq eseq))
Source

eseq.lisp.

Method: as-pstream ((ptrack ptrack))
Source

track.lisp.

Method: as-pstream ((pcycles pcycles))
Source

cycles.lisp.

Method: as-pstream ((pbjorklund pbjorklund))
Source

bjorklund.lisp.

Method: as-pstream ((pmeta pmeta))
Source

pmeta.lisp.

Method: as-pstream ((pdef pdef))
Source

pdef.lisp.

Method: as-pstream ((ipstream ipstream))
Method: as-pstream ((ps ps))
Method: as-pstream ((pparchain pparchain))
Method: as-pstream ((pwalk pwalk))
Method: as-pstream ((pts pts))
Method: as-pstream ((pdrop pdrop))
Method: as-pstream ((pdelta pdelta))
Method: as-pstream ((pchain pchain))
Method: as-pstream ((psym psym))
Method: as-pstream ((prun prun))
Method: as-pstream ((pindex pindex))
Method: as-pstream ((pdurstutter pdurstutter))
Method: as-pstream ((psync psync))
Method: as-pstream ((pfindur pfindur))
Method: as-pstream ((pfin pfin))
Method: as-pstream ((pfor pfor))
Method: as-pstream ((pscratch pscratch))
Method: as-pstream ((phistory phistory))
Method: as-pstream ((pslide pslide))
Method: as-pstream ((prerange prerange))
Method: as-pstream ((pnary pnary))
Method: as-pstream ((ppatlace ppatlace))
Method: as-pstream ((ptrace ptrace))
Method: as-pstream ((pshuf pshuf))
Method: as-pstream ((pn pn))
Method: as-pstream ((protate protate))
Method: as-pstream ((plazy plazy))
Method: as-pstream ((pr pr))
Method: as-pstream ((pfunc pfunc))
Method: as-pstream ((pk pk))
Method: as-pstream ((pbind pbind-pstream))
Method: as-pstream ((pbind pbind))
Method: as-pstream ((pstream pstream))
Method: as-pstream :around (object)
Method: as-pstream ((pattern pattern))
Method: as-pstream (value)
Generic Reader: backend-enabled-p (object)

Whether this backend instance is currently enabled. Events being played will only be sent to enabled and running backends.

Package

cl-patterns.

Methods
Reader Method: backend-enabled-p ((backend backend))

Whether this backend instance is currently enabled. Events being played will only be sent to enabled and running backends.

Source

backend.lisp.

Target Slot

enabled-p.

Generic Writer: (setf backend-enabled-p) (object)
Package

cl-patterns.

Methods
Writer Method: (setf backend-enabled-p) ((backend backend))

Whether this backend instance is currently enabled. Events being played will only be sent to enabled and running backends.

Source

backend.lisp.

Target Slot

enabled-p.

Generic Reader: backend-input-processors (object)

List of functions that process incoming events. Similar to ‘*post-pattern-output-processors*’ but per-backend.

Package

cl-patterns.

Methods
Reader Method: backend-input-processors ((backend backend))

List of functions that process incoming events. Similar to ‘*post-pattern-output-processors*’ but per-backend.

Source

backend.lisp.

Target Slot

input-processors.

Generic Writer: (setf backend-input-processors) (object)
Package

cl-patterns.

Methods
Writer Method: (setf backend-input-processors) ((backend backend))

List of functions that process incoming events. Similar to ‘*post-pattern-output-processors*’ but per-backend.

Source

backend.lisp.

Target Slot

input-processors.

Generic Reader: backend-metadata (object)

Additional metadata associated with the backend instance.

Package

cl-patterns.

Methods
Reader Method: backend-metadata ((backend backend))

Additional metadata associated with the backend instance.

Source

backend.lisp.

Target Slot

metadata.

Generic Writer: (setf backend-metadata) (object)
Package

cl-patterns.

Methods
Writer Method: (setf backend-metadata) ((backend backend))

Additional metadata associated with the backend instance.

Source

backend.lisp.

Target Slot

metadata.

Generic Reader: backend-name (object)

The name of the backend instance.

Package

cl-patterns.

Methods
Reader Method: backend-name ((backend backend))

The name of the backend instance.

Source

backend.lisp.

Target Slot

name.

Generic Writer: (setf backend-name) (object)
Package

cl-patterns.

Methods
Writer Method: (setf backend-name) ((backend backend))

The name of the backend instance.

Source

backend.lisp.

Target Slot

name.

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

Start BACKEND so it is ready to handle events and return the backend object. If BACKEND is the name of a backend rather than a ‘backend’ instance, first make an instance of the backend as if ‘make-backend’ was called, then call ‘backend-start’ on that.

See also: ‘backend-stop’, ‘backend-enabled-p’, ‘make-backend’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-start :around ((backend backend) &key &allow-other-keys)
Method: backend-start ((backend backend) &key &allow-other-keys)
Method: backend-start ((name symbol) &rest args &key &allow-other-keys)
Generic Reader: backend-started-p (object)

Whether the backend is current enabled and running.

Package

cl-patterns.

Methods
Reader Method: backend-started-p ((backend backend))

Whether the backend is current enabled and running.

Source

backend.lisp.

Target Slot

started-p.

Generic Writer: (setf backend-started-p) (object)
Package

cl-patterns.

Methods
Writer Method: (setf backend-started-p) ((backend backend))

Whether the backend is current enabled and running.

Source

backend.lisp.

Target Slot

started-p.

Generic Function: backend-stop (backend)

Stop BACKEND’s server if it is running and return a list of the affected backend(s).

See also: ‘backend-start’, ‘backend-enabled-p’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-stop :around (backend)
Method: backend-stop (backend)
Generic Function: beat (object)

Get the beat that OBJECT occurs on, relative to its context’s start. For example, for an ‘event’, the beat is relative to the start of its source pattern, while for a ‘pstream’ or clock object, the beat is the number of beats that have passed since its start.

See also: ‘tempo’

Package

cl-patterns.

Source

utility.lisp.

Methods
Reader Method: beat ((clock clock))

The number of beats that have elapsed since the creation of the clock.

Source

clock.lisp.

Target Slot

beat.

Method: beat ((task task))
Source

clock.lisp.

Reader Method: beat ((pstream pstream))

The number of beats that have elapsed since the start of the pstream.

Source

patterns.lisp.

Target Slot

beat.

Method: beat ((event event))
Source

event.lisp.

Method: beat ((eop (eql cl-patterns:eop)))
Method: beat ((null null))
Generic Function: (setf beat) (event)
Package

cl-patterns.

Methods
Writer Method: (setf beat) ((clock clock))

The number of beats that have elapsed since the creation of the clock.

Source

clock.lisp.

Target Slot

beat.

Method: (setf beat) ((event event))
Source

event.lisp.

Generic Function: bsubseq (object start-beat &optional end-beat)

"Beat subseq" - get a list of all events from OBJECT whose ‘beat’ is START-BEAT or above, and below END-BEAT.

See also: ‘events-in-range’

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: bsubseq ((eseq eseq) start-beat &optional end-beat)
Source

eseq.lisp.

Method: bsubseq ((list list) start-beat &optional end-beat)
Source

eseq.lisp.

Generic Function: chord (object)

Get a chord by name.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: chord ((chord chord))
Method: chord ((string string))
Method: chord ((symbol symbol))
Method: chord ((list list))
Generic Function: chord-indexes (chord)

The indexes of the notes from the scale that the chord is made up of.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: chord-indexes ((symbol symbol))
Reader Method: chord-indexes ((chord chord))

The indexes of the notes from the scale that the chord is made up of.

Target Slot

indexes.

Generic Writer: (setf chord-indexes) (object)
Package

cl-patterns.

Methods
Writer Method: (setf chord-indexes) ((chord chord))

The indexes of the notes from the scale that the chord is made up of.

Source

scales.lisp.

Target Slot

indexes.

Generic Function: chord-name (chord)

The octave ratio of the chord (i.e. what to multiply a pitch by to increase its octave by 1).

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: chord-name ((symbol symbol))
Reader Method: chord-name ((chord chord))

The full name of the chord.

Target Slot

name.

Generic Writer: (setf chord-name) (object)
Package

cl-patterns.

Methods
Writer Method: (setf chord-name) ((chord chord))

The full name of the chord.

Source

scales.lisp.

Target Slot

name.

Generic Function: chord-scale (chord)

The scale that the chord is derived from.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: chord-scale ((symbol symbol))
Reader Method: chord-scale ((chord chord))

The scale that the chord is derived from.

Target Slot

scale.

Generic Writer: (setf chord-scale) (object)
Package

cl-patterns.

Methods
Writer Method: (setf chord-scale) ((chord chord))

The scale that the chord is derived from.

Source

scales.lisp.

Target Slot

scale.

Generic Reader: clock-caught-conditions-extra-data-function (object)

A function of one argument (the clock) that generates extra data for the ‘caught-conditions’ when a condition occurs during the clock’s task processing.

Package

cl-patterns.

Methods
Reader Method: clock-caught-conditions-extra-data-function ((clock clock))

A function of one argument (the clock) that generates extra data for the ‘caught-conditions’ when a condition occurs during the clock’s task processing.

Source

clock.lisp.

Target Slot

caught-conditions-extra-data-function.

Generic Writer: (setf clock-caught-conditions-extra-data-function) (object)
Package

cl-patterns.

Methods
Writer Method: (setf clock-caught-conditions-extra-data-function) ((clock clock))

A function of one argument (the clock) that generates extra data for the ‘caught-conditions’ when a condition occurs during the clock’s task processing.

Source

clock.lisp.

Target Slot

caught-conditions-extra-data-function.

Generic Function: db (object)

Volume in decibels (dB).

Package

cl-patterns.

Source

event.lisp.

Methods
Method: db ((event event))
Generic Function: (setf db) (event)
Package

cl-patterns.

Methods
Method: (setf db) ((event event))
Source

event.lisp.

Generic Function: delta (object)

The number of beats between the start of this event and the start of the next one.

See also: ‘dur’, ‘sustain’

Package

cl-patterns.

Source

event.lisp.

Methods
Method: delta ((event event))
Generic Function: (setf delta) (event)
Package

cl-patterns.

Methods
Method: (setf delta) ((event event))
Source

event.lisp.

Generic Function: dur (object)

The total duration of the note, in beats.

See also: ‘delta’, ‘legato’

Package

cl-patterns.

Source

event.lisp.

Methods
Method: dur ((eseq eseq))
Source

eseq.lisp.

Method: dur ((pattern pattern))
Source

patterns.lisp.

Method: dur ((event event))
Generic Function: (setf dur) (event)
Package

cl-patterns.

Methods
Method: (setf dur) ((event event))
Source

event.lisp.

Generic Function: end (object)

End a task; it will stop when its current loop completes.

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: end ((item task))
Source

clock.lisp.

Method: end ((pdef pdef))
Source

pdef.lisp.

Method: end ((list list))
Method: end ((symbol symbol))
Method: end (object)
Generic Function: end-quant (object)

The end-quant of OBJECT; a list representing when OBJECT is allowed to end playing or when a ‘pdef’ is allowed to swap to a new definition if it has been redefined. Note that if ‘end-quant’ is not set (the default), the pattern can only end or swap when the pattern itself ends (i.e. when it yields ‘eop’).

See ‘quant’ for more information on quants and a description of acceptable values.

See also: ‘quant’, ‘play-quant’, ‘next-beat-for-quant’, ‘beat’, ‘end’, ‘pdef’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: end-quant ((eseq eseq))
Source

eseq.lisp.

Method: end-quant ((pdef pdef))
Source

pdef.lisp.

Reader Method: end-quant ((pattern pattern))
Source

patterns.lisp.

Target Slot

end-quant.

Generic Function: (setf end-quant) (object)
Package

cl-patterns.

Methods
Method: (setf end-quant) ((eseq eseq))
Source

eseq.lisp.

Writer Method: (setf end-quant) ((pattern pattern))
Source

patterns.lisp.

Target Slot

end-quant.

Generic Function: ended-p (pstream)

Returns t if PSTREAM has no more outputs, or nil if outputs remain to be yielded.

Example:

;; (defparameter *pstr* (as-pstream (pseq ’(1 2) 1)))
;; (next *pstr*) ;=> 1
;; (ended-p *pstr*) ;=> NIL
;; (next *pstr*) ;=> 2
;; (ended-p *pstr*) ;=> NIL
;; (next *pstr*) ;=> NIL
;; (ended-p *pstr*) ;=> T

See also: ‘eop-p’, ‘last-output’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: ended-p ((pstream pstream))
Source

patterns.lisp.

Generic Function: eop-p (object)

True if OBJECT indicates the end of a pstream’s outputs.

See also: ‘ended-p’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: eop-p ((event event))
Source

event.lisp.

Method: eop-p ((symbol symbol))
Method: eop-p (object)
Generic Function: eseq-add (eseq event)

Add EVENT to ESEQ. If EVENT doesn’t have a ‘beat’, it is placed after the last event in ESEQ.

See also: ‘eseq-remove’

Package

cl-patterns.

Source

eseq.lisp.

Methods
Method: eseq-add ((eseq eseq) (events list))
Method: eseq-add ((eseq eseq) (event event))
Generic Reader: eseq-events (object)

The list of events in the ‘eseq’.

Note that eseq’s events slot should not be modified directly as it expects its events to be kept in order. Instead, use ‘eseq-add’, ‘eseq-remove’, or setf ‘eseq-events’.

Package

cl-patterns.

Source

eseq.lisp.

Methods
Reader Method: eseq-events ((eseq eseq))

automatically generated reader method

Target Slot

events.

Generic Function: (setf eseq-events) (eseq)
Package

cl-patterns.

Methods
Method: (setf eseq-events) ((eseq eseq))
Source

eseq.lisp.

Generic Function: eseq-remove (eseq event)

Remove EVENT from ESEQ.

See also: ‘eseq-add’

Package

cl-patterns.

Source

eseq.lisp.

Methods
Method: eseq-remove ((eseq eseq) (events list))
Method: eseq-remove ((eseq eseq) (index integer))
Method: eseq-remove ((eseq eseq) (event event))
Generic Reader: event-plist (event)

The raw plist containing the key/value pairs of the event.

Package

cl-patterns.

Source

event.lisp.

Methods
Reader Method: event-plist ((event event))

The plist containing all of the event’s keys and values.

Target Slot

event-plist.

Generic Function: freq (object)

Frequency of the note, in Hz.

See also: ‘rate’, ‘midinote’, ‘degree’

Package

cl-patterns.

Source

event.lisp.

Methods
Method: freq ((event event))
Generic Function: (setf freq) (event)
Package

cl-patterns.

Methods
Method: (setf freq) ((event event))
Source

event.lisp.

Generic Function: instrument (object)

The instrument or synth to trigger.

Package

cl-patterns.

Source

event.lisp.

Methods
Method: instrument ((event event))
Generic Function: (setf instrument) (event)
Package

cl-patterns.

Methods
Method: (setf instrument) ((event event))
Source

event.lisp.

Generic Function: ipstream-insert (ipstream pattern &optional start-beat)

Insert PATTERN into IPSTREAM at START-BEAT. START-BEAT defaults to the ipstream’s current beat.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: ipstream-insert ((ipstream ipstream-pstream) pattern &optional start-beat)
Generic Function: launch (object)

Play a new copy of OBJECT on the clock. Unlike ‘play’, calling this method on a ‘pdef’ will always start a new copy of its pattern instead of the pdef itself.

See also: ‘play’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: launch ((pdef pdef))
Source

pdef.lisp.

Method: launch ((pattern pattern))
Source

patterns.lisp.

Method: launch ((list list))
Method: launch ((symbol symbol))
Method: launch (object)
Generic Function: legato (object)

How long the note should be held, as a factor of its total length in beats (‘dur’).

See also: ‘sustain’, ‘dur’

Package

cl-patterns.

Source

event.lisp.

Methods
Method: legato ((event event))
Generic Function: (setf legato) (event)
Package

cl-patterns.

Methods
Method: (setf legato) ((event event))
Source

event.lisp.

Generic Function: loop-p (object)

Whether or not OBJECT should play again after it ends.

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: loop-p ((task task))
Source

clock.lisp.

Method: loop-p ((eseq eseq))
Source

eseq.lisp.

Method: loop-p ((pdef pdef))
Source

pdef.lisp.

Method: loop-p ((pstream pstream))
Source

patterns.lisp.

Method: loop-p ((pattern pattern))
Source

patterns.lisp.

Method: loop-p ((event event))
Source

event.lisp.

Generic Function: (setf loop-p) (event)
Package

cl-patterns.

Methods
Method: (setf loop-p) ((eseq eseq))
Source

eseq.lisp.

Method: (setf loop-p) ((pattern pattern))
Source

patterns.lisp.

Method: (setf loop-p) ((event event))
Source

event.lisp.

Generic Function: make-backend (backend &rest rest &key &allow-other-keys)

Make a ‘backend’ of the specified type and return it.

See also: ‘backend-start’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: make-backend (backend &rest rest &key &allow-other-keys)
Generic Function: midinote (object)

MIDI note number of the note (0-127).

Package

cl-patterns.

Source

event.lisp.

Methods
Method: midinote ((event event))
Generic Function: (setf midinote) (event)
Package

cl-patterns.

Methods
Method: (setf midinote) ((event event))
Source

event.lisp.

Generic Function: next (pattern)

Get the next value of a pstream, function, or other object, advancing the pstream forward in the process.

See also: ‘next-n’, ‘next-upto-n’, ‘peek’

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: next ((eseq eseq-pstream))
Source

eseq.lisp.

Method: next ((ptrack ptrack-pstream))
Source

track.lisp.

Method: next ((pcycles pcycles-pstream))
Source

cycles.lisp.

Method: next ((pattern pbjorklund-pstream))
Source

bjorklund.lisp.

Method: next ((pmeta pmeta-pstream))
Source

pmeta.lisp.

Method: next ((pdef pdef-pstream))
Source

pdef.lisp.

Method: next ((pmouse pmouse-pstream))
Method: next ((pfilter pfilter-pstream))
Method: next ((ipstream ipstream-pstream))
Method: next ((ps-pstream ps-pstream))
Method: next ((paccum paccum-pstream))
Method: next ((paclump paclump-pstream))
Method: next ((pclump pclump-pstream))
Method: next ((pparchain pparchain-pstream))
Method: next ((pwalk pwalk-pstream))
Method: next ((pts pts-pstream))
Method: next ((ppar ppar-pstream))
Method: next ((pdrop pdrop-pstream))
Method: next ((pdelta pdelta-pstream))
Method: next ((pdiff pdiff-pstream))
Method: next ((pchain pchain-pstream))
Method: next ((psym psym-pstream))
Method: next ((prun prun-pstream))
Method: next ((pindex pindex-pstream))
Method: next ((ptime ptime-pstream))
Method: next ((pbeat* pbeat*-pstream))
Method: next ((pbeat pbeat-pstream))
Method: next ((pdurstutter pdurstutter-pstream))
Method: next ((psync psync-pstream))
Method: next ((pfindur pfindur-pstream))
Method: next ((pfin pfin-pstream))
Method: next ((pfor pfor-pstream))
Method: next ((pif pif-pstream))
Method: next ((pscratch pscratch-pstream))
Method: next ((phistory phistory-pstream))
Method: next ((pslide pslide-pstream))
Method: next ((prerange prerange-pstream))
Method: next ((pnary pnary-pstream))
Method: next ((ppatlace ppatlace-pstream))
Method: next ((place place-pstream))
Method: next ((ptrace ptrace-pstream))
Method: next ((pgeom pgeom-pstream))
Method: next ((pseries pseries-pstream))
Method: next ((pgauss pgauss-pstream))
Method: next ((pexprand pexprand-pstream))
Method: next ((pbrown pbrown-pstream))
Method: next ((pwhite pwhite-pstream))
Method: next ((pshuf pshuf-pstream))
Method: next ((pn pn-pstream))
Method: next ((protate protate-pstream))
Method: next ((plazy plazy-pstream))
Method: next ((pr pr-pstream))
Method: next ((pfunc pfunc-pstream))
Method: next ((pwxrand pwxrand-pstream))
Method: next ((pwrand pwrand-pstream))
Method: next ((pxrand pxrand-pstream))
Method: next ((prand prand-pstream))
Method: next ((pk pk-pstream))
Method: next ((pser pser-pstream))
Method: next ((pseq pseq-pstream))
Method: next ((pbind pbind-pstream))
Method: next ((t-pstream t-pstream))
Method: next :around ((pstream pstream))
Method: next ((pstream pstream))
Method: next ((function function))
Method: next ((pattern pattern))
Method: next (object)
Generic Function: pan (object)

Stereo panning, where -1 is fully left, 1 is fully right, and 0 is center.

Package

cl-patterns.

Source

event.lisp.

Methods
Method: pan ((event event))
Generic Function: (setf pan) (event)
Package

cl-patterns.

Methods
Method: (setf pan) ((event event))
Source

event.lisp.

Generic Function: pattern-metadata (pattern &optional key)

Get the value of PATTERN’s metadata for KEY. Returns true as a second value if the metadata had an entry for KEY, or nil if it did not.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: pattern-metadata ((eseq eseq) &optional key)
Source

eseq.lisp.

Method: pattern-metadata ((pattern pattern) &optional key)
Generic Reader: pattern-source (pattern)

The source object that this object was created from. For example, for a ‘pstream’, this would be the pattern that ‘as-pstream’ was called on.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Reader Method: pattern-source ((pattern pattern))

The source object that this object was created from. For example, for a ‘pstream’, this would be the pattern that ‘as-pstream’ was called on.

Target Slot

source.

Generic Writer: (setf pattern-source) (object)
Package

cl-patterns.

Methods
Writer Method: (setf pattern-source) ((pattern pattern))

The source object that this object was created from. For example, for a ‘pstream’, this would be the pattern that ‘as-pstream’ was called on.

Source

patterns.lisp.

Target Slot

source.

Generic Function: pdef-name (pdef)

The name ("key") of PDEF.

Package

cl-patterns.

Source

pdef.lisp.

Methods
Method: pdef-name ((pbind pbind))
Method: pdef-name ((null null))
Method: pdef-name ((symbol symbol))
Reader Method: pdef-name ((pdef pdef))

automatically generated reader method

Target Slot

name.

Generic Function: (setf pdef-name) (pdef)
Package

cl-patterns.

Methods
Method: (setf pdef-name) ((symbol symbol))
Source

pdef.lisp.

Method: (setf pdef-name) ((pdef pdef))
Source

pdef.lisp.

Generic Function: pdef-pattern (pdef)

The pattern that PDEF points to.

Package

cl-patterns.

Source

pdef.lisp.

Methods
Method: pdef-pattern ((null null))
Method: pdef-pattern ((symbol symbol))
Reader Method: pdef-pattern ((pdef pdef))

automatically generated reader method

Target Slot

pattern.

Generic Writer: (setf pdef-pattern) (object)
Package

cl-patterns.

Methods
Writer Method: (setf pdef-pattern) ((pdef pdef))

automatically generated writer method

Source

pdef.lisp.

Target Slot

pattern.

Generic Function: pdef-pstream (pdef)

The currently-playing pstream of PDEF’s pattern.

Package

cl-patterns.

Source

pdef.lisp.

Methods
Method: pdef-pstream ((null null))
Method: pdef-pstream ((symbol symbol))
Reader Method: pdef-pstream ((pdef pdef))

automatically generated reader method

Target Slot

pstream.

Generic Function: (setf pdef-pstream) (object)
Package

cl-patterns.

Methods
Method: (setf pdef-pstream) ((symbol symbol))
Source

pdef.lisp.

Writer Method: (setf pdef-pstream) ((pdef pdef))

automatically generated writer method

Source

pdef.lisp.

Target Slot

pstream.

Generic Function: pdef-task (pdef)

The task that PDEF was last being played in.

Package

cl-patterns.

Source

pdef.lisp.

Methods
Method: pdef-task ((null null))
Method: pdef-task ((symbol symbol))
Reader Method: pdef-task ((pdef pdef))

automatically generated reader method

Target Slot

task.

Generic Writer: (setf pdef-task) (object)
Package

cl-patterns.

Methods
Writer Method: (setf pdef-task) ((pdef pdef))

automatically generated writer method

Source

pdef.lisp.

Target Slot

task.

Generic Function: peek (pattern)

"Peek" at the next value of a pstream, without advancing its current position.

See also: ‘next’, ‘peek-n’, ‘peek-upto-n’

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: peek ((pattern pattern))
Method: peek ((pstream pstream))
Generic Function: play (object)

Play an object (typically an event or pattern).

See also: ‘launch’, ‘stop’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: play ((pdef pdef))
Source

pdef.lisp.

Method: play ((pattern pattern))
Source

patterns.lisp.

Method: play ((event event))
Source

event.lisp.

Method: play ((list list))
Method: play ((symbol symbol))
Generic Function: play-quant (object)

The play-quant of OBJECT; a list representing when OBJECT is allowed to begin playing. Defaults to (1).

See ‘quant’ for more information on quants and a description of acceptable values.

See also: ‘quant’, ‘end-quant’, ‘next-beat-for-quant’, ‘beat’, ‘play’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: play-quant ((eseq eseq))
Source

eseq.lisp.

Method: play-quant ((pdef pdef))
Source

pdef.lisp.

Method: play-quant ((pattern pattern))
Source

patterns.lisp.

Method: play-quant ((event event))
Source

event.lisp.

Generic Function: (setf play-quant) (event)
Package

cl-patterns.

Methods
Method: (setf play-quant) ((eseq eseq))
Source

eseq.lisp.

Method: (setf play-quant) ((pattern pattern))
Source

patterns.lisp.

Method: (setf play-quant) ((event event))
Source

event.lisp.

Generic Function: playing-p (object &optional clock)

Whether OBJECT is playing.

See also: ‘play-or-stop’, ‘play-or-end’, ‘playing-pdefs’, ‘playing-nodes’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: playing-p ((task task) &optional clock)
Source

clock.lisp.

Method: playing-p ((pdef pdef) &optional clock)
Source

pdef.lisp.

Method: playing-p ((pattern pattern) &optional clock)
Source

patterns.lisp.

Method: playing-p ((list list) &optional clock)
Method: playing-p ((symbol symbol) &optional clock)
Generic Reader: pstream-count (pattern)

The number of pstreams that have been made of this pattern.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Reader Method: pstream-count ((pstream pstream))

How many times a pstream was made of this pstream’s source prior to this pstream. For example, if it was the first time ‘as-pstream’ was called on the pattern, this will be 0.

Target Slot

pstream-count.

Reader Method: pstream-count ((pattern pattern))

The number of pstreams that have been made of this pattern.

Target Slot

pstream-count.

Generic Writer: (setf pstream-count) (object)
Package

cl-patterns.

Methods
Writer Method: (setf pstream-count) ((pstream pstream))

How many times a pstream was made of this pstream’s source prior to this pstream. For example, if it was the first time ‘as-pstream’ was called on the pattern, this will be 0.

Source

patterns.lisp.

Target Slot

pstream-count.

Writer Method: (setf pstream-count) ((pattern pattern))

The number of pstreams that have been made of this pattern.

Source

patterns.lisp.

Target Slot

pstream-count.

Generic Function: ptrack-cell (ptrack row key &key if-does-not-exist)

Get the value of a cell from ptrack (i.e. the value at that location if specified, or the generated value if not specified). Can also be used on a ptrack-pstream to get the generated values from it. Returns three values:

- the value of the cell
- the name of the key that the specified KEY was derived from, or nil if it was not found
- t if the output was taken from the row itself, or nil if it was derived from the header

See also: ‘ptrack’, ‘ptrack-row’

Package

cl-patterns.

Source

track.lisp.

Methods
Method: ptrack-cell ((ptrack ptrack-pstream) row key &key if-does-not-exist)
Method: ptrack-cell ((ptrack ptrack) row key &key if-does-not-exist)
Generic Function: (setf ptrack-cell) (ptrack row key &key)
Package

cl-patterns.

Source

track.lisp.

Methods
Method: (setf ptrack-cell) (ptrack row key &key)
Generic Function: ptrack-row (ptrack row &key if-does-not-exist)

Get the plist for ROW from PTRACK.

Package

cl-patterns.

Source

track.lisp.

Methods
Method: ptrack-row ((ptrack ptrack) row &key if-does-not-exist)
Generic Function: (setf ptrack-row) (ptrack row &key)
Package

cl-patterns.

Methods
Method: (setf ptrack-row) ((ptrack ptrack) row &key)
Source

track.lisp.

Generic Function: ptrack-rows (ptrack)

Get the list of rows from PTRACK.

Package

cl-patterns.

Source

track.lisp.

Methods
Method: ptrack-rows (ptrack)
Generic Function: quant (object)

The quant of OBJECT; a list representing when OBJECT is allowed to begin playing (‘play-quant’), end playing (‘end-quant’), or when a ‘pdef’ is allowed to swap to its new definition (‘end-quant’). ‘quant’ will return the value of ‘play-quant’ as its first value and ‘end-quant’ as its second, and sets both ‘play-quant’ and ‘end-quant’ when it is setf.

A quant value takes the form (divisor phase offset) where all provided elements are numbers. Only the first element is required.

- "divisor" is the divisor to quantize the clock to. The next time (mod (beat *clock*) divisor) is 0 is when OBJECT will start playing.
- "phase" is the number of beats to add on to the position determined by "divisor".
- "offset" is the number of seconds to add on to the position determined by "divisor" and "phase".

For example, a quant of (4) means it can start on any clock beat that is divisible by 4 (0, 4, 8, etc). A quant of (4 2) means the pstream can start 2 beats after any beat divisible by 4 (2, 6, 10, etc). And a quant of (4 0 1) means that the pstream can start 1 second after any beat that is divisible by 4.

See also: ‘play-quant’, ‘end-quant’, ‘next-beat-for-quant’, ‘beat’, ‘play’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: quant ((event event))
Source

event.lisp.

Method: quant (object)
Generic Function: (setf quant) (object)
Package

cl-patterns.

Methods
Method: (setf quant) ((event event))
Source

event.lisp.

Method: (setf quant) (object)
Source

utility.lisp.

Generic Function: rate (object)

Playback rate, i.e. for playing back sound buffers. 1 is normal speed, 2 is twice as fast, 0.5 half as fast, etc.

Package

cl-patterns.

Source

event.lisp.

Methods
Method: rate ((event event))
Generic Function: (setf rate) (event)
Package

cl-patterns.

Methods
Method: (setf rate) ((event event))
Source

event.lisp.

Generic Function: render (object output &key backend tempo max-length max-pattern-yield-length duration max-duration max-output-duration &allow-other-keys)

Render a pattern or other object as audio or other format. OUTPUT is what the pattern should be rendered as. It can be one of the following values:

- A string or pathname - Output file name (file format is determined by the file extension).
- :file - Render to a file in the ‘*cl-patterns-temporary-directory*’.
- :buffer - Render to a buffer in memory.
- :bdef - Render to a ‘bdef:bdef’ buffer object in memory. This output type is only available if the bdef library is loaded, and falls back to :buffer if it is not.
- :score - Render as a "score" in memory, i.e. the sequence type supported by the backend.
- :eseq - Make an ‘eseq’ from the pattern. Effectively defers to ‘as-eseq’.
- :pstream - Make a ‘pstream’ from the pattern. Effectively defers to ‘as-pstream’.
- :list - Get a list of up to the first MAX-LENGTH outputs from this object using ‘next-upto-n’.

The following additional keyword arguments are also supported, depending on the output type:

- BACKEND - The backend to render with. Defaults to the first applicable backend, based on (in descending order of priority): the first event’s :backend key, the first event’s :instrument, or the first enabled backend that supports the specified output type. - OUTPUT-FILENAME - The filename to write the rendered file to (when rendering to a file).
- TEMPO - The tempo of the result in beats per second. Defaults to ‘*clock*”s current tempo.
- MAX-LENGTH - Maximum number of outputs to grab from the source pattern. Must be an integer (cannot be :inf). Defaults to ‘*max-pattern-yield-length*’.
- DURATION - The total duration of the output in seconds.
- MAX-DURATION - The maximum duration of the output in seconds. Defaults to infinite, in which case the pattern is limited by MAX-PATTERN-YIELD-LENGTH.

See also: ‘as-eseq’

Package

cl-patterns.

Source

render.lisp.

Methods
Method: render ((event event) output &rest args &key &allow-other-keys)
Method: render (object (output-filename pathname) &rest args &key &allow-other-keys)
Method: render (object (output-filename string) &rest args &key &allow-other-keys)
Method: render (object (output (eql :score)) &rest args &key &allow-other-keys)
Method: render (object (output (eql :file)) &rest args &key &allow-other-keys)
Method: render (object (output (eql :buffer)) &rest args &key &allow-other-keys)
Method: render (object (output (eql :list)) &key max-length)
Method: render (object (output (eql :pstream)) &key)
Method: render (object (output (eql :eseq)) &key)
Generic Function: rest-p (object)

Whether or not something is a rest or a rest-representing object (i.e. :rest, :r, or a rest event).

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: rest-p ((prest prest))
Source

patterns.lisp.

Method: rest-p ((event event))
Source

event.lisp.

Method: rest-p (this)
Method: rest-p ((symbol symbol))
Generic Function: (setf rest-p) (event)
Package

cl-patterns.

Methods
Method: (setf rest-p) ((event event))
Source

event.lisp.

Generic Function: scale (object)

Get either a musical scale object by its name, or get the name of the scale of an event.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: scale ((event event))
Source

event.lisp.

Method: scale ((scale scale))
Method: scale ((string string))
Method: scale ((symbol symbol))
Generic Function: (setf scale) (event)
Package

cl-patterns.

Methods
Method: (setf scale) ((event event))
Source

event.lisp.

Generic Function: scale-name (scale)

The full name of the scale.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: scale-name ((symbol symbol))
Reader Method: scale-name ((scale scale))

The full name of the scale.

Target Slot

name.

Generic Writer: (setf scale-name) (object)
Package

cl-patterns.

Methods
Writer Method: (setf scale-name) ((scale scale))

The full name of the scale.

Source

scales.lisp.

Target Slot

name.

Generic Function: scale-notes (scale)

The degrees of the scale.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: scale-notes ((symbol symbol))
Reader Method: scale-notes ((scale scale))

The notes of the scale.

Target Slot

notes.

Generic Writer: (setf scale-notes) (object)
Package

cl-patterns.

Methods
Writer Method: (setf scale-notes) ((scale scale))

The notes of the scale.

Source

scales.lisp.

Target Slot

notes.

Generic Function: scale-steps-per-octave (scale)

The number of pitches per octave in the scale’s ‘tuning’.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: scale-steps-per-octave ((symbol symbol))
Method: scale-steps-per-octave ((scale scale))
Generic Function: scale-tuning (scale)

The scale’s ‘tuning’.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: scale-tuning ((symbol symbol))
Method: scale-tuning ((scale scale))
Generic Writer: (setf scale-tuning) (object)
Package

cl-patterns.

Methods
Writer Method: (setf scale-tuning) ((scale scale))

The scale’s ‘tuning’.

Source

scales.lisp.

Target Slot

tuning.

Generic Function: stop (object)

Immediately stop a playing object (typically a pattern, pdef, task, or node). If OBJECT is T, stop all playing patterns and nodes.

See also: ‘end’, ‘play’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: stop ((task task))
Source

clock.lisp.

Method: stop ((pdef pdef))
Source

pdef.lisp.

Method: stop ((null null))
Method: stop ((list list))
Method: stop ((symbol symbol))
Method: stop ((object (eql t)))
Generic Function: sustain (object)

How long the note should be held, in beats.

See also: ‘legato’, ‘delta’

Package

cl-patterns.

Source

event.lisp.

Methods
Method: sustain ((event event))
Generic Function: (setf sustain) (event)
Package

cl-patterns.

Methods
Method: (setf sustain) ((event event))
Source

event.lisp.

Generic Reader: t-pstream-length (object)

The number of times to yield the value.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Reader Method: t-pstream-length ((t-pstream t-pstream))

The number of times to yield the value.

Target Slot

length.

Generic Writer: (setf t-pstream-length) (object)
Package

cl-patterns.

Methods
Writer Method: (setf t-pstream-length) ((t-pstream t-pstream))

The number of times to yield the value.

Source

patterns.lisp.

Target Slot

length.

Generic Reader: t-pstream-value (object)

The value that is yielded by the t-pstream.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Reader Method: t-pstream-value ((t-pstream t-pstream))

The value that is yielded by the t-pstream.

Target Slot

value.

Generic Writer: (setf t-pstream-value) (object)
Package

cl-patterns.

Methods
Writer Method: (setf t-pstream-value) ((t-pstream t-pstream))

The value that is yielded by the t-pstream.

Source

patterns.lisp.

Target Slot

value.

Generic Function: tempo (object)

Get the tempo of OBJECT in beats per second. If OBJECT is a number, set the tempo of ‘*clock*’ to that number.

See also: ‘beat’

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: tempo ((number number))
Source

clock.lisp.

Reader Method: tempo ((clock clock))

The tempo of the clock, in beats per second.

Source

clock.lisp.

Target Slot

tempo.

Method: tempo ((event event))
Source

event.lisp.

Method: tempo ((symbol symbol))
Generic Function: (setf tempo) (event)
Package

cl-patterns.

Methods
Method: (setf tempo) ((clock clock))
Source

clock.lisp.

Method: (setf tempo) ((event event))
Source

event.lisp.

Generic Function: tuning (object)

Get a tuning by name.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: tuning ((tuning tuning))
Method: tuning ((string string))
Method: tuning ((symbol symbol))
Generic Function: tuning-name (tuning)

The full name of the tuning.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: tuning-name ((symbol symbol))
Reader Method: tuning-name ((tuning tuning))

The full name of the tuning.

Target Slot

name.

Generic Writer: (setf tuning-name) (object)
Package

cl-patterns.

Methods
Writer Method: (setf tuning-name) ((tuning tuning))

The full name of the tuning.

Source

scales.lisp.

Target Slot

name.

Generic Function: tuning-octave-ratio (tuning)

The octave ratio of the tuning (i.e. what to multiply a pitch by to increase its octave by 1).

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: tuning-octave-ratio ((symbol symbol))
Reader Method: tuning-octave-ratio ((tuning tuning))

The octave ratio of the tuning (i.e. what to multiply a pitch by to increase its octave by 1).

Target Slot

octave-ratio.

Generic Writer: (setf tuning-octave-ratio) (object)
Package

cl-patterns.

Methods
Writer Method: (setf tuning-octave-ratio) ((tuning tuning))

The octave ratio of the tuning (i.e. what to multiply a pitch by to increase its octave by 1).

Source

scales.lisp.

Target Slot

octave-ratio.

Generic Function: tuning-pitches (tuning)

The actual semitone values of the tuning.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: tuning-pitches ((symbol symbol))
Reader Method: tuning-pitches ((tuning tuning))

The actual semitone values of the tuning.

Target Slot

pitches.

Generic Writer: (setf tuning-pitches) (object)
Package

cl-patterns.

Methods
Writer Method: (setf tuning-pitches) ((tuning tuning))

The actual semitone values of the tuning.

Source

scales.lisp.

Target Slot

pitches.

Generic Function: tuning-steps-per-octave (tuning)

The number of pitches per octave in the tuning.

Package

cl-patterns.

Source

scales.lisp.

Methods
Method: tuning-steps-per-octave ((symbol symbol))
Method: tuning-steps-per-octave ((tuning tuning))

6.1.6 Standalone methods

Method: adjust-sequence ((this pstream) length &key initial-element initial-contents)
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: describe-object ((chord chord) stream)
Source

scales.lisp.

Method: elt ((this scale) index)
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: elt ((this tuning) index)
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: elt ((this chord) index)
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: (setf elt) ((this pstream) index)
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: elt ((this pstream) index)
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: emptyp ((this scale))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: emptyp ((this tuning))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: emptyp ((this chord))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: emptyp ((this pstream))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: initialize-instance :after ((pwxrand pwxrand) &key)
Source

patterns.lisp.

Method: initialize-instance :after ((pxrand pxrand) &key)
Source

patterns.lisp.

Method: initialize-instance :after ((pattern pattern) &key)
Source

patterns.lisp.

Method: initialize-instance :after ((pfunc pfunc) &key)
Source

patterns.lisp.

Method: initialize-instance :after ((backend backend) &key &allow-other-keys)
Source

backend.lisp.

Method: initialize-instance :after ((pstream pstream) &key)
Source

patterns.lisp.

Method: initialize-instance :before ((pstream pstream) &key)
Source

patterns.lisp.

Method: keys ((pbind pbind))
Package

mutility.

Source

patterns.lisp.

Method: keys ((pdef pdef))
Package

mutility.

Source

pdef.lisp.

Method: keys ((event event))
Package

mutility.

Source

event.lisp.

Method: length ((this scale))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: length ((this tuning))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: length ((this chord))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: length ((this pstream))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: length ((eseq eseq))
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: make-sequence-like ((this pstream) length &key initial-element initial-contents)
Package

sb-sequence.

Source

extensions/sequence.lisp.

Method: print-object ((ptime ptime) stream)
Source

patterns.lisp.

Method: print-object ((ppatlace ppatlace) stream)
Source

patterns.lisp.

Method: print-object ((place place) stream)
Source

patterns.lisp.

Method: print-object ((ptrack ptrack) stream)
Source

track.lisp.

Method: print-object ((pclump pclump) stream)
Source

patterns.lisp.

Method: print-object ((pfor pfor) stream)
Source

patterns.lisp.

Method: print-object ((pindex pindex) stream)
Source

patterns.lisp.

Method: print-object ((pser pser) stream)
Source

patterns.lisp.

Method: print-object ((ipstream ipstream) stream)
Source

patterns.lisp.

Method: print-object ((pdurstutter pdurstutter) stream)
Source

patterns.lisp.

Method: print-object ((pwxrand pwxrand) stream)
Source

patterns.lisp.

Method: print-object ((prand prand) stream)
Source

patterns.lisp.

Method: print-object ((plazy plazy) stream)
Source

patterns.lisp.

Method: print-object ((pgauss pgauss) stream)
Source

patterns.lisp.

Method: print-object ((pdef pdef-pstream) stream)
Source

pdef.lisp.

Method: print-object ((pbind pbind) stream)
Source

patterns.lisp.

Method: print-object ((paclump paclump) stream)
Source

patterns.lisp.

Method: print-object ((pr pr) stream)
Source

patterns.lisp.

Method: print-object ((protate protate) stream)
Source

patterns.lisp.

Method: print-object ((pmouse pmouse) stream)
Source

patterns.lisp.

Method: print-object ((pxrand pxrand) stream)
Source

patterns.lisp.

Method: print-object ((pdef pdef) stream)
Source

pdef.lisp.

Method: print-object ((pslide pslide) stream)
Source

patterns.lisp.

Method: print-object ((paccum paccum) stream)
Source

patterns.lisp.

Method: print-object ((pgeom pgeom) stream)
Source

patterns.lisp.

Method: print-object ((ppar ppar) stream)
Source

patterns.lisp.

Method: print-object ((pfunc pfunc) stream)
Source

patterns.lisp.

Method: print-object ((pshuf pshuf) stream)
Source

patterns.lisp.

Method: print-object ((pmeta pmeta) stream)
Source

pmeta.lisp.

Method: print-object ((psync psync) stream)
Source

patterns.lisp.

Method: print-object ((scale scale) stream)
Source

scales.lisp.

Method: print-object ((phistory phistory) stream)
Source

patterns.lisp.

Method: print-object ((pseq pseq) stream)
Source

patterns.lisp.

Method: print-object ((pdrop pdrop) stream)
Source

patterns.lisp.

Method: print-object ((pbind pbind-pstream) stream)
Source

patterns.lisp.

Method: print-object ((pwalk pwalk) stream)
Source

patterns.lisp.

Method: print-object ((pcycles pcycles) stream)
Source

cycles.lisp.

Method: print-object ((pparchain pparchain) stream)
Source

patterns.lisp.

Method: print-object ((pwhite pwhite) stream)
Source

patterns.lisp.

Method: print-object ((pbeat* pbeat*) stream)
Source

patterns.lisp.

Method: print-object ((prerange prerange) stream)
Source

patterns.lisp.

Method: print-object ((pfindur pfindur) stream)
Source

patterns.lisp.

Method: print-object ((prest prest) stream)
Source

patterns.lisp.

Method: print-object ((pseries pseries) stream)
Source

patterns.lisp.

Method: print-object ((tuning tuning) stream)
Source

scales.lisp.

Method: print-object ((pbrown pbrown) stream)
Source

patterns.lisp.

Method: print-object ((pwrand pwrand) stream)
Source

patterns.lisp.

Method: print-object ((pn pn) stream)
Source

patterns.lisp.

Method: print-object ((item event) stream)
Source

event.lisp.

Method: print-object ((psym psym) stream)
Source

patterns.lisp.

Method: print-object ((pk pk) stream)
Source

patterns.lisp.

Method: print-object ((pfin pfin) stream)
Source

patterns.lisp.

Method: print-object ((pexprand pexprand) stream)
Source

patterns.lisp.

Method: print-object ((pbeat pbeat) stream)
Source

patterns.lisp.

Method: print-object ((pscratch pscratch) stream)
Source

patterns.lisp.

Method: print-object ((t-pstream t-pstream) stream)
Source

patterns.lisp.

Method: print-object ((pbjorklund pbjorklund) stream)
Source

bjorklund.lisp.

Method: print-object ((pdiff pdiff) stream)
Source

patterns.lisp.

Method: print-object ((chord chord) stream)
Source

scales.lisp.

Method: print-object ((pstream pstream) stream)
Source

patterns.lisp.

Method: print-object ((ps ps) stream)
Source

patterns.lisp.

Method: print-object ((eseq eseq) stream)
Source

eseq.lisp.

Method: print-object ((pfilter pfilter) stream)
Source

patterns.lisp.

Method: print-object ((ptrace ptrace) stream)
Source

patterns.lisp.

Method: print-object ((pnary pnary) stream)
Source

patterns.lisp.

Method: print-object ((pdelta pdelta) stream)
Source

patterns.lisp.

Method: print-object ((pif pif) stream)
Source

patterns.lisp.

Method: print-object ((pchain pchain) stream)
Source

patterns.lisp.

Method: print-object ((pts pts) stream)
Source

patterns.lisp.

Method: print-object ((prun prun) stream)
Source

patterns.lisp.

Method: print-object ((task task) stream)
Source

clock.lisp.

Method: print-object ((clock clock) stream)
Source

clock.lisp.


6.1.7 Conditions

Condition: redefining-melodic-alias

Condition for when changing an alias for a ‘tuning’, ‘scale’, or ‘chord’.

Package

cl-patterns.

Source

scales.lisp.

Direct superclasses

warning.

Direct methods
Direct slots
Slot: alias
Initargs

:alias

Readers

redefining-melodic-alias-alias.

Writers

This slot is read-only.

Slot: existing-definition
Initargs

:existing-definition

Readers

redefining-melodic-alias-existing-definition.

Writers

This slot is read-only.

Slot: new-definition
Initargs

:new-definition

Readers

redefining-melodic-alias-new-definition.

Writers

This slot is read-only.


6.1.8 Classes

Class: backend

Abstract superclass for backends.

Package

cl-patterns.

Source

backend.lisp.

Direct methods
Direct slots
Slot: name

The name of the backend instance.

Type

alexandria:string-designator

Initargs

:name

Readers

backend-name.

Writers

(setf backend-name).

Slot: enabled-p

Whether this backend instance is currently enabled. Events being played will only be sent to enabled and running backends.

Type

boolean

Initform

t

Initargs

:enabled-p

Readers

backend-enabled-p.

Writers

(setf backend-enabled-p).

Slot: started-p

Whether the backend is current enabled and running.

Type

boolean

Initargs

:started-p

Readers

backend-started-p.

Writers

(setf backend-started-p).

Slot: input-processors

List of functions that process incoming events. Similar to ‘*post-pattern-output-processors*’ but per-backend.

Type

list

Initargs

:input-processors

Readers

backend-input-processors.

Writers

(setf backend-input-processors).

Slot: metadata

Additional metadata associated with the backend instance.

Type

list

Initargs

:metadata

Readers

backend-metadata.

Writers

(setf backend-metadata).

Class: chord

Chord definition.

Package

cl-patterns.

Source

scales.lisp.

Direct superclasses

sequence.

Direct methods
Direct slots
Slot: name

The full name of the chord.

Initargs

:name

Readers

chord-name.

Writers

(setf chord-name).

Slot: indexes

The indexes of the notes from the scale that the chord is made up of.

Initargs

:indexes

Readers

chord-indexes.

Writers

(setf chord-indexes).

Slot: scale

The scale that the chord is derived from.

Initargs

:scale

Readers

chord-scale.

Writers

(setf chord-scale).

Class: eseq
Package

cl-patterns.

Source

eseq.lisp.

Direct superclasses
Direct subclasses

eseq-pstream.

Direct methods
Direct slots
Slot: events
Type

list

Initform

(list)

Initargs

:events

Readers

eseq-events.

Writers

This slot is read-only.

Slot: dur

The duration of the eseq. If the slot is nil, it defaults to ‘last-dur’ rounded up to the next multiple of the eseq’s ‘play-quant’.

Type

(or null number)

Initargs

:dur

Class: eseq-pstream

pstream for ‘eseq’.

Package

cl-patterns.

Source

eseq.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: events-remaining

The list of events left to be played in the pstream.

Initargs

:events-remaining

Slot: direct-p

Whether changes to the source eseq should affect this pstream immediately.

Initargs

:direct-p

Class: event

Class representing a musical event.

Package

cl-patterns.

Source

event.lisp.

Direct methods
Direct slots
Slot: event-plist

The plist containing all of the event’s keys and values.

Type

list

Initargs

:event-plist

Readers

event-plist.

Writers

This slot is read-only.

Slot: %beat

The time in beats when this event occurred in the pstream. Generally you should use ‘beat’ instead.

Type

(or null number)

Readers

%beat.

Writers

This slot is read-only.

Class: ipstream

Insertable pstream; a pstream that can be changed while it’s running by inserting new patterns at a specified beat.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

ipstream-pstream.

Direct methods
Direct slots
Slot: patterns
Initargs

:patterns

Slot: end-when-empty
Initargs

:end-when-empty

Slot: granularity
Initform

1/5

Initargs

:granularity

Class: ipstream-pstream

pstream for ‘ipstream’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: lock
Initform

(bordeaux-threads:make-recursive-lock "ipstream patterns slot lock")

Initargs

:lock

Class: paccum

Numeric accumulator. Each output and STEP is used as the input for OPERATOR to generate the next output. When LO, HI, and BOUND-BY are provided, outputs that fall outside the range LO..HI are wrapped back inside with the BOUND-BY function; the value is provided as its first argument, and LO and HI are provided as its second and third.

Based on the pattern originally from the ddwPatterns SuperCollider library.

Example:

;; (next-upto-n (paccum #’+ 0 1) 5) ; same as (pseries 0 1)
;; ;=> (0 1 2 3 4)

;; (next-upto-n (paccum #’+ 0 1 :inf :lo 0 :hi 3 :bound-by #’wrap) 9) ; same as above, wrapping between 0 and 3.
;; ;=> (0 1 2 0 1 2 0 1 2)

See also: ‘pseries’, ‘pgeom’, ‘pwalk’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

paccum-pstream.

Direct methods

print-object.

Direct slots
Slot: operator
Initform

(function +)

Initargs

:operator

Slot: start
Initform

0

Initargs

:start

Slot: step
Package

common-lisp.

Initform

1

Initargs

:step

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Slot: lo
Initargs

:lo

Slot: hi
Initargs

:hi

Slot: bound-by
Initargs

:bound-by

Class: paccum-pstream

pstream for ‘paccum’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-value
Initargs

:current-value

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: paclump

Automatically group outputs of the source pattern into lists of up to N items each. Unlike ‘pclump’, clump size is automatically set to the length of the longest list in the values of ‘*event*’, or 1 if there are no lists.

Example:

;; (next-upto-n (pbind :foo (pseq ’((1) (1 2) (1 2 3)) 1) :bar (paclump (pseries))))
;; ;=> ((EVENT :FOO (1) :BAR (0)) (EVENT :FOO (1 2) :BAR (1 2)) (EVENT :FOO (1 2 3) :BAR (3 4 5)))

See also: ‘pclump’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

paclump-pstream.

Direct methods

print-object.

Direct slots
Slot: pattern
Initargs

:pattern

Class: paclump-pstream

pstream for ‘paclump’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pattern

Abstract pattern superclass.

Package

cl-patterns.

Source

patterns.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: play-quant

A list of numbers representing when the pattern’s pstream can start playing. See ‘play-quant’ and ‘quant’.

Initargs

:play-quant

Slot: end-quant

A list of numbers representing when a pattern can end playing and when a ‘pdef’ can be swapped out for a new definition. See ‘end-quant’ and ‘quant’.

Type

list

Initargs

:end-quant

Readers

end-quant.

Writers

(setf end-quant).

Slot: end-condition

Nil or a function that is called by the clock with the pattern as its argument to determine whether the pattern should end or swap to a new definition.

Type

(or null function)

Initargs

:end-condition

Readers

end-condition.

Writers

(setf end-condition).

Slot: source

The source object that this object was created from. For example, for a ‘pstream’, this would be the pattern that ‘as-pstream’ was called on.

Initargs

:source

Readers

pattern-source.

Writers

(setf pattern-source).

Slot: parent

When a pattern is embedded in another pattern, the embedded pattern’s parent slot points to the pattern it is embedded in.

Initargs

:parent

Slot: loop-p

Whether or not the pattern should loop when played.

Initargs

:loop-p

Slot: cleanup

A list of functions that are run when the pattern ends or is stopped.

Initargs

:cleanup

Slot: pstream-count

The number of pstreams that have been made of this pattern.

Initform

0

Readers

pstream-count.

Writers

(setf pstream-count).

Slot: metadata

Hash table of additional data associated with the pattern, accessible with the ‘pattern-metadata’ function.

Type

hash-table

Initform

(make-hash-table)

Initargs

:metadata

Class: pbeat

Yield the number of beats elapsed since the pbeat was embedded in the pstream.

Example:

;; (next-n (pbind :dur (pseq ’(1 2 3)) :foo (pbeat)) 3)
;; ;=> ((EVENT :DUR 1 :FOO 0) (EVENT :DUR 2 :FOO 1) (EVENT :DUR 3 :FOO 3))

See also: ‘pbeat*’, ‘beat’, ‘prun’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pbeat-pstream.

Direct methods

print-object.

Class: pbeat*

Yield the number of beats on the ‘*clock*’ of the current pattern. In other words, pbeat* is clock-synced, unlike ‘pbeat’, which is pattern-synced.

Example:

;; (next-n (pbind :dur (pseq ’(1 2 3)) :foo (pbeat*)) 3)
;; ;=> ((EVENT :DUR 1 :FOO 200) (EVENT :DUR 2 :FOO 201) (EVENT :DUR 3 :FOO 203))

See also: ‘pbeat’, ‘beat’, ‘prun’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pbeat*-pstream.

Direct methods

print-object.

Class: pbeat*-pstream

pstream for ‘pbeat*’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: task
Initargs

:task

Class: pbeat-pstream

pstream for ‘pbeat’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pbind

pbind yields events determined by its PAIRS, which are a list of keys and values. Each key corresponds to a key in the resulting events, and each value is treated as a pattern that is evaluated for each step of the pattern to generate the value for its key.

Example:

;; (next-n (pbind :foo (pseq ’(1 2 3)) :bar :hello) 4)
;;
;; ;=> ((EVENT :FOO 1 :BAR :HELLO) (EVENT :FOO 2 :BAR :HELLO) (EVENT :FOO 3 :BAR :HELLO) EOP)

See also: ‘pmono’, ‘pb’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pbind-pstream.

Direct methods
Direct slots
Slot: pairs

The pattern pairs of the pbind; a plist mapping its keys to their values.

Initargs

:pairs

Readers

pbind-pairs.

Writers

(setf pbind-pairs).

Class: pbind-pstream

pstream for ‘pbind’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods
Class: pbjorklund

pbjorklund generates Euclidean rhythms using the Bjorklund algorithm. PULSES is the number of notes in the sequence, and STEPS is number of steps in the sequence. Additionally, OFFSET is the number to rotate the sequence by, DUR is the total duration one repeat of the sequence should be, and REPEATS is the number of repeats that should be yielded. This pattern outputs events which can be embedded into another pattern. Each pulse is a note, and each subdivision of the sequence that is not a pulse is a rest. If you just want the raw output from the Bjorklund algorithm (not in pattern form), use ‘bjorklund’ instead.

Example:

;; (next-upto-n (pbjorklund 3 7))
;; => ((EVENT :TYPE :NOTE :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7) (EVENT :TYPE :NOTE :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7) (EVENT :TYPE :NOTE :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7) (EVENT :TYPE :REST :DUR 1/7))

See also: ‘bjorklund’

Package

cl-patterns.

Source

bjorklund.lisp.

Direct superclasses

pattern.

Direct subclasses

pbjorklund-pstream.

Direct methods
Direct slots
Slot: pulses
Initargs

:pulses

Slot: steps
Initargs

:steps

Slot: offset
Initform

0

Initargs

:offset

Slot: dur
Initform

1

Initargs

:dur

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: pbjorklund-pstream

pstream for ‘pbjorklund’.

Package

cl-patterns.

Source

bjorklund.lisp.

Direct superclasses
Direct methods

next.

Class: pbrown

Brownian motion within a range; each output randomly a maximum of STEP away from the previous. LO and HI define the lower and upper bounds of the range. STEP defaults to 1 if LO and HI are integers.

Example:

;; (next-upto-n (pbrown 0 10 1 10))
;; ;=> (2 3 3 3 4 3 4 5 6 5)

See also: ‘pwhite’, ‘pexprand’, ‘pgauss’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pbrown-pstream.

Direct methods

print-object.

Direct slots
Slot: lo
Initform

0.0

Initargs

:lo

Slot: hi
Initform

1.0

Initargs

:hi

Slot: step
Package

common-lisp.

Initform

0.125

Initargs

:step

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pbrown-pstream

pstream for ‘pbrown’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Slot: current-value
Initargs

:current-value

Class: pchain

Combine multiple patterns into one event stream.

Example:

;; (next-n (pchain (pbind :foo (pseq ’(1 2 3))) (pbind :bar (pseq ’(7 8 9) 1))) 4) ;;
;; ;=> ((EVENT :FOO 1 :BAR 7) (EVENT :FOO 2 :BAR 8) (EVENT :FOO 3 :BAR 9) NIL)

See also: ‘pbind”s :embed key

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses
Direct methods
Direct slots
Slot: patterns
Initargs

:patterns

Class: pchain-pstream

pstream for ‘pchain’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct subclasses

pparchain-pstream.

Direct methods

next.

Class: pclump

Group outputs of the source pattern into lists of up to N items each.

Example:

;; (next-upto-n (pclump (pseries 0 1 5) 2))
;; ;=> ((0 1) (2 3) (4))

See also: ‘paclump’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pclump-pstream.

Direct methods

print-object.

Direct slots
Slot: pattern
Initargs

:pattern

Slot: n
Initform

1

Initargs

:n

Class: pclump-pstream

pstream for ‘pclump’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pcycles

Divide DUR between the elements in LIST. Child lists are recursively divided by the dur of their step. LIST can also be a string, in which case it is split into a list, each character converted into an integer or symbol.

pcycles also supports the following keyword arguments:

- MAP - Plist mapping symbols to the event to yield for that symbol. The symbols - (dash), _ (underscore), and . (period) are mapped to rest events by default.
- KEY - The event key that should hold the value of that step. Can be convenient if you’re :embed-ing pcycles into another pattern. Defaults to :value.
- DUR - The total duration in beats of one cycle of LIST.
- REPEATS - The number of times that LIST should be repeated before the pattern ends.

Examples:

;; (next-upto-n (pcycles ’(1 - 2 - ) :repeats 1)) ; 4 items in LIST, so each output will be 1/4 beats long.
;; ;=> ((EVENT :VALUE 1 :DUR 1/4)
;; ; (EVENT :TYPE :REST :DUR 1/4)
;; ; (EVENT :VALUE 2 :DUR 1/4)
;; ; (EVENT :TYPE :REST :DUR 1/4))

;; (next-upto-n (pcycles ’(1 - (2 3)) :repeats 1)) ; 3 items in LIST, so each will fit into 1/3 beats.
;; ;=> ((EVENT :VALUE 1 :DUR 1/3)
;; ; (EVENT :TYPE :REST :DUR 1/3)
;; ; (EVENT :VALUE 2 :DUR 1/6) ; since 2 and 3 are a sublist, they will each be 1/2 of 1/3 beats long, thus 1/6.
;; ; (EVENT :VALUE 3 :DUR 1/6))

;; (next-upto-n (pcycles ’(foo 2 3) :map (list :foo (event :midinote 60)) :repeats 1)) ; map the symbol "FOO" to (event :midinote 60)
;; ;=> ((EVENT :MIDINOTE 60 :DUR 1/3) ; note that the mapped event still contains the correct :dur.
;; ; (EVENT :VALUE 2 :DUR 1/3)
;; ; (EVENT :VALUE 3 :DUR 1/3))

;; (next-upto-n (pcycles ’(1 2) :key :bar :repeats 1)) ; the value of each item will be used as the value of the :key key – in this case, :bar.
;; ;=> ((EVENT :BAR 1 :DUR 1/2)
;; ; (EVENT :BAR 2 :DUR 1/2))

;; (next-upto-n (pcycles ’(1 2) :dur 4 :repeats 1)) ; set the total duration of each cycle of LIST to 4 beats.
;; ;=> ((EVENT :VALUE 1 :DUR 2) ; 4 beats divided by 2 events = each event is 2 beats in length.
;; ; (EVENT :VALUE 2 :DUR 2))

;; (next-upto-n (pcycles ’(1 2) :repeats 2)) ; repeat the list 2 times before ending the pattern.
;; ;=> ((EVENT :VALUE 1 :DUR 1/2) ; 2 items in list and 2 repeats results in 4 total outputs.
;; ; (EVENT :VALUE 2 :DUR 1/2)
;; ; (EVENT :VALUE 1 :DUR 1/2)
;; ; (EVENT :VALUE 2 :DUR 1/2))

pcycles is based on and inspired by the TidalCycles live coding environment (see https://tidalcycles.org/ ), however most TidalCycles notation is not supported.

See also: ‘cycles’, ‘ptrack’

Package

cl-patterns.

Source

cycles.lisp.

Direct superclasses

pattern.

Direct subclasses

pcycles-pstream.

Direct methods
Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: map
Package

common-lisp.

Initargs

:map

Slot: key
Initform

:value

Initargs

:key

Slot: dur
Initform

1

Initargs

:dur

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: pcycles-pstream

pstream for ‘pcycles’.

Package

cl-patterns.

Source

cycles.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: parsed-list
Initargs

:parsed-list

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pdef

Define a named pattern, with NAME being the name of the pattern and PATTERN the pattern itself. Named patterns are stored in a global dictionary and can be referred back to by calling ‘pdef’ without supplying PATTERN. The global dictionary also keeps track of the pdef’s pstream when ‘play’ is called on it. If a pdef is redefined while it is being played, the changes won’t be audible until either PATTERN ends, or the pdef’s ‘end-quant’ time is reached (if non-nil). Note that, unlike bare patterns, pdefs loop by default when played (‘loop-p’).

Example:

;; (pdef :foo (pbind :degree (pseries 0 1 4)))
;;
;; (play (pdef :foo))
;; ;; redefine the pdef’s pattern... note that the redefinition doesn’t become audible until the current loop finishes playing:
;; (pdef :foo (pbind :degree (pseries 4 -1 4)))

See also: ‘find-pdef’, ‘all-pdefs’, ‘pb’, ‘pmeta’, ‘ps’

Package

cl-patterns.

Source

pdef.lisp.

Direct superclasses

pattern.

Direct subclasses

pdef-pstream.

Direct methods
Direct slots
Slot: name
Type

alexandria:string-designator

Initargs

:name

Readers

pdef-name.

Writers

This slot is read-only.

Slot: pattern
Initargs

:pattern

Readers

pdef-pattern.

Writers

(setf pdef-pattern).

Slot: pstream
Initargs

:pstream

Readers

pdef-pstream.

Writers

(setf pdef-pstream).

Slot: task
Initargs

:task

Readers

pdef-task.

Writers

(setf pdef-task).

Class: pdef-pstream

pstream for ‘pdef’.

Package

cl-patterns.

Source

pdef.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: current-pstream
Initargs

:current-pstream

Class: pdelta

Output the difference between successive outputs of PATTERN, assuming PATTERN restarts every CYCLE outputs.

Unlike ‘pdiff’, pdelta is written with its use as input for ‘pbind”s :delta key in mind. If PATTERN’s successive values would result in a negative difference, pdelta instead wraps the delta around to the next multiple of CYCLE. This would allow you to, for example, supply the number of the beat that each event occurs on, rather than specifying the delta between each event. This is of course achievable using pbind’s :beat key as well, however that method requires the pbind to peek at future values, which is not always desirable.

Based on the pattern originally from the ddwPatterns SuperCollider library.

Example:

;; (next-n (pdelta (pseq ’(0 1 2 3)) 4) 8)
;;
;; ;=> (1 1 1 1 1 1 1 1)
;;
;; (next-n (pdelta (pseq ’(0 1 2 5)) 4) 8)
;;
;; ;=> (1 1 3 3 1 1 3 3)

See also: ‘pdiff’, ‘pbind”s :beat key

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pdelta-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: cycle
Initform

4

Initargs

:cycle

Class: pdelta-pstream

pstream for ‘pdelta’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pdiff

Output the difference between successive outputs of PATTERN.

Example:

;; (next-n (pdiff (pseq ’(3 1 4 3) 1)) 4)
;;
;; ;=> (-2 3 -1 NIL)

See also: ‘pdelta’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pdiff-pstream.

Direct methods

print-object.

Direct slots
Slot: pattern
Initargs

:pattern

Class: pdiff-pstream

pstream for ‘pdiff’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pdrop

Drop the first N outputs from PATTERN and yield the rest. If N is negative, drop the last N outputs from PATTERN instead.

Example:

;; (next-n (pdrop (pseq ’(1 2 3 4) 1) 2) 4)
;;
;; ;=> (3 4 NIL NIL)

See also: ‘protate’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pdrop-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: n
Initform

0

Initargs

:n

Class: pdrop-pstream

pstream for ‘pdrop’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pdurstutter

Yield each output from PATTERN N times, dividing it by N. If the output from PATTERN is an event, its dur is divided; if it’s a number, the number itself is divided instead of being yielded directly.

Example:

;; (next-n (pdurstutter (pseq ’(1 2 3 4 5)) (pseq ’(3 2 1 0 2))) 9)
;; ;=> (1/3 1/3 1/3 1 1 3 5/2 5/2 NIL)
;;
;; (next-n (pdurstutter (pbind :dur (pseq ’(1 2 3 4 5)))
;; (pseq ’(3 2 1 0 2)))
;; 9)
;; ;=> ((EVENT :DUR 1/3) (EVENT :DUR 1/3) (EVENT :DUR 1/3) (EVENT :DUR 1) (EVENT :DUR 1) (EVENT :DUR 3) (EVENT :DUR 5/2) (EVENT :DUR 5/2) NIL)

See also: ‘pr’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pdurstutter-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: n
Initargs

:n

Class: pdurstutter-pstream

pstream for ‘pdurstutter’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-value
Initargs

:current-value

Slot: current-repeats-remaining
Initform

0

Initargs

:current-repeats-remaining

Class: pexprand

Exponentially-distributed random numbers between LO and HI. Note that LO and HI cannot be 0, and that LO and HI must have the same sign or else complex numbers will be output.

Example:

;; (next-upto-n (pexprand 1.0 8.0 4))
;; ;=> (1.0420843091865208d0 1.9340168112124456d0 2.173209129035095d0 4.501371557329618d0)

See also: ‘pwhite’, ‘pbrown’, ‘pgauss’, ‘prand’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pexprand-pstream.

Direct methods

print-object.

Direct slots
Slot: lo
Initform

1.0e-4

Initargs

:lo

Slot: hi
Initform

1.0

Initargs

:hi

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pexprand-pstream

pstream for ‘pexprand’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pfilter

Skip elements of a source pattern that PREDICATE returns false for. If PREDICATE is not a function, skip items that are ‘eql’ to it.

Example:

;; (next-n (pfilter (pseq (list 1 2 3))
;; 2)
;; 6)
;; ;=> (1 3 1 3 1 3)

;; (next-n (pfilter (pseries 0 1) ’evenp)
;; 6)
;; ;=> (1 3 5 7 9 11)

See also: ‘pfilter-out’, ‘pr’, ‘pdurstutter’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pfilter-pstream.

Direct methods

print-object.

Direct slots
Slot: pattern
Initargs

:pattern

Slot: predicate
Initform

(quote identity)

Initargs

:predicate

Class: pfilter-pstream

pstream for ‘pfilter’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pfin

Yield up to COUNT outputs from PATTERN.

Example:

;; (next-n (pfin (pseq ’(1 2 3) :inf) 3) 5) ;; ;=> (1 2 3 NIL NIL)

See also: ‘pfindur’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pfin-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: count
Package

common-lisp.

Initargs

:count

Class: pfin-pstream

pstream for ‘pfin’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pfindur

Yield events from PATTERN until their total duration is within TOLERANCE of DUR, or greater than DUR. Any events that would end beyond DUR are cut short. If PATTERN outputs numbers, their total sum is limited instead.

Example:

;; (next-n (pfindur (pbind :dur 1 :foo (pseries)) 2) 3)
;; ;=> ((EVENT :DUR 1 :FOO 0) (EVENT :DUR 1 :FOO 1) EOP)
;;
;; (next-upto-n (pfindur (pwhite 0 4) 16))
;; ;=> (1 3 0 1 2 2 1 3 0 1 2)
;; (reduce #’+ *)
;; ;=> 16

See also: ‘pfin’, ‘psync’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pfindur-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: dur
Initargs

:dur

Slot: tolerance
Initform

0

Initargs

:tolerance

Class: pfindur-pstream

pstream for ‘pfindur’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-dur
Initargs

:current-dur

Slot: elapsed-dur
Initform

0

Initargs

:elapsed-dur

Class: pfor

Arpeggiator pattern; each event yielded by PATTERN is bound to ‘*event*’ and then the entirety of the ARPEGGIATOR pattern is yielded.

Example:

;; (next-upto-n (pfor (pbind :foo (pseq ’(1 2 3) 1))
;; (pbind :bar (pseq ’(4 5 6) 1))))
;; ;=> ((EVENT :FOO 1 :BAR 4) (EVENT :FOO 1 :BAR 5) (EVENT :FOO 1 :BAR 6)
;; (EVENT :FOO 2 :BAR 4) (EVENT :FOO 2 :BAR 5) (EVENT :FOO 2 :BAR 6)
;; (EVENT :FOO 3 :BAR 4) (EVENT :FOO 3 :BAR 5) (EVENT :FOO 3 :BAR 6))

See also: ‘psym’, ‘pmeta’, ‘pr’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pfor-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: arpeggiator
Initargs

:arpeggiator

Class: pfor-pstream

pstream for ‘pfor’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-pattern-event
Initargs

:current-pattern-event

Slot: current-arpeggiator-stream
Initargs

:current-arpeggiator-stream

Class: pfunc

Yield the result of evaluating FUNC. Note that the current event of the parent pattern is still accessible via the ‘*event*’ special variable.

Example:

;; (next-upto-n (pfunc (lambda () (random 10)) 4))
;; ;=> ((5 2 8 9))
;;
;; (next-upto-n (pbind :foo (pwhite 0 10 4)
;; :bar (pfunc (lambda ()
;; (if (> (event-value *event* :foo) 5) :greater :lesser)))))
;; ;=> ((EVENT :FOO 0 :BAR :LESSER) (EVENT :FOO 6 :BAR :GREATER)
;; (EVENT :FOO 7 :BAR :GREATER) (EVENT :FOO 8 :BAR :GREATER))

See also: ‘pf’, ‘pnary’, ‘plazy’, ‘pif’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pfunc-pstream.

Direct methods
Direct slots
Slot: func
Type

(or mutility:function-designator cl-patterns:pattern)

Initargs

:func

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pfunc-pstream

pstream for ‘pfunc’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pgauss

Random numbers distributed along a normal (gaussian) curve. MEAN is the "center" of the distribution, DEVIATION is the standard deviation (i.e. the higher the value, the further the outputs are spread from MEAN).

Example:

;; (next-n (pgauss) 4)
;; ;=> (0.08918811646370092d0 0.1745957067161632d0 0.7954678768273173d0 -1.2215823449671597d0)

See also: ‘pwhite’, ‘pexprand’, ‘pbrown’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pgauss-pstream.

Direct methods

print-object.

Direct slots
Slot: mean
Package

alexandria.

Initform

0.0

Initargs

:mean

Slot: deviation
Initform

1.0

Initargs

:deviation

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pgauss-pstream

pstream for ‘pgauss’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pgeom

Yield START, then generate subsequent outputs by multiplying by GROW, for a total of LENGTH outputs.

Example:

;; (next-upto-n (pgeom 1 2 4))
;; ;=> (1 2 4 8)

See also: ‘pseries’, ‘paccum’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pgeom-pstream.

Direct methods

print-object.

Direct slots
Slot: start
Initform

1

Initargs

:start

Slot: grow
Initform

2

Initargs

:grow

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pgeom-pstream

pstream for ‘pgeom’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Slot: current-value
Initargs

:current-value

Class: phistory

Refer back to PATTERN’s history, yielding the output at the index provided by STEP-PATTERN.

Note that PATTERN is still advanced once per event, and if STEP-PATTERN yields a number pointing to an event in PATTERN that hasn’t been yielded yet (i.e. if PATTERN has only advanced once but STEP-PATTERN yields 3 for its output), phistory yields nil.

Example:

;; (next-n (phistory (pseries) (pseq ’(0 2 1))) 3)
;; ;=> (0 NIL 1)

See also: ‘pscratch’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

phistory-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: step-pattern
Initargs

:step-pattern

Class: phistory-pstream

pstream for ‘phistory’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pif

"If" expression for patterns. TEST is evaluated for each step, and if it’s non-nil, the value of TRUE will be yielded, otherwise the value of FALSE will be. Note that TRUE and FALSE can be patterns, and if they are, they are only advanced in their respective cases, not for every step.

Example:

;; (next-n (pif (pseq ’(t t nil nil nil)) (pseq ’(1 2 3)) (pseq ’(9 8 7))) 8)
;; ;=> (1 2 9 8 7 3 1 9)

See also: ‘plazy’, ‘pfunc’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pif-pstream.

Direct methods

print-object.

Direct slots
Slot: test
Initargs

:test

Slot: true
Initargs

:true

Slot: false
Initargs

:false

Class: pif-pstream

pstream for ‘pif’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pindex

Use INDEX-PAT to index into the list returned by LIST-PAT. WRAP-P is whether indexes that are out of range will be wrapped (if t) or will simply return nil.

Example:

;; (next-n (pindex (list 99 98 97) (pseq (list 0 1 2 3))) 4)
;;
;; ;=> (99 98 97 NIL)
;;
;; (next-upto-n (pindex (list 99 98 97) (pseries 0 1 6) t))
;;
;; ;=> (99 98 97 99 98 97)

See also: ‘pwalk’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pindex-pstream.

Direct methods
Direct slots
Slot: list-pat
Initargs

:list-pat

Slot: index-pat
Initargs

:index-pat

Slot: wrap-p
Initargs

:wrap-p

Class: pindex-pstream

pstream for ‘pindex’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pk

Yield the value of KEY in the current ‘*event*’ context, returning DEFAULT if that value is nil.

Example:

;; (next-upto-n (pbind :foo (pseq ’(1 2 3) 1) :bar (pk :foo)))
;; ;=> ((EVENT :FOO 1 :BAR 1) (EVENT :FOO 2 :BAR 2) (EVENT :FOO 3 :BAR 3))

See also: ‘pbind’, ‘event-value’, ‘*event*’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pk-pstream.

Direct methods
Direct slots
Slot: key
Initargs

:key

Slot: default
Initform

1

Initargs

:default

Class: pk-pstream

pstream for ‘pk’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: place

Yield each value from LIST in sequence. If the value is a list, the first element of that list is yielded. The second time that sub-list is encountered, its second element will be yielded; the third time, the third element, and so on. REPEATS controls the number of times LIST is repeated.

Example:

;; (next-upto-n (place (list 1 2 (list 3 4 5)) 3))
;; ;=> (1 2 3 1 2 4 1 2 5)

See also: ‘ppatlace’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

place-pstream.

Direct methods

print-object.

Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: place-pstream

pstream for ‘place’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeat
Initform

0

Initargs

:current-repeat

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: plazy

Evaluates FUNC to generate a pattern, which is then yielded from until its end, at which point FUNC is evaluated again to generate the next pattern. The pattern is generated a total of REPEATS times.

Example:

;; (next-n (plazy (lambda () (if (= 0 (random 2)) (pseq ’(1 2 3) 1) (pseq ’(9 8 7) 1)))) 6)
;; ;=> (9 8 7 1 2 3)

See also: ‘pfunc’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

plazy-pstream.

Direct methods
Direct slots
Slot: func
Initargs

:func

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: plazy-pstream

pstream for ‘plazy’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-pstream
Initargs

:current-pstream

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pmeta

Meta-control patterns using the events output by PATTERN. In other words, instead of triggering synths directly, the events output by PATTERN are used to embed patterns into the pmeta’s pstream.

The following keys are supported:

- :pattern or :instrument - name of the source pattern for this "step".
- :dur - set the duration of the embedded pattern (defaults to :inf, which causes the pattern to play to its end).
- :findur - limit the duration of the embedded pattern.
- :sync - sync the duration of the embedded pattern to a multiple of the provided value, similar to ‘psync’
- :stretch - multiply the duration of each of the source pattern’s events.
- :ts or :fit - timestretch a pattern so its total duration is the number specified, a la ‘pts’.
- :r or :repeat - repeat each event the number of times returned by the function when the event is applied to it, similar to ‘pr’.
- :inject - inject key/value pairs from the output of this value into the source pattern.
- :step-inject or :sinject - inject one output from this value per step.

The following keys are planned for future implementation:

- :start or :end - adjust the start or end points of the source pattern (i.e. to skip the first half, set :start to 0.5).
- :start-beat or :end-beat - adjust the start or end points of the source pattern in number of beats (i.e. to end the pattern 2 beats early, set :end-beat to -2).
- :start-nth or :end-nth - adjust the start or end points of the source pattern by skipping the first or last N events.
- :filter or :remove-if-not - skip all events from the source pattern that return nil when applied to the specified function or pattern.
- :mapcar or :nary - process each event from the source pattern with a function or another pattern.

See doc/special-keys.org for more information on these keys.

Example:

;; ;; define a few patterns...
;; (pdef :foo (pbind :x (pseq ’(1 2 3) 1) :dur 1))
;; (pdef :bar (pbind :y (pseries) :dur (pwhite 0.1 1.0 3)))
;;
;; ;; use pmeta to play pattern foo and then pattern bar, ensuring each are 2 beats long in total by way of pmeta’s sync key, which works similarly to ‘psync’
;; (next-upto-n (pmeta :pattern (pseq (list :foo :bar) 1) :sync 2))
;; ;=> ((EVENT :X 1 :DUR 1) (EVENT :X 2 :DUR 1) ; from (pdef :foo)
;; (EVENT :Y 0 :DUR 0.76958686) (EVENT :Y 1 :DUR 0.94850993) (EVENT :Y 2 :DUR 0.28190327)) ; from (pdef :bar)

See also: ‘psym’, ‘pfor’, ‘pdef’, ‘pbind’

Package

cl-patterns.

Source

pmeta.lisp.

Direct superclasses

pattern.

Direct subclasses

pmeta-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Class: pmeta-pstream

pstream for ‘pmeta’.

Package

cl-patterns.

Source

pmeta.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-pstream
Initargs

:current-pstream

Class: pmouse

Get the mouse position of the display server (GUI). ORIENTATION can be :x or :y, and FORMAT can be either :relative (in which case the output is a number from 0 to 1 as a fraction of total display size) or :absolute (in which case the output is the actual X or Y position of the mouse).

See also: ‘pmousex’, ‘pmousey’, ‘mouse-location’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pmouse-pstream.

Direct methods

print-object.

Direct slots
Slot: orientation
Initargs

:orientation

Slot: format
Package

common-lisp.

Initform

:relative

Initargs

:format

Class: pmouse-pstream

pstream for ‘pmouse’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pn

Embed the full PATTERN into the pstream REPEATS times.

Example:

;; (next-upto-n (pn (pwhite 0 5 1) 5))
;; ;=> (2 4 2 1 0)

See also: ‘pr’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pn-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: pn-pstream

pstream for ‘pn’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Slot: current-pstream
Initargs

:current-pstream

Class: pnary

Yield the result of applying OPERATOR to each value yielded by each pattern in PATTERNS.

Example:

;; (next-upto-n (pnary (pseq (list ’+ ’- ’* ’/) 2) 2 2))
;; ;=> (4 0 4 1)

See also: ‘pfunc’, ‘p+’, ‘p-’, ‘p*’, ‘p/’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pnary-pstream.

Direct methods
Direct slots
Slot: operator
Initargs

:operator

Slot: patterns
Initargs

:patterns

Class: pnary-pstream

pstream for ‘pnary’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: ppar

Combine multiple event patterns into one pstream with all events in temporal order. PATTERNS is the list of patterns, or a pattern yielding lists of patterns. The ppar ends when all of the patterns in PATTERNS end.

Example:

;; (next-upto-n (ppar (list (pbind :dur (pn 1/2 4))
;; (pbind :dur (pn 2/3 4)))))
;;
;; ;=> ((EVENT :DUR 1/2 :DELTA 0) (EVENT :DUR 2/3 :DELTA 1/2)
;; (EVENT :DUR 1/2 :DELTA 1/6) (EVENT :DUR 2/3 :DELTA 1/3)
;; (EVENT :DUR 1/2 :DELTA 1/3) (EVENT :DUR 2/3 :DELTA 1/6)
;; (EVENT :DUR 1/2 :DELTA 1/2) (EVENT :DUR 2/3 :DELTA 2/3))

See also: ‘psym’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

ppar-pstream.

Direct methods

print-object.

Direct slots
Slot: patterns
Initargs

:patterns

Class: ppar-pstream

pstream for ‘ppar’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: pstreams
Initargs

:pstreams

Class: pparchain

Combine multiple patterns into several event streams. The event yielded by the first pattern will be used as the input event to the second pattern, and so on. The events yielded by each pattern will be collected into a list and yielded by the pparchain. This pattern is effectively ‘ppar’ and ‘pchain’ combined.

Example:

;; (next-upto-n (pparchain (pbind :foo (pseries 0 1 3)) (pbind :baz (p+ (pk :foo) 1) :foo (p+ (pk :foo) 3))))
;; ;=> (((EVENT :FOO 0) (EVENT :FOO 3 :BAZ 1))
;; ((EVENT :FOO 1) (EVENT :FOO 4 :BAZ 2))
;; ((EVENT :FOO 2) (EVENT :FOO 5 :BAZ 3)))

See also: ‘ppc’, ‘ppar’, ‘pchain’, ‘pbind”s :embed key

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pchain.

Direct subclasses

pparchain-pstream.

Direct methods
Direct slots
Slot: patterns
Initargs

:patterns

Class: pparchain-pstream

pstream for ‘pparchain’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: ppatlace

Yield each value from LIST in sequence, or one output from each pattern in LIST per cycle of the list. If one of the patterns embedded in LIST ends sooner than the others, it is simply removed and the ppatlace continues to yield from the rest of the LIST. The entire LIST is yielded through a total of REPEATS times.

Example:

;; (next-upto-n (ppatlace (list (pseq (list 1 2 3) 1)
;; (pseq (list 4 5 6) 2))))
;; ;=> (1 4 2 5 3 6 4 5 6)

See also: ‘place’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

ppatlace-pstream.

Direct methods
Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: ppatlace-pstream

pstream for ‘ppatlace’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pr

Repeat each value from PATTERN REPEATS times. If REPEATS is 0, the value is skipped.

Example:

;; (next-upto-n (pr (pseries) (pseq ’(1 3 0 2) 1)))
;; ;=> (0 1 1 1 3 3)

See also: ‘pdurstutter’, ‘pn’, ‘pdrop’, ‘pfor’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pr-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: pr-pstream

pstream for ‘pr’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-value
Initargs

:current-value

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: prand

Yield random values from LIST.

Example:

;; (next-n (prand ’(1 2 3) 5) 6)
;; ;=> (3 2 2 1 1 EOP)

See also: ‘pxrand’, ‘pwrand’, ‘pwxrand’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

prand-pstream.

Direct methods

print-object.

Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: prand-pstream

pstream for ‘prand’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: prerange

Remap INPUT from one range, specified by FROM-RANGE, to another range, specified by TO-RANGE.

Note that this is effectively a convenience wrapper over ‘pnary’ and ‘rerange’; thus you should see ‘rerange’ for more information.

See also: ‘rerange’, ‘pnary’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

prerange-pstream.

Direct methods
Direct slots
Slot: input
Initargs

:input

Slot: from-range
Initargs

:from-range

Slot: to-range
Initargs

:to-range

Class: prerange-pstream

pstream for ‘prerange’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: prest

An object representing a rest. When set as a value in an event, the event’s :type becomes :rest and the prest’s value slot is used as the actual value for the event key instead.

Package

cl-patterns.

Source

patterns.lisp.

Direct methods
Direct slots
Slot: value
Initform

1

Initargs

:value

Class: protate

Rotate PATTERN N outputs forward or backward, wrapping the shifted items to the other side, a la ‘alexandria:rotate’.

Example:

;; (next-upto-n (protate (pseq ’(1 2 3 4 5) 1) 2))
;; ;=> (4 5 1 2 3)

See also: ‘pdrop’, ‘phistory’, ‘pscratch’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

protate-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: shift
Initform

0

Initargs

:shift

Class: protate-pstream

pstream for ‘protate’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: prun

Run PATTERN "independently" of its parent, holding each value for DUR beats. Each of PATTERN’s outputs is treated as if it lasted DUR beats, being continuously yielded during that time before moving on to the next output.

Example:

;; (next-upto-n (pbind :foo (pseq ’(1 2 3 4 5))
;; :bar (prun (pseq ’(4 5 6 7 8))
;; (pseq ’(1 2 0.5 0.5 1)))))
;; ;=> ((EVENT :FOO 1 :BAR 4)
;; (EVENT :FOO 2 :BAR 5)
;; (EVENT :FOO 3 :BAR 5)
;; (EVENT :FOO 4 :BAR 6)
;; (EVENT :FOO 5 :BAR 8))

See also: ‘beat’, ‘pbeat’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

prun-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: dur
Initform

1

Initargs

:dur

Class: prun-pstream

pstream for ‘prun’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-dur
Initform

0

Initargs

:current-dur

Class: ps

Preserve pstream state across subsequent calls to ‘as-pstream’. To reset the pstream, simply re-evaluate the ps definition.

Based on the pattern originally from the miSCellaneous SuperCollider library.

Example:

;; (defparameter *pst* (ps (pseries)))
;;
;; (next-upto-n *pst* 4)
;; ;=> (0 1 2 3)
;;
;; (next-upto-n *pst* 4)
;; ;=> (4 5 6 7)
;;
;; (defparameter *pst* (ps (pseries)))
;;
;; (next-upto-n *pst* 4)
;; ;=> (0 1 2 3)

See also: ‘prs’, ‘pdef’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

ps-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: pstream
Initargs

:pstream

Class: ps-pstream

pstream for ‘ps’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: pscratch

"Scratches" across the values yielded by a pstream, similar in concept to how a DJ might scratch a record, altering the normal flow of playback. PATTERN is the source pattern, and STEP-PATTERN determines the increment of the index into the pstream history.

Based on the pattern originally from the ddwPatterns SuperCollider library.

Example:

;; (next-upto-n (pscratch (pseries) (pseq ’(0 1 1 -1 2) 2)))
;; ;=> (0 0 1 2 1 3 3 4 5 4)

See also: ‘phistory’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pscratch-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: step-pattern
Initargs

:step-pattern

Class: pscratch-pstream

pstream for ‘pscratch’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-index
Initform

0

Initargs

:current-index

Class: pseq

Sequentially yield items from LIST, repeating the whole list REPEATS times. OFFSET is the offset to index into the list.

Example:

;; (next-n (pseq ’(5 6 7) 2) 7)
;; ;=> (5 6 7 5 6 7 EOP)
;;
;; (next-upto-n (pseq ’(5 6 7) 2 1))
;; ;=> (6 7 5 6 7 5)

See also: ‘pser’, ‘eseq’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pseq-pstream.

Direct methods

print-object.

Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Slot: offset
Initform

0

Initargs

:offset

Class: pseq-pstream

pstream for ‘pseq’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pser

Sequentially yield values from LIST, yielding a total of LENGTH values.

Example:

;; (next-n (pser ’(5 6 7) 2) 3)
;;
;; ;=> (5 6 EOP)

See also: ‘pseq’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pser-pstream.

Direct methods

print-object.

Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Slot: offset
Initform

0

Initargs

:offset

Class: pser-pstream

pstream for ‘pser’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Slot: current-index
Initargs

:current-index

Class: pseries

Yield START, then generate subsequent outputs by adding STEP, for a total of LENGTH outputs.

Example:

;; (next-upto-n (pseries 1 2 4))
;; ;=> (1 3 5 7)

See also: ‘pseries*’, ‘pgeom’, ‘paccum’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pseries-pstream.

Direct methods

print-object.

Direct slots
Slot: start
Initform

0

Initargs

:start

Slot: step
Package

common-lisp.

Initform

1

Initargs

:step

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pseries-pstream

pstream for ‘pseries’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Slot: current-value
Initargs

:current-value

Class: pshuf

Shuffle LIST, then yield each item from the shuffled list, repeating it REPEATS times.

Example:

;; (next-upto-n (pshuf ’(1 2 3) 2))
;;
;; ;=> (3 1 2 3 1 2)

See also: ‘prand’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pshuf-pstream.

Direct methods
Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: pshuf-pstream

pstream for ‘pshuf’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: shuffled-list
Initargs

:shuffled-list

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pslide

"Slide" across sections of LIST. REPEATS is the total number of sections to output, LEN the length of the section. STEP is the number to increment the start index by after each section, and START is the initial index into LIST that the first section starts from. WRAP-AT-END, when true, means that an index outside of the list will wrap around. When false, indexes outside of the list result in nil.

Example:

;; (next-upto-n (pslide (list 0 1 2 3 4 5 6) 3 3 2 1 t))
;; ;=> (1 2 3 3 4 5 5 6 0)

See also: ‘pscratch’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pslide-pstream.

Direct methods
Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Slot: len
Initform

3

Initargs

:len

Slot: step
Package

common-lisp.

Initform

1

Initargs

:step

Slot: start
Initform

0

Initargs

:start

Slot: wrap-at-end
Initform

t

Initargs

:wrap-at-end

Class: pslide-pstream

pstream for ‘pslide’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Slot: current-repeats
Initargs

:current-repeats

Slot: remaining-current-segment
Initargs

:remaining-current-segment

Slot: current-value
Initargs

:current-value

Slot: current-list-length
Initargs

:current-list-length

Class: pstream

"Pattern stream". Keeps track of the current state of a pattern in process of yielding its outputs.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct subclasses
Direct methods
Direct slots
Slot: number

The number of outputs yielded from this pstream and any sub-pstreams that have ended.

Package

common-lisp.

Initform

0

Slot: pattern-stack

The stack of pattern pstreams embedded in this pstream.

Initform

(list)

Slot: pstream-count

How many times a pstream was made of this pstream’s source prior to this pstream. For example, if it was the first time ‘as-pstream’ was called on the pattern, this will be 0.

Type

integer

Initargs

:pstream-count

Readers

pstream-count.

Writers

(setf pstream-count).

Slot: beat

The number of beats that have elapsed since the start of the pstream.

Type

number

Initform

0

Readers

beat.

Writers

This slot is read-only.

Slot: history

The history of outputs yielded by the pstream.

Type

vector

Slot: history-number

The number of items in this pstream’s history. Differs from the number slot in that all outputs are immediately included in its count.

Initform

0

Slot: start-beat

The beat number of the parent pstream when this pstream started.

Initargs

:start-beat

Slot: future-number

The number of peeks into the future that have been made in the pstream. For example, if ‘peek’ is used once, this would be 1. If ‘next’ is called after that, future-number decreases back to 0.

Initform

0

Slot: future-beat

The current beat including all future outputs (the ‘beat’ slot does not include peeked outputs).

Initform

0

Class: psym

Use a pattern of symbols to embed ‘pdef’s. PATTERN is the source pattern that yields symbols naming the pdef to embed.

Example:

;; (pdef :foo (pseq ’(1 2 3) 1))
;;
;; (pdef :bar (pseq ’(4 5 6) 1))
;;
;; (next-upto-n (psym (pseq ’(:foo :bar) 1)))
;;
;; ;=> (1 2 3 4 5 6)

See also: ‘pdef’, ‘ppar’, ‘pmeta’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

psym-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Class: psym-pstream

pstream for ‘psym’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-pstream
Initform

cl-patterns:eop

Initargs

:current-pstream

Class: psync

Yield events from PATTERN until their total duration is within TOLERANCE of MAXDUR, cutting off any events that would extend past MAXDUR. If PATTERN ends before MAXDUR, a rest is added to the pstream to round its duration up to the nearest multiple of SYNC-QUANT.

Example:

;; (next-upto-n (psync (pbind :dur (pseq ’(5) 1)) 4 16))
;;
;; ;=> ((EVENT :DUR 5) (EVENT :TYPE :REST :DUR 3))
;;
;; (next-upto-n (psync (pbind :dur (pseq ’(5) 5)) 4 16))
;;
;; ;=> ((EVENT :DUR 5) (EVENT :DUR 5) (EVENT :DUR 5) (EVENT :DUR 5 :DELTA 1))

See also: ‘pfindur’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

psync-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: sync-quant
Initargs

:sync-quant

Slot: maxdur
Initargs

:maxdur

Slot: tolerance
Initform

0.001

Initargs

:tolerance

Class: psync-pstream

pstream for ‘psync’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: elapsed-dur
Initform

0

Initargs

:elapsed-dur

Class: ptime

Yield the number of seconds elapsed since ptime was embedded in the pstream.

Note: May give inaccurate results if the clock’s tempo changes occur more frequently than events in the parent pbind.

Example:

;; (setf (tempo *clock*) 1) ; 60 BPM
;; (next-n (pbind :dur 1 :time (ptime)) 2)
;; ;=> ((EVENT :DUR 1 :TIME 0) (EVENT :DUR 1 :TIME 1.0))

See also: ‘pbeat’, ‘prun’, ‘beat’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

ptime-pstream.

Direct methods

print-object.

Class: ptime-pstream

pstream for ‘ptime’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: last-beat-checked
Initargs

:last-beat-checked

Slot: tempo-at-beat
Initargs

:tempo-at-beat

Slot: elapsed-time
Initform

0

Initargs

:elapsed-time

Class: ptrace

Print the PREFIX and each output of TRACE to STREAM. If TRACE is t, print ‘*event*’. If TRACE is a different symbol, print the value of that symbol in ‘*event*’. Otherwise, ptrace yields TRACE unaffected.

See also: ‘debug-backend’, ‘debug-backend-recent-events’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

ptrace-pstream.

Direct methods
Direct slots
Slot: trace
Package

common-lisp.

Initform

t

Initargs

:trace

Slot: prefix
Initargs

:prefix

Slot: stream
Package

common-lisp.

Initform

t

Initargs

:stream

Class: ptrace-pstream

pstream for ‘ptrace’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Class: ptrack

Defines an event pattern via a tracker-inspired notation. HEADER is a plist mapping the pattern’s "columns" (keys) to their default values or to patterns that are used to generate the key’s values for each output. ROWS is a list of lists, each sublist specifying the values for a step. Values can be specified on their own (in which case they’re matched in order to the columns specified in the header) or by using Lisp’s traditional key/value notation.

By default, the pattern repeats infinitely, however it can be limited by providing a :repeats argument in the header specifying the number of repeats.

Example:

;; (ptrack (list :freq 440 :dur 1/4)
;; ’((100) ; play a note with a frequency of 100
;; :r ; rest for 1/4 beat
;; (:midinote 70 :dur 1/2) ; play a note at midinote 70 for 1/2 beat
;; (-) ; continue previous note for an additional 1/4 beat
;; (600 3/4) ; play a note with a frequency of 600 for 3/4 beat
;; :r ; rest for 1/4 beat
;; (750 :foo 3) ; play a note at frequency 750, dur 1/4, and additional :foo key with value 3
;; ))

See also: ‘pt’, ‘pcycles’, ‘pbind’

Package

cl-patterns.

Source

track.lisp.

Direct superclasses

pattern.

Direct subclasses

ptrack-pstream.

Direct methods
Direct slots
Slot: header
Initargs

:header

Slot: rows
Initform

(make-list 16)

Initargs

:rows

Slot: repeats
Initform

cl-patterns:*default-pattern-repeats*

Initargs

:repeats

Class: ptrack-pstream

pstream for ‘ptrack’.

Package

cl-patterns.

Source

track.lisp.

Direct superclasses
Direct methods
Direct slots
Slot: current-row
Initargs

:current-row

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pts

Timestretch PATTERN so its total duration is DUR. Note that only the first ‘*max-pattern-yield-length*’ events from PATTERN are considered, and that they are calculated immediately at pstream creation time rather than lazily as the pstream yields.

Example:

;; (next-upto-n (pts (pbind :dur (pn 1 4)) 5))
;;
;; ;=> ((EVENT :DUR 5/4) (EVENT :DUR 5/4) (EVENT :DUR 5/4) (EVENT :DUR 5/4))

See also: ‘pfindur’, ‘psync’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pts-pstream.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Slot: dur
Initform

4

Initargs

:dur

Class: pts-pstream

pstream for ‘pts’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: pattern-outputs
Initargs

:pattern-outputs

Class: pwalk

"Walk" over the values in LIST by using the accumulated value of the outputs of STEP-PATTERN as the index. At the beginning of the pwalk and each time the start or end of the list is passed, the output of DIRECTION-PATTERN is taken and used as the multiplier for values from STEP-PATTERN. START-POS is the index in LIST for pwalk to take its first output from.

Example:

;; ;; using (pseq (list 1 -1)) as the DIRECTION-PATTERN causes the pwalk’s output to "ping-pong":
;; (next-n (pwalk (list 0 1 2 3) (pseq (list 1)) (pseq (list 1 -1))) 10)
;;
;; ;=> (0 1 2 3 2 1 0 1 2 3)

See also: ‘pindex’, ‘pbrown’, ‘paccum’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pwalk-pstream.

Direct methods
Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: step-pattern
Initargs

:step-pattern

Slot: direction-pattern
Initform

1

Initargs

:direction-pattern

Slot: start-pos
Initform

0

Initargs

:start-pos

Class: pwalk-pstream

pstream for ‘pwalk’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-index
Initargs

:current-index

Slot: current-direction
Initform

1

Initargs

:current-direction

Class: pwhite

Linearly-distributed random numbers between LO and HI, inclusive.

Example:

;; (next-upto-n (pwhite 0 10 16))
;; ;=> (7 2 4 5 7 10 4 8 10 2 3 5 9 2 5 4)

See also: ‘pexprand’, ‘pbrown’, ‘pgauss’, ‘prand’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pwhite-pstream.

Direct methods

print-object.

Direct slots
Slot: lo
Initform

0.0

Initargs

:lo

Slot: hi
Initform

1.0

Initargs

:hi

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pwhite-pstream

pstream for ‘pwhite’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pwrand

Yield random elements from LIST weighted by respective values from WEIGHTS.

Example:

;; (next-upto-n (pwrand ’(1 2 3) ’(7 5 3) 10))
;; ;=> (1 1 2 2 2 1 2 1 1 3)

See also: ‘prand’, ‘pxrand’, ‘pwxrand’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pwrand-pstream.

Direct methods

print-object.

Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: weights
Initform

:equal

Initargs

:weights

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pwrand-pstream

pstream for ‘pwrand’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pwxrand

Yield random elements from LIST weighted by respective values from WEIGHTS, never repeating equivalent values twice in a row. This is effectively ‘pxrand’ and ‘pwrand’ combined.

Example:

;; (next-upto-n (pwxrand ’(1 2 3) ’(7 5 3) 10))
;; ;=> (1 2 1 2 1 3 1 2 1 2)

See also: ‘prand’, ‘pxrand’, ‘pwrand’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pwxrand-pstream.

Direct methods
Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: weights
Initform

:equal

Initargs

:weights

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pwxrand-pstream

pstream for ‘pwxrand’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: last-result
Initargs

:last-result

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: pxrand

Yield random values from LIST, never repeating equal values twice in a row.

Example:

;; (next-upto-n (pxrand ’(1 2 3) 4))
;; ;=> (3 1 2 1)

See also: ‘prand’, ‘pwrand’, ‘pwxrand’

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pattern.

Direct subclasses

pxrand-pstream.

Direct methods
Direct slots
Slot: list
Package

common-lisp.

Initargs

:list

Slot: length
Package

common-lisp.

Initform

cl-patterns:*default-pattern-length*

Initargs

:length

Class: pxrand-pstream

pstream for ‘pxrand’.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses
Direct methods

next.

Direct slots
Slot: last-result
Initargs

:last-result

Slot: current-repeats-remaining
Initargs

:current-repeats-remaining

Class: scale

Scale definition.

Package

cl-patterns.

Source

scales.lisp.

Direct superclasses

sequence.

Direct methods
Direct slots
Slot: name

The full name of the scale.

Initargs

:name

Readers

scale-name.

Writers

(setf scale-name).

Slot: notes

The notes of the scale.

Initargs

:notes

Readers

scale-notes.

Writers

(setf scale-notes).

Slot: tuning

The scale’s ‘tuning’.

Initargs

:tuning

Writers

(setf scale-tuning).

Class: t-pstream

Pattern stream object that by default yields its value only once.

Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

pstream.

Direct methods
Direct slots
Slot: value

The value that is yielded by the t-pstream.

Initargs

:value

Readers

t-pstream-value.

Writers

(setf t-pstream-value).

Slot: length

The number of times to yield the value.

Package

common-lisp.

Initform

1

Initargs

:length

Readers

t-pstream-length.

Writers

(setf t-pstream-length).

Class: tuning

Tuning definition.

Package

cl-patterns.

Source

scales.lisp.

Direct superclasses

sequence.

Direct methods
Direct slots
Slot: name

The full name of the tuning.

Initargs

:name

Readers

tuning-name.

Writers

(setf tuning-name).

Slot: pitches

The actual semitone values of the tuning.

Initargs

:pitches

Readers

tuning-pitches.

Writers

(setf tuning-pitches).

Slot: octave-ratio

The octave ratio of the tuning (i.e. what to multiply a pitch by to increase its octave by 1).

Initargs

:octave-ratio

Readers

tuning-octave-ratio.

Writers

(setf tuning-octave-ratio).


6.2 Internals


6.2.1 Special variables

Special Variable: *abbreviations*

List of abbreviations that should be used by ‘generate-aliases’ to auto-generate aliases for ‘tuning’s, ‘scale’s, ‘chord’s, etc.

Package

cl-patterns.

Source

scales.lisp.

Special Variable: *backends*

List of loaded and active cl-patterns backends. This variable generally shouldn’t need to be modified by the user; instead register backends by loading the relevant cl-patterns sub-system, then use ‘make-backend’ and/or ‘backend-start’ to make and activate a backend.

See also: ‘all-backends’, ‘all-backend-types’, ‘make-backend’, ‘backend-start’, ‘backend-stop’

Package

cl-patterns.

Source

backend.lisp.

Special Variable: *chords*

Hash table mapping names and aliases to chord definition objects.

Package

cl-patterns.

Source

scales.lisp.

Special Variable: *conversions*

Hash table storing conversion function definitions and metadata.

Package

cl-patterns.

Source

conversions.lisp.

Special Variable: *deprecated-function-error-events-lists-differing-keys-notified-p*
Package

cl-patterns.

Source

event.lisp.

Special Variable: *deprecated-function-style-warning-parp-notified-p*
Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *dictionary-lookup-functions*

List of functions that can be used to look up the object that a symbol can name. Each function should return the object in question if it exists, or nil (or throw an error) if it doesn’t.

Functions like ‘play’, ‘end’, ‘launch’, and ‘stop’ will check symbols against each of these dictionaries in order and will apply themselves to the object from the first dictionary with a matching key.

Example:

;; *dictionary-lookup-functions*
;; => (CL-PATTERNS::FIND-PDEF BDEF:BDEF)
;; (play :foo) ; will (play (pdef :foo)) if that pdef exists, or (play (bdef :foo)) if the bdef exists. If neither exists, it will throw an error.

See also: ‘play’, ‘launch’, ‘end’, ‘stop’

Package

cl-patterns.

Source

utility.lisp.

Special Variable: *event-special-keys*

Plist mapping event special keys to their case lists.

Package

cl-patterns.

Source

event.lisp.

Special Variable: *instrument-map*

Hash table mapping instrument names (as symbols) to arbitrary parameter lists. Used by ‘remap-instrument-to-parameters’ as part of post-pattern output processing. Any events whose :instrument is not found in this table will not be affected.

See also: ‘remap-instrument-to-parameters’

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *pattern-function-translations*

The list of names of functions and the forms they will be translated to in ‘pb’ and other pattern macros.

See also: ‘define-pattern-function-translation’

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *patterns*

List of the names of all defined pattern types.

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *pbind-special-init-keys*

The list of special keys for pbind that alters it during its initialization.

See also: ‘define-pbind-special-init-key’

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *pbind-special-process-keys*

The list of special keys for pbind that alter the outputs of the pbind.

See also: ‘define-pbind-special-process-key’

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *pbind-special-wrap-keys*

The list of special keys for pbind that causes the pbind to be replaced by another pattern during its initialization.

See also: ‘define-pbind-special-wrap-key’

Package

cl-patterns.

Source

patterns.lisp.

Special Variable: *pdef-dictionary*

The pdef dictionary hash table.

See also: ‘find-pdef’

Package

cl-patterns.

Source

pdef.lisp.

Special Variable: *scales*

Hash table mapping names and aliases to scale definition objects.

Package

cl-patterns.

Source

scales.lisp.

Special Variable: *tunings*

Hash table mapping names and aliases to tuning definition objects.

Package

cl-patterns.

Source

scales.lisp.


6.2.2 Macros

Macro: defconversion (name lambda-list &body body)

Define a conversion, storing function definition information so it can be used later to define "pseudo-ugens" for synthesis definitions in supported backends.

Package

cl-patterns.

Source

conversions.lisp.

Macro: define-event-special-key (name cases &key remove-keys define-methods documentation)

Define a special key with the key NAME for events (i.e. keys that take their values from other keys, or keys that have default values).

CASES is an alist of cases mapping event key names to forms. When ‘event-value’ is called on an event for the NAME key, then the event is tested for the keys of CASES in the order they’re listed. The associated form of the first key of CASES that exists in the event is evaluated to get the value of that call to ‘event-value’.

If no case is provided with a key that’s the same as NAME, one is automatically added at the start with a form that just returns the value of the event’s NAME key. If a case is provided with t as its key, that case is always run when found. This allows you to set a default value for the key if none of the other keys from CASES exist in the event.

REMOVE-KEYS is a list of keys to remove from the event when the NAME key is being set with ‘(setf event-value)’. If t (the default), all keys in CASES will be removed from the event.

DEFINE-METHODS, if true, will cause the macro to define methods for getting and setting the key in an event.

DOCUMENTATION is the documentation string for the function.

Example:

;; (define-event-special-key :amp ((:db (db-amp (raw-event-value event :db)))
;; (t 0.5))
;; :define-methods t)

This defines the amp key for events. Since the :amp key is implied, it doesn’t need to be specified in the CASES. Thus if the event already has an :amp key, its value will be used by default. If no :amp key exists in the event, then the :db FUNC is run if the :db key exists. If neither :amp nor :db exist in the event, then the t key is run, giving a default of 0.5.

Additionally, because :define-methods is true, we can also do the following:

;; (defparameter *foo* (event :amp 0.9))
;; (amp *foo*) ; => 0.9
;; (setf (amp *foo*) 0.7)

Package

cl-patterns.

Source

event.lisp.

Macro: define-pattern-function-translation (function pattern)

Define a translation from FUNCTION to PATTERN in ‘pb’.

Package

cl-patterns.

Source

patterns.lisp.

Macro: define-pbind-special-init-key (key &body body)

Define a special key for pbind that alters the pbind during its initialization, either by embedding a plist into its pattern-pairs or in another way. These functions are called once, when the pbind is created, and must return a plist if the key should embed values into the pbind pairs, or NIL if it should not.

Package

cl-patterns.

Source

patterns.lisp.

Macro: define-pbind-special-process-key (key &body body)

Define a special key for pbind that alters the pattern in a nonstandard way. These functions are called for each event created by the pbind and must return an event if the key should embed values into the event stream, or ‘eop’ if the pstream should end.

Package

cl-patterns.

Source

patterns.lisp.

Macro: define-pbind-special-wrap-key (key &body body)

Define a special key for pbind that replaces the pbind with another pattern during the pbind’s initialization. Each encapsulation key is run once on the pbind after it has been initialized, altering the type of pattern returned if the return value of the function is non-NIL.

Package

cl-patterns.

Source

patterns.lisp.


6.2.3 Ordinary functions

Function: (setf %beat) (event)

If EVENT has a ‘beat’ key, set it to VALUE; otherwise, set its ‘%beat’ "hidden key".

Package

cl-patterns.

Source

event.lisp.

Function: absolute-beats-to-timestamp (beats &optional clock)

Convert a clock’s number of beats to a timestamp. The result is only guaranteed to be accurate if it’s greater than the clock’s beat-at-tempo slot.

Package

cl-patterns.

Source

clock.lisp.

Function: backend-instrument-has-gate-p (backend instrument)

Whether or not SYNTH in BACKEND has a gate control (i.e. whether it needs to be manually released or if it acts as a "one-shot").

Package

cl-patterns.

Source

backend.lisp.

Function: boolean-to-midi (boolean)

Convert BOOLEAN to a MIDI value.

Examples:

;; ;; false/"off" values:
;; (boolean-to-midi nil) ;=> 0 ;; (boolean-to-midi 0) ;=> 0 ;; (boolean-to-midi 63) ;=> 63

;; ;; true/"on" values:
;; (boolean-to-midi t) ;=> 127 ;; (boolean-to-midi 64) ;=> 64 ;; (boolean-to-midi 127) ;=> 127

See also: ‘parse-boolean’

Package

cl-patterns.

Source

conversions.lisp.

Function: can-swap-now-p (pstream &optional beat)

Whether PSTREAM can swap to its new definition, based on ‘end-quant’, ‘end-condition’, ‘ended-p’, and BEAT (the current beat of the clock).

Package

cl-patterns.

Source

clock.lisp.

Function: clock-add (item &optional clock)

Add ITEM (usually a ‘pstream’) to CLOCK’s tasks. Generally you don’t need to use this directly and would use ‘play’ instead.

See also: ‘clock-remove’, ‘play’

Package

cl-patterns.

Source

clock.lisp.

Function: clock-clear-tasks (&optional clock)

Remove all tasks from CLOCK.

See also: ‘clock-tasks’

Package

cl-patterns.

Source

clock.lisp.

Function: clock-process-event (clock task event type)

Process EVENT on CLOCK. TASK is the associated task, and TYPE is the event type.

Package

cl-patterns.

Source

clock.lisp.

Function: clock-remove (task &optional clock)

Remove TASK from CLOCK’s tasks. Generally you don’t need to use this directly and would use ‘stop’ or ‘end’ instead.

See also: ‘clock-add’, ‘stop’, ‘end’

Package

cl-patterns.

Source

clock.lisp.

Function: cumulative-list (list)

Get a fresh version of LIST where each element is the sum of it and the previous elements.

Example:

;; (cumulative-list (list 1 2 3 4)) ;=> (1 3 6 10)

See also: ‘normalized-sum’

Package

cl-patterns.

Source

utility.lisp.

Function: cycles-parse (list)
Package

cl-patterns.

Source

cycles.lisp.

Function: decf-remaining (pattern &optional key)

Decrease PATTERN’s KEY value.

See also: ‘remaining-p’

Package

cl-patterns.

Source

patterns.lisp.

Function: event-backends (event)

Get a list of backends that EVENT might be playable on, either via the event’s :backend key or via the ‘enabled-backends’.

Package

cl-patterns.

Source

backend.lisp.

Function: event-with-raw-timing (event task)

Get an event like EVENT but with the :BEAT-AT-START and :TIMESTAMP-AT-START keys added for backends.

Package

cl-patterns.

Source

clock.lisp.

Function: find-backend-supporting-render (render-type)

Get the output and backend names of the first enabled backend that supports RENDER-TYPE (i.e. :buffer, :file, :score, etc), or nil if none support it.

See also: ‘render’

Package

cl-patterns.

Source

render.lisp.

Function: find-buffer-symbol (sequence)

Get the name and index of the symbol in SEQUENCE that represents the buffer argument. This is typically either :buffer or :bufnum.

Package

cl-patterns.

Source

utility.lisp.

Function: find-object-by-id (id &key default)

Find an object identified by ID using ‘*dictionary-lookup-functions*’. Returns DEFAULT if no object was found, or signals an error if DEFAULT is the symbol :error.

See also: ‘find-pdef’

Package

cl-patterns.

Source

utility.lisp.

Function: from-range (input map)

Unmap INPUT from the range specified by MAP to the range [0..1].

See also: ‘to-range’, ‘rerange’

Package

cl-patterns.

Source

utility.lisp.

Function: generate-aliases (name)

Generate a list of aliases for NAME by mapping various combinations of ‘*abbreviations*’.

See also: ‘*abbreviations*’

Package

cl-patterns.

Source

scales.lisp.

Function: index-and-offset (num)

Return a cons cell consisting of the input number and the offset its sharps/flats represent.

Package

cl-patterns.

Source

scales.lisp.

Function: index-of-greater-than (n list)

Get the index of the first element of LIST greater than N.

Package

cl-patterns.

Source

utility.lisp.

Function: make-default-event ()

Get ‘*event*’ if it’s not nil, or get a fresh empty event.

Package

cl-patterns.

Source

patterns.lisp.

Function: make-pattern-for-function (function)

Generate Lisp of a wrapper function named pFUNCTION whose definition is (pnary FUNCTION ...).

See also: ‘pnary’

Package

cl-patterns.

Source

patterns.lisp.

Function: near-p (number &optional range of)

Test whether NUMBER is within RANGE (bipolar) of OF.

Examples:

;; (near-p 4 1 5) ; => t
;; (near-p 4 1) ; => nil
;; (near-p 0.5) ; => t
;; (near-p 0.5 0.6 1) ; => t

See also: ‘alexandria:clamp’, ‘wrap’, ‘nearest’

Package

cl-patterns.

Source

utility.lisp.

Function: nearest (input list)

Get the element in LIST nearest to INPUT.

See also: ‘near-p’

Package

cl-patterns.

Source

utility.lisp.

Function: normalized-sum (list &optional sum)

Get a copy of LIST "normalized" so all of its numbers summed together equal SUM.

Examples:

;; (normalized-sum (list 1 1 1 1)) ;=> (1/4 1/4 1/4 1/4)
;; (normalized-sum (list 1 2 3) 2) ;=> (1/3 2/3 1)

See also: ‘cumulative-list’

Package

cl-patterns.

Source

utility.lisp.

Function: pattern-pstream-class-name (pattern)

Get the name of the pstream class for PATTERN.

Package

cl-patterns.

Source

utility.lisp.

Function: pattern-translate-sexp (sexp)

Translate SEXP to the equivalent pattern as per ‘*pattern-function-translations*’, or pass it through unchanged if there is no translation.

See also: ‘pb-translate-body-functions’

Package

cl-patterns.

Source

patterns.lisp.

Function: pb-translate-body-functions (body)

Translate functions in BODY to their equivalent pattern as per ‘*pattern-function-translations*’.

See also: ‘pattern-translate-sexp’

Package

cl-patterns.

Source

patterns.lisp.

Function: pcycles-parse-list (list &key map dur key)
Package

cl-patterns.

Source

cycles.lisp.

Function: pdef-names (name &key include-aliases dictionary)

Get a list of all the names in DICTIONARY that point to NAME.

See also: ‘all-pdef-names’, ‘all-pdefs’

Package

cl-patterns.

Source

pdef.lisp.

Function: plist-set (plist key value)

Return a new copy of PLIST, but with its KEY set to VALUE.

Package

cl-patterns.

Source

utility.lisp.

Function: pmeta-ensure-pattern-value (value)
Package

cl-patterns.

Source

pmeta.lisp.

Function: pstream-elt-index-to-history-index (pstream index)

Given INDEX, an absolute index into PSTREAM’s history, return the actual index into the current recorded history of the pstream.

See also: ‘pstream-history-advance-by’

Package

cl-patterns.

Source

patterns.lisp.

Function: pstream-history-advance-by (pstream index)

Convert a history index (i.e. a positive number provided to ‘pstream-elt-future’) to the amount that the history must be advanced by.

If the provided index is before the earliest item in history, the result will be a negative number denoting how far beyond the earliest history the index is. If the provided index is within the current history, the result will be zero.
If the provided index is in the future, the result will be a positive number denoting how far in the future it is.

See also: ‘pstream-elt-index-to-history-index’

Package

cl-patterns.

Source

patterns.lisp.

Function: ptrack-does-not-exist (ptrack type name if-does-not-exist)
Package

cl-patterns.

Source

track.lisp.

Function: raw-event-value (event key)

Get the value of KEY in EVENT without running any conversion functions.

See also: ‘event-value’

Package

cl-patterns.

Source

event.lisp.

Function: (setf raw-event-value) (event key)

Set the value of KEY to VALUE in EVENT without running any conversion functions.

See also: ‘raw-event-value’, ‘event-value’

Package

cl-patterns.

Source

event.lisp.

Function: remaining-p (pattern &optional repeats-key remaining-key)

True if PATTERN’s REMAINING-KEY slot value represents outputs "remaining" (see ‘value-remaining-p’). If PATTERN’s REMAINING-KEY slot is unbound or 0, and REPEATS-KEY is not nil, then it is automatically set to the ‘next’ of PATTERN’s REPEATS-KEY slot. Then if that new value is 0 or nil, remaining-p returns nil. Otherwise, :reset is returned as a generalized true value and to indicate that ‘next’ was called on PATTERN’s REPEATS-KEY slot.

See also: ‘value-remaining-p’, ‘decf-remaining’

Package

cl-patterns.

Source

patterns.lisp.

Function: remap-instrument-to-parameters (output &optional pstream)

Remap OUTPUT’s instrument key to arbitrary parameters specified in ‘*instrument-map*’. If OUTPUT is not an event or the instrument is not found in the map, it is passed through unchanged.

See also: ‘instrument-mapping’, ‘*instrument-map*’, ‘*post-pattern-output-processors*’

Package

cl-patterns.

Source

patterns.lisp.

Function: set-parents (pattern)

Loop through PATTERN’s slots and set the "parent" slot of any patterns to this pattern.

Package

cl-patterns.

Source

patterns.lisp.

Function: sharp-or-flat (string)

Given STRING, return a number representing how many semitones above or below its number it represents, by counting sharps (#) and flats (b).

Example:

;; (sharp-or-flat "#") ;=> 1
;; (sharp-or-flat "##") ;=> 2
;; (sharp-or-flat "b") ;=> -1

See also: ‘note-name-and-octave’, ‘index-and-offset’

Package

cl-patterns.

Source

scales.lisp.

Function: string-reader (stream char)
Package

cl-patterns.

Source

track.lisp.

Function: string-replace (string old new)

Find the first instance of OLD in STRING and replace it with NEW. Return the new string, or if OLD was not found, return STRING unchanged. Returns the position that OLD was found as a second value, or nil if it was not found.

Package

cl-patterns.

Source

utility.lisp.

Function: t-short (stream char subchar)
Package

cl-patterns.

Source

track.lisp.

Function: task-nodes (task &optional backend)

Get the list of nodes for TASK for the specified backend. If BACKEND is nil, get all of the resources for TASK regardless of backend.

Package

cl-patterns.

Source

backend.lisp.

Function: (setf task-nodes) (task &optional backend)

Set the list of nodes for TASK for the specified backend. If BACKEND is nil, set the full backend-resources slot for the task.

Package

cl-patterns.

Source

backend.lisp.

Function: to-range (input map)

Map INPUT from the range [0..1] to the range specified by MAP.

See also: ‘from-range’, ‘rerange’

Package

cl-patterns.

Source

utility.lisp.

Function: track-shorthand (stream char subchar)

Reader macro for ‘ptrack’ preprocessing.

Package

cl-patterns.

Source

track.lisp.

Function: value-remaining-p (value)

True if VALUE represents that a pstream has outputs "remaining"; i.e. VALUE is a symbol (i.e. :inf), or a number greater than 0.

See also: ‘remaining-p’, ‘decf-remaining’

Package

cl-patterns.

Source

patterns.lisp.


6.2.4 Generic functions

Generic Reader: %beat (object)
Package

cl-patterns.

Methods
Reader Method: %beat ((event event))

The time in beats when this event occurred in the pstream. Generally you should use ‘beat’ instead.

Source

event.lisp.

Target Slot

%beat.

Generic Function: %pattern-children (object)
Package

cl-patterns.

Methods
Method: %pattern-children ((pbind pbind))
Source

patterns.lisp.

Method: %pattern-children ((pattern pattern))
Source

patterns.lisp.

Method: %pattern-children (object)
Source

patterns.lisp.

Generic Function: backend-all-instruments (backend)

Get a list of the names of all defined synths (synthdefs, dsps, etc) for the specified backend.

See also: ‘backend-all-nodes’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-all-instruments ((backend symbol))
Method: backend-all-instruments (backend)
Generic Function: backend-all-nodes (backend)

Get a list of all active nodes for the specified backend.

See also: ‘backend-all-instruments’, ‘backend-node-p’, ‘backend-panic’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-all-nodes (backend)
Generic Function: backend-control-node-at (backend time node params)

At TIME, set NODE’s parameters to PARAMS. If NODE is an instrument name, launch a node with those parameters at the specified time instead. This function should return the node object.

Package

cl-patterns.

Source

backend.lisp.

Generic Function: backend-convert-object (backend object key)

Convert OBJECT to a value that BACKEND can understand. For example, the SuperCollider backend requires that any ‘cl-collider::buffer’ objects are converted to their bufnum.

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-convert-object (backend (symbol symbol) key)
Method: backend-convert-object (backend object key)
Generic Function: backend-instrument-args-list (backend instrument event)

Generate a plist of parameters for INSTRUMENT based off of its controls, taking values from EVENT. Unlike ‘event-plist’, this function doesn’t include event keys that aren’t also one of the synth’s arguments.

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-instrument-args-list (backend instrument event)
Generic Function: backend-instrument-controls (backend instrument)

Get the list of names of controls for INSTRUMENT in BACKEND.

Package

cl-patterns.

Source

backend.lisp.

Generic Function: backend-node-p (backend object)

True if OBJECT is a node for the specified backend.

See also: ‘backend-all-nodes’

Package

cl-patterns.

Source

backend.lisp.

Generic Function: backend-panic (backend)

"Panic" the backend, i.e. stop all of its nodes immediately.

See also: ‘backend-all-nodes’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-panic (backend)
Generic Function: backend-play-event (backend event task)

Play ITEM on the sound server specified by BACKEND. TASK is the task that triggered ITEM to be played. Typically a backend should not need to define a specialized method for this generic if it already provides methods for the following:

- ‘backend-instrument-controls’
- ‘backend-node-p’
- ‘backend-timestamps-for-event’
- ‘backend-proxys-node’
- ‘backend-control-node-at’

It’s suggested to define methods for ‘backend-convert-object’ if the backend requires objects to be converted to another representation before being used as an instrument’s parameters. Additionally, methods for ‘play’, ‘launch’, ‘stop’, and ‘end’ may be convenient to define for the backend’s node class.

See also: ‘backend-task-removed’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-play-event :around (backend event task)
Method: backend-play-event (backend event task)
Generic Function: backend-proxys-node (backend id)

Get the current node object on BACKEND for the proxy with the specified ID.

Package

cl-patterns.

Source

backend.lisp.

Generic Function: backend-responds-p (backend event)

True if BACKEND should respond to EVENT.

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-responds-p (event (backend backend))
Method: backend-responds-p (backend event)
Generic Function: backend-task-added (backend task)

Called when TASK is added to the clock so BACKEND can prepare any related state.

See also: ‘backend-task-removed’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-task-added (backend task)
Generic Function: backend-task-removed (backend task)

Called when TASK is removed from the clock so BACKEND can free any associated nodes. Typically a backend shouldn’t need to define a method for this generic if it already defines methods for the events listed in the docstring for ‘backend-play-event’.

See also: ‘backend-play-event’

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-task-removed (backend task)
Generic Function: backend-tempo-change-at (backend clock timestamp)

Set the backend’s tempo to NEW-TEMPO at the timestamp provided.

Package

cl-patterns.

Source

backend.lisp.

Methods
Method: backend-tempo-change-at (backend clock timestamp)
Generic Function: backend-timestamps-for-event (backend event task)

Get a list containing timestamps for the start and end of EVENT’s note, in the format that BACKEND expects for its scheduling function.

See also: ‘backend-control-node-at’

Package

cl-patterns.

Source

backend.lisp.

Generic Reader: end-condition (object)
Generic Writer: (setf end-condition) (object)
Package

cl-patterns.

Methods
Reader Method: end-condition ((pattern pattern))
Writer Method: (setf end-condition) ((pattern pattern))

Nil or a function that is called by the clock with the pattern as its argument to determine whether the pattern should end or swap to a new definition.

Source

patterns.lisp.

Target Slot

end-condition.

Generic Function: events-in-range (pstream min max)

Get all the events from PSTREAM whose start beat are MIN or greater, and less than MAX.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: events-in-range ((pstream pstream) min max)
Method: events-in-range ((pattern pattern) min max)
Generic Function: last-dur (object)

Get the beat position of the ending of the last event in OBJECT.

Package

cl-patterns.

Source

utility.lisp.

Methods
Method: last-dur ((eseq eseq))
Source

eseq.lisp.

Method: last-dur ((list list))
Generic Function: last-output (pstream)

Returns the last output yielded by PSTREAM.

Example:

;; (defparameter *pstr* (as-pstream (pseq ’(1 2 3) 1))) ;; (next *pstr*) ;=> 1
;; (last-output *pstr*) ;=> 1

See also: ‘ended-p’

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: last-output ((pstream pstream))
Generic Function: mouse-location* (display-server)

Get the mouse location information for DISPLAY-SERVER. Typically you should just call ‘mouse-location’ instead of using this directly.

Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: mouse-location* ((display-server (eql :wayland)))
Method: mouse-location* ((display-server (eql :x11)))
Method: mouse-location* (display-server)
Generic Function: next.events-ordered (eseq)
Package

cl-patterns.

Methods
Method: next.events-ordered ((eseq eseq-pstream))
Source

eseq.lisp.

Generic Reader: pbind-pairs (object)
Generic Writer: (setf pbind-pairs) (object)
Package

cl-patterns.

Methods
Reader Method: pbind-pairs ((pbind pbind))
Writer Method: (setf pbind-pairs) ((pbind pbind))

The pattern pairs of the pbind; a plist mapping its keys to their values.

Source

patterns.lisp.

Target Slot

pairs.

Generic Function: process-pattern-key-value (pattern key value)

Process a key/value pair for a pattern like ‘pbind’ or ‘pmeta’.

Package

cl-patterns.

Source

pmeta.lisp.

Methods
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :step-inject)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :sinject)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :inject)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :repeat)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :r)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :fit)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :ts)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :stretch)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :dur)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :sync)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :findur)) value)
Method: process-pattern-key-value ((pmeta pmeta) (key (eql :pattern)) value)
Generic Reader: pstream-elt-index (condition)
Package

cl-patterns.

Methods
Reader Method: pstream-elt-index ((condition pstream-out-of-range))
Source

patterns.lisp.

Target Slot

index.

Generic Function: real-beat (clock)
Package

cl-patterns.

Methods
Method: real-beat ((clock clock))

Get the "real beat" of the clock; i.e. compute what the beat number should actually be at this instant in time (whereas the beat slot for the clock is quantized to the clock’s granularity).

Note that this function will likely be removed in the future with improvements to the clock, so you should expect to eventually have to update code depending on it.

See also: ‘beat’

Source

clock.lisp.

Generic Reader: redefining-melodic-alias-alias (condition)
Package

cl-patterns.

Methods
Reader Method: redefining-melodic-alias-alias ((condition redefining-melodic-alias))
Source

scales.lisp.

Target Slot

alias.

Generic Reader: redefining-melodic-alias-existing-definition (condition)
Package

cl-patterns.

Methods
Reader Method: redefining-melodic-alias-existing-definition ((condition redefining-melodic-alias))
Source

scales.lisp.

Target Slot

existing-definition.

Generic Reader: redefining-melodic-alias-new-definition (condition)
Package

cl-patterns.

Methods
Reader Method: redefining-melodic-alias-new-definition ((condition redefining-melodic-alias))
Source

scales.lisp.

Target Slot

new-definition.

Generic Function: screen-size* (display-server)
Package

cl-patterns.

Source

patterns.lisp.

Methods
Method: screen-size* ((display-server (eql :x11)))
Method: screen-size* ((display-server null))
Generic Reader: task-clock (object)
Generic Writer: (setf task-clock) (object)
Package

cl-patterns.

Methods
Reader Method: task-clock ((task task))
Writer Method: (setf task-clock) ((task task))

The clock that the task is running on.

Source

clock.lisp.

Target Slot

clock.

Generic Reader: task-item (object)
Generic Writer: (setf task-item) (object)
Package

cl-patterns.

Methods
Reader Method: task-item ((task task))
Writer Method: (setf task-item) ((task task))

The actual playing item that the task refers to. Typically this is a pstream or similar.

Source

clock.lisp.

Target Slot

item.


6.2.5 Conditions

Condition: pstream-out-of-range
Package

cl-patterns.

Source

patterns.lisp.

Direct superclasses

condition.

Direct methods

pstream-elt-index.

Direct slots
Slot: index
Initargs

:index

Readers

pstream-elt-index.

Writers

This slot is read-only.


6.2.6 Classes

Class: clock

A musical time-based clock defining a tempo and pulse that its tasks synchronize to.

Package

cl-patterns.

Source

clock.lisp.

Direct methods
Direct slots
Slot: beat

The number of beats that have elapsed since the creation of the clock.

Type

number

Initform

0

Readers

beat.

Writers

(setf beat).

Slot: tempo

The tempo of the clock, in beats per second.

Type

number

Initform

1

Initargs

:tempo

Readers

tempo.

Writers

This slot is read-only.

Slot: latency

The default latency for events played on the clock; the number of seconds added onto the event’s scheduled time, in order to allow the backend to process it without being "late".

Type

number

Initform

1/10

Initargs

:latency

Slot: play-expired-events

If T, always play events, even if their scheduled time has already passed. If NIL, silently skip these events. If :WARN, print a warning for each event skipped.

Initargs

:play-expired-events

Slot: condition-handler

The restart to invoke when a condition occurs during task processing. If nil, the clock will not attempt to handle any conditions. If non-nil, all conditions signaled within a task will be caught and the specified restart will be invoked automatically to prevent the clock from pausing. Caught conditions will be printed as a warning and recorded with data generated by ‘caught-conditions-extra-data-function’ in the clock’s ‘caught-conditions’ slot.

Type

symbol

Initargs

:condition-handler

Slot: caught-conditions

A list of conditions caught by the clock while processing tasks when its condition-handler is non-nil. Each entry in the list is a plist containing the the condition and any extra data generated by ‘caught-conditions-extra-data-function’.

Type

list

Slot: caught-conditions-lock

The lock on the caught-conditions slot to ensure it is thread-safe.

Initform

(bordeaux-threads:make-lock)

Slot: caught-conditions-extra-data-function

A function of one argument (the clock) that generates extra data for the ‘caught-conditions’ when a condition occurs during the clock’s task processing.

Type

(or null function)

Initargs

:caught-conditions-extra-data-function

Readers

clock-caught-conditions-extra-data-function.

Writers

(setf clock-caught-conditions-extra-data-function).

Slot: tasks

The list of tasks that are running on the clock. Use ‘play’, ‘stop’, etc to play and stop patterns (the "friendly" way to add or remove them from the clock), or ‘clock-add’ and ‘clock-remove’ to manually remove them directly.

Type

list

Slot: tasks-lock

The lock on the tasks to make the clock thread-safe.

Initform

(bordeaux-threads:make-recursive-lock)

Slot: timestamp-at-tempo

The local-time timestamp when the tempo was last changed.

Initform

(local-time:now)

Slot: beat-at-tempo

The number of beats on the clock when the tempo was last changed.

Initform

0

Class: task

An item scheduled to be run on the clock.

Package

cl-patterns.

Source

clock.lisp.

Direct methods
Direct slots
Slot: item

The actual playing item that the task refers to. Typically this is a pstream or similar.

Initargs

:item

Readers

task-item.

Writers

(setf task-item).

Slot: loop-p

Whether the task should loop. If left unbound, the task’s item’s loop-p slot is referred to instead.

Initargs

:loop-p

Slot: start-beat

The beat of the clock when the task started.

Type

(or null number)

Initargs

:start-beat

Slot: clock

The clock that the task is running on.

Type

cl-patterns::clock

Initargs

:clock

Readers

task-clock.

Writers

(setf task-clock).

Slot: backend-resources

Resources associated with this task that should be freed by it, i.e. nodes it triggered, buffers it loaded, etc.

Initargs

:backend-resources


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   I   K   L   M   N   O   P   Q   R   S   T   U   V  
Index Entry  Section

%
%beat: Private generic functions
%beat: Private generic functions
%pattern-children: Private generic functions
%pattern-children: Private generic functions
%pattern-children: Private generic functions
%pattern-children: Private generic functions

(
(setf %beat): Private ordinary functions
(setf amp): Public generic functions
(setf amp): Public generic functions
(setf backend-enabled-p): Public generic functions
(setf backend-enabled-p): Public generic functions
(setf backend-input-processors): Public generic functions
(setf backend-input-processors): Public generic functions
(setf backend-metadata): Public generic functions
(setf backend-metadata): Public generic functions
(setf backend-name): Public generic functions
(setf backend-name): Public generic functions
(setf backend-started-p): Public generic functions
(setf backend-started-p): Public generic functions
(setf beat): Public generic functions
(setf beat): Public generic functions
(setf beat): Public generic functions
(setf chord-indexes): Public generic functions
(setf chord-indexes): Public generic functions
(setf chord-name): Public generic functions
(setf chord-name): Public generic functions
(setf chord-scale): Public generic functions
(setf chord-scale): Public generic functions
(setf clock-caught-conditions): Public ordinary functions
(setf clock-caught-conditions-extra-data-function): Public generic functions
(setf clock-caught-conditions-extra-data-function): Public generic functions
(setf clock-condition-handler): Public ordinary functions
(setf clock-latency): Public ordinary functions
(setf clock-tasks): Public ordinary functions
(setf db): Public generic functions
(setf db): Public generic functions
(setf delta): Public generic functions
(setf delta): Public generic functions
(setf dur): Public generic functions
(setf dur): Public generic functions
(setf e): Public ordinary functions
(setf elt): Public standalone methods
(setf end-condition): Private generic functions
(setf end-condition): Private generic functions
(setf end-quant): Public generic functions
(setf end-quant): Public generic functions
(setf end-quant): Public generic functions
(setf eseq-events): Public generic functions
(setf eseq-events): Public generic functions
(setf event-value): Public ordinary functions
(setf find-pdef): Public ordinary functions
(setf freq): Public generic functions
(setf freq): Public generic functions
(setf instrument): Public generic functions
(setf instrument): Public generic functions
(setf instrument-mapping): Public ordinary functions
(setf legato): Public generic functions
(setf legato): Public generic functions
(setf loop-p): Public generic functions
(setf loop-p): Public generic functions
(setf loop-p): Public generic functions
(setf loop-p): Public generic functions
(setf midinote): Public generic functions
(setf midinote): Public generic functions
(setf pan): Public generic functions
(setf pan): Public generic functions
(setf pattern-metadata): Public ordinary functions
(setf pattern-source): Public generic functions
(setf pattern-source): Public generic functions
(setf pbind-pairs): Private generic functions
(setf pbind-pairs): Private generic functions
(setf pdef-name): Public generic functions
(setf pdef-name): Public generic functions
(setf pdef-name): Public generic functions
(setf pdef-pattern): Public generic functions
(setf pdef-pattern): Public generic functions
(setf pdef-pstream): Public generic functions
(setf pdef-pstream): Public generic functions
(setf pdef-pstream): Public generic functions
(setf pdef-task): Public generic functions
(setf pdef-task): Public generic functions
(setf play-quant): Public generic functions
(setf play-quant): Public generic functions
(setf play-quant): Public generic functions
(setf play-quant): Public generic functions
(setf pstream-count): Public generic functions
(setf pstream-count): Public generic functions
(setf pstream-count): Public generic functions
(setf ptrack-cell): Public generic functions
(setf ptrack-cell): Public generic functions
(setf ptrack-row): Public generic functions
(setf ptrack-row): Public generic functions
(setf quant): Public generic functions
(setf quant): Public generic functions
(setf quant): Public generic functions
(setf rate): Public generic functions
(setf rate): Public generic functions
(setf raw-event-value): Private ordinary functions
(setf rest-p): Public generic functions
(setf rest-p): Public generic functions
(setf scale): Public generic functions
(setf scale): Public generic functions
(setf scale-name): Public generic functions
(setf scale-name): Public generic functions
(setf scale-notes): Public generic functions
(setf scale-notes): Public generic functions
(setf scale-tuning): Public generic functions
(setf scale-tuning): Public generic functions
(setf sustain): Public generic functions
(setf sustain): Public generic functions
(setf t-pstream-length): Public generic functions
(setf t-pstream-length): Public generic functions
(setf t-pstream-value): Public generic functions
(setf t-pstream-value): Public generic functions
(setf task-clock): Private generic functions
(setf task-clock): Private generic functions
(setf task-item): Private generic functions
(setf task-item): Private generic functions
(setf task-nodes): Private ordinary functions
(setf tempo): Public generic functions
(setf tempo): Public generic functions
(setf tempo): Public generic functions
(setf tuning-name): Public generic functions
(setf tuning-name): Public generic functions
(setf tuning-octave-ratio): Public generic functions
(setf tuning-octave-ratio): Public generic functions
(setf tuning-pitches): Public generic functions
(setf tuning-pitches): Public generic functions

A
absolute-beats-to-timestamp: Private ordinary functions
adjust-sequence: Public standalone methods
all-backend-types: Public ordinary functions
all-backends: Public ordinary functions
all-chords: Public ordinary functions
all-instruments: Public ordinary functions
all-patterns: Public ordinary functions
all-pdef-names: Public ordinary functions
all-pdefs: Public ordinary functions
all-scales: Public ordinary functions
all-tunings: Public ordinary functions
amp: Public generic functions
amp: Public generic functions
amp-db: Public ordinary functions
as-eseq: Public generic functions
as-eseq: Public generic functions
as-eseq: Public generic functions
as-eseq: Public generic functions
as-eseq: Public generic functions
as-eseq: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions
as-pstream: Public generic functions

B
backend-all-instruments: Private generic functions
backend-all-instruments: Private generic functions
backend-all-instruments: Private generic functions
backend-all-nodes: Private generic functions
backend-all-nodes: Private generic functions
backend-control-node-at: Private generic functions
backend-convert-object: Private generic functions
backend-convert-object: Private generic functions
backend-convert-object: Private generic functions
backend-enabled-p: Public generic functions
backend-enabled-p: Public generic functions
backend-input-processors: Public generic functions
backend-input-processors: Public generic functions
backend-instrument-args-list: Private generic functions
backend-instrument-args-list: Private generic functions
backend-instrument-controls: Private generic functions
backend-instrument-has-gate-p: Private ordinary functions
backend-metadata: Public generic functions
backend-metadata: Public generic functions
backend-name: Public generic functions
backend-name: Public generic functions
backend-node-p: Private generic functions
backend-p: Public ordinary functions
backend-panic: Private generic functions
backend-panic: Private generic functions
backend-play-event: Private generic functions
backend-play-event: Private generic functions
backend-play-event: Private generic functions
backend-proxys-node: Private generic functions
backend-responds-p: Private generic functions
backend-responds-p: Private generic functions
backend-responds-p: Private generic functions
backend-start: Public generic functions
backend-start: Public generic functions
backend-start: Public generic functions
backend-start: Public generic functions
backend-started-p: Public generic functions
backend-started-p: Public generic functions
backend-stop: Public generic functions
backend-stop: Public generic functions
backend-stop: Public generic functions
backend-task-added: Private generic functions
backend-task-added: Private generic functions
backend-task-removed: Private generic functions
backend-task-removed: Private generic functions
backend-tempo-change-at: Private generic functions
backend-tempo-change-at: Private generic functions
backend-timestamps-for-event: Private generic functions
beat: Public generic functions
beat: Public generic functions
beat: Public generic functions
beat: Public generic functions
beat: Public generic functions
beat: Public generic functions
beat: Public generic functions
bipolar-1-to-midi: Public ordinary functions
bipolar-1-to-midi-pitchbend: Public ordinary functions
bipolar-unipolar: Public ordinary functions
bjorklund: Public ordinary functions
boolean-to-midi: Private ordinary functions
bsubseq: Public generic functions
bsubseq: Public generic functions
bsubseq: Public generic functions

C
can-swap-now-p: Private ordinary functions
chord: Public generic functions
chord: Public generic functions
chord: Public generic functions
chord: Public generic functions
chord: Public generic functions
chord-indexes: Public generic functions
chord-indexes: Public generic functions
chord-indexes: Public generic functions
chord-midinotes: Public ordinary functions
chord-name: Public generic functions
chord-name: Public generic functions
chord-name: Public generic functions
chord-notes: Public ordinary functions
chord-scale: Public generic functions
chord-scale: Public generic functions
chord-scale: Public generic functions
chromatic-index-degree: Public ordinary functions
chromatic-index-freq: Public ordinary functions
chromatic-index-midinote: Public ordinary functions
chromatic-index-note: Public ordinary functions
clock-add: Private ordinary functions
clock-caught-conditions: Public ordinary functions
clock-caught-conditions-extra-data-function: Public generic functions
clock-caught-conditions-extra-data-function: Public generic functions
clock-clear-tasks: Private ordinary functions
clock-condition-handler: Public ordinary functions
clock-latency: Public ordinary functions
clock-loop: Public ordinary functions
clock-process: Public ordinary functions
clock-process-event: Private ordinary functions
clock-remove: Private ordinary functions
clock-tasks: Public ordinary functions
combine-events: Public ordinary functions
combine-events-via-lists: Public ordinary functions
Compiler Macro, events-lists-differing-keys: Public compiler macros
Compiler Macro, parp: Public compiler macros
copy-event: Public ordinary functions
cumulative-list: Private ordinary functions
cycles: Public macros
cycles-parse: Private ordinary functions

D
db: Public generic functions
db: Public generic functions
db-amp: Public ordinary functions
decf-remaining: Private ordinary functions
defconversion: Private macros
define-chord: Public ordinary functions
define-event-special-key: Private macros
define-pattern-function-translation: Private macros
define-pbind-special-init-key: Private macros
define-pbind-special-process-key: Private macros
define-pbind-special-wrap-key: Private macros
define-scale: Public ordinary functions
define-tuning: Public ordinary functions
defpattern: Public macros
degree-chromatic-index: Public ordinary functions
degree-freq: Public ordinary functions
degree-key: Public ordinary functions
degree-midinote: Public ordinary functions
degree-note: Public ordinary functions
degree-octave: Public ordinary functions
delta: Public generic functions
delta: Public generic functions
describe-object: Public standalone methods
dur: Public generic functions
dur: Public generic functions
dur: Public generic functions
dur: Public generic functions
dur-freq: Public ordinary functions
dur-time: Public ordinary functions

E
e: Public ordinary functions
elt: Public standalone methods
elt: Public standalone methods
elt: Public standalone methods
elt: Public standalone methods
emptyp: Public standalone methods
emptyp: Public standalone methods
emptyp: Public standalone methods
emptyp: Public standalone methods
enabled-backends: Public ordinary functions
end: Public generic functions
end: Public generic functions
end: Public generic functions
end: Public generic functions
end: Public generic functions
end: Public generic functions
end-condition: Private generic functions
end-condition: Private generic functions
end-quant: Public generic functions
end-quant: Public generic functions
end-quant: Public generic functions
end-quant: Public generic functions
ended-p: Public generic functions
ended-p: Public generic functions
eop-p: Public generic functions
eop-p: Public generic functions
eop-p: Public generic functions
eop-p: Public generic functions
eseq: Public ordinary functions
eseq-add: Public generic functions
eseq-add: Public generic functions
eseq-add: Public generic functions
eseq-events: Public generic functions
eseq-events: Public generic functions
eseq-length: Public ordinary functions
eseq-p: Public ordinary functions
eseq-remove: Public generic functions
eseq-remove: Public generic functions
eseq-remove: Public generic functions
eseq-remove: Public generic functions
event: Public ordinary functions
event-backends: Private ordinary functions
event-equal: Public ordinary functions
event-p: Public ordinary functions
event-plist: Public generic functions
event-plist: Public generic functions
event-value: Public ordinary functions
event-with-raw-timing: Private ordinary functions
events-differing-keys: Public ordinary functions
events-in-range: Private generic functions
events-in-range: Private generic functions
events-in-range: Private generic functions
events-lists-differing-keys: Public compiler macros
events-lists-differing-keys: Public ordinary functions
every-event-equal: Public ordinary functions

F
find-backend: Public ordinary functions
find-backend-supporting-render: Private ordinary functions
find-buffer-symbol: Private ordinary functions
find-object-by-id: Private ordinary functions
find-pdef: Public ordinary functions
freq: Public generic functions
freq: Public generic functions
freq-chromatic-index: Public ordinary functions
freq-degree: Public ordinary functions
freq-dur: Public ordinary functions
freq-midinote: Public ordinary functions
freq-note: Public ordinary functions
freq-octave: Public ordinary functions
freq-rate: Public ordinary functions
frequency-to-midi: Public ordinary functions
from-range: Private ordinary functions
Function, (setf %beat): Private ordinary functions
Function, (setf clock-caught-conditions): Public ordinary functions
Function, (setf clock-condition-handler): Public ordinary functions
Function, (setf clock-latency): Public ordinary functions
Function, (setf clock-tasks): Public ordinary functions
Function, (setf e): Public ordinary functions
Function, (setf event-value): Public ordinary functions
Function, (setf find-pdef): Public ordinary functions
Function, (setf instrument-mapping): Public ordinary functions
Function, (setf pattern-metadata): Public ordinary functions
Function, (setf raw-event-value): Private ordinary functions
Function, (setf task-nodes): Private ordinary functions
Function, absolute-beats-to-timestamp: Private ordinary functions
Function, all-backend-types: Public ordinary functions
Function, all-backends: Public ordinary functions
Function, all-chords: Public ordinary functions
Function, all-instruments: Public ordinary functions
Function, all-patterns: Public ordinary functions
Function, all-pdef-names: Public ordinary functions
Function, all-pdefs: Public ordinary functions
Function, all-scales: Public ordinary functions
Function, all-tunings: Public ordinary functions
Function, amp-db: Public ordinary functions
Function, backend-instrument-has-gate-p: Private ordinary functions
Function, backend-p: Public ordinary functions
Function, bipolar-1-to-midi: Public ordinary functions
Function, bipolar-1-to-midi-pitchbend: Public ordinary functions
Function, bipolar-unipolar: Public ordinary functions
Function, bjorklund: Public ordinary functions
Function, boolean-to-midi: Private ordinary functions
Function, can-swap-now-p: Private ordinary functions
Function, chord-midinotes: Public ordinary functions
Function, chord-notes: Public ordinary functions
Function, chromatic-index-degree: Public ordinary functions
Function, chromatic-index-freq: Public ordinary functions
Function, chromatic-index-midinote: Public ordinary functions
Function, chromatic-index-note: Public ordinary functions
Function, clock-add: Private ordinary functions
Function, clock-caught-conditions: Public ordinary functions
Function, clock-clear-tasks: Private ordinary functions
Function, clock-condition-handler: Public ordinary functions
Function, clock-latency: Public ordinary functions
Function, clock-loop: Public ordinary functions
Function, clock-process: Public ordinary functions
Function, clock-process-event: Private ordinary functions
Function, clock-remove: Private ordinary functions
Function, clock-tasks: Public ordinary functions
Function, combine-events: Public ordinary functions
Function, combine-events-via-lists: Public ordinary functions
Function, copy-event: Public ordinary functions
Function, cumulative-list: Private ordinary functions
Function, cycles-parse: Private ordinary functions
Function, db-amp: Public ordinary functions
Function, decf-remaining: Private ordinary functions
Function, define-chord: Public ordinary functions
Function, define-scale: Public ordinary functions
Function, define-tuning: Public ordinary functions
Function, degree-chromatic-index: Public ordinary functions
Function, degree-freq: Public ordinary functions
Function, degree-key: Public ordinary functions
Function, degree-midinote: Public ordinary functions
Function, degree-note: Public ordinary functions
Function, degree-octave: Public ordinary functions
Function, dur-freq: Public ordinary functions
Function, dur-time: Public ordinary functions
Function, e: Public ordinary functions
Function, enabled-backends: Public ordinary functions
Function, eseq: Public ordinary functions
Function, eseq-length: Public ordinary functions
Function, eseq-p: Public ordinary functions
Function, event: Public ordinary functions
Function, event-backends: Private ordinary functions
Function, event-equal: Public ordinary functions
Function, event-p: Public ordinary functions
Function, event-value: Public ordinary functions
Function, event-with-raw-timing: Private ordinary functions
Function, events-differing-keys: Public ordinary functions
Function, events-lists-differing-keys: Public ordinary functions
Function, every-event-equal: Public ordinary functions
Function, find-backend: Public ordinary functions
Function, find-backend-supporting-render: Private ordinary functions
Function, find-buffer-symbol: Private ordinary functions
Function, find-object-by-id: Private ordinary functions
Function, find-pdef: Public ordinary functions
Function, freq-chromatic-index: Public ordinary functions
Function, freq-degree: Public ordinary functions
Function, freq-dur: Public ordinary functions
Function, freq-midinote: Public ordinary functions
Function, freq-note: Public ordinary functions
Function, freq-octave: Public ordinary functions
Function, freq-rate: Public ordinary functions
Function, frequency-to-midi: Public ordinary functions
Function, from-range: Private ordinary functions
Function, generate-aliases: Private ordinary functions
Function, index-and-offset: Private ordinary functions
Function, index-of-greater-than: Private ordinary functions
Function, instrument-mapping: Public ordinary functions
Function, ipstream: Public ordinary functions
Function, load-scala-scale: Public ordinary functions
Function, make-clock: Public ordinary functions
Function, make-default-event: Private ordinary functions
Function, make-pattern-for-function: Private ordinary functions
Function, midi-ratio: Public ordinary functions
Function, midi-truncate-clamp: Public ordinary functions
Function, midinote-chromatic-index: Public ordinary functions
Function, midinote-degree: Public ordinary functions
Function, midinote-freq: Public ordinary functions
Function, midinote-note: Public ordinary functions
Function, midinote-octave: Public ordinary functions
Function, midinote-rate: Public ordinary functions
Function, mouse-location: Public ordinary functions
Function, multi-channel-funcall: Public ordinary functions
Function, near-p: Private ordinary functions
Function, nearest: Private ordinary functions
Function, next-beat-for-quant: Public ordinary functions
Function, next-n: Public ordinary functions
Function, next-upto-n: Public ordinary functions
Function, normalized-sum: Private ordinary functions
Function, note-chromatic-index: Public ordinary functions
Function, note-degree: Public ordinary functions
Function, note-freq: Public ordinary functions
Function, note-midinote: Public ordinary functions
Function, note-name-and-octave: Public ordinary functions
Function, note-octave: Public ordinary functions
Function, octave-degree: Public ordinary functions
Function, octave-freq: Public ordinary functions
Function, octave-midinote: Public ordinary functions
Function, octave-note: Public ordinary functions
Function, p*: Public ordinary functions
Function, p+: Public ordinary functions
Function, p-: Public ordinary functions
Function, p/: Public ordinary functions
Function, p/=: Public ordinary functions
Function, p<: Public ordinary functions
Function, p<=: Public ordinary functions
Function, p=: Public ordinary functions
Function, p>: Public ordinary functions
Function, p>=: Public ordinary functions
Function, paccum: Public ordinary functions
Function, paclump: Public ordinary functions
Function, parp: Public ordinary functions
Function, pattern-as-pstream: Public ordinary functions
Function, pattern-children: Public ordinary functions
Function, pattern-p: Public ordinary functions
Function, pattern-parent: Public ordinary functions
Function, pattern-pstream-class-name: Private ordinary functions
Function, pattern-tasks: Public ordinary functions
Function, pattern-translate-sexp: Private ordinary functions
Function, pb-translate-body-functions: Private ordinary functions
Function, pbeat: Public ordinary functions
Function, pbeat*: Public ordinary functions
Function, pbind: Public ordinary functions
Function, pbjorklund: Public ordinary functions
Function, pbrown: Public ordinary functions
Function, pchain: Public ordinary functions
Function, pclump: Public ordinary functions
Function, pcycles: Public ordinary functions
Function, pcycles-parse-list: Private ordinary functions
Function, pdef: Public ordinary functions
Function, pdef-names: Private ordinary functions
Function, pdef-p: Public ordinary functions
Function, pdelta: Public ordinary functions
Function, pdiff: Public ordinary functions
Function, pdrop: Public ordinary functions
Function, pdurstutter: Public ordinary functions
Function, peek-n: Public ordinary functions
Function, peek-upto-n: Public ordinary functions
Function, peql: Public ordinary functions
Function, pexprand: Public ordinary functions
Function, pfilter: Public ordinary functions
Function, pfilter-out: Public ordinary functions
Function, pfin: Public ordinary functions
Function, pfindur: Public ordinary functions
Function, pfor: Public ordinary functions
Function, pfunc: Public ordinary functions
Function, pgauss: Public ordinary functions
Function, pgeom: Public ordinary functions
Function, pgeom*: Public ordinary functions
Function, phistory: Public ordinary functions
Function, pif: Public ordinary functions
Function, pindex: Public ordinary functions
Function, pk: Public ordinary functions
Function, place: Public ordinary functions
Function, play-or-end: Public ordinary functions
Function, play-or-stop: Public ordinary functions
Function, play-solo: Public ordinary functions
Function, play-swap: Public ordinary functions
Function, playing-nodes: Public ordinary functions
Function, playing-pdef-names: Public ordinary functions
Function, playing-pdefs: Public ordinary functions
Function, plazy: Public ordinary functions
Function, plist-set: Private ordinary functions
Function, pmeta: Public ordinary functions
Function, pmeta-ensure-pattern-value: Private ordinary functions
Function, pmono: Public ordinary functions
Function, pmouse: Public ordinary functions
Function, pmousex: Public ordinary functions
Function, pmousey: Public ordinary functions
Function, pn: Public ordinary functions
Function, pnary: Public ordinary functions
Function, ppar: Public ordinary functions
Function, pparchain: Public ordinary functions
Function, ppatlace: Public ordinary functions
Function, pr: Public ordinary functions
Function, prand: Public ordinary functions
Function, prerange: Public ordinary functions
Function, prest: Public ordinary functions
Function, protate: Public ordinary functions
Function, prs: Public ordinary functions
Function, prun: Public ordinary functions
Function, ps: Public ordinary functions
Function, pscratch: Public ordinary functions
Function, pseq: Public ordinary functions
Function, pser: Public ordinary functions
Function, pseries: Public ordinary functions
Function, pseries*: Public ordinary functions
Function, pshuf: Public ordinary functions
Function, pslide: Public ordinary functions
Function, pstream-elt: Public ordinary functions
Function, pstream-elt-future: Public ordinary functions
Function, pstream-elt-index-to-history-index: Private ordinary functions
Function, pstream-history-advance-by: Private ordinary functions
Function, pstream-p: Public ordinary functions
Function, psym: Public ordinary functions
Function, psync: Public ordinary functions
Function, ptime: Public ordinary functions
Function, ptrace: Public ordinary functions
Function, ptrack: Public ordinary functions
Function, ptrack-does-not-exist: Private ordinary functions
Function, pts: Public ordinary functions
Function, pwalk: Public ordinary functions
Function, pwhite: Public ordinary functions
Function, pwrand: Public ordinary functions
Function, pwrap: Public ordinary functions
Function, pwxrand: Public ordinary functions
Function, pxrand: Public ordinary functions
Function, pyramid: Public ordinary functions
Function, rate-freq: Public ordinary functions
Function, rate-midinote: Public ordinary functions
Function, ratio-midi: Public ordinary functions
Function, raw-event-value: Private ordinary functions
Function, redefining-melodic-alias: Public ordinary functions
Function, remaining-p: Private ordinary functions
Function, remap-instrument-to-parameters: Private ordinary functions
Function, remove-event-value: Public ordinary functions
Function, rerange: Public ordinary functions
Function, scale-midinotes: Public ordinary functions
Function, screen-size: Public ordinary functions
Function, set-parents: Private ordinary functions
Function, sharp-or-flat: Private ordinary functions
Function, split-event-by-lists: Public ordinary functions
Function, start-clock-loop: Public ordinary functions
Function, string-reader: Private ordinary functions
Function, string-replace: Private ordinary functions
Function, t-pstream: Public ordinary functions
Function, t-pstream-p: Public ordinary functions
Function, t-short: Private ordinary functions
Function, task-nodes: Private ordinary functions
Function, task-pattern: Public ordinary functions
Function, time-dur: Public ordinary functions
Function, to-range: Private ordinary functions
Function, tone-matrix: Public ordinary functions
Function, track-shorthand: Private ordinary functions
Function, transpose: Public ordinary functions
Function, unipolar-1-to-midi: Public ordinary functions
Function, unipolar-bipolar: Public ordinary functions
Function, value-remaining-p: Private ordinary functions

G
generate-aliases: Private ordinary functions
Generic Function, %beat: Private generic functions
Generic Function, %pattern-children: Private generic functions
Generic Function, (setf amp): Public generic functions
Generic Function, (setf backend-enabled-p): Public generic functions
Generic Function, (setf backend-input-processors): Public generic functions
Generic Function, (setf backend-metadata): Public generic functions
Generic Function, (setf backend-name): Public generic functions
Generic Function, (setf backend-started-p): Public generic functions
Generic Function, (setf beat): Public generic functions
Generic Function, (setf chord-indexes): Public generic functions
Generic Function, (setf chord-name): Public generic functions
Generic Function, (setf chord-scale): Public generic functions
Generic Function, (setf clock-caught-conditions-extra-data-function): Public generic functions
Generic Function, (setf db): Public generic functions
Generic Function, (setf delta): Public generic functions
Generic Function, (setf dur): Public generic functions
Generic Function, (setf end-condition): Private generic functions
Generic Function, (setf end-quant): Public generic functions
Generic Function, (setf eseq-events): Public generic functions
Generic Function, (setf freq): Public generic functions
Generic Function, (setf instrument): Public generic functions
Generic Function, (setf legato): Public generic functions
Generic Function, (setf loop-p): Public generic functions
Generic Function, (setf midinote): Public generic functions
Generic Function, (setf pan): Public generic functions
Generic Function, (setf pattern-source): Public generic functions
Generic Function, (setf pbind-pairs): Private generic functions
Generic Function, (setf pdef-name): Public generic functions
Generic Function, (setf pdef-pattern): Public generic functions
Generic Function, (setf pdef-pstream): Public generic functions
Generic Function, (setf pdef-task): Public generic functions
Generic Function, (setf play-quant): Public generic functions
Generic Function, (setf pstream-count): Public generic functions
Generic Function, (setf ptrack-cell): Public generic functions
Generic Function, (setf ptrack-row): Public generic functions
Generic Function, (setf quant): Public generic functions
Generic Function, (setf rate): Public generic functions
Generic Function, (setf rest-p): Public generic functions
Generic Function, (setf scale): Public generic functions
Generic Function, (setf scale-name): Public generic functions
Generic Function, (setf scale-notes): Public generic functions
Generic Function, (setf scale-tuning): Public generic functions
Generic Function, (setf sustain): Public generic functions
Generic Function, (setf t-pstream-length): Public generic functions
Generic Function, (setf t-pstream-value): Public generic functions
Generic Function, (setf task-clock): Private generic functions
Generic Function, (setf task-item): Private generic functions
Generic Function, (setf tempo): Public generic functions
Generic Function, (setf tuning-name): Public generic functions
Generic Function, (setf tuning-octave-ratio): Public generic functions
Generic Function, (setf tuning-pitches): Public generic functions
Generic Function, amp: Public generic functions
Generic Function, as-eseq: Public generic functions
Generic Function, as-pstream: Public generic functions
Generic Function, backend-all-instruments: Private generic functions
Generic Function, backend-all-nodes: Private generic functions
Generic Function, backend-control-node-at: Private generic functions
Generic Function, backend-convert-object: Private generic functions
Generic Function, backend-enabled-p: Public generic functions
Generic Function, backend-input-processors: Public generic functions
Generic Function, backend-instrument-args-list: Private generic functions
Generic Function, backend-instrument-controls: Private generic functions
Generic Function, backend-metadata: Public generic functions
Generic Function, backend-name: Public generic functions
Generic Function, backend-node-p: Private generic functions
Generic Function, backend-panic: Private generic functions
Generic Function, backend-play-event: Private generic functions
Generic Function, backend-proxys-node: Private generic functions
Generic Function, backend-responds-p: Private generic functions
Generic Function, backend-start: Public generic functions
Generic Function, backend-started-p: Public generic functions
Generic Function, backend-stop: Public generic functions
Generic Function, backend-task-added: Private generic functions
Generic Function, backend-task-removed: Private generic functions
Generic Function, backend-tempo-change-at: Private generic functions
Generic Function, backend-timestamps-for-event: Private generic functions
Generic Function, beat: Public generic functions
Generic Function, bsubseq: Public generic functions
Generic Function, chord: Public generic functions
Generic Function, chord-indexes: Public generic functions
Generic Function, chord-name: Public generic functions
Generic Function, chord-scale: Public generic functions
Generic Function, clock-caught-conditions-extra-data-function: Public generic functions
Generic Function, db: Public generic functions
Generic Function, delta: Public generic functions
Generic Function, dur: Public generic functions
Generic Function, end: Public generic functions
Generic Function, end-condition: Private generic functions
Generic Function, end-quant: Public generic functions
Generic Function, ended-p: Public generic functions
Generic Function, eop-p: Public generic functions
Generic Function, eseq-add: Public generic functions
Generic Function, eseq-events: Public generic functions
Generic Function, eseq-remove: Public generic functions
Generic Function, event-plist: Public generic functions
Generic Function, events-in-range: Private generic functions
Generic Function, freq: Public generic functions
Generic Function, instrument: Public generic functions
Generic Function, ipstream-insert: Public generic functions
Generic Function, last-dur: Private generic functions
Generic Function, last-output: Private generic functions
Generic Function, launch: Public generic functions
Generic Function, legato: Public generic functions
Generic Function, loop-p: Public generic functions
Generic Function, make-backend: Public generic functions
Generic Function, midinote: Public generic functions
Generic Function, mouse-location*: Private generic functions
Generic Function, next: Public generic functions
Generic Function, next.events-ordered: Private generic functions
Generic Function, pan: Public generic functions
Generic Function, pattern-metadata: Public generic functions
Generic Function, pattern-source: Public generic functions
Generic Function, pbind-pairs: Private generic functions
Generic Function, pdef-name: Public generic functions
Generic Function, pdef-pattern: Public generic functions
Generic Function, pdef-pstream: Public generic functions
Generic Function, pdef-task: Public generic functions
Generic Function, peek: Public generic functions
Generic Function, play: Public generic functions
Generic Function, play-quant: Public generic functions
Generic Function, playing-p: Public generic functions
Generic Function, process-pattern-key-value: Private generic functions
Generic Function, pstream-count: Public generic functions
Generic Function, pstream-elt-index: Private generic functions
Generic Function, ptrack-cell: Public generic functions
Generic Function, ptrack-row: Public generic functions
Generic Function, ptrack-rows: Public generic functions
Generic Function, quant: Public generic functions
Generic Function, rate: Public generic functions
Generic Function, real-beat: Private generic functions
Generic Function, redefining-melodic-alias-alias: Private generic functions
Generic Function, redefining-melodic-alias-existing-definition: Private generic functions
Generic Function, redefining-melodic-alias-new-definition: Private generic functions
Generic Function, render: Public generic functions
Generic Function, rest-p: Public generic functions
Generic Function, scale: Public generic functions
Generic Function, scale-name: Public generic functions
Generic Function, scale-notes: Public generic functions
Generic Function, scale-steps-per-octave: Public generic functions
Generic Function, scale-tuning: Public generic functions
Generic Function, screen-size*: Private generic functions
Generic Function, stop: Public generic functions
Generic Function, sustain: Public generic functions
Generic Function, t-pstream-length: Public generic functions
Generic Function, t-pstream-value: Public generic functions
Generic Function, task-clock: Private generic functions
Generic Function, task-item: Private generic functions
Generic Function, tempo: Public generic functions
Generic Function, tuning: Public generic functions
Generic Function, tuning-name: Public generic functions
Generic Function, tuning-octave-ratio: Public generic functions
Generic Function, tuning-pitches: Public generic functions
Generic Function, tuning-steps-per-octave: Public generic functions

I
index-and-offset: Private ordinary functions
index-of-greater-than: Private ordinary functions
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
instrument: Public generic functions
instrument: Public generic functions
instrument-mapping: Public ordinary functions
ipstream: Public ordinary functions
ipstream-insert: Public generic functions
ipstream-insert: Public generic functions

K
keys: Public standalone methods
keys: Public standalone methods
keys: Public standalone methods

L
last-dur: Private generic functions
last-dur: Private generic functions
last-dur: Private generic functions
last-output: Private generic functions
last-output: Private generic functions
launch: Public generic functions
launch: Public generic functions
launch: Public generic functions
launch: Public generic functions
launch: Public generic functions
launch: Public generic functions
legato: Public generic functions
legato: Public generic functions
length: Public standalone methods
length: Public standalone methods
length: Public standalone methods
length: Public standalone methods
length: Public standalone methods
load-scala-scale: Public ordinary functions
loop-p: Public generic functions
loop-p: Public generic functions
loop-p: Public generic functions
loop-p: Public generic functions
loop-p: Public generic functions
loop-p: Public generic functions
loop-p: Public generic functions

M
Macro, cycles: Public macros
Macro, defconversion: Private macros
Macro, define-event-special-key: Private macros
Macro, define-pattern-function-translation: Private macros
Macro, define-pbind-special-init-key: Private macros
Macro, define-pbind-special-process-key: Private macros
Macro, define-pbind-special-wrap-key: Private macros
Macro, defpattern: Public macros
Macro, pb: Public macros
Macro, pf: Public macros
Macro, ppc: Public macros
Macro, pt: Public macros
make-backend: Public generic functions
make-backend: Public generic functions
make-clock: Public ordinary functions
make-default-event: Private ordinary functions
make-pattern-for-function: Private ordinary functions
make-sequence-like: Public standalone methods
Method, %beat: Private generic functions
Method, %pattern-children: Private generic functions
Method, %pattern-children: Private generic functions
Method, %pattern-children: Private generic functions
Method, (setf amp): Public generic functions
Method, (setf backend-enabled-p): Public generic functions
Method, (setf backend-input-processors): Public generic functions
Method, (setf backend-metadata): Public generic functions
Method, (setf backend-name): Public generic functions
Method, (setf backend-started-p): Public generic functions
Method, (setf beat): Public generic functions
Method, (setf beat): Public generic functions
Method, (setf chord-indexes): Public generic functions
Method, (setf chord-name): Public generic functions
Method, (setf chord-scale): Public generic functions
Method, (setf clock-caught-conditions-extra-data-function): Public generic functions
Method, (setf db): Public generic functions
Method, (setf delta): Public generic functions
Method, (setf dur): Public generic functions
Method, (setf elt): Public standalone methods
Method, (setf end-condition): Private generic functions
Method, (setf end-quant): Public generic functions
Method, (setf end-quant): Public generic functions
Method, (setf eseq-events): Public generic functions
Method, (setf freq): Public generic functions
Method, (setf instrument): Public generic functions
Method, (setf legato): Public generic functions
Method, (setf loop-p): Public generic functions
Method, (setf loop-p): Public generic functions
Method, (setf loop-p): Public generic functions
Method, (setf midinote): Public generic functions
Method, (setf pan): Public generic functions
Method, (setf pattern-source): Public generic functions
Method, (setf pbind-pairs): Private generic functions
Method, (setf pdef-name): Public generic functions
Method, (setf pdef-name): Public generic functions
Method, (setf pdef-pattern): Public generic functions
Method, (setf pdef-pstream): Public generic functions
Method, (setf pdef-pstream): Public generic functions
Method, (setf pdef-task): Public generic functions
Method, (setf play-quant): Public generic functions
Method, (setf play-quant): Public generic functions
Method, (setf play-quant): Public generic functions
Method, (setf pstream-count): Public generic functions
Method, (setf pstream-count): Public generic functions
Method, (setf ptrack-cell): Public generic functions
Method, (setf ptrack-row): Public generic functions
Method, (setf quant): Public generic functions
Method, (setf quant): Public generic functions
Method, (setf rate): Public generic functions
Method, (setf rest-p): Public generic functions
Method, (setf scale): Public generic functions
Method, (setf scale-name): Public generic functions
Method, (setf scale-notes): Public generic functions
Method, (setf scale-tuning): Public generic functions
Method, (setf sustain): Public generic functions
Method, (setf t-pstream-length): Public generic functions
Method, (setf t-pstream-value): Public generic functions
Method, (setf task-clock): Private generic functions
Method, (setf task-item): Private generic functions
Method, (setf tempo): Public generic functions
Method, (setf tempo): Public generic functions
Method, (setf tuning-name): Public generic functions
Method, (setf tuning-octave-ratio): Public generic functions
Method, (setf tuning-pitches): Public generic functions
Method, adjust-sequence: Public standalone methods
Method, amp: Public generic functions
Method, as-eseq: Public generic functions
Method, as-eseq: Public generic functions
Method, as-eseq: Public generic functions
Method, as-eseq: Public generic functions
Method, as-eseq: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, as-pstream: Public generic functions
Method, backend-all-instruments: Private generic functions
Method, backend-all-instruments: Private generic functions
Method, backend-all-nodes: Private generic functions
Method, backend-convert-object: Private generic functions
Method, backend-convert-object: Private generic functions
Method, backend-enabled-p: Public generic functions
Method, backend-input-processors: Public generic functions
Method, backend-instrument-args-list: Private generic functions
Method, backend-metadata: Public generic functions
Method, backend-name: Public generic functions
Method, backend-panic: Private generic functions
Method, backend-play-event: Private generic functions
Method, backend-play-event: Private generic functions
Method, backend-responds-p: Private generic functions
Method, backend-responds-p: Private generic functions
Method, backend-start: Public generic functions
Method, backend-start: Public generic functions
Method, backend-start: Public generic functions
Method, backend-started-p: Public generic functions
Method, backend-stop: Public generic functions
Method, backend-stop: Public generic functions
Method, backend-task-added: Private generic functions
Method, backend-task-removed: Private generic functions
Method, backend-tempo-change-at: Private generic functions
Method, beat: Public generic functions
Method, beat: Public generic functions
Method, beat: Public generic functions
Method, beat: Public generic functions
Method, beat: Public generic functions
Method, beat: Public generic functions
Method, bsubseq: Public generic functions
Method, bsubseq: Public generic functions
Method, chord: Public generic functions
Method, chord: Public generic functions
Method, chord: Public generic functions
Method, chord: Public generic functions
Method, chord-indexes: Public generic functions
Method, chord-indexes: Public generic functions
Method, chord-name: Public generic functions
Method, chord-name: Public generic functions
Method, chord-scale: Public generic functions
Method, chord-scale: Public generic functions
Method, clock-caught-conditions-extra-data-function: Public generic functions
Method, db: Public generic functions
Method, delta: Public generic functions
Method, describe-object: Public standalone methods
Method, dur: Public generic functions
Method, dur: Public generic functions
Method, dur: Public generic functions
Method, elt: Public standalone methods
Method, elt: Public standalone methods
Method, elt: Public standalone methods
Method, elt: Public standalone methods
Method, emptyp: Public standalone methods
Method, emptyp: Public standalone methods
Method, emptyp: Public standalone methods
Method, emptyp: Public standalone methods
Method, end: Public generic functions
Method, end: Public generic functions
Method, end: Public generic functions
Method, end: Public generic functions
Method, end: Public generic functions
Method, end-condition: Private generic functions
Method, end-quant: Public generic functions
Method, end-quant: Public generic functions
Method, end-quant: Public generic functions
Method, ended-p: Public generic functions
Method, eop-p: Public generic functions
Method, eop-p: Public generic functions
Method, eop-p: Public generic functions
Method, eseq-add: Public generic functions
Method, eseq-add: Public generic functions
Method, eseq-events: Public generic functions
Method, eseq-remove: Public generic functions
Method, eseq-remove: Public generic functions
Method, eseq-remove: Public generic functions
Method, event-plist: Public generic functions
Method, events-in-range: Private generic functions
Method, events-in-range: Private generic functions
Method, freq: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, instrument: Public generic functions
Method, ipstream-insert: Public generic functions
Method, keys: Public standalone methods
Method, keys: Public standalone methods
Method, keys: Public standalone methods
Method, last-dur: Private generic functions
Method, last-dur: Private generic functions
Method, last-output: Private generic functions
Method, launch: Public generic functions
Method, launch: Public generic functions
Method, launch: Public generic functions
Method, launch: Public generic functions
Method, launch: Public generic functions
Method, legato: Public generic functions
Method, length: Public standalone methods
Method, length: Public standalone methods
Method, length: Public standalone methods
Method, length: Public standalone methods
Method, length: Public standalone methods
Method, loop-p: Public generic functions
Method, loop-p: Public generic functions
Method, loop-p: Public generic functions
Method, loop-p: Public generic functions
Method, loop-p: Public generic functions
Method, loop-p: Public generic functions
Method, make-backend: Public generic functions
Method, make-sequence-like: Public standalone methods
Method, midinote: Public generic functions
Method, mouse-location*: Private generic functions
Method, mouse-location*: Private generic functions
Method, mouse-location*: Private generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next: Public generic functions
Method, next.events-ordered: Private generic functions
Method, pan: Public generic functions
Method, pattern-metadata: Public generic functions
Method, pattern-metadata: Public generic functions
Method, pattern-source: Public generic functions
Method, pbind-pairs: Private generic functions
Method, pdef-name: Public generic functions
Method, pdef-name: Public generic functions
Method, pdef-name: Public generic functions
Method, pdef-name: Public generic functions
Method, pdef-pattern: Public generic functions
Method, pdef-pattern: Public generic functions
Method, pdef-pattern: Public generic functions
Method, pdef-pstream: Public generic functions
Method, pdef-pstream: Public generic functions
Method, pdef-pstream: Public generic functions
Method, pdef-task: Public generic functions
Method, pdef-task: Public generic functions
Method, pdef-task: Public generic functions
Method, peek: Public generic functions
Method, peek: Public generic functions
Method, play: Public generic functions
Method, play: Public generic functions
Method, play: Public generic functions
Method, play: Public generic functions
Method, play: Public generic functions
Method, play-quant: Public generic functions
Method, play-quant: Public generic functions
Method, play-quant: Public generic functions
Method, play-quant: Public generic functions
Method, playing-p: Public generic functions
Method, playing-p: Public generic functions
Method, playing-p: Public generic functions
Method, playing-p: Public generic functions
Method, playing-p: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, process-pattern-key-value: Private generic functions
Method, pstream-count: Public generic functions
Method, pstream-count: Public generic functions
Method, pstream-elt-index: Private generic functions
Method, ptrack-cell: Public generic functions
Method, ptrack-cell: Public generic functions
Method, ptrack-row: Public generic functions
Method, ptrack-rows: Public generic functions
Method, quant: Public generic functions
Method, quant: Public generic functions
Method, rate: Public generic functions
Method, real-beat: Private generic functions
Method, redefining-melodic-alias-alias: Private generic functions
Method, redefining-melodic-alias-existing-definition: Private generic functions
Method, redefining-melodic-alias-new-definition: Private generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, render: Public generic functions
Method, rest-p: Public generic functions
Method, rest-p: Public generic functions
Method, rest-p: Public generic functions
Method, rest-p: Public generic functions
Method, scale: Public generic functions
Method, scale: Public generic functions
Method, scale: Public generic functions
Method, scale: Public generic functions
Method, scale-name: Public generic functions
Method, scale-name: Public generic functions
Method, scale-notes: Public generic functions
Method, scale-notes: Public generic functions
Method, scale-steps-per-octave: Public generic functions
Method, scale-steps-per-octave: Public generic functions
Method, scale-tuning: Public generic functions
Method, scale-tuning: Public generic functions
Method, screen-size*: Private generic functions
Method, screen-size*: Private generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, sustain: Public generic functions
Method, t-pstream-length: Public generic functions
Method, t-pstream-value: Public generic functions
Method, task-clock: Private generic functions
Method, task-item: Private generic functions
Method, tempo: Public generic functions
Method, tempo: Public generic functions
Method, tempo: Public generic functions
Method, tempo: Public generic functions
Method, tuning: Public generic functions
Method, tuning: Public generic functions
Method, tuning: Public generic functions
Method, tuning-name: Public generic functions
Method, tuning-name: Public generic functions
Method, tuning-octave-ratio: Public generic functions
Method, tuning-octave-ratio: Public generic functions
Method, tuning-pitches: Public generic functions
Method, tuning-pitches: Public generic functions
Method, tuning-steps-per-octave: Public generic functions
Method, tuning-steps-per-octave: Public generic functions
midi-ratio: Public ordinary functions
midi-truncate-clamp: Public ordinary functions
midinote: Public generic functions
midinote: Public generic functions
midinote-chromatic-index: Public ordinary functions
midinote-degree: Public ordinary functions
midinote-freq: Public ordinary functions
midinote-note: Public ordinary functions
midinote-octave: Public ordinary functions
midinote-rate: Public ordinary functions
mouse-location: Public ordinary functions
mouse-location*: Private generic functions
mouse-location*: Private generic functions
mouse-location*: Private generic functions
mouse-location*: Private generic functions
multi-channel-funcall: Public ordinary functions

N
near-p: Private ordinary functions
nearest: Private ordinary functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next: Public generic functions
next-beat-for-quant: Public ordinary functions
next-n: Public ordinary functions
next-upto-n: Public ordinary functions
next.events-ordered: Private generic functions
next.events-ordered: Private generic functions
normalized-sum: Private ordinary functions
note-chromatic-index: Public ordinary functions
note-degree: Public ordinary functions
note-freq: Public ordinary functions
note-midinote: Public ordinary functions
note-name-and-octave: Public ordinary functions
note-octave: Public ordinary functions

O
octave-degree: Public ordinary functions
octave-freq: Public ordinary functions
octave-midinote: Public ordinary functions
octave-note: Public ordinary functions

P
p*: Public ordinary functions
p+: Public ordinary functions
p-: Public ordinary functions
p/: Public ordinary functions
p/=: Public ordinary functions
p<: Public ordinary functions
p<=: Public ordinary functions
p=: Public ordinary functions
p>: Public ordinary functions
p>=: Public ordinary functions
paccum: Public ordinary functions
paclump: Public ordinary functions
pan: Public generic functions
pan: Public generic functions
parp: Public compiler macros
parp: Public ordinary functions
pattern-as-pstream: Public ordinary functions
pattern-children: Public ordinary functions
pattern-metadata: Public generic functions
pattern-metadata: Public generic functions
pattern-metadata: Public generic functions
pattern-p: Public ordinary functions
pattern-parent: Public ordinary functions
pattern-pstream-class-name: Private ordinary functions
pattern-source: Public generic functions
pattern-source: Public generic functions
pattern-tasks: Public ordinary functions
pattern-translate-sexp: Private ordinary functions
pb: Public macros
pb-translate-body-functions: Private ordinary functions
pbeat: Public ordinary functions
pbeat*: Public ordinary functions
pbind: Public ordinary functions
pbind-pairs: Private generic functions
pbind-pairs: Private generic functions
pbjorklund: Public ordinary functions
pbrown: Public ordinary functions
pchain: Public ordinary functions
pclump: Public ordinary functions
pcycles: Public ordinary functions
pcycles-parse-list: Private ordinary functions
pdef: Public ordinary functions
pdef-name: Public generic functions
pdef-name: Public generic functions
pdef-name: Public generic functions
pdef-name: Public generic functions
pdef-name: Public generic functions
pdef-names: Private ordinary functions
pdef-p: Public ordinary functions
pdef-pattern: Public generic functions
pdef-pattern: Public generic functions
pdef-pattern: Public generic functions
pdef-pattern: Public generic functions
pdef-pstream: Public generic functions
pdef-pstream: Public generic functions
pdef-pstream: Public generic functions
pdef-pstream: Public generic functions
pdef-task: Public generic functions
pdef-task: Public generic functions
pdef-task: Public generic functions
pdef-task: Public generic functions
pdelta: Public ordinary functions
pdiff: Public ordinary functions
pdrop: Public ordinary functions
pdurstutter: Public ordinary functions
peek: Public generic functions
peek: Public generic functions
peek: Public generic functions
peek-n: Public ordinary functions
peek-upto-n: Public ordinary functions
peql: Public ordinary functions
pexprand: Public ordinary functions
pf: Public macros
pfilter: Public ordinary functions
pfilter-out: Public ordinary functions
pfin: Public ordinary functions
pfindur: Public ordinary functions
pfor: Public ordinary functions
pfunc: Public ordinary functions
pgauss: Public ordinary functions
pgeom: Public ordinary functions
pgeom*: Public ordinary functions
phistory: Public ordinary functions
pif: Public ordinary functions
pindex: Public ordinary functions
pk: Public ordinary functions
place: Public ordinary functions
play: Public generic functions
play: Public generic functions
play: Public generic functions
play: Public generic functions
play: Public generic functions
play: Public generic functions
play-or-end: Public ordinary functions
play-or-stop: Public ordinary functions
play-quant: Public generic functions
play-quant: Public generic functions
play-quant: Public generic functions
play-quant: Public generic functions
play-quant: Public generic functions
play-solo: Public ordinary functions
play-swap: Public ordinary functions
playing-nodes: Public ordinary functions
playing-p: Public generic functions
playing-p: Public generic functions
playing-p: Public generic functions
playing-p: Public generic functions
playing-p: Public generic functions
playing-p: Public generic functions
playing-pdef-names: Public ordinary functions
playing-pdefs: Public ordinary functions
plazy: Public ordinary functions
plist-set: Private ordinary functions
pmeta: Public ordinary functions
pmeta-ensure-pattern-value: Private ordinary functions
pmono: Public ordinary functions
pmouse: Public ordinary functions
pmousex: Public ordinary functions
pmousey: Public ordinary functions
pn: Public ordinary functions
pnary: Public ordinary functions
ppar: Public ordinary functions
pparchain: Public ordinary functions
ppatlace: Public ordinary functions
ppc: Public macros
pr: Public ordinary functions
prand: Public ordinary functions
prerange: Public ordinary functions
prest: Public ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
process-pattern-key-value: Private generic functions
protate: Public ordinary functions
prs: Public ordinary functions
prun: Public ordinary functions
ps: Public ordinary functions
pscratch: Public ordinary functions
pseq: Public ordinary functions
pser: Public ordinary functions
pseries: Public ordinary functions
pseries*: Public ordinary functions
pshuf: Public ordinary functions
pslide: Public ordinary functions
pstream-count: Public generic functions
pstream-count: Public generic functions
pstream-count: Public generic functions
pstream-elt: Public ordinary functions
pstream-elt-future: Public ordinary functions
pstream-elt-index: Private generic functions
pstream-elt-index: Private generic functions
pstream-elt-index-to-history-index: Private ordinary functions
pstream-history-advance-by: Private ordinary functions
pstream-p: Public ordinary functions
psym: Public ordinary functions
psync: Public ordinary functions
pt: Public macros
ptime: Public ordinary functions
ptrace: Public ordinary functions
ptrack: Public ordinary functions
ptrack-cell: Public generic functions
ptrack-cell: Public generic functions
ptrack-cell: Public generic functions
ptrack-does-not-exist: Private ordinary functions
ptrack-row: Public generic functions
ptrack-row: Public generic functions
ptrack-rows: Public generic functions
ptrack-rows: Public generic functions
pts: Public ordinary functions
pwalk: Public ordinary functions
pwhite: Public ordinary functions
pwrand: Public ordinary functions
pwrap: Public ordinary functions
pwxrand: Public ordinary functions
pxrand: Public ordinary functions
pyramid: Public ordinary functions

Q
quant: Public generic functions
quant: Public generic functions
quant: Public generic functions

R
rate: Public generic functions
rate: Public generic functions
rate-freq: Public ordinary functions
rate-midinote: Public ordinary functions
ratio-midi: Public ordinary functions
raw-event-value: Private ordinary functions
real-beat: Private generic functions
real-beat: Private generic functions
redefining-melodic-alias: Public ordinary functions
redefining-melodic-alias-alias: Private generic functions
redefining-melodic-alias-alias: Private generic functions
redefining-melodic-alias-existing-definition: Private generic functions
redefining-melodic-alias-existing-definition: Private generic functions
redefining-melodic-alias-new-definition: Private generic functions
redefining-melodic-alias-new-definition: Private generic functions
remaining-p: Private ordinary functions
remap-instrument-to-parameters: Private ordinary functions
remove-event-value: Public ordinary functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
render: Public generic functions
rerange: Public ordinary functions
rest-p: Public generic functions
rest-p: Public generic functions
rest-p: Public generic functions
rest-p: Public generic functions
rest-p: Public generic functions

S
scale: Public generic functions
scale: Public generic functions
scale: Public generic functions
scale: Public generic functions
scale: Public generic functions
scale-midinotes: Public ordinary functions
scale-name: Public generic functions
scale-name: Public generic functions
scale-name: Public generic functions
scale-notes: Public generic functions
scale-notes: Public generic functions
scale-notes: Public generic functions
scale-steps-per-octave: Public generic functions
scale-steps-per-octave: Public generic functions
scale-steps-per-octave: Public generic functions
scale-tuning: Public generic functions
scale-tuning: Public generic functions
scale-tuning: Public generic functions
screen-size: Public ordinary functions
screen-size*: Private generic functions
screen-size*: Private generic functions
screen-size*: Private generic functions
set-parents: Private ordinary functions
sharp-or-flat: Private ordinary functions
split-event-by-lists: Public ordinary functions
start-clock-loop: Public ordinary functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
string-reader: Private ordinary functions
string-replace: Private ordinary functions
sustain: Public generic functions
sustain: Public generic functions

T
t-pstream: Public ordinary functions
t-pstream-length: Public generic functions
t-pstream-length: Public generic functions
t-pstream-p: Public ordinary functions
t-pstream-value: Public generic functions
t-pstream-value: Public generic functions
t-short: Private ordinary functions
task-clock: Private generic functions
task-clock: Private generic functions
task-item: Private generic functions
task-item: Private generic functions
task-nodes: Private ordinary functions
task-pattern: Public ordinary functions
tempo: Public generic functions
tempo: Public generic functions
tempo: Public generic functions
tempo: Public generic functions
tempo: Public generic functions
time-dur: Public ordinary functions
to-range: Private ordinary functions
tone-matrix: Public ordinary functions
track-shorthand: Private ordinary functions
transpose: Public ordinary functions
tuning: Public generic functions
tuning: Public generic functions
tuning: Public generic functions
tuning: Public generic functions
tuning-name: Public generic functions
tuning-name: Public generic functions
tuning-name: Public generic functions
tuning-octave-ratio: Public generic functions
tuning-octave-ratio: Public generic functions
tuning-octave-ratio: Public generic functions
tuning-pitches: Public generic functions
tuning-pitches: Public generic functions
tuning-pitches: Public generic functions
tuning-steps-per-octave: Public generic functions
tuning-steps-per-octave: Public generic functions
tuning-steps-per-octave: Public generic functions

U
unipolar-1-to-midi: Public ordinary functions
unipolar-bipolar: Public ordinary functions

V
value-remaining-p: Private ordinary functions


A.3 Variables

Jump to:   %   *  
A   B   C   D   E   F   G   H   I   K   L   M   N   O   P   R   S   T   V   W  
Index Entry  Section

%
%beat: Public classes

*
*abbreviations*: Private special variables
*backends*: Private special variables
*c4-midinote*: Public special variables
*chords*: Private special variables
*cl-patterns-temporary-directory*: Public special variables
*clock*: Public special variables
*conversions*: Private special variables
*default-pattern-length*: Public special variables
*default-pattern-repeats*: Public special variables
*deprecated-function-error-events-lists-differing-keys-notified-p*: Private special variables
*deprecated-function-style-warning-parp-notified-p*: Private special variables
*dictionary-lookup-functions*: Private special variables
*display-server*: Public special variables
*event*: Public special variables
*event-special-keys*: Private special variables
*instrument-map*: Private special variables
*max-pattern-yield-length*: Public special variables
*note-names*: Public special variables
*pattern-function-translations*: Private special variables
*patterns*: Private special variables
*pbind-special-init-keys*: Private special variables
*pbind-special-process-keys*: Private special variables
*pbind-special-wrap-keys*: Private special variables
*pdef-dictionary*: Private special variables
*post-pattern-output-processors*: Public special variables
*scales*: Private special variables
*screen-size*: Public special variables
*tunings*: Private special variables

A
alias: Public conditions
arpeggiator: Public classes

B
backend-resources: Private classes
beat: Public classes
beat: Private classes
beat-at-tempo: Private classes
bound-by: Public classes

C
caught-conditions: Private classes
caught-conditions-extra-data-function: Private classes
caught-conditions-lock: Private classes
cleanup: Public classes
clock: Private classes
condition-handler: Private classes
count: Public classes
current-arpeggiator-stream: Public classes
current-direction: Public classes
current-dur: Public classes
current-dur: Public classes
current-index: Public classes
current-index: Public classes
current-index: Public classes
current-list-length: Public classes
current-pattern-event: Public classes
current-pstream: Public classes
current-pstream: Public classes
current-pstream: Public classes
current-pstream: Public classes
current-pstream: Public classes
current-repeat: Public classes
current-repeats: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-repeats-remaining: Public classes
current-row: Public classes
current-value: Public classes
current-value: Public classes
current-value: Public classes
current-value: Public classes
current-value: Public classes
current-value: Public classes
current-value: Public classes
cycle: Public classes

D
default: Public classes
deviation: Public classes
direct-p: Public classes
direction-pattern: Public classes
dur: Public classes
dur: Public classes
dur: Public classes
dur: Public classes
dur: Public classes
dur: Public classes

E
elapsed-dur: Public classes
elapsed-dur: Public classes
elapsed-time: Public classes
enabled-p: Public classes
end-condition: Public classes
end-quant: Public classes
end-when-empty: Public classes
eop: Public special variables
event-plist: Public classes
events: Public classes
events-remaining: Public classes
existing-definition: Public conditions

F
false: Public classes
format: Public classes
from-range: Public classes
func: Public classes
func: Public classes
future-beat: Public classes
future-number: Public classes

G
granularity: Public classes
grow: Public classes

H
header: Public classes
hi: Public classes
hi: Public classes
hi: Public classes
hi: Public classes
history: Public classes
history-number: Public classes

I
index: Private conditions
index-pat: Public classes
indexes: Public classes
input: Public classes
input-processors: Public classes
item: Private classes

K
key: Public classes
key: Public classes

L
last-beat-checked: Public classes
last-result: Public classes
last-result: Public classes
latency: Private classes
len: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
length: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list: Public classes
list-pat: Public classes
lo: Public classes
lo: Public classes
lo: Public classes
lo: Public classes
lock: Public classes
loop-p: Public classes
loop-p: Private classes

M
map: Public classes
maxdur: Public classes
mean: Public classes
metadata: Public classes
metadata: Public classes

N
n: Public classes
n: Public classes
n: Public classes
name: Public classes
name: Public classes
name: Public classes
name: Public classes
name: Public classes
new-definition: Public conditions
notes: Public classes
number: Public classes

O
octave-ratio: Public classes
offset: Public classes
offset: Public classes
offset: Public classes
operator: Public classes
operator: Public classes
orientation: Public classes

P
pairs: Public classes
parent: Public classes
parsed-list: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern: Public classes
pattern-outputs: Public classes
pattern-stack: Public classes
patterns: Public classes
patterns: Public classes
patterns: Public classes
patterns: Public classes
patterns: Public classes
pitches: Public classes
play-expired-events: Private classes
play-quant: Public classes
predicate: Public classes
prefix: Public classes
pstream: Public classes
pstream: Public classes
pstream-count: Public classes
pstream-count: Public classes
pstreams: Public classes
pulses: Public classes

R
remaining-current-segment: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
repeats: Public classes
rows: Public classes

S
scale: Public classes
shift: Public classes
shuffled-list: Public classes
Slot, %beat: Public classes
Slot, alias: Public conditions
Slot, arpeggiator: Public classes
Slot, backend-resources: Private classes
Slot, beat: Public classes
Slot, beat: Private classes
Slot, beat-at-tempo: Private classes
Slot, bound-by: Public classes
Slot, caught-conditions: Private classes
Slot, caught-conditions-extra-data-function: Private classes
Slot, caught-conditions-lock: Private classes
Slot, cleanup: Public classes
Slot, clock: Private classes
Slot, condition-handler: Private classes
Slot, count: Public classes
Slot, current-arpeggiator-stream: Public classes
Slot, current-direction: Public classes
Slot, current-dur: Public classes
Slot, current-dur: Public classes
Slot, current-index: Public classes
Slot, current-index: Public classes
Slot, current-index: Public classes
Slot, current-list-length: Public classes
Slot, current-pattern-event: Public classes
Slot, current-pstream: Public classes
Slot, current-pstream: Public classes
Slot, current-pstream: Public classes
Slot, current-pstream: Public classes
Slot, current-pstream: Public classes
Slot, current-repeat: Public classes
Slot, current-repeats: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-repeats-remaining: Public classes
Slot, current-row: Public classes
Slot, current-value: Public classes
Slot, current-value: Public classes
Slot, current-value: Public classes
Slot, current-value: Public classes
Slot, current-value: Public classes
Slot, current-value: Public classes
Slot, current-value: Public classes
Slot, cycle: Public classes
Slot, default: Public classes
Slot, deviation: Public classes
Slot, direct-p: Public classes
Slot, direction-pattern: Public classes
Slot, dur: Public classes
Slot, dur: Public classes
Slot, dur: Public classes
Slot, dur: Public classes
Slot, dur: Public classes
Slot, dur: Public classes
Slot, elapsed-dur: Public classes
Slot, elapsed-dur: Public classes
Slot, elapsed-time: Public classes
Slot, enabled-p: Public classes
Slot, end-condition: Public classes
Slot, end-quant: Public classes
Slot, end-when-empty: Public classes
Slot, event-plist: Public classes
Slot, events: Public classes
Slot, events-remaining: Public classes
Slot, existing-definition: Public conditions
Slot, false: Public classes
Slot, format: Public classes
Slot, from-range: Public classes
Slot, func: Public classes
Slot, func: Public classes
Slot, future-beat: Public classes
Slot, future-number: Public classes
Slot, granularity: Public classes
Slot, grow: Public classes
Slot, header: Public classes
Slot, hi: Public classes
Slot, hi: Public classes
Slot, hi: Public classes
Slot, hi: Public classes
Slot, history: Public classes
Slot, history-number: Public classes
Slot, index: Private conditions
Slot, index-pat: Public classes
Slot, indexes: Public classes
Slot, input: Public classes
Slot, input-processors: Public classes
Slot, item: Private classes
Slot, key: Public classes
Slot, key: Public classes
Slot, last-beat-checked: Public classes
Slot, last-result: Public classes
Slot, last-result: Public classes
Slot, latency: Private classes
Slot, len: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, length: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list: Public classes
Slot, list-pat: Public classes
Slot, lo: Public classes
Slot, lo: Public classes
Slot, lo: Public classes
Slot, lo: Public classes
Slot, lock: Public classes
Slot, loop-p: Public classes
Slot, loop-p: Private classes
Slot, map: Public classes
Slot, maxdur: Public classes
Slot, mean: Public classes
Slot, metadata: Public classes
Slot, metadata: Public classes
Slot, n: Public classes
Slot, n: Public classes
Slot, n: Public classes
Slot, name: Public classes
Slot, name: Public classes
Slot, name: Public classes
Slot, name: Public classes
Slot, name: Public classes
Slot, new-definition: Public conditions
Slot, notes: Public classes
Slot, number: Public classes
Slot, octave-ratio: Public classes
Slot, offset: Public classes
Slot, offset: Public classes
Slot, offset: Public classes
Slot, operator: Public classes
Slot, operator: Public classes
Slot, orientation: Public classes
Slot, pairs: Public classes
Slot, parent: Public classes
Slot, parsed-list: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern: Public classes
Slot, pattern-outputs: Public classes
Slot, pattern-stack: Public classes
Slot, patterns: Public classes
Slot, patterns: Public classes
Slot, patterns: Public classes
Slot, patterns: Public classes
Slot, patterns: Public classes
Slot, pitches: Public classes
Slot, play-expired-events: Private classes
Slot, play-quant: Public classes
Slot, predicate: Public classes
Slot, prefix: Public classes
Slot, pstream: Public classes
Slot, pstream: Public classes
Slot, pstream-count: Public classes
Slot, pstream-count: Public classes
Slot, pstreams: Public classes
Slot, pulses: Public classes
Slot, remaining-current-segment: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, repeats: Public classes
Slot, rows: Public classes
Slot, scale: Public classes
Slot, shift: Public classes
Slot, shuffled-list: Public classes
Slot, source: Public classes
Slot, start: Public classes
Slot, start: Public classes
Slot, start: Public classes
Slot, start: Public classes
Slot, start-beat: Public classes
Slot, start-beat: Private classes
Slot, start-pos: Public classes
Slot, started-p: Public classes
Slot, step: Public classes
Slot, step: Public classes
Slot, step: Public classes
Slot, step: Public classes
Slot, step-pattern: Public classes
Slot, step-pattern: Public classes
Slot, step-pattern: Public classes
Slot, steps: Public classes
Slot, stream: Public classes
Slot, sync-quant: Public classes
Slot, task: Public classes
Slot, task: Public classes
Slot, tasks: Private classes
Slot, tasks-lock: Private classes
Slot, tempo: Private classes
Slot, tempo-at-beat: Public classes
Slot, test: Public classes
Slot, timestamp-at-tempo: Private classes
Slot, to-range: Public classes
Slot, tolerance: Public classes
Slot, tolerance: Public classes
Slot, trace: Public classes
Slot, true: Public classes
Slot, tuning: Public classes
Slot, value: Public classes
Slot, value: Public classes
Slot, weights: Public classes
Slot, weights: Public classes
Slot, wrap-at-end: Public classes
Slot, wrap-p: Public classes
source: Public classes
Special Variable, *abbreviations*: Private special variables
Special Variable, *backends*: Private special variables
Special Variable, *c4-midinote*: Public special variables
Special Variable, *chords*: Private special variables
Special Variable, *cl-patterns-temporary-directory*: Public special variables
Special Variable, *clock*: Public special variables
Special Variable, *conversions*: Private special variables
Special Variable, *default-pattern-length*: Public special variables
Special Variable, *default-pattern-repeats*: Public special variables
Special Variable, *deprecated-function-error-events-lists-differing-keys-notified-p*: Private special variables
Special Variable, *deprecated-function-style-warning-parp-notified-p*: Private special variables
Special Variable, *dictionary-lookup-functions*: Private special variables
Special Variable, *display-server*: Public special variables
Special Variable, *event*: Public special variables
Special Variable, *event-special-keys*: Private special variables
Special Variable, *instrument-map*: Private special variables
Special Variable, *max-pattern-yield-length*: Public special variables
Special Variable, *note-names*: Public special variables
Special Variable, *pattern-function-translations*: Private special variables
Special Variable, *patterns*: Private special variables
Special Variable, *pbind-special-init-keys*: Private special variables
Special Variable, *pbind-special-process-keys*: Private special variables
Special Variable, *pbind-special-wrap-keys*: Private special variables
Special Variable, *pdef-dictionary*: Private special variables
Special Variable, *post-pattern-output-processors*: Public special variables
Special Variable, *scales*: Private special variables
Special Variable, *screen-size*: Public special variables
Special Variable, *tunings*: Private special variables
Special Variable, eop: Public special variables
start: Public classes
start: Public classes
start: Public classes
start: Public classes
start-beat: Public classes
start-beat: Private classes
start-pos: Public classes
started-p: Public classes
step: Public classes
step: Public classes
step: Public classes
step: Public classes
step-pattern: Public classes
step-pattern: Public classes
step-pattern: Public classes
steps: Public classes
stream: Public classes
sync-quant: Public classes

T
task: Public classes
task: Public classes
tasks: Private classes
tasks-lock: Private classes
tempo: Private classes
tempo-at-beat: Public classes
test: Public classes
timestamp-at-tempo: Private classes
to-range: Public classes
tolerance: Public classes
tolerance: Public classes
trace: Public classes
true: Public classes
tuning: Public classes

V
value: Public classes
value: Public classes

W
weights: Public classes
weights: Public classes
wrap-at-end: Public classes
wrap-p: Public classes


A.4 Data types

Jump to:   B   C   E   F   I   M   P   R   S   T   U  
Index Entry  Section

B
backend: Public classes
backend.lisp: The cl-patterns/backend․lisp file
bjorklund.lisp: The cl-patterns/patterns/bjorklund․lisp file

C
chord: Public classes
cl-patterns: The cl-patterns system
cl-patterns: The cl-patterns package
cl-patterns.asd: The cl-patterns/cl-patterns․asd file
Class, backend: Public classes
Class, chord: Public classes
Class, clock: Private classes
Class, eseq: Public classes
Class, eseq-pstream: Public classes
Class, event: Public classes
Class, ipstream: Public classes
Class, ipstream-pstream: Public classes
Class, paccum: Public classes
Class, paccum-pstream: Public classes
Class, paclump: Public classes
Class, paclump-pstream: Public classes
Class, pattern: Public classes
Class, pbeat: Public classes
Class, pbeat*: Public classes
Class, pbeat*-pstream: Public classes
Class, pbeat-pstream: Public classes
Class, pbind: Public classes
Class, pbind-pstream: Public classes
Class, pbjorklund: Public classes
Class, pbjorklund-pstream: Public classes
Class, pbrown: Public classes
Class, pbrown-pstream: Public classes
Class, pchain: Public classes
Class, pchain-pstream: Public classes
Class, pclump: Public classes
Class, pclump-pstream: Public classes
Class, pcycles: Public classes
Class, pcycles-pstream: Public classes
Class, pdef: Public classes
Class, pdef-pstream: Public classes
Class, pdelta: Public classes
Class, pdelta-pstream: Public classes
Class, pdiff: Public classes
Class, pdiff-pstream: Public classes
Class, pdrop: Public classes
Class, pdrop-pstream: Public classes
Class, pdurstutter: Public classes
Class, pdurstutter-pstream: Public classes
Class, pexprand: Public classes
Class, pexprand-pstream: Public classes
Class, pfilter: Public classes
Class, pfilter-pstream: Public classes
Class, pfin: Public classes
Class, pfin-pstream: Public classes
Class, pfindur: Public classes
Class, pfindur-pstream: Public classes
Class, pfor: Public classes
Class, pfor-pstream: Public classes
Class, pfunc: Public classes
Class, pfunc-pstream: Public classes
Class, pgauss: Public classes
Class, pgauss-pstream: Public classes
Class, pgeom: Public classes
Class, pgeom-pstream: Public classes
Class, phistory: Public classes
Class, phistory-pstream: Public classes
Class, pif: Public classes
Class, pif-pstream: Public classes
Class, pindex: Public classes
Class, pindex-pstream: Public classes
Class, pk: Public classes
Class, pk-pstream: Public classes
Class, place: Public classes
Class, place-pstream: Public classes
Class, plazy: Public classes
Class, plazy-pstream: Public classes
Class, pmeta: Public classes
Class, pmeta-pstream: Public classes
Class, pmouse: Public classes
Class, pmouse-pstream: Public classes
Class, pn: Public classes
Class, pn-pstream: Public classes
Class, pnary: Public classes
Class, pnary-pstream: Public classes
Class, ppar: Public classes
Class, ppar-pstream: Public classes
Class, pparchain: Public classes
Class, pparchain-pstream: Public classes
Class, ppatlace: Public classes
Class, ppatlace-pstream: Public classes
Class, pr: Public classes
Class, pr-pstream: Public classes
Class, prand: Public classes
Class, prand-pstream: Public classes
Class, prerange: Public classes
Class, prerange-pstream: Public classes
Class, prest: Public classes
Class, protate: Public classes
Class, protate-pstream: Public classes
Class, prun: Public classes
Class, prun-pstream: Public classes
Class, ps: Public classes
Class, ps-pstream: Public classes
Class, pscratch: Public classes
Class, pscratch-pstream: Public classes
Class, pseq: Public classes
Class, pseq-pstream: Public classes
Class, pser: Public classes
Class, pser-pstream: Public classes
Class, pseries: Public classes
Class, pseries-pstream: Public classes
Class, pshuf: Public classes
Class, pshuf-pstream: Public classes
Class, pslide: Public classes
Class, pslide-pstream: Public classes
Class, pstream: Public classes
Class, psym: Public classes
Class, psym-pstream: Public classes
Class, psync: Public classes
Class, psync-pstream: Public classes
Class, ptime: Public classes
Class, ptime-pstream: Public classes
Class, ptrace: Public classes
Class, ptrace-pstream: Public classes
Class, ptrack: Public classes
Class, ptrack-pstream: Public classes
Class, pts: Public classes
Class, pts-pstream: Public classes
Class, pwalk: Public classes
Class, pwalk-pstream: Public classes
Class, pwhite: Public classes
Class, pwhite-pstream: Public classes
Class, pwrand: Public classes
Class, pwrand-pstream: Public classes
Class, pwxrand: Public classes
Class, pwxrand-pstream: Public classes
Class, pxrand: Public classes
Class, pxrand-pstream: Public classes
Class, scale: Public classes
Class, t-pstream: Public classes
Class, task: Private classes
Class, tuning: Public classes
clock: Private classes
clock.lisp: The cl-patterns/clock․lisp file
Condition, pstream-out-of-range: Private conditions
Condition, redefining-melodic-alias: Public conditions
conversions.lisp: The cl-patterns/conversions․lisp file
cycles.lisp: The cl-patterns/patterns/cycles․lisp file

E
eseq: Public classes
eseq-pstream: Public classes
eseq.lisp: The cl-patterns/eseq․lisp file
event: Public classes
event.lisp: The cl-patterns/event․lisp file
export.lisp: The cl-patterns/patterns/export․lisp file
extensions/sequence.lisp: The cl-patterns/extensions/sequence․lisp file

F
File, backend.lisp: The cl-patterns/backend․lisp file
File, bjorklund.lisp: The cl-patterns/patterns/bjorklund․lisp file
File, cl-patterns.asd: The cl-patterns/cl-patterns․asd file
File, clock.lisp: The cl-patterns/clock․lisp file
File, conversions.lisp: The cl-patterns/conversions․lisp file
File, cycles.lisp: The cl-patterns/patterns/cycles․lisp file
File, eseq.lisp: The cl-patterns/eseq․lisp file
File, event.lisp: The cl-patterns/event․lisp file
File, export.lisp: The cl-patterns/patterns/export․lisp file
File, extensions/sequence.lisp: The cl-patterns/extensions/sequence․lisp file
File, package.lisp: The cl-patterns/package․lisp file
File, patterns.lisp: The cl-patterns/patterns/patterns․lisp file
File, pdef.lisp: The cl-patterns/patterns/pdef․lisp file
File, pmeta.lisp: The cl-patterns/patterns/pmeta․lisp file
File, render.lisp: The cl-patterns/render․lisp file
File, scales.lisp: The cl-patterns/scales․lisp file
File, track.lisp: The cl-patterns/patterns/track․lisp file
File, utility.lisp: The cl-patterns/utility․lisp file

I
ipstream: Public classes
ipstream-pstream: Public classes

M
Module, patterns: The cl-patterns/patterns module

P
paccum: Public classes
paccum-pstream: Public classes
Package, cl-patterns: The cl-patterns package
package.lisp: The cl-patterns/package․lisp file
paclump: Public classes
paclump-pstream: Public classes
pattern: Public classes
patterns: The cl-patterns/patterns module
patterns.lisp: The cl-patterns/patterns/patterns․lisp file
pbeat: Public classes
pbeat*: Public classes
pbeat*-pstream: Public classes
pbeat-pstream: Public classes
pbind: Public classes
pbind-pstream: Public classes
pbjorklund: Public classes
pbjorklund-pstream: Public classes
pbrown: Public classes
pbrown-pstream: Public classes
pchain: Public classes
pchain-pstream: Public classes
pclump: Public classes
pclump-pstream: Public classes
pcycles: Public classes
pcycles-pstream: Public classes
pdef: Public classes
pdef-pstream: Public classes
pdef.lisp: The cl-patterns/patterns/pdef․lisp file
pdelta: Public classes
pdelta-pstream: Public classes
pdiff: Public classes
pdiff-pstream: Public classes
pdrop: Public classes
pdrop-pstream: Public classes
pdurstutter: Public classes
pdurstutter-pstream: Public classes
pexprand: Public classes
pexprand-pstream: Public classes
pfilter: Public classes
pfilter-pstream: Public classes
pfin: Public classes
pfin-pstream: Public classes
pfindur: Public classes
pfindur-pstream: Public classes
pfor: Public classes
pfor-pstream: Public classes
pfunc: Public classes
pfunc-pstream: Public classes
pgauss: Public classes
pgauss-pstream: Public classes
pgeom: Public classes
pgeom-pstream: Public classes
phistory: Public classes
phistory-pstream: Public classes
pif: Public classes
pif-pstream: Public classes
pindex: Public classes
pindex-pstream: Public classes
pk: Public classes
pk-pstream: Public classes
place: Public classes
place-pstream: Public classes
plazy: Public classes
plazy-pstream: Public classes
pmeta: Public classes
pmeta-pstream: Public classes
pmeta.lisp: The cl-patterns/patterns/pmeta․lisp file
pmouse: Public classes
pmouse-pstream: Public classes
pn: Public classes
pn-pstream: Public classes
pnary: Public classes
pnary-pstream: Public classes
ppar: Public classes
ppar-pstream: Public classes
pparchain: Public classes
pparchain-pstream: Public classes
ppatlace: Public classes
ppatlace-pstream: Public classes
pr: Public classes
pr-pstream: Public classes
prand: Public classes
prand-pstream: Public classes
prerange: Public classes
prerange-pstream: Public classes
prest: Public classes
protate: Public classes
protate-pstream: Public classes
prun: Public classes
prun-pstream: Public classes
ps: Public classes
ps-pstream: Public classes
pscratch: Public classes
pscratch-pstream: Public classes
pseq: Public classes
pseq-pstream: Public classes
pser: Public classes
pser-pstream: Public classes
pseries: Public classes
pseries-pstream: Public classes
pshuf: Public classes
pshuf-pstream: Public classes
pslide: Public classes
pslide-pstream: Public classes
pstream: Public classes
pstream-out-of-range: Private conditions
psym: Public classes
psym-pstream: Public classes
psync: Public classes
psync-pstream: Public classes
ptime: Public classes
ptime-pstream: Public classes
ptrace: Public classes
ptrace-pstream: Public classes
ptrack: Public classes
ptrack-pstream: Public classes
pts: Public classes
pts-pstream: Public classes
pwalk: Public classes
pwalk-pstream: Public classes
pwhite: Public classes
pwhite-pstream: Public classes
pwrand: Public classes
pwrand-pstream: Public classes
pwxrand: Public classes
pwxrand-pstream: Public classes
pxrand: Public classes
pxrand-pstream: Public classes

R
redefining-melodic-alias: Public conditions
render.lisp: The cl-patterns/render․lisp file

S
scale: Public classes
scales.lisp: The cl-patterns/scales․lisp file
System, cl-patterns: The cl-patterns system

T
t-pstream: Public classes
task: Private classes
track.lisp: The cl-patterns/patterns/track․lisp file
tuning: Public classes

U
utility.lisp: The cl-patterns/utility․lisp file