This page lists the enums, helpers, attributes, and functions exposed by the current D♭ compiler.
For a guided introduction, start with the first tutorial on Entities and Attributes.
Table of Contents
• • • • • •
Enum values and helper members use qualified names such as
Dynamics.mf, Triad.Major, and Meter.Beat(). Attributes of the
current scope and batch functions that process it use the @ prefix.
Entity-bound random functions use @Rnd; the top-level random generator
uses #Rnd and is not bound to an entity. Each entry gives its type, unit
where available, description, and callable overloads supplied by the compiler.
Attributes can be combined just as in the earlier tutorials. This example plays a D dorian scale while gradually increasing the velocity (how strong the note is hit).
function Main() {
@span = 8;
@key = 2;
@mode = Mode.Dorian;
@velocity = 0.45;
@Split(8).Then(i => {
@degree = i;
@velocity += 0.5 * i.Relative;
});
}Functions can be chained through Then. Here, Split creates four notes
and Clone adds a quieter harmony note to each of them.
function Main() {
@span = 8;
@Split(4).Then(i => {
@degree = i;
@Clone().Then(() => {
@degree += 2;
@velocity *= 0.65;
});
});
}23 enum values in the current compiler API.
Articulations.ClosedEnum value ·
ArticulationsActive closing or muting of a tone.
Brass and percussion instruments.
Articulations.ClosingEnum value ·
ArticulationsTransition from an open (without artificial obstacles) to a closed tone.
Brass and percussion instruments.
Articulations.MarcatoEnum value ·
ArticulationsAccented notes.
Articulations.PizzicatoEnum value ·
ArticulationsPlucking the strings directly with fingers.
Bowed strings only.
Articulations.PizzicatoSnapEnum value ·
ArticulationsPlucking the string away from the fingerboard with the right hand with sufficient force to cause it to snap back and strike the fingerboard creating a snapping sound in addition to the pitch itself.
Bowed strings only.
Articulations.SpiccatoEnum value ·
ArticulationsA bowing technique with light bounces producing short tones.
Bowed strings only.
Articulations.StaccatissimoEnum value ·
ArticulationsVery short tone, technically the shortest possible.
Articulations.StaccatoEnum value ·
ArticulationsShort tone, technically splitting the tone into a shorter copy and a pause.
Articulations.StaccatoMarcatoEnum value ·
ArticulationsAccented staccato played with too much of air pressure.
Selected woodwinds only.
Articulations.SustainedEnum value ·
ArticulationsLong almost overlapping tones played rather flat.
Articulations.TremoloEnum value ·
ArticulationsTrembling or rolling tones, e.g., for bowed strings typically achieved by short back and forth bow movements.
Articulations.VibratoEnum value ·
ArticulationsLong tines with active addition of pitch pulsation, e.g. by little periodic movements of the fingers when pressing strings.
Dynamics.fEnum value ·
SingleForte.
Dynamics.ffEnum value ·
SingleFortissimo.
Dynamics.fffEnum value ·
SingleFortississimo.
Dynamics.mfEnum value ·
SingleMezzoforte.
Dynamics.mpEnum value ·
SingleMezzopiano.
Dynamics.pEnum value ·
SinglePiano.
Dynamics.ppEnum value ·
SinglePianissimo.
Dynamics.pppEnum value ·
SinglePianississimo.
Transition.GainEnum value ·
TransitionSmooth volume adjustment.
Transition.LegatoEnum value ·
TransitionLegato.
Transition.VelocityEnum value ·
TransitionSmooth dynamics.
48 helper members in the current compiler API.
Meter provides time constants and static functions for tempo, beats, measures, and spans.
Meter.BeatHelper function ·
DoubleDuration of a single beat (assuming constant tempo).
Overloads
•
Meter.Beat(EntityBase x) : Double •
Meter.Beat(Double tempo, Int32 beatType) : Double
•
tempo(quarter per minute) •
beatType— Time signature denominator.
Meter.FitBeatsHelper function ·
Int32Approximate count of beats to cover the given time span (assuming constant tempo).
Approximate count of -beats to cover the given time span (assuming constant tempo).
Overloads
•
Meter.FitBeats(EntityBase x) : Int32 •
Meter.FitBeats(EntityBase x, Double duration) : Int32
•
duration(seconds) •
Meter.FitBeats(Double tempo, Int32 beatType, Double duration) : Int32
•
tempo(quarter per minute) •
beatType— Time signature denominator. •
duration(seconds)
Meter.FitMeasuresHelper function ·
Int32Approximate count of bars to cover the given time span (assuming constant tempo).
Overloads
•
Meter.FitMeasures(EntityBase x) : Int32 •
Meter.FitMeasures(EntityBase x, Double duration) : Int32
•
duration(seconds) •
Meter.FitMeasures(Double tempo, Int32 beats, Int32 beatType, Double duration) : Int32
•
tempo(quarter per minute) •
beats— Beats per measure. •
beatType— Time signature denominator. •
duration(seconds)
Meter.FitSpanHelper function ·
DoubleApproximate the duration required for the given amount of beats and tempo.
Overloads
•
Meter.FitSpan(EntityBase x) : Double •
Meter.FitSpan(EntityBase x, Double tempo) : Double
•
tempo(quarter per minute) •
Meter.FitSpan(Double tempo, Int32 beats, Int32 beatType) : Double
•
tempo(quarter per minute) •
beats— Beats per measure. •
beatType— Time signature denominator.
Meter.FitTempoHelper function ·
DoubleApproximate the tempo required for the given amount of beats to cover the duration.
Overloads
•
Meter.FitTempo(EntityBase x) : Double •
Meter.FitTempo(EntityBase x, Double duration) : Double
•
duration(seconds) •
Meter.FitTempo(Double duration, Int32 beats, Int32 beatType) : Double
•
duration(seconds) •
beats— Beats per measure. •
beatType— Time signature denominator.
Meter.HourConstant ·
DoubleOne hour converted to time units.
Meter.MeasureHelper function ·
DoubleDuration of a single measure (assuming constant tempo).
Time span of a single measures (assuming constant tempo).
Overloads
•
Meter.Measure(EntityBase x) : Double •
Meter.Measure(Double tempo, Int32 beats, Int32 beatType) : Double
•
tempo(quarter per minute) •
beats— Beats per measure. •
beatType— Time signature denominator.
Meter.MinuteConstant ·
DoubleOne minute converted to time units.
Meter.QuarterHelper function ·
DoubleDuration of a quarter note (assuming constant tempo).
Overloads
•
Meter.Quarter(EntityBase x) : Double •
Meter.Quarter(Double tempo) : Double
•
tempo(quarter per minute)
Meter.SecondConstant ·
DoubleOne second converted to time units.
Triad provides chord constants represented as int[] arrays.
Triad.AugmentedConstant ·
int[]An augmented triad.
Triad.DiminishedConstant ·
int[]A diminished triad.
Triad.MajorConstant ·
int[]A major triad.
Triad.MinorConstant ·
int[]A minor triad.
Seventh provides chord constants represented as int[] arrays.
Seventh.AugmentedConstant ·
int[]An augmented seventh chord.
Seventh.AugmentedMajorConstant ·
int[]An augmented major seventh chord.
Seventh.DiminishedConstant ·
int[]A diminished seventh chord.
Seventh.DiminishedMajorConstant ·
int[]A diminished major seventh chord.
Seventh.DominantConstant ·
int[]A dominant seventh chord.
Seventh.DominantFlatFiveConstant ·
int[]A dominant flat five seventh chord.
Seventh.HalfDiminishedConstant ·
int[]A half diminished seventh chord.
Seventh.MajorConstant ·
int[]A major seventh chord.
Seventh.MajorFlatFiveConstant ·
int[]A major flat five seventh chord.
Seventh.MinorConstant ·
int[]A minor seventh chord.
Seventh.MinorMajorConstant ·
int[]A minor major seventh chord.
Slicing helpers describe absolute, relative, and fill portions passed to batch functions such as @Split.
ABSHelper function ·
SlicePartCreate a new SlicePart with exact duration.
Overloads
•
ABS(Double size) : SlicePart
•
size(second) •
ABS(ƒ<Double> size) : SlicePart
•
size(second) •
ABS(ƒ<Single> size) : SlicePart
•
size(second) •
ABS(ƒ<Int32> size) : SlicePart
•
size(second)
FILLHelper function ·
SlicePartCreate a new SlicePart with a duration relative to other FILLs.
FILLs occupy the space available after placing all ABS and REL parts. In case there is no more space left, the FILLs get omitted.
Overloads
•
FILL(Double size) : SlicePart •
FILL(ƒ<Double> size) : SlicePart •
FILL(ƒ<Single> size) : SlicePart •
FILL(ƒ<Int32> size) : SlicePart
RELHelper function ·
SlicePartCreate a new SlicePart with a duration relative to the parent duration.
Overloads
•
REL(Double size) : SlicePart
•
size(ratio of the parent duration) •
REL(ƒ<Double> size) : SlicePart
•
size(ratio of the parent duration) •
REL(ƒ<Single> size) : SlicePart
•
size(ratio of the parent duration) •
REL(ƒ<Int32> size) : SlicePart
•
size(ratio of the parent duration)
Chord.BaseConstant ·
ChordThe single base tone. This is the default value for each entity.
Chord.CountConstant ·
Int32Number of tones in this chord.
Chord.DyadConstant ·
ChordThe base tone along with a third above.
Chord.EleventhConstant ·
ChordThe base along with 3rd, 5th, 7th, 9th and 11th above.
Chord.HasHelper function ·
BooleanChecks whether the chord contains the given tone.
Call
•
Chord.Has(Int32 index) : Boolean
Chord.IsChordHelper function ·
BooleanIndicates whether there are any tones in the chord. Otherwise it is a rest.
Call
•
Chord.IsChord() : Boolean
Chord.IsRestHelper function ·
BooleanIndicates whether there are any tones in the chord. Otherwise it is a rest.
Call
•
Chord.IsRest() : Boolean
Chord.NinthConstant ·
ChordThe base along with 3rd, 5th, 7th and 9th above.
Chord.RestConstant ·
ChordNo tone played at all.
Chord.SeventhConstant ·
ChordThe base along with third, fifth and seventh above.
Chord.TriadConstant ·
ChordThe base tone along with a third and fifth above.
Mode.AeolianConstant ·
ModeAeolian / minor (-3).
Mode.DorianConstant ·
ModeDorian (-2).
Mode.IonianConstant ·
ModeIonian / major (0).
Mode.LocrianConstant ·
ModeLocrian (-5).
Mode.LydianConstant ·
ModeLydian (+1).
Mode.MajorConstant ·
ModeMajor / ionian (0).
Mode.MinorConstant ·
ModeMinor / aeolian (-3).
Mode.MixolydianConstant ·
ModeMixolydian (-1).
Mode.PhrygianConstant ·
ModePhrygian (-4).
38 attributes in the current compiler API.
@alterAttribute ·
SByte·chromaticAdds a chromatic offset to the diatonic degree.
Note that this is a hacky way to get semitones outside of the current key. Make sure you use modulation as musch as possible.
@articulationAttribute ·
ArticulationsArticulation of the instrument, the way it is played. E.g. staccato, pizzicato, tremolo.
Different instruments have different default articulations. Usually it is sustained and vibrato, if available.
@attackAttribute ·
Single·secondDuration from silence to full gain.
Overrides the default envelope of the respective instrument.
@beatTypeAttribute ·
Byte·beat note typeMetre denominator (e.g. 2, 4, 8)
@beatsAttribute ·
Byte·beats per barCount of beats per bar
@chordAttribute ·
ChordA set of tones to be played for this entity.
By default the set is (0), i.e. only the direct degree will be played.
Try it out: An augmented harmonic progression.
function Main() { var h = [3, 1, 4, 0]; @span = 4; @chord = Chord.Triad; @Split(4).Then(i => @harmony = h[i]); //IV, II, V, I @Split().Then(i => { if (i.IsLast) ++@alter; //raise the top note by a semitone }); }
@colorAttribute ·
StringColor for rendering this entity.
Any html valid color format like #abc, #a0b1c2, rgb(10,20,30), etc.
@decayAttribute ·
Single·secondDuration from full gain to the sustain level.
Overrides the default envelope of the respective instrument.
@degreeAttribute ·
SByte·diatonicIndex of the tone within the given harmonic function and key.
Try it out: Five notes starting at subdominant of C major.
function Main() { @span = 3; @harmony = 3; //IV subdominant @Split(5).Then(i => @degree = i); //F, G, A, H, C }
@delayAttribute ·
Single·secondPlays the sample later (or earlier if negative) as notated.
In the notes view and in the piano roll the note still appears correctly timed.
Try it out: Playing with imperfect rhtythm
function Main() { @span = 4; @Split(8).Then(i => {@degree = i; @delay = @Rnd.Float(-0.1, 0.3); }); }
@gainAttribute ·
Single·factorLoudness factor of the entity.
Non-negative, by default 1. Applied at the very end as an effect, does not affect the timbre.
Try it out: Increasing gain.
function Main() { @span = 10; @Split(20).Then(i => @gain = i.Relative); }
@harmonyAttribute ·
SByte·diatonicIndex of the harmonic function within the given key.
Try it out: A simple harmonic progression.
function Main() { var h = [3, 1, 4, 0]; @span = 4; @chord = Chord.Triad; @Split(4).Then(i => @harmony = h[i]); //IV, II, V, I }
@instrumentAttribute ·
StringName of the instrument to be played.
@inversionAttribute ·
SByteChord inversion.
The base form is 0. Every higher inversion moves the lowest chord tone an octave higher. Everly lower inversion moves the highest chord tone an octave lower.
@keyAttribute ·
SByte·chromaticKey offset, e.g. D♭ would be 1.
Try it out: A triad in three keys, always a semitone higher.
function Main() { @span = 4; @chord = Chord.Triad; @Split(3).Then(i => @key = i); //key shift 3x @Split(); //breaks up the chord }
@languageAttribute ·
StringName of the TTS model.
For details see https://github.com/rhasspy/piper/blob/master/VOICES.md, but not all of the models are available.
@modeAttribute ·
Mode·a fourth stepMode of the key.
For diatonic scales ionian (major) is the default mode. Each increment adds a # (following the circle of 4ths for the common diatonic scale), each decrement adds a ♭. Swtiching to from the major to the minor (aeolian) mode requires to subtract 3. A full chromatic key step can be achieved by adding or subtracting 7.
@octaveAttribute ·
SByte·octaveOctave base for the tone (ranged 0 to 8).
Try it out: C in all nine octaves.
function Main() { @span = 9; @Split(9).Then(i => @octave = i); }
@rampAttribute ·
RampRamp function for transitions between gain levels in the envelope.
Either Ramp.Linear or Ramp.Exp (default).
@randomizedAttribute ·
BooleanRandomization of duplicates, by default true.
Applies to children entities produced by split, slices, repeats, multiple calls of a custom function within an expression and similar. Without randomization they all inherit the same random seed producing the same values.
Try it out: Forcing identity after a split.
function Main() { @span = 10; @randomized = false; //turning off to obtain 4 identical entities @Split(4); @randomized = true; //turning on again to obtain a randomized ostinato @Split(6).Then(i => @degree = @Rnd.Int(-3, 5)); }
@releaseAttribute ·
Single·secondDuration from the sustain level to silence.
Overrides the default envelope of the respective instrument. Release is by default not counted into the entity span, use alignment to change that.
@releaseAlignmentAttribute ·
Single·factorAligns the release part either after the entity (default = 1), or moves it earlier.
A continuous factor from -1 to 1. At -1 the whole release part is part of the entity span, at 0 the half of it and at 1 the release only starts at entity span (default).
@reversedAttribute ·
ReverseReversed sample effect. No reverse by default.
Reverse.Forward keeps the sample as is. Reverse.Simple just reverses the sample, Reverse.Full also reverses its envelope.
@scaleAttribute ·
ScaleScale as subset of chromatic tones.
Given as a mask, by default a diatonic scale.
@sectionAttribute ·
ByteSection index (e.g. 1 for first violins).
The default 0 and 1 are equal. If a section recording does not exist the highes available index is used.
@seedAttribute ·
UInt64Seed of the random numbers generator.
By default the seed is initialized from the current time.
Try it out: Deterministic seed.
function Main() { @span = 10; @seed = 27; @Split(20); //the constant seed above generates the very same sequence in every each run @degree = @Rnd.Int(-5, 5); }
@skipAttribute ·
Single·secondSkips an initial portion of the sample.
The note timing and duration are preserved, just the sample internally shifts earlier in time.
Try it out: Skipping the moment when the hammer hits the string
function Main() { @span = 4; @skip = 1; @Split(4).Then(i => @degree = i); }
@spanAttribute ·
Single·secondDuration of this entity
Try it out: A simple split would normally create a sequence of equal duration. In this example each entity is shortened to half of its original duration.
function Main() { @instrument = "viola"; @span = 4; @Split(4).Then(i => @span *= 0.5); }
@sustainAttribute ·
Single·factorThe sustained gain level expresses as a factor of the full gain.
Overrides the default envelope of the respective instrument. Duration of the sustain = span - attack - decay
@syllableAttribute ·
SyllableSyllable selection. Applies only to vocals.
@temperamentAttribute ·
ByteEqual temperament divides the octave into a number of regular intervals. By default these are the 12 semitones. Values up to 64 are possible.
Changing the default value allows the exploration of microtonalities.
@tempoAttribute ·
Single·quarters per minuteCount of quarter notes played per minute
@textAttribute ·
StringText to be spoken by a text-to-speech synthesizer.
@timeAttribute ·
Single·secondTime when this entity starts to play
The song starts at 0, but negative time is possible as well (e.g. using @Prepend). If entities with negative time values are present, a post processing step shifts them all, so that the first entity starts at 0.
Try it out: A split would normally create a sequence of entities that is continuous in time. In this example we postpone each entity for later and the shift increases.
function Main() { @span = 4; @Split(4).Then(i => @time += i * 0.5); }
@trackAttribute ·
ByteInstrument track, usefull when an instrument plays several unaligned notes at once or to divide a section.
Track is always bound to the instrument identifier. So track 1 for violins is a different one as for cellos.
@transitionsAttribute ·
TransitionsDataControl of smooth transitions that span over several notes.
Includes smooth dynamics, volume adjustment and legato.
@tuttiAttribute ·
BooleanSolo instrument or the Whole section.
Instruments play solo by default (if a solo sample is available). Activating tutti will trigger the whole section.
@velocityAttribute ·
VelocityData·factorIntensity of the instrument.
Non-negative, by default 0.7. Different levels change the timbre.
Try it out: Increasing velocity.
function Main() { @span = 10; @Split(20).Then(i => @velocity = i.Relative); }
57 functions in the current compiler API.
Batch functions process the entities in the current scope and use the @ prefix.
@AggregateFunction ·
TAggregates over the entities in the current scope.
Overloads
•
@Aggregate(Func<T, Music, T> fn) : T
•
fn— Aggregation function •
@Aggregate(Func<T, Music, Int32, T> fn) : T
•
fn— Aggregation function •
@Aggregate(Func<T, Music, T> fn, T init) : T
•
fn— Aggregation function •
init— Initial value of the aggregator •
@Aggregate(Func<T, Music, Int32, T> fn, T init) : T
•
fn— Aggregation function •
init— Initial value of the aggregator
@AppendFunction ·
MusicPromiseFor each entity in the current scope it creates a new entity of the same duration as the original and appends it right after the original entity.
Both the appended as well as the original entity are returned at output. Any Then() transformers will be only applied to the appended content.
Creates a new entity of a given duration and appends it right after each entity of the current scope.
Appends the given entities right after each entity of the current scope.
All the appended as well as the original entity are returned at output. Any Then() transformers will be only applied to the appended content.
Overloads
•
@Append() : MusicPromise •
@Append(Func<Entity, Single> duration) : MusicPromise
•
duration— Duration of the appended entity. If omited, the span of the original entity is taken. (second) •
@Append(Func<Entity, Double> duration) : MusicPromise
•
duration— Duration of the appended entity. If omited, the span of the original entity is taken. (second) •
@Append(Double duration) : MusicPromise
•
duration— Duration of the appended entity. If omited, the span of the original entity is taken. (second) •
@Append(Music input, Func<Entity, Music> content) : MusicPromise
•
content— Entities to be appended. •
@Append(Music input, Music content) : MusicPromise
•
content— Entities to be appended.
@AppendOnceFunction ·
MusicPromiseCreates a new entity of a given duration and appends it right after the last entity of the current scope.
Both the appended as well as the original entity are returned at output. Any Then() transformers will be only applied to the appended content.
Appends the content right after the last entity of the current scope.
All the appended as well as the original entity are returned at output. Any Then() transformers will be only applied to the appended content.
Overloads
•
@AppendOnce() : MusicPromise •
@AppendOnce(Music input, Func<Entity, Double> duration) : MusicPromise •
@AppendOnce(Music input, Double duration) : MusicPromise •
@AppendOnce(Music content) : MusicPromise
@ArpeggioFunction ·
MusicPromisePlays the chord by adding and holding one note after each other in ascending direction.
The notes are added in regular intervals to cover the whole span of the chord. This is just an alias for ArpeggioUp.
The notes are added in regular intervals of the given duration. This is just an alias for ArpeggioUp.
Overloads
•
@Arpeggio() : MusicPromise •
@Arpeggio(Func<Entity, Single> duration) : MusicPromise
•
duration— Duration after which the next note is added. (second) •
@Arpeggio(Func<Entity, Double> duration) : MusicPromise
•
duration— Duration after which the next note is added. (second) •
@Arpeggio(Double duration) : MusicPromise
•
duration— Duration after which the next note is added. (second)
@ArpeggioDownFunction ·
MusicPromisePlays the chord by adding and holding one note after each other in descending direction.
The notes are added in regular intervals to cover the whole span of the chord.
The notes are added in regular intervals of the given duration.
Overloads
•
@ArpeggioDown() : MusicPromise •
@ArpeggioDown(Func<Entity, Single> duration) : MusicPromise
•
duration— Duration after which the next note is added. (second) •
@ArpeggioDown(Func<Entity, Double> duration) : MusicPromise
•
duration— Duration after which the next note is added. (second) •
@ArpeggioDown(Double duration) : MusicPromise
•
duration— Duration after which the next note is added. (second)
@ArpeggioUpFunction ·
MusicPromisePlays the chord by adding and holding one note after each other in ascending direction.
The notes are added in regular intervals to cover the whole span of the chord.
The notes are added in regular intervals of the given duration.
Overloads
•
@ArpeggioUp() : MusicPromise •
@ArpeggioUp(Func<Entity, Single> duration) : MusicPromise
•
duration— Duration after which the next note is added. (second) •
@ArpeggioUp(Func<Entity, Double> duration) : MusicPromise
•
duration— Duration after which the next note is added. (second) •
@ArpeggioUp(Double duration) : MusicPromise
•
duration— Duration after which the next note is added. (second)
@AxiomFunction ·
MusicPromiseCreates a new default entity.
Call
•
@Axiom() : MusicPromise
@ChromaticFunction ·
MusicSwitch to the chromatic scale to perform atonal composition.
Overloads
•
@Chromatic() : Music •
@Chromatic(Func<Entity, int[]> chordConst) : Music
•
chordConst— Override chord by a quality constant: Triad or Seventh. •
@Chromatic(int[] chordConst) : Music
•
chordConst— Override chord by a quality constant: Triad or Seventh. •
@Chromatic(Func<Entity, Chord> chord) : Music
•
chord— Override chord •
@Chromatic(Func<Entity, Int32[]> chord) : Music
•
chord— Override chord •
@Chromatic(Chord chord) : Music
•
chord— Override chord •
@Chromatic(Int32[] chord) : Music
•
chord— Override chord
@CloneFunction ·
MusicPromiseCopies the entity several times. Also keeps the original. Any Then transformation is applied only to the clones, not to the original.
All entities share the same properties, except for the random seed which is uniqe.
Count of the returned entites is by one higher than the count specified in the function call. All entities share the same properties, except for the random seed which is uniqe.
Count of the returned entites is by one higher than the count of transforms. All entities share the same properties, except for the random seed which is uniqe.
Copies the entity with new instrument assignment. The original is kept as well. The Then transformation is applied only to the produced copies, not to the original.
Count of new copies is given by the count of instruments. All entities share the same properties, except for the random seed which is unique and instrument is assigned from the input collection.
Overloads
•
@Clone() : MusicPromise •
@Clone(Func<Entity, Int32> count) : MusicPromise
•
count— Number of the cloned parts, initialized to 1. Note that this count excludes the original that is returned along, so the number of returned entities is always by one higher than count. •
@Clone(Int32 count) : MusicPromise
•
count— Number of the cloned parts, initialized to 1. Note that this count excludes the original that is returned along, so the number of returned entities is always by one higher than count. •
@Clone(params Func<Music, Music>[] transforms) : MusicPromise
•
transforms— A list of subroutines. Each will be applied only to its corresponding entity. •
@Clone(params Func<Music, Indexer, Music>[] transforms) : MusicPromise
•
transforms— A list of subroutines. Each will be applied only to its corresponding entity. •
@Clone(Func<Entity, IList<Func<Music, Music>>> transforms) : MusicPromise
•
transforms— A list of subroutines. Each will be applied only to its corresponding entity. •
@Clone(Func<Entity, IList<Func<Music, Indexer, Music>>> transforms) : MusicPromise
•
transforms— A list of subroutines. Each will be applied only to its corresponding entity. •
@Clone(IList<Func<Music, Music>> transforms) : MusicPromise
•
transforms— A list of subroutines. Each will be applied only to its corresponding entity. •
@Clone(IList<Func<Music, Indexer, Music>> transforms) : MusicPromise
•
transforms— A list of subroutines. Each will be applied only to its corresponding entity. •
@Clone(params String[] instruments) : MusicPromise
•
instruments— A list of instruments. Each will be applied only to its corresponding entity. •
@Clone(Func<Entity, IList<String>> instruments) : MusicPromise
•
instruments— A list of instruments. Each will be applied only to its corresponding entity. •
@Clone(IList<String> instruments) : MusicPromise
•
instruments— A list of instruments. Each will be applied only to its corresponding entity.
@CountFunction ·
Int32Count of entities within the current scope.
Call
•
@Count() : Int32
@DoneFunction ·
MusicThe entity is set to be done, i.e. terminal. No more command will affect it.
Call
•
@Done() : Music
@DurationFunction ·
Single·secondsDuration of entities within the current scope.
Call
•
@Duration() : Single
@MotiveFunction ·
MusicPromiseSplits the entity to occupy the given melody.
Splits the entity to occupy the given harmony and melody.
Overloads
•
@Motive(Func<Entity, IList<Int32>> melody) : MusicPromise
•
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<SByte>> melody) : MusicPromise
•
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<Int32> melody) : MusicPromise
•
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<SByte> melody) : MusicPromise
•
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<Int32>> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<SByte>> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<Int32>> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<SByte>> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<Int32>> harmony, IList<SByte> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<Int32> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<Int32> harmony, IList<SByte> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<SByte>> harmony, IList<Int32> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<SByte> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<SByte> harmony, IList<Int32> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<Int32>> harmony, IList<Int32> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<Int32> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<Int32> harmony, IList<Int32> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, IList<SByte>> harmony, IList<SByte> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<SByte> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(IList<SByte> harmony, IList<SByte> melody) : MusicPromise
•
harmony— Harmony progression for the motive. Both arrays must be of same length. •
melody— Melody degrees as offsets to the harmony progression. Both arrays must be of same length. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Func<Entity, Rhythm> rhythm, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Rhythm rhythm, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Rhythm rhythm, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Func<Entity, Rhythm> rhythm, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Rhythm rhythm, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Rhythm rhythm, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody. •
melody— Melody degrees. Must be the same length as rhythm. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<Int32>> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<SByte>> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<Int32>> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<SByte>> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<Int32>> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<Int32> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<Int32> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<Int32>> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<Int32>> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<Int32> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<Int32> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<SByte>> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<SByte> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<SByte> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<SByte>> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<SByte>> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<SByte> harmony, Func<Entity, IList<Int32>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<SByte> harmony, IList<Int32> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<Int32>> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<Int32> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<Int32> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<Int32>> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<Int32>> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<Int32> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<Int32> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, Func<Entity, IList<SByte>> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<SByte> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Func<Entity, Rhythm> rhythm, IList<SByte> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<SByte>> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, Func<Entity, IList<SByte>> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<SByte> harmony, Func<Entity, IList<SByte>> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony. •
@Motive(Rhythm rhythm, IList<SByte> harmony, IList<SByte> melody) : MusicPromise
•
rhythm— A rhythm defining note lengths. Must be the same length as melody and harmony. •
harmony— Harmony progression for the motive. Must be the same length as rhythm and melody. •
melody— Melody degrees as offsets to the harmony progression. Must be the same length as rhythm and harmony.
@PrependFunction ·
MusicPromiseFor each entity in the current scope it creates a new entity of the same duration as the original and prepends it right before the original entity.
Both the prepended as well as the original entity are returned at output. Any Then() transformers will be only applied to the prepended content.
Creates a new entity of a given duration and prepends it right before each entity of the current scope.
Prepends the given entities right before each entity of the current scope.
All the prepended as well as the original entity are returned at output. Any Then() transformers will be only applied to the prepended content.
Overloads
•
@Prepend() : MusicPromise •
@Prepend(Music input, Func<Entity, Single> duration) : MusicPromise •
@Prepend(Music input, Func<Entity, Double> duration) : MusicPromise •
@Prepend(Music input, Double duration) : MusicPromise •
@Prepend(Func<Entity, Music> content) : MusicPromise
•
content— Entities to be prepended. •
@Prepend(Music content) : MusicPromise
•
content— Entities to be prepended.
@PrependOnceFunction ·
MusicPromiseCreates a new entity and prepends it right before the first entity of the current scope.
Both the prepended as well as the original entity are returned at output. Any Then() transformers will be only applied to the prepended content.
Creates a new entity of a given duration and prepends it right before the first entity of the current scope.
Prepends the given entities right before the first entity of the current scope.
All the prepended as well as the original entity are returned at output. Any Then() transformers will be only applied to the prepended content.
Overloads
•
@PrependOnce() : MusicPromise •
@PrependOnce(Music input, Func<Entity, Double> duration) : MusicPromise •
@PrependOnce(Music input, Double duration) : MusicPromise •
@PrependOnce(Music input, Music content) : MusicPromise
@ReplaceFunction ·
MusicPromiseReplaces the entity by a whole Music instance.
Overloads
•
@Replace(Func<Entity, Music> content) : MusicPromise
•
content— A Music instance with entities to be inserted. •
@Replace(Music content) : MusicPromise
•
content— A Music instance with entities to be inserted.
@RestFunction ·
MusicConverts the entity into a rest.
A rest keeps all its properties, but chord which is set to an empty set.
Call
•
@Rest() : Music
@ScopeFunction ·
MusicPromiseExtracts the current scope.
Passes the given scope to the transformer.
The transformer is applied to the provided scope instead of the default scope.
Overloads
•
@Scope() : MusicPromise •
@Scope(Music scope) : MusicPromise
@SelectFunction ·
Entity[] | T[]Extracts all entities from the current scope.
The extracted data is returned in a new array.
Extracts data from the current scope of entities.
Overloads
•
@Select() : Entity[] •
@Select(Func<Music, T> fn) : T[] •
@Select(Func<Music, Int32, T> fn) : T[]
@SliceFunction ·
MusicPromiseCopies the entity several times. The original gets removed. Any Then transformation is applied to all produced copies.
All entities share the same properties, except for the random seed which is unique.
Vertical division of a chord producing a new entity for each tone of the chord. Any Then transformation is applied to all produced copies.
All entities share the same properties, except for the degree which is derived from the chord and random seed which is unique.
Count of copies is given by the count of transforms. All entities share the same properties, except for the random seed which is unique.
Copies the entity with new instrument assignment. The original gets removed. Any Then transformation is applied to all produced copies.
Count of copies is given by the count of instruments. All entities share the same properties, except for the random seed which is unique and instrument is assigned from the input collection.
Overloads
•
@Slice(Func<Entity, Int32> count) : MusicPromise
•
count— Number of copies to produce. •
@Slice(Int32 count) : MusicPromise
•
count— Number of copies to produce. •
@Slice() : MusicPromise •
@Slice(params Func<Music, Music>[] transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Slice(params Func<Music, Indexer, Music>[] transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Slice(Func<Entity, IList<Func<Music, Music>>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Slice(Func<Entity, IList<Func<Music, Indexer, Music>>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Slice(IList<Func<Music, Music>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Slice(IList<Func<Music, Indexer, Music>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Slice(params String[] instruments) : MusicPromise
•
instruments— A list of instruments. Each will be applied only to its corresponding entity. •
@Slice(Func<Entity, IList<String>> instruments) : MusicPromise
•
instruments— A list of instruments. Each will be applied only to its corresponding entity. •
@Slice(IList<String> instruments) : MusicPromise
•
instruments— A list of instruments. Each will be applied only to its corresponding entity.
@SplitFunction ·
MusicPromiseDivides a chord into a sequence of ascending notes.
The resulting entities are of equal duration. Together they cover the whole timespan of the input entity.
Divides an entity into a sequence of shorter entities.
Spans of the resulting entities are of equal duration. Together they cover the whole timespan of the input entity.
Spans of the resulting entities correspond to the relative durations of the rhythm beats. Together they cover the whole timespan of the input entity.
Spans of the resulting entities are given using a sequence of ABS, REL and FILL parts. Together they cover the whole timespan of the input entity.
Count of the resulting entities is given by the number of transforms. Resulting entities are of equal length. Together they cover the whole timespan of the input entity.
Overloads
•
@Split() : MusicPromise •
@Split(Func<Entity, Int32> count) : MusicPromise
•
count— Specifies the count of resulting entities. •
@Split(Int32 count) : MusicPromise
•
count— Specifies the count of resulting entities. •
@Split(Func<Entity, IList<Single>> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(params Single[] relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(Func<Entity, Int32[]> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(Func<Entity, IList<Int32>> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(IList<Func<EntityBase, Int32>> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(Func<Entity, IList<Double>> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(IList<Single> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(Int32[] relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(IList<Int32> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(IList<Double> relativeDurations) : MusicPromise
•
relativeDurations— Specifies the count of resulting entities and their relative durations. •
@Split(Func<Entity, Rhythm> rhythm) : MusicPromise
•
rhythm— Rhythm with relative tone lengths to be used for the split. •
@Split(Rhythm rhythm) : MusicPromise
•
rhythm— Rhythm with relative tone lengths to be used for the split. •
@Split(params SlicePart[] durations) : MusicPromise
•
durations— Relative durations of the split parts. •
@Split(Func<Entity, IList<SlicePart>> durations) : MusicPromise
•
durations— Relative durations of the split parts. •
@Split(IList<Func<Entity, SlicePart>> durations) : MusicPromise
•
durations— Relative durations of the split parts. •
@Split(params Func<Entity, SlicePart>[] durations) : MusicPromise
•
durations— Relative durations of the split parts. •
@Split(IList<SlicePart> durations) : MusicPromise
•
durations— Relative durations of the split parts. •
@Split(params Func<Music, Music>[] transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Split(params Func<Music, Indexer, Music>[] transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Split(Func<Entity, IList<Func<Music, Music>>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Split(Func<Entity, IList<Func<Music, Indexer, Music>>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Split(IList<Func<Music, Music>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity. •
@Split(IList<Func<Music, Indexer, Music>> transform) : MusicPromise
•
transform— A list of subroutines. Each will be applied only to its corresponding entity.
@WhereFunction ·
List<Entity>Filters the current scope of entities by a predicate.
The scope itself is not modified, The filtered list is returned separately.
Overloads
•
@Where(Predicate<Entity> fn) : List<Entity> •
@Where(Func<Entity, Int32, Boolean> fn) : List<Entity>
These functions use the random number generator of the current entity and are accessed through @Rnd.
@Rnd.BoolFunction ·
BooleanA random boolean value.
Call
•
@Rnd.Bool() : Boolean
@Rnd.BoolVecFunction ·
Boolean[]An array of random Boolean values.
Call
•
@Rnd.BoolVec(Int32 count) : Boolean[]
@Rnd.ChoiceFunction ·
TA random choice of several options.
Overloads
•
@Rnd.Choice(List<T> options) : T •
@Rnd.Choice(params T[] options) : T •
@Rnd.Choice(ReadOnlySpan<T> options) : T
@Rnd.FloatFunction ·
SingleA random 32-bit float value with inclusive bounds.
Overloads
•
@Rnd.Float(Double lowerInclusive, Double upperInclusive) : Single
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
@Rnd.Float(SignedRangeInt range) : Single
•
range— Inclusive range. •
@Rnd.Float(SignedRangeDouble range) : Single
•
range— Inclusive range.
@Rnd.IntFunction ·
Int32A random signed 32-bit integer value.
A random signed 32-bit integer value with inclusive bounds.
Overloads
•
@Rnd.Int() : Int32 •
@Rnd.Int(Int32 lowerInclusive, Int32 upperInclusive) : Int32
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
@Rnd.Int(SignedRangeInt range) : Int32
•
range— Inclusive range.
@Rnd.IntVecFunction ·
Int32[]An array of random signed 32-bit integers.
Call
•
@Rnd.IntVec(Int32 count) : Int32[]
•
count— Number of integers to generate.
@Rnd.ModeFunction ·
ModeA random mode value for musical keys.
A random mode value for musical keys with an inclusive upper bound.
A random mode value for musical keys with inclusive bounds.
Overloads
•
@Rnd.Mode() : Mode •
@Rnd.Mode(Mode upperInclusive) : Mode
•
upperInclusive— Inclusive upper bound. •
@Rnd.Mode(Int32 upperInclusive) : Mode
•
upperInclusive— Inclusive upper bound. •
@Rnd.Mode(Mode lowerInclusive, Mode upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
@Rnd.Mode(Int32 lowerInclusive, Mode upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
@Rnd.Mode(Mode lowerInclusive, Int32 upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
@Rnd.Mode(Int32 lowerInclusive, Int32 upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound.
@Rnd.NumFunction ·
TA generic random number (up to 128 bits).
Call
•
@Rnd.Num(SignedRange<T> range) : T
@Rnd.PartitionFunction ·
Int32[] | Single[]Random partition of a number into several positive parts.
Overloads
•
@Rnd.Partition(Int32 sum, Int32 count, SignedRangeInt range = null) : Int32[]
•
sum— The number to partition. •
count— The number of partitions. •
range— Minimum and maximum item size, must be positive. •
@Rnd.Partition(Double sum, Int32 count, SignedRangeDouble range = null) : Int32[]
•
sum— The number to partition. •
count— The number of partitions. •
range— Minimum and maximum item size, must be positive.
@Rnd.PositiveFloatFunction ·
SingleA random positive 32-bit float value.
Mathematics defines positive as larger than zero, but here we include it.
A random 32-bit float value with an inclusive upper bound.
Overloads
•
@Rnd.PositiveFloat() : Single •
@Rnd.PositiveFloat(Double upperInclusive) : Single
•
upperInclusive— Inclusive upper bound.
@Rnd.PositiveIntFunction ·
Int32A random signed 32-bit integer value larger than -1.
Mathematics defines positive as larger than zero, but here we include it.
A random positive signed 32-bit integer value with an inclusive upper bound.
Overloads
•
@Rnd.PositiveInt() : Int32 •
@Rnd.PositiveInt(Int32 upperInclusive) : Int32
•
upperInclusive— Inclusive upper bound.
@Rnd.PositiveIntVecFunction ·
Int32[]An array of random signed 32-bit integers larger than -1.
Call
•
@Rnd.PositiveIntVec(Int32 count) : Int32[]
•
count— Number of integers to generate.
@Rnd.ShuffleFunction ·
List<T> | T[] | Int32[]Random ordering of the provided list.
Random ordering of the provided array.
Random ordering of the provided integer range. Both ends inclusive.
Overloads
•
@Rnd.Shuffle(List<T> collection) : List<T>
•
collection— A list of items to shuffle. •
@Rnd.Shuffle(params T[] collection) : List<T>
•
collection— An array of items to shuffle. •
@Rnd.Shuffle(SignedRangeInt range) : Int32[]
•
range— A range to shuffle. Both ends are inclusive.
@Rnd.SubsetFunction ·
List<T> | T[] | Int32[]Random selection from the collection. Maintains order.
Overloads
•
@Rnd.Subset(Int32 count, List<T> collection) : List<T>
•
count— Number of elements to choose. •
collection— A list of elements to choose from. •
@Rnd.Subset(Int32 count, T[] collection) : List<T>
•
count— Number of elements to choose. •
collection— An array of elements to choose from. •
@Rnd.Subset(Int32 count, SignedRangeInt range) : Int32[]
•
count— Number of elements to choose. •
range— Range of elements to choose from, both ends are inclusive.
@Rnd.UIntFunction ·
UInt32A random unsigned 32-bit integer value.
A random unsigned 32-bit integer value with inclusive bounds.
Overloads
•
@Rnd.UInt() : UInt32 •
@Rnd.UInt(UInt32 lowerInclusive, UInt32 upperInclusive) : UInt32
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
@Rnd.UInt(SignedRangeInt range) : UInt32
•
range— Inclusive range, clamped to [0, int32.MaxValue].
@Rnd.ULongFunction ·
UInt64A random unsigned 64-bit integer value.
A random unsigned 64-bit integer value with an inclusive upper bound.
A random unsigned 64-bit integer value with inclusive bounds.
Overloads
•
@Rnd.ULong() : UInt64 •
@Rnd.ULong(UInt64 upperInclusive) : UInt64
•
upperInclusive— Inclusive upper bound. •
@Rnd.ULong(UInt64 lowerInclusive, UInt64 upperInclusive) : UInt64
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound.
@Rnd.UnitFloatFunction ·
SingleA random 32-bit float value in the range of 0 to 1.
Call
•
@Rnd.UnitFloat() : Single
These functions use the top-level random number generator and are accessed through #Rnd; they are not bound to an entity.
#Rnd.BoolFunction ·
BooleanA random boolean value.
Call
•
#Rnd.Bool() : Boolean
#Rnd.BoolVecFunction ·
Boolean[]An array of random Boolean values.
Call
•
#Rnd.BoolVec(Int32 count) : Boolean[]
#Rnd.ChoiceFunction ·
TA random choice of several options.
Overloads
•
#Rnd.Choice(params T[] options) : T •
#Rnd.Choice(List<T> options) : T •
#Rnd.Choice(ReadOnlySpan<T> options) : T
#Rnd.FloatFunction ·
SingleA random 32-bit float value with inclusive bounds.
Overloads
•
#Rnd.Float(Double lowerInclusive, Double upperInclusive) : Single
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
#Rnd.Float(SignedRangeInt range) : Single
•
range— Inclusive range. •
#Rnd.Float(SignedRangeDouble range) : Single
•
range— Inclusive range.
#Rnd.IntFunction ·
Int32A random signed 32-bit integer value.
A random signed 32-bit integer value with inclusive bounds.
Overloads
•
#Rnd.Int() : Int32 •
#Rnd.Int(Int32 lowerInclusive, Int32 upperInclusive) : Int32
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
#Rnd.Int(SignedRangeInt range) : Int32
•
range— Inclusive range.
#Rnd.IntVecFunction ·
Int32[]An array of random signed 32-bit integers.
Call
•
#Rnd.IntVec(Int32 count) : Int32[]
•
count— Number of integers to generate.
#Rnd.MelodyFunction ·
SByte[]A random melody of given length
Call
•
#Rnd.Melody(Int32 length) : SByte[]
#Rnd.ModeFunction ·
ModeA random mode value for musical keys.
A random mode value for musical keys with an inclusive upper bound.
A random mode value for musical keys with inclusive bounds.
Overloads
•
#Rnd.Mode() : Mode •
#Rnd.Mode(Mode upperInclusive) : Mode
•
upperInclusive— Inclusive upper bound. •
#Rnd.Mode(Int32 upperInclusive) : Mode
•
upperInclusive— Inclusive upper bound. •
#Rnd.Mode(Mode lowerInclusive, Mode upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
#Rnd.Mode(Int32 lowerInclusive, Mode upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
#Rnd.Mode(Mode lowerInclusive, Int32 upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
#Rnd.Mode(Int32 lowerInclusive, Int32 upperInclusive) : Mode
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound.
#Rnd.NumFunction ·
TA generic random number (up to 128 bits).
Call
•
#Rnd.Num(SignedRange<T> range) : T
#Rnd.PartitionFunction ·
Int32[] | Single[]Random partition of a number into several positive parts.
Overloads
•
#Rnd.Partition(Int32 sum, Int32 count, SignedRangeInt range = null) : Int32[]
•
sum— The number to partition. •
count— The number of partitions. •
range— Minimum and maximum item size, must be positive. •
#Rnd.Partition(Double sum, Int32 count, SignedRangeDouble range = null) : Int32[]
•
sum— The number to partition. •
count— The number of partitions. •
range— Minimum and maximum item size, must be positive.
#Rnd.PositiveFloatFunction ·
SingleA random positive 32-bit float value.
Mathematics defines positive as larger than zero, but here we include it.
A random 32-bit float value with an inclusive upper bound.
Overloads
•
#Rnd.PositiveFloat() : Single •
#Rnd.PositiveFloat(Double upperInclusive) : Single
•
upperInclusive— Inclusive upper bound.
#Rnd.PositiveIntFunction ·
Int32A random signed 32-bit integer value larger than -1.
Mathematics defines positive as larger than zero, but here we include it.
A random positive signed 32-bit integer value with an inclusive upper bound.
Overloads
•
#Rnd.PositiveInt() : Int32 •
#Rnd.PositiveInt(Int32 upperInclusive) : Int32
•
upperInclusive— Inclusive upper bound.
#Rnd.PositiveIntVecFunction ·
Int32[]An array of random signed 32-bit integers larger than -1.
Call
•
#Rnd.PositiveIntVec(Int32 count) : Int32[]
•
count— Number of integers to generate.
#Rnd.ShuffleFunction ·
List<T> | T[] | Int32[]Random ordering of the provided list.
Random ordering of the provided array.
Random ordering of the provided integer range. Both ends inclusive.
Overloads
•
#Rnd.Shuffle(List<T> collection) : List<T>
•
collection— A list of items to shuffle. •
#Rnd.Shuffle(params T[] collection) : List<T>
•
collection— An array of items to shuffle. •
#Rnd.Shuffle(SignedRangeInt range) : Int32[]
•
range— A range to shuffle. Both ends are inclusive.
#Rnd.SubsetFunction ·
List<T> | T[] | Int32[]Random selection from the collection. Maintains order.
Overloads
•
#Rnd.Subset(Int32 count, List<T> collection) : List<T>
•
count— Number of elements to choose. •
collection— A list of elements to choose from. •
#Rnd.Subset(Int32 count, T[] collection) : List<T>
•
count— Number of elements to choose. •
collection— An array of elements to choose from. •
#Rnd.Subset(Int32 count, SignedRangeInt range) : Int32[]
•
count— Number of elements to choose. •
range— Range of elements to choose from, both ends are inclusive.
#Rnd.UIntFunction ·
UInt32A random unsigned 32-bit integer value.
A random unsigned 32-bit integer value with inclusive bounds.
Overloads
•
#Rnd.UInt() : UInt32 •
#Rnd.UInt(UInt32 lowerInclusive, UInt32 upperInclusive) : UInt32
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound. •
#Rnd.UInt(SignedRangeInt range) : UInt32
•
range— Inclusive range, clamped to [0, int32.MaxValue].
#Rnd.ULongFunction ·
UInt64A random unsigned 64-bit integer value.
A random unsigned 64-bit integer value with an inclusive upper bound.
A random unsigned 64-bit integer value with inclusive bounds.
Overloads
•
#Rnd.ULong() : UInt64 •
#Rnd.ULong(UInt64 upperInclusive) : UInt64
•
upperInclusive— Inclusive upper bound. •
#Rnd.ULong(UInt64 lowerInclusive, UInt64 upperInclusive) : UInt64
•
lowerInclusive— Inclusive lower bound. •
upperInclusive— Inclusive upper bound.
#Rnd.UnitFloatFunction ·
SingleA random 32-bit float value in the range of 0 to 1.
Call
•
#Rnd.UnitFloat() : Single
D♭ Tutorials — Basic
D♭ Tutorials — Intermediate
D♭ Reference
D♭ Examples
Links