E


Intro       Symbols A B C D E F G H I J K L M N O P Q R S T U V W X Y Z       Index  
event-stream [Class]

An abstract class implementing most of the basic input and output protocol.

  event-stream provides the following slots to all score file and event stream subclasses:

name {string}
Holds the name (string) of the stream.
start {number}
Holds an optional initial start time for the stream. If specified, events earlier than start will not be written to the stream.
end {number}
Holds an optional initial end time for the stream. If specified, events later than end will not be written to the stream.
timescale {number}
Holds an optional scale factor for time values sent to the stream.

See Also:

About Open

 


expl power &key :y0 :y1 :base :return-type [Function]

Returns an exponential value between :y0 and :y1 according to power, which ranges from 0 to 1. When power is 0 :y0 is returned, when power is 1 :y1 is returned. :y0 and :y1 default to 0 and 1, respectively. :base determines the slope of the exponential curve, if it is less than 1 then the exponential curve is concave, otherwise a convex curve is produced. The default value of :base is 2. 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.

Example:

? (expl 0 5 1 1/256)
0.0

? (expl 1 5 1 1/256)
5.0

? (expl .5 5 1 1/256)
1.235

;;; create envelope ramping from 3 to .5

? (loop for i to 1 by .2 append (list i (expl i 3 .5 1/256)))
(0 3.0 0.2 1.31 0.4 0.76 0.6 0.58 0.8 0.51 1.0 0.5)

See Also:

explseg, explsegs, fit, rescale

 


explseg i length sum power &key :return-type [Function]

Returns the ith segment of length number of exponential segments whose values sum to sum. The exponential curve is defind by power, where 0<power<1 yields concave slopes and power>1 yields convex slopes. 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.

See Also:

expl, explsegs

 


explsegs length sum power &key :return-type [Function]

Like explseg but returns all length number of segments in a list.

Example:

? (setf l (explsegs 4 10 2))
(1.8920711500272102 2.250064473703739 2.6757926813433408
  3.18207169492571)

? (apply #'+ l)
10.0

See Also:

expl, explseg    
expr expression [Macro]
#e expression [Read Macro]

Creates a pattern item out of expression. The item is evaluated each time it is encountered in the pattern.

Example:

? (setf x (items a #e(between 1 5) b))
#<CYCLIC-ITEM-STREAM 131337161>

? (read-items x 12)
(A 2 B A 1 B A 4 B A 4 B)

See Also:

fn