M4C | [Syntax] |
The M4C syntax implements score file output for M4C, a sound synthesis language developed by James Beauchamp at the University of Illinois.
See Also:
m4c-note, m4c-score-filem4c-note | [Class] |
An abstract class defining score file output forall M4C note classes: Pl, Pladsr, Glide, GL1-10, GFins, Buzz, PMins, PMeins, cornet, clarinet, alt_sax, piano. Instrument parameter names are documented in the M4C tutorial. Exceptions to the tutorial are:
See Also:
M4C, defobject,m4c-score-file | [Class] |
An event stream class implementing M4C score files. This class is automatcally chosen when you specify a file with a .sc extension.
m4c-score-file declares the following slots:
See Also:
event-stream, M4Cmake-item-stream type pattern items &rest keywords | [Function] |
Creates an item stream of the specified type and pattern. Items is the list of items. keywords are item stream macro options specified using their Lisp keyword form.
Example:
;;; same as (notes c4 d e f g in heap for 10) ? (setf x (make-item-stream 'notes 'heap '(c4 d e f g) :for 10)) #<HEAP-NOTE-STREAM 133074501> ? (read-items x) (D4 G4 F4 E4 C4 F4 C4 D4 E4 G4)
See Also:
Item Streamsmap-data function stream | [Function] |
Maps function over each item in stream. Function is passed one argument, the currently mapped item. Note that items are often transformed into an internal form different than what was externally specified to the item stream.
Example:
(defun stream-list (stream) (let ((l '())) (map-data #'(lambda (x) (push x l)) stream) (nreverse l))) (defun stream-items (stream) (let ((l '())) (map-data #'(lambda (x) (if (typep x 'item-stream) (push (stream-items x) l) (push x l))) stream) (nreverse l)))
See Also:
doitems, item, read-items*mapping-level* | [Variable] |
Controls the depth that containers are recursively visited when mapped by commands in Stella. The default value is 1, which means that subobjects but not subcontainers of a mapped container are visited. Set to t to enable full recursion.
*mapping-mode* | [Variable] |
Determines the type of object mapped by commands in Stella. The value may be :data or :containers. The default value is :data.
merge | [Class] |
An object that accesses subcontainers in parallel. merge uses a scheduling queue to ensure that the musical events produced by its subcontainers appear in the proper, time sorted order.
merge inherits its slots from container.
See Also:
algorithm, generator, heap, merge [Macro], threadmerge {name} ({slot value}*) {form}* | [Macro] |
Defines a merge object. Macro syntax is otherwise identical to that of thread.
Example:
(merge moo () (thread sub1 () (object midi-note note 'b2 rhythm 1 duration 1 amplitude .5) (object midi-note note 'f3 rhythm 2 duration 2 amplitude .7)) (let ((rhy .1) (dur .2) (amp .5)) (thread sub2 () (doitems (x (notes c4 d ef f g in random for 10)) (object midi-note note x rhythm rhy duration dur amplitude amp)))))
See Also:
algorithm, generator, heap, mute, thread, Describing Music Algorithmicallymessage-case message {(type {form}*)}* | [Macro] |
Conditional evaluation based on MIDI message types. A clause is selected if its type matches the MIDI type of message. In addition to the message types enumnerated in MIDI Message Types, message-case supports the following abstract types:
See Also:
MIDI Support in Common Music, Working with Algorithms in Real-TimeMIDI | [Syntax] |
Common Music implements 32 channel, direct-to-driver MIDI support for the Mac, NextStep and SGI, and 16 channel midi file support on all platforms. Common Music reads and imports single and multi-track (level 0 and 1) files and writes level 0 files. Most functions and macros related to MIDI are documented in MIDI Support in Common Music.
See Also:
midi-file, midi-port, midi-message, midi-note, MIDI Support in Common Music, Working with Algorithms in Real-Timemidi-file | [Class] |
An event stream class implementing MIDI score files. This class is automatcally chosen when you specify a file with a .midi extension.
midi-file implemnts the following slots:
Stella's import command supports the following options for MIDI files:
See Also:
import command, MIDI, midi-portmidi-message | [Class] |
Represents a raw MIDI message of any type. Most useful for representing control, meta and system messages. In particular, it is much easier use the midi-note class for representing MIDI note values than to code seperate note on and note of pairs using midi-message.
Slots declared by midi-message:
Example:
? (object midi-message rhythm 0 message (make-control-change 0 60 60)) #<CtrlChng: 0, 60, 60>
See Also:
MIDI, midi-note,midi-note | [Class] |
Creates a MIDI note-on and note-off pair out of a more general representation of frequency, rhythm, duration and amplitude.
Slots declared by midi-note:
Example:
;;; this algorithm generates 80 midi-notes. sin is used to compute ;;; four periods of note values expressed as integer scale degrees ;;; (key numbers) ranging between 20 and 100. the amplitude, rhythm ;;; and duration of each midi-note is constant. (algorithm sinus midi-note (length 80 amplitude 0.5 rhythm 0.1 duration 0.1) (setf note (round (rescale (sin (* 2pi (/ count length) 4)) -1 1 20 100))))
See Also:
MIDI, midi-messagemidi-port | [Class] |
An event stream class implementing direct-to-driver MIDI input and output in some ports of Common Music.
midi-port implements the following slots:
See Also:
MIDI, midi-file*midi-preferences* | [Variable] |
Macintosh only. A list of the known midi drivers and ports, sorted in descending order according to their relative preference. The default value is ((:apple :oms :mtp :midiqt) (:a :b)). Note that the MidiQT extension and QuickTime Midi Player share a keyword, i.e. :midiqt. The variable's primary use is to provide midi-open with the means to discriminate between multiple possibilities, whenever it it is called without parameters.
mirror stream | [Macro] |
Enumerates a period of items from the item stream stream followed by a strict retrograde of that period. stream may implement any pattern.
Example:
? (setf x (mirror (items a b c d in heap))) #<FUNCTIONAL-ITEM-STREAM 137562641> ? (read-items x 16) (A D B C C B D A D C B A A B C D)
See Also:
repeat, retrogrademode-degree reference mode | [Function] |
Quantizes referenceto a degree in mode. Reference may be a note, degree, or pitch.
Example:
? (setf m (defmode (whole-tone on 'c4) 2 2 2 2 2 2)) #<MODE: Whole-Tone (on C)> ? (mode-degree 'cs4 m) 60 ? (mode-degree 63 m) 62
See Also:
defmode, mode-note, mode-pitchmode-note reference mode | [Function] |
Quantizes referenceto a note name in mode. Reference may be a note, degree, or pitch.
Example:
? (setf m (defmode (whole-tone on 'c4) 2 2 2 2 2 2)) #<MODE: Whole-Tone (on C)> ? (mode-note 'cs4 m) C4 ? (mode-note 63 m) D4
See Also:
defmode, mode-degree, mode-pitchmode-pitch reference mode | [Function] |
Quantizes referenceto a pitch in mode. Reference may be a note, degree, or pitch.
Example:
? (setf m (defmode (whole-tone on 'c4) 2 2 2 2 2 2)) #<MODE: Whole-Tone (on C)> ? (mode-pitch 'cs4 m) 261.625 ? (mode-pitch 63 m) 293.66
See Also:
defmode, mode-degree, mode-notemultiple-item-bind ({var}+) {item} {form}* | [Macro] |
Binds each var to a field of the multiple-item item within the scope of the macro.
See Also:
defmultiple-itemMusicKit | [Syntax] |
Produces score file input and output for the Music Kit, a sound synthesis package implemented in Objective C on the NeXT Computer. The Music Kit is developed by David Jaffe at CCRMA, Stanford University. Visit the Music Kit home page.
The Music Kit syntax provides note definitions for all predefined Music Kit instruments.
See Also:
music-kit-notemusic-kit-note | [Syntax] |
An abstract class defining the basic set of slots available to all music kit note classes: Wave1vi, Wave1i, Pluck, Mixsounds, Mkmidi, Fm2pvi, Fm2pnvi, Fm2cvi, Fm2cnvi, Fm1vi, Fm1i, Dbwave2vi, Dbwave1vi, Dbfm1vi).
Slots declared by music-kit-note:
See Also:
MusicKitmute {name} ({slot value}*) {form}* | [Macro] |
Defines an algorithm that does not output events. A muted algorithm may be used in conjunction with sprout to create musical structure dynamically. Except for the lack of note class specification, macro syntax is identical to algorithm.
Example:
(mute hush (length 10) (vars (s (notes c4 fs c5 fs c6 fs in heap))) (setf rhythm (item (rhythms q e h in random))) (let ((o (item s))) (format t "~%Sprouting algorithm at ~S." time) (sprout (algorithm nil midi-note (start time length (between 20 50) rhythm .1 duration .1 amplitude .5) (setf note (item (intervals 0 1 2 3 in random from o)))))))
See Also:
algorithm, generator, heap, merge, thread, Describing Music Algorithmically