P


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  
palindrome [Pattern]

Enumerates items in palindromic order. The items specified to the pattern are treated as a half period of material; when the pattern reaches the last element it reverses order. If the items are all atomic, a mirror image is formed but items that are item streams continue to yield their own patterns.

palindrome implements the following option value pairs:

eliding {yes | no | start | end | left | right}
Controls whether the first and last items are directly repeated as the pattern reverses direction. If no (the default) the terminal items are repeated. If yes, the items are not repeated. If first or left the initial element is not repeated. If end or right the final element is not repeated.

Example:

? (setf x (intervals 0 6 11 from (notes c3 fs5) returning note
                     in palindrome eliding start))
#<CYCLIC-INTERVAL-NOTE-STREAM 136345471>

? (read-items x)
(C3 FS3 B3 B3 FS3)

? (read-items x)
(FS5 C6 F6 F6 C6)

See Also:

Item Streams

 


pathnames {pathname}+ {option value}* [Macro]

Creates an item stream of pathnames. Each pathname may be a file name (string), an integer or an item stream. If an integer, pathname is treated as an index into a list of pathnames specified to the item stream using the pathlist option. Each pathname is merged against an optionally specified directory and file type to produce a fully specified pathname.

pathnames implements the following option value pairs:

directory {string}
Sets the default directory for pathnames. Defaults to the directory of *pathnames-default-name*.
type {string}
Sets the defaula file type (extension) for pathnames. Defaults to the type of *pathnames-default-name*.
pathlist {list}
List of pathnames to use when pathname is an an integer.
An additional set of basic option valuepairs are available in all item stream macros. Others may be available based on the pattern type specified to the macro.

Example:

? (setf x (pathnames "hi" "ho" "silver.aiff" "away"
                     type "aifc" in rotation for 8))
#<ROTATIONAL-PATHNAME-STREAM @ #x107c66a2>

? (read-items x)
("/sounds/alban/hi.aifc" "/sounds/alban/ho.aifc"
 "/sounds/alban/silver.aiff" "/sounds/alban/away.aifc"
 "/sounds/alban/ho.aifc" "/sounds/alban/silver.aiff"
 "/sounds/alban/away.aifc" "/sounds/alban/hi.aifc")

See Also:

Item Streams, *pathnames-default-name*

 


*pathnames-default-name* [Variable]

The default value for the filenames given to pathnames. It defaults to clm::default-sound-file-name if CLM is loaded, otherwise to "test.aiff".

See Also:

pathnames

 


pfunc coords [Function]

Returns a probability density function given coords, a list of x y coordinates defining the areas of probability. X coodinate values must lie between 0.0 and 1.0.

Example:

? (setf p (pfunc '(0 0 .1 0 .15 1 .25 0 .75 0 .8 1 1 0)))
(0.0 0.1 0.125 0.15 0.125 0.15 0.375 0.25 0.375 0.75 0.5 0.8 0.5
0.8 1.0 1)

? (loop repeat 5 collect (interp (random 1.0) p))
(0.113 0.761 0.800 0.888 0.868)

See Also:

interp

 


pick seq &key :end :start :avoid :state [Function]

Returns a randomly chosen element from seq, which may be a list or array. Start is the lower selection bound and defaults to 0. End is the upper selection bound and defaults to the length of seq. If specified, avoid is an element to ignore. Use avoid to avoid direct reselection of an element. state is the random state to use and defaults to *cm-state*.

Example:

? (pick '(1 two 3 four 5))
3

? (pick "foobar" :start 1)
#\a

See Also:

between, pickl

 


pickl &rest data [Function]

Returns a randomly choosen argument to the function.

Example:

? (pickl 1 2 3 4 :foo 5)
3

? (pickl 1 2 3 4 :foo 5)
:FOO

See Also:

between, pick

 


pitch [Item Type]

The floating point frequency of an entry in a musical scale. Scale entries have three different aspects: a note, or symbolic note name, a pitch, or floating point frequency, and a degree, or ordinal position.

Each of these reference types is supported by a function for converting to that type and a macro for creating item streams of that type.

See Also:

degree, note, pitch [Function], pitches

 


pitch reference &optional scale [Function]

Returns the floating point frequency of reference in scale. Reference may be a note, degree, or pitch. If scale is omitted it defaults to *standard-scale*.

Example:

? (pitch 'a4)
440.0

? (pitch 69)
440.0

? (pitch 440.0)
440.0

See Also:

degree, degrees, note, notes, pitch [Item Type], pitches, *standard-scale*

 


pitches {reference}+ {option value}* [Macro]

Creates an item stream of floating point frequencies. Each reference may be a note, degree, pitch or item stream.

pitches implements the following option value pairs:

of {scale}
Sets the scale of the stream. Defaults to *standard-scale*.
An additional set of basic option valuepairs are available in all item stream macros. Others may be available based on the pattern type specified to the macro.

Example:

? (setf x (pitches c4 d e f in random for 8))
#<RANDOM-PITCH-STREAM 137542751>

? (read-items x)
(349.2283 349.2283 293.66476 349.2283 349.2283 349.2283
 349.2283 349.2283)
 

See Also:

degree, degrees, Item Streams, note, pitch, pitches

 


*post-processing* [Variable]

Determines if the Stella commands mix and seq process files after writing them. The default value is :ask, which means that post processing must be confirmed each time a file is written. If t, then post processing is always invoked. If nil then no post processing occurs.

The exact nature of post processing (if any) performed on the file depends on the current syntax and type of file being written.