tempo {form}+ | [Macro] |
Creates a tempo scaler appropriate to the arguments supplied to the macro. There are three forms of argument specification. The first form:
tempo value [pulse]
creates a single metronome value. An integer value produces rational time calculations. If the system clock mode is :seconds, a floating point value results in floating point time calculations. pulse defaults to the quarter note.
The second form:
tempo {option value}+
supports a series of option value pairs. The following pairs are supported:
tempo {beat tempo}+ {option value}*
is a series of function coordinates followed by zero or more option value pairs. Beatranges from 0 to the number of beats the tempo change spans. tempo is the metronome value at that beat. Legal options are pulse and update, as described in the preceding paragraph.
Example:
? (setf x (rhythms q for 8 tempo (tempo 80))) #<CYCLIC-RHYTHM-STREAM 131654651> ? (read-items x) (0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75) ? (setf x (rhythms q for 8 tempo (tempo from 60 to 120 in 8))) #<CYCLIC-RHYTHM-STREAM 131754301> ? (read-items x) (0.9375 0.875 0.8125 0.75 0.6875 0.625 0.5625 0.5) ? (setf x (rhythms q for 8 tempo (tempo 0 60 6 90 8 120))) #<CYCLIC-RHYTHM-STREAM 132223341> ? (read-items x) (0.9444444 0.8888889 0.8333334 0.7777778 0.7222222 0.6666667 0.5833334 0.5)
See Also:
clock-mode, in-tempo, rhythm, rhythms,tendency x low high &key :scale :offset :return-type :random :state | [Function] |
Returns a random value between the value of x in low and high envelopes with optional :scale and :offset values applied. A constant envelope may be expressed as a simple numeric value. The type of the value returned normally depends on the type of the arguments specified to the function. Use :return-type to force the return value to be either float, integer or ratio. float may be specified as a list (float digits) in which case the floating point return value will be rounded to digitnumber of places. :random allows a random generator other than random to be used. The generator is passed two arguments, the floating point range between high and low and a random state object.
Example:
? (loop for i by .2 to 2 collect (tendency i '(0 0 1.5 .5) '(0 1 1.5 .75)) (.37 .77 .62 .50 .44 .34 .75 .48 .55 .66 .69)
See Also:
interpl, betweenthread | [Class] |
An object that produces musical events in sequential order. Threads are created using the thread macro.
thread inherits all slots from container.
See Also:
algorithm, generator, heap, merge, thread [Macro]thread {name} ({slot value}*) {form}* | [Macro] |
Defines a thread object. A thread is container that produces subobjects in sequential order. name is the name for the thread. Following name comes a list of zero or more slot value pairs. For each pair, slot is the name of a slot and value is its evaluated initial value.
Following the initialization pairs comes the body of macro. Any lisp code is legal here. Normally, this code creates the subobjects to be included in the thread.
Example:
? (thread test () (doitems (n (notes c4 d ef f g in random for 40)) (object midi-note note n rhythm .1 duration (between .1 .5) amplitude .5))) #<THREAD: Test>
See Also:
algorithm, generator, heap, merge, mute, Describing Music Algorithmicallytranspose reference interval &optional scale | [Function] |
Transposes reference by interval number of steps in scale. Reference may be a note, pitch, degree or list of the same. Scale defaults to *standard-scale*.
Example:
(transpose 'a4 1) AS4 (transpose 69 -1) 68 (transpose 440.0 1) 466.16397
See Also:
degree, invert, note, pitch