SuperCollider CLASSES

PdegreeToKey

index into a scale
Inherits from: Pnaryop : Pattern : AbstractFunction : Object

Description

Returns a series of notes derived from an index into a scale.

Class Methods

*new (pattern, scale, stepsPerOctave: 12)

Arguments:

pattern

integer index into the scale.

scale

an array or pattern. If a pattern, it streams the scales accordingly.

stepsPerOctave

the number of steps per octave in the scale.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

(
Pbind(\note, PdegreeToKey(
            Pseq([1, 2, 3, 2, 5, 4, 3, 4, 2, 1], 2),
            #[0, 2, 3, 6, 7, 9],
            12
        ),
    \dur, 0.25
).play;
)


(
var scales;
scales = #[[0, 2, 3, 6, 7, 9], [0, 1, 5, 6, 7, 9, 11], [0, 2, 3]];
Pbind(\note, PdegreeToKey(
            Pseq([1, 2, 3, 2, 5, 4, 3, 4, 2, 1], 4),
            Pstutter(3, Prand(scales, inf)),
            12
        ),
    \dur, 0.25
).play;
)