public class Mod extends java.lang.Object implements JMC
AMPLITUDE, DEBUG, DYNAMIC, EIGHT_BIT, FREQUENCY, KEY_SIG_EVT, MONO, NO_DENOMINATOR, NO_INSTRUMENT, NO_KEY_QUALITY, NO_KEY_SIGNATURE, NO_NUMERATOR, OCTAPHONIC, PAN, PITCH, PROG_EVT, QUADRAPHONIC, RHYTHM, SIXTEEN_BIT, STEREO, TEMP_EVT, THIRTY_TWO_BIT, TIME_SIG_EVT, VERBOSE
C, CD, CDD, CROTCHET, CROTCHET_TRIPLET, CT, DC, DDC, DDEN, DDHN, DDM, DDQ, DDQN, DEMI_SEMI_QUAVER, DEMI_SEMI_QUAVER_TRIPLET, DEN, DHN, DM, DOTTED_CROTCHET, DOTTED_EIGHTH_NOTE, DOTTED_HALF_NOTE, DOTTED_MINIM, DOTTED_QUARTER_NOTE, DOTTED_QUAVER, DOTTED_SEMI_QUAVER, DOTTED_SIXTEENTH_NOTE, DOUBLE_DOTTED_CROTCHET, DOUBLE_DOTTED_EIGHTH_NOTE, DOUBLE_DOTTED_HALF_NOTE, DOUBLE_DOTTED_MINIM, DOUBLE_DOTTED_QUARTER_NOTE, DOUBLE_DOTTED_QUAVER, DQ, DQN, DSN, DSQ, DSQT, EIGHTH_NOTE, EIGHTH_NOTE_TRIPLET, EN, ENT, HALF_NOTE, HALF_NOTE_TRIPLET, HN, HNT, M, MD, MDD, MINIM, MINIM_TRIPLET, MT, Q, QD, QDD, QN, QNT, QT, QUARTER_NOTE, QUARTER_NOTE_TRIPLET, QUAVER, QUAVER_TRIPLET, SB, SEMI_QUAVER, SEMI_QUAVER_TRIPLET, SEMIBREVE, SIXTEENTH_NOTE, SIXTEENTH_NOTE_TRIPLET, SN, SNT, SQ, SQD, SQT, THIRTYSECOND_NOTE, THIRTYSECOND_NOTE_TRIPLET, TN, TNT, TSN, TSNT, WHOLE_NOTE, WN
a0, A0, a1, A1, a2, A2, a3, A3, a4, A4, a5, A5, a6, A6, a7, A7, a8, A8, af0, AF0, af1, AF1, af2, AF2, af3, AF3, af4, AF4, af5, AF5, af6, AF6, af7, AF7, af8, AF8, afn1, AFN1, an1, AN1, as0, AS0, as1, AS1, as2, AS2, as3, AS3, as4, AS4, as5, AS5, as6, AS6, as7, AS7, as8, AS8, asn1, ASN1, b0, B0, b1, B1, b2, B2, b3, B3, b4, B4, b5, B5, b6, B6, b7, B7, b8, B8, bf0, BF0, bf1, BF1, bf2, BF2, bf3, BF3, bf4, BF4, bf5, BF5, bf6, BF6, bf7, BF7, bf8, BF8, bfn1, BFN1, bn1, BN1, bs0, BS0, bs1, BS1, bs2, BS2, bs3, BS3, bs4, BS4, bs5, BS5, bs6, BS6, bs7, BS7, bs8, BS8, bsn1, BSN1, c0, C0, c1, C1, c2, C2, c3, C3, c4, C4, c5, C5, c6, C6, c7, C7, c8, C8, c9, C9, cf0, CF0, cf1, CF1, cf2, CF2, cf3, CF3, cf4, CF4, cf5, CF5, cf6, CF6, cf7, CF7, cf8, CF8, cf9, CF9, cn1, CN1, cs0, CS0, cs1, CS1, cs2, CS2, cs3, CS3, cs4, CS4, cs5, CS5, cs6, CS6, cs7, CS7, cs8, CS8, cs9, CS9, csn1, CSN1, d0, D0, d1, D1, d2, D2, d3, D3, d4, D4, d5, D5, d6, D6, d7, D7, d8, D8, d9, D9, df0, DF0, df1, DF1, df2, DF2, df3, DF3, df4, DF4, df5, DF5, df6, DF6, df7, DF7, df8, DF8, df9, DF9, dfn1, DFN1, dn1, DN1, ds0, DS0, ds1, DS1, ds2, DS2, ds3, DS3, ds4, DS4, ds5, DS5, ds6, DS6, ds7, DS7, ds8, DS8, ds9, DS9, dsn1, DSN1, e0, E0, e1, E1, e2, E2, e3, E3, e4, E4, e5, E5, e6, E6, e7, E7, e8, E8, e9, E9, ef0, EF0, ef1, EF1, ef2, EF2, ef3, EF3, ef4, EF4, ef5, EF5, ef6, EF6, ef7, EF7, ef8, EF8, ef9, EF9, efn1, EFN1, en1, EN1, es0, ES0, es1, ES1, es2, ES2, es3, ES3, es4, ES4, es5, ES5, es6, ES6, es7, ES7, es8, ES8, es9, ES9, esn1, ESN1, f0, F0, f1, F1, f2, F2, f3, F3, f4, F4, f5, F5, f6, F6, f7, F7, f8, F8, f9, F9, ff0, FF0, ff1, FF1, ff2, FF2, ff3, FF3, ff4, FF4, ff5, FF5, ff6, FF6, ff7, FF7, ff8, FF8, ff9, FF9, ffn1, FFN1, fn1, FN1, fs0, FS0, fs1, FS1, fs2, FS2, fs3, FS3, fs4, FS4, fs5, FS5, fs6, FS6, fs7, FS7, fs8, FS8, fs9, FS9, fsn1, FSN1, g0, G0, g1, G1, g2, G2, g3, G3, g4, G4, g5, G5, g6, G6, g7, G7, g8, G8, g9, G9, gf0, GF0, gf1, GF1, gf2, GF2, gf3, GF3, gf4, GF4, gf5, GF5, gf6, GF6, gf7, GF7, gf8, GF8, gf9, GF9, gfn1, GFN1, gn1, GN1, gs0, GS0, gs1, GS1, gs2, GS2, gs3, GS3, gs4, GS4, gs5, GS5, gs6, GS6, gs7, GS7, gs8, GS8, gsn1, GSN1, REST
FRQ
EQUAL, JUST, MEAN, PYTHAGOREAN
F, FF, FFF, FORTE, FORTISSIMO, MEZZO_FORTE, MEZZO_PIANO, MF, MP, P, PIANISSIMO, PP, PPP, SILENT
PAN_CENTER, PAN_CENTRE, PAN_LEFT, PAN_RIGHT
AAH, ABASS, AC_GUITAR, ACCORDION, ACOUSTIC_BASS, ACOUSTIC_GRAND, ACOUSTIC_GUITAR, AGOGO, AHHS, ALTO, ALTO_SAX, ALTO_SAXOPHONE, APPLAUSE, ATMOSPHERE, BAG_PIPES, BAGPIPE, BAGPIPES, BANDNEON, BANJO, BARI, BARI_SAX, BARITONE, BARITONE_SAX, BARITONE_SAXOPHONE, BASS, BASSOON, BELL, BELLS, BIRD, BOTTLE, BOTTLE_BLOW, BOWED_GLASS, BRASS, BREATH, BREATHNOISE, BRIGHT_ACOUSTIC, BRIGHTNESS, CALLOPE, CELESTA, CELESTE, CELLO, CGUITAR, CHARANG, CHIFFER, CHIFFER_LEAD, CHOIR, CHURCH_ORGAN, CLAR, CLARINET, CLAV, CLAVINET, CLEAN_GUITAR, CONCERTINA, CONTRA_BASS, CONTRABASS, CRYSTAL, CYMBAL, DGUITAR, DIST_GUITAR, DISTORTED_GUITAR, DOUBLE_BASS, DROPS, DRUM, DX_EPIANO, EBASS, ECHO, ECHO_DROP, ECHO_DROPS, ECHOS, EL_BASS, EL_GUITAR, ELECTRIC_BASS, ELECTRIC_GRAND, ELECTRIC_GUITAR, ELECTRIC_ORGAN, ELECTRIC_PIANO, ELPIANO, ENGLISH_HORN, EPIANO, EPIANO2, FANTASIA, FBASS, FIDDLE, FINGERED_BASS, FLUTE, FRENCH_HORN, FRET, FRET_NOISE, FRETLESS, FRETLESS_BASS, FRETNOISE, FRETS, GLOCK, GLOCKENSPIEL, GMSAW_WAVE, GMSQUARE_WAVE, GOBLIN, GT_HARMONICS, GUITAR, GUITAR_HARMONICS, GUNSHOT, HALO, HALO_PAD, HAMMOND_ORGAN, HARMONICA, HARMONICS, HARP, HARPSICHORD, HELICOPTER, HONKYTONK, HONKYTONK_PIANO, HORN, ICE_RAIN, ICERAIN, JAZZ_GUITAR, JAZZ_ORGAN, JGUITAR, KALIMBA, KOTO, MARIMBA, METAL_PAD, MGUITAR, MUSIC_BOX, MUTED_GUITAR, MUTED_TRUMPET, NGUITAR, NYLON_GUITAR, OBOE, OCARINA, OGUITAR, OOH, OOHS, ORCHESTRA_HIT, ORGAN, ORGAN2, ORGAN3, OVERDRIVE_GUITAR, PAD, PAN_FLUTE, PANFLUTE, PBASS, PHONE, PIANO, PIANO_ACCORDION, PIC, PICC, PICCOLO, PICKED_BASS, PIPE_ORGAN, PIPES, PITZ, PIZZ, PIZZICATO_STRINGS, POLY_SYNTH, POLYSYNTH, PSTRINGS, RAIN, RECORDER, REED_ORGAN, REVERSE_CYMBAL, RHODES, SAW, SAWTOOTH, SAX, SAXOPHONE, SBASS, SEA, SEASHORE, SFX, SGUITAR, SHAKUHACHI, SHAMISEN, SHANNAI, SITAR, SLAP, SLAP_BASS, SLAP_BASS_1, SLAP_BASS_2, SLOW_STRINGS, SOLO_VOX, SOP, SOPRANO, SOPRANO_SAX, SOPRANO_SAXOPHONE, SOUNDEFFECTS, SOUNDFX, SOUNDTRACK, SPACE_VOICE, SQUARE, STAR_THEME, STEEL_DRUM, STEEL_DRUMS, STEEL_GUITAR, STEELDRUM, STEELDRUMS, STR, STREAM, STRING_ENSEMBLE_1, STRING_ENSEMBLE_2, STRINGS, SWEEP, SWEEP_PAD, SYN_CALLIOPE, SYNTH_BASS, SYNTH_BASS_1, SYNTH_BASS_2, SYNTH_BRASS, SYNTH_BRASS_1, SYNTH_BRASS_2, SYNTH_CALLIOPE, SYNTH_DRUM, SYNTH_DRUMS, SYNTH_STRINGS, SYNTH_STRINGS_1, SYNTH_STRINGS_2, SYNVOX, TAIKO, TELEPHONE, TENOR, TENOR_SAX, TENOR_SAXOPHONE, THUMB_PIANO, THUNDER, TIMP, TIMPANI, TINKLE_BELL, TOM, TOM_TOM, TOM_TOMS, TOMS, TREMOLO, TREMOLO_STRINGS, TROMBONE, TRUMPET, TUBA, TUBULAR_BELL, TUBULAR_BELLS, VIBES, VIBRAPHONE, VIOLA, VIOLIN, VIOLIN_CELLO, VOICE, VOX, WARM_PAD, WHISTLE, WIND, WOODBLOCK, WOODBLOCKS, XYLOPHONE
ACOUSTIC_BASS_DRUM, ACOUSTIC_SNARE, BASS_DRUM_1, CABASA, CHINESE_CYMBAL, CLAVES, CLOSED_HI_HAT, COWBELL, CRASH_CYMBAL_1, CRASH_CYMBAL_2, ELECTRIC_SNARE, HAND_CLAP, HI_BONGO, HI_MID_TOM, HI_WOOD_BLOCK, HIGH_AGOGO, HIGH_FLOOR_TOM, HIGH_TIMBALE, HIGH_TOM, LONG_GUIRO, LONG_WHISTLE, LOW_AGOGO, LOW_BONGO, LOW_CONGA, LOW_FLOOR_TOM, LOW_MID_TOM, LOW_TIMBALE, LOW_TOM, LOW_WOOD_BLOCK, MARACAS, MUTE_CUICA, MUTE_HI_CONGA, MUTE_TRIANGLE, OPEN_CUICA, OPEN_HI_CONGA, OPEN_HI_HAT, OPEN_TRIANGLE, PEDAL_HI_HAT, RIDE_BELL, RIDE_CYMBAL_1, RIDE_CYMBAL_2, SHORT_GUIRO, SHORT_WHISTLE, SIDE_STICK, SPLASH_CYMBAL, TAMBOURINE, VIBRASLAP
AEOLIAN_SCALE, BLUES_SCALE, CHROMATIC_SCALE, DIATONIC_MINOR_SCALE, DORIAN_SCALE, HARMONIC_MINOR_SCALE, INDIAN_SCALE, LYDIAN_SCALE, MAJOR_SCALE, MELODIC_MINOR_SCALE, MINOR_SCALE, MIXOLYDIAN_SCALE, NATURAL_MINOR_SCALE, PENTATONIC_SCALE, TURKISH_SCALE
COSINE_WAVE, PULSE_WAVE, SABERSAW_WAVE, SAWDOWN_WAVE, SAWTOOTH_WAVE, SINE_WAVE, SQUARE_WAVE, TRIANGLE_WAVE
BROWN_NOISE, FRACTAL_NOISE, SMOOTH_NOISE, STEP_NOISE, WHITE_NOISE
AFTER, BEFORE, CENTER_ALIGN, CENTER_ON_END, CENTER_ON_START, CENTRE_ALIGN, CENTRE_ON_END, CENTRE_ON_START, END_ON_CENTER, END_ON_CENTRE, END_TOGETHER, START_ON_CENTER, START_ON_CENTRE, START_TOGETHER
Modifier and Type | Method and Description |
---|---|
static void |
accent(Phrase phrase,
double meter)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by emphasising the
first beat of each bar/measure.
|
static void |
accent(Phrase phrase,
double meter,
double[] accentedBeats)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by accenting specified beats
within each bar/measure.
|
static void |
accent(Phrase phrase,
double meter,
double[] accentedBeats,
int accentAmount)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter.
|
static void |
accents(CPhrase cphrase,
double meter)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by emphasising the
first beat of each bar/measure.
|
static void |
accents(CPhrase cphrase,
double meter,
double[] accentedBeats)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by accenting specified beats
within each bar/measure.
|
static void |
accents(CPhrase cphrase,
double meter,
double[] accentedBeats,
int accentAmount)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter.
|
static void |
accents(Part part,
double meter)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by emphasising the
first beat of each bar/measure.
|
static void |
accents(Part part,
double meter,
double[] accentedBeats)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by accenting specified beats
within each bar/measure.
|
static void |
accents(Part part,
double meter,
double[] accentedBeats,
int accentAmount)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter.
|
static void |
accents(Phrase phrase,
double meter)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by emphasising the
first beat of each bar/measure.
|
static void |
accents(Phrase phrase,
double meter,
double[] accentedBeats)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by accenting specified beats
within each bar/measure.
|
static void |
accents(Phrase phrase,
double meter,
double[] accentedBeats,
int accentAmount)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter.
|
static void |
accents(Score score,
double meter)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by emphasising the
first beat of each bar/measure.
|
static void |
accents(Score score,
double meter,
double[] accentedBeats)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter by accenting specified beats
within each bar/measure.
|
static void |
accents(Score score,
double meter,
double[] accentedBeats,
int accentAmount)
Increase the dynamic of notes at regularly occuring pulse locations
which generates the sound of regular meter.
|
static void |
addToDuration(CPhrase cphrase,
double amount)
Vary the duration of each note in the cphrase by the specified amount.
|
static void |
addToDuration(Part part,
double amount)
Vary the duration of each note in the part by the specified amount.
|
static void |
addToDuration(Phrase phrase,
double amount)
Vary the duration of each note in the phrase by the specified amount.
|
static void |
addToDuration(Score score,
double amount)
Vary the duration of each note in the score by the specified amount.
|
static void |
addToLength(CPhrase cphrase,
double amount)
Vary both the rhythm value and duration of each note in the phrase by the specified amount.
|
static void |
addToLength(Part part,
double amount)
Vary both the rhythm value and duration of each note in the part by the specified amount.
|
static void |
addToLength(Phrase phrase,
double amount)
Vary both the rhythm value and duration of each note in the phrase by the specified amount.
|
static void |
addToLength(Score score,
double amount)
Vary both the rhythm value and duration of each note in the Score by the specified amount.
|
static void |
addToRhythmValue(CPhrase cphrase,
double amount)
Vary the rhythm value of each note in the cphrase by the specified amount.
|
static void |
addToRhythmValue(Part part,
double amount)
Vary the rhythm value of each note in the part by the specified amount.
|
static void |
addToRhythmValue(Phrase phrase,
double amount)
Vary the rhythm value of each note in the phrase by the specified amount.
|
static void |
addToRhythmValue(Score score,
double amount)
Vary the rhythm value of each note in the Score by the specified amount.
|
static void |
append(CPhrase cphrase1,
CPhrase cphrase2)
Adds a second CPhrase to the end of the first.
|
static void |
append(Note note1,
Note note2)
Appends the duration and rhythm value of the second note onto the first.
|
static void |
append(Part part1,
Part part2)
Adds a second part to the end of this one.
|
static void |
append(Part part1,
Part part2,
double fromLoc)
Adds a second part to this one starting from a specified location
|
static void |
append(Phrase phrase1,
Phrase phrase2)
Adds phrase2 to the end of phrase1.
|
static void |
append(Score score1,
Score score2)
Adds a second score to the end of this one.
|
static void |
bounce(CPhrase cphrase)
Adjusts all Notes' pan value to alternate between extreme left and right from note to note.
|
static void |
bounce(Part part)
Adjusts all Notes' pan value to alternate between extreme left and right from note to note.
|
static void |
bounce(Phrase phrase)
Adjusts all Note pan values to alternate between extreme left and right from note to note.
|
static void |
bounce(Score score)
Adjusts all Notes' pan value to alternate between extreme left and right from note to note.
|
static void |
changeLength(Phrase phrase,
double newLength)
Alters the phrase so that it's notes are stretched or compressed until
the phrase is the length specified.
|
static void |
compress(CPhrase cphrase,
double ratio)
A compressor/expander routine.
|
static void |
compress(Part part,
double ratio)
A compressor/expander routine.
|
static void |
compress(Phrase phrase,
double ratio)
A compressor/expander routine.
|
static void |
compress(Score score,
double ratio)
A compressor/expander routine.
|
static void |
consolidate(Part p)
packs all of the phrases within this part into a single phrase
|
static void |
consolidate(Score score)
Pack all phrases from parts with the same channel into one part.
|
static void |
crescendo(Phrase phrase,
double startTime,
double endTime,
int startDynamic,
int endDynamic) |
static void |
cycle(Part part,
double to)
A version of Cycle that works for parts
|
static void |
cycle(Phrase phrase,
double numBeats)
Extends the
phrase by repeating it until it is as long as
the specified length. |
static void |
cycle(Phrase phrase,
int numNotes)
Extends the
phrase by repeating it until it contains the
number of notes as specified by numNotes . |
static void |
decrescendo(Phrase phrase,
double startTime,
double endTime,
int startDynamic,
int endDynamic) |
static void |
diatonicInvert(Phrase phrase,
int[] scale,
int root) |
static void |
diminuendo(Phrase phrase,
double startTime,
double endTime,
int startDynamic,
int endDynamic) |
static void |
elongate(CPhrase cphrase,
double scaleFactor)
Lengthen each note in the CPhrase.
|
static void |
elongate(Part part,
double scaleFactor)
Stretch the time of each note in each phrase by the
scaleFactor |
static void |
elongate(Phrase phrase,
double scaleFactor)
Stretch the time of each note in the phrase by
scaleFactor |
static void |
elongate(Score score,
double scaleFactor)
Stretch the time of each note in each phrase by the
scaleFactor |
static void |
expandIntervals(CPhrase cphrase,
double amount)
Vary the interval between notes scaling by the specified amount to each interval.
|
static void |
expandIntervals(Part part,
double amount)
Vary the interval between notes scaling by the specified amount to each interval.
|
static void |
expandIntervals(Phrase phrase,
double amount)
Vary the interval between notes scaling by the specified amount to each interval.
|
static void |
expandIntervals(Score score,
double amount)
Vary the interval between notes scaling by the specified amount to each interval.
|
static void |
fadeIn(CPhrase cphrase,
double fadeLength)
Linearly fades in the CPhrase
|
static void |
fadeIn(CPhrase cphrase,
double fadeLength,
double cphraseStartTime)
Linearly fades in the CPhrase.
|
static void |
fadeIn(Part part,
double fadeLength)
Linearly fades in the Part.
|
static void |
fadeIn(Part part,
double fadeLength,
double partStartTime)
Linearly fades in the Part.
|
static void |
fadeIn(Phrase phrase,
double fadeLength)
Linearly fades in the
phrase . |
static void |
fadeIn(Phrase phrase,
double fadeLength,
double phraseStartTime)
Linearly fades in the
phrase , with the fade beginning before
the phrase . |
static void |
fadeIn(Score score,
double fadeLength)
Linearly fades in the Score.
|
static void |
fadeOut(CPhrase cphrase,
double fadeLength)
Linearly fades out the CPhrase.
|
static void |
fadeOut(CPhrase cphrase,
double fadeLength,
double cphraseEndTime)
Linearly fades out the CPhrase.
|
static void |
fadeOut(Part part,
double fadeLength)
Linearly fades out the Part.
|
static void |
fadeOut(Part part,
double fadeLength,
double partEndTime)
Linearly fades out the Part.
|
static void |
fadeOut(Phrase phrase,
double fadeLength)
Linearly fades out the
phrase . |
static void |
fadeOut(Phrase phrase,
double fadeLength,
double phraseEndTime)
Linearly fades out the
phrase , with the fade ending after
the phrase ends. |
static void |
fadeOut(Score score,
double fadeLength)
Linearly fades out the Score.
|
static void |
fillRests(CPhrase cphrase)
Lengthens notes followed by a rest in the
CPhrase
by creating one longer note and deleting the rest. |
static void |
fillRests(Part part)
Lengthens notes followed by a rest in the
part
by creating one longer note and deleting the rest. |
static void |
fillRests(Phrase phrase)
Lengthens notes followed by a rest in the
phrase
by creating one longer note and deleting the rest. |
static void |
fillRests(Score score)
Lengthens notes followed by a rest in the
score
by creating one longer note and deleting the rest. |
static void |
increaseDuration(CPhrase cphrase,
double multiplyer)
Vary the duration of each note in the phrase by the multiplyer.
|
static void |
increaseDuration(Part part,
double multiplyer)
Vary the duration of each note in the part by the multiplyer.
|
static void |
increaseDuration(Phrase phrase,
double multiplyer)
Vary the duration of each note in the phrase by the multiplyer.
|
static void |
increaseDuration(Score score,
double multiplyer)
Vary the duration of each note in the score by the multiplyer.
|
static void |
increaseDynamic(Part p,
int amount)
Increases the dynamic by a certain amount -
obviously a negative number will decrease it. |
static void |
increaseDynamic(Phrase phr,
int amount)
increases the dynamic by a certain amount -
obviously a negative number will decrease it |
static void |
increaseDynamic(Score s,
int amount)
increases the dynamic by a certain amount -
obviously a negative number will decrease it |
static void |
inversion(Phrase phrase)
Mirror the pitch of notes in the phrase around the first note's pitch.
|
static void |
invert(Phrase phrase) |
static void |
merge(CPhrase cphrase1,
CPhrase cphrase2)
Combines the phrases from a second CPhrase into the first.
|
static void |
merge(Part part1,
Part part2)
Combines the phrases from a second part into this one.
|
static void |
merge(Score score1,
Score score2)
Combines the parts from a second score into the first one.
|
static void |
mutate(Phrase phrase)
Mutates the
phrase by changing one pitch and one rhythm
value. |
static void |
mutate(Phrase phrase,
int pitchCount,
int[] scale)
Mutates the
phrase by changing pitches and rhythm
values. |
static void |
mutate(Phrase phrase,
int pitchCount,
int rhythmCount,
int[] pitches,
int lowestPitch,
int highestPitch,
double[] rhythms)
Mutates the
phrase by changing pitches and rhythm
values. |
static void |
normalise(CPhrase cphrase)
Increases dynamic values so that the loudest is at maxiumim level.
|
static void |
normalise(Part part)
Increases dynamic values so that the loudest is at maxiumim level.
|
static void |
normalise(Phrase phrase)
Increases dynamic values so that the loudest is at maxiumim level.
|
static void |
normalise(Score score)
Increases dynamic values so that the loudest is at maxiumim level.
|
static void |
palindrome(Phrase phrase)
Extend the phrase by adding all notes backwards, repeating the last note
of the phrase.
|
static void |
palindrome(Phrase phrase,
boolean repeatLastNote)
Extend the phrase by adding all notes backwards.
|
static void |
quantise(CPhrase cphrase,
double qValue)
Quantise the cphrase.
|
static void |
quantise(Part part,
double qValue)
Quantise the
part . |
static void |
quantise(Phrase phrase,
double qValue)
Quantises the rhythm values of notes in the
phrase . |
static void |
quantise(Score score,
double qValue)
Quantise all the rhythm values of notes in this score.
|
static void |
quantize(CPhrase cphrase,
double qValue)
Quantize the cphrase.
|
static void |
quantize(CPhrase cphrase,
double qValue,
int[] mode,
int key)
Quantise all the phrases in this CPhrase.
|
static void |
quantize(Part part,
double qValue)
Quantize the
part . |
static void |
quantize(Part part,
double qValue,
int[] mode,
int key)
Quantize all the phrases in this part, both rhythmic and pitch elements.
|
static void |
quantize(Phrase phrase,
double qValue)
Quantizes the
phrase . |
static void |
quantize(Phrase phrase,
double qValue,
int[] mode,
int key)
Aligns all rhythmValues of notes in a phrase to the closest beat subdivision
and all note pitches to be members of the specified mode.
|
static void |
quantize(Score score,
double qValue)
Quantize rhythm values of all the parts in this score.
|
static void |
quantize(Score score,
double qValue,
int[] mode,
int key)
Quantize all the rhythm values and pitches in this score.
|
static void |
quantizePitch(Note note,
int[] mode,
int key)
Shift the pitch down until it corresponds to a pitch in the specified mode.
|
static void |
randomize(CPhrase cphrase,
int pitchVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(CPhrase cphrase,
int pitchVariation,
double rhythmVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(CPhrase cphrase,
int pitchVariation,
double rhythmVariation,
int dynamicVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Part part,
int pitchVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Part part,
int pitchVariation,
double rhythmVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Part part,
int pitchVariation,
double rhythmVariation,
int dynamicVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Phrase phrase,
int pitchVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Phrase phrase,
int pitchVariation,
double rhythmVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Phrase phrase,
int pitchVariation,
double rhythmVariation,
int dynamicVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Score score,
int pitchVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Score score,
int pitchVariation,
double rhythmVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
randomize(Score score,
int pitchVariation,
double rhythmVariation,
int dynamicVariation)
Adjusts Note values to any value plus or minus a specified amount.
|
static void |
repeat(CPhrase cphrase)
Makes the CPhrase twice as long by repeating it once.
|
static void |
repeat(CPhrase cphrase,
double startLoc,
double endLoc)
Loops a section of a the CPhrase once
|
static void |
repeat(CPhrase cphrase,
int times)
Makes the CPhrase n times as long by repeating.
|
static void |
repeat(CPhrase cphrase,
int times,
double startLoc,
double endLoc)
Loops a section of the CPhrase n times.
|
static void |
repeat(Part part)
Makes the Part twice as long by repeating it once.
|
static void |
repeat(Part part,
double startLoc,
double endLoc)
Loops a section of a the Part once
|
static void |
repeat(Part part,
int times)
Makes the Part n times as long by repeating.
|
static void |
repeat(Part part,
int times,
double startLoc,
double endLoc)
Loops a section of the Part n times.
|
static void |
repeat(Phrase phrase)
Appends a copy of the
phrase to the end of itself. |
static void |
repeat(Phrase phrase,
double startLoc,
double endLoc)
Places a duplicate of a section of a phrase immediately after the end
of the section.
|
static void |
repeat(Phrase phrase,
int n)
Makes the
phrase n times as long by repeating. |
static void |
repeat(Phrase phrase,
int times,
double startLoc,
double endLoc)
Loops a section of
phrase n times. |
static void |
repeat(Score score)
Makes a the
score twice times as long by repeating |
static void |
repeat(Score score,
int times)
Loops the
score n times. |
static void |
retrograde(Phrase phrase)
Reverse the order of notes in the phrase.
|
static void |
rotate(Phrase phrase)
Move the notes around the phrase, first becoming second, second becoming
third, and so forth with last becoming first.
|
static void |
rotate(Phrase phrase,
int numSteps)
Move the notes around a number of steps as specified by
numSteps
which each step involving the first note becoming the second,
second the third, and so forth with the last becoming first. |
static void |
shake(CPhrase cphrase,
int amount)
Randomise the dynamic values of notes up to a specified amount either side of the current value.
|
static void |
shake(Part part,
int amount)
Randomise the dynamic values of notes up to a specified amount either side of the current value.
|
static void |
shake(Phrase phrase)
Randomly adjusts Note dynamic values to create uneven loudness.
|
static void |
shake(Phrase phrase,
int amount)
Randomly adjusts all Notes' dynamic value to create uneven loudness.
|
static void |
shake(Score score,
int amount)
Randomise the dynamic values of notes up to a specified amount either side of the current value.
|
static void |
shuffle(CPhrase cphrase)
Randomly order notes within each phrase.
|
static void |
shuffle(Part part)
Randomly order notes within each phrase.
|
static void |
shuffle(Phrase phrase)
Randomise the order of notes in the phrase without repeating any note.
|
static void |
shuffle(Score score)
Randomly order notes within each phrase.
|
static void |
slurDown(CPhrase cphrase,
int numberOfNotes)
All descending sequences of the number of notes or more are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurDown(Part part,
int numberOfNotes)
All descending sequences of the number of notes or more are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurDown(Phrase phrase)
All descending sequences of notes are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurDown(Phrase phrase,
int numberOfNotes)
All descending sequences of the number of notes or more are slured by
having the duration of all but the last note extended to
100% of the rhythm value.
|
static void |
slurDown(Score score,
int numberOfNotes)
All descending sequences of the number of notes or more are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurUp(CPhrase cphrase,
int numberOfNotes)
All ascending sequences of the number of notes or more are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurUp(Part part,
int numberOfNotes)
All ascending sequences of the number of notes or more are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurUp(Phrase phrase)
All ascending sequences of notes are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurUp(Phrase phrase,
int numberOfNotes)
All ascending sequences of the number of notes or more are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
slurUp(Score score,
int numberOfNotes)
All ascending sequences of the number of notes or more are slured by
having thier duration extended to 100% of the rhythm value.
|
static void |
spread(CPhrase cphrase)
Randomly adjusts all Notes' pan value to create an even spread acroos the stereo spectrum.
|
static void |
spread(Part part)
Randomly adjusts all Notes' pan value to create an even spread acroos the stereo spectrum.
|
static void |
spread(Phrase phrase)
Randomly adjusts all Notes' pan value to create an even spread acroos the stereo spectrum.
|
static void |
spread(Score score)
Randomly adjusts all Notes' pan value to create an even spread acroos the stereo spectrum.
|
static void |
tiePitches(CPhrase cphrase)
Joins consecutive notes in each
CPhrase that
have the same pitch, creating one longer note. |
static void |
tiePitches(Part part)
Joins consecutive notes in each
phrase that
have the same pitch, creating one longer note. |
static void |
tiePitches(Phrase phrase)
Joins consecutive notes in the
phrase that
have the same pitch, creating one longer note. |
static void |
tiePitches(Score score)
Joins consecutive notes in each
phrase that
have the same pitch, creating one longer note. |
static void |
tieRests(CPhrase cphrase)
Joins consecutive rests in each
CPhrase
creating one longer note. |
static void |
tieRests(Part part)
Joins consecutive rests in each
part
creating one longer note. |
static void |
tieRests(Phrase phrase)
Joins consecutive rests in the
phrase
creating one longer note. |
static void |
tieRests(Score score)
Joins consecutive rests in each
phrase
creating one longer note. |
static void |
transpose(CPhrase cphrase,
int trans)
Transposes the
cphrase . |
static void |
transpose(CPhrase cphrase,
int transposition,
int[] mode,
int key)
Transpose the CPhrase up or down in scale degrees.
|
static void |
transpose(Note note,
int transposition)
Transpose the note up or down in semitones.
|
static void |
transpose(Note note,
int transposition,
int[] mode,
int key)
Transpose the phrase up or down in scale degrees.
|
static void |
transpose(Part part,
int transposition)
Transpose the part up or down in semitone steps.
|
static void |
transpose(Part part,
int degrees,
int[] mode,
int key)
Transpose the Part up or down in scale degrees.
|
static void |
transpose(Phrase phrase,
int transposition)
Transpose the phrase up or down in semitones.
|
static void |
transpose(Phrase phrase,
int transposition,
int[] mode,
int key)
Transpose the phrase up or down in scale degrees.
|
static void |
transpose(Score scr,
int transposition)
Transpose a Score
|
static void |
transpose(Score score,
int degrees,
int[] mode,
int key)
Transpose the score up or down in scale degrees.
|
static void |
varyLength(CPhrase cphrase,
double minLength,
double maxLength)
Adjusts all Notes' duration values to vary randomly between specified values from note to note.
|
static void |
varyLength(Part part,
double minLength,
double maxLength)
Adjusts all Notes' duration values to vary randomly between specified values from note to note.
|
static void |
varyLength(Phrase phrase,
double minLength,
double maxLength)
Adjusts all Note duration values to vary randomly between specified values from note to note.
|
static void |
varyLength(Score score,
double minLength,
double maxLength)
Adjusts all Notes' duration values to vary randomly between specified values from note to note.
|
public static void append(Note note1, Note note2)
The second note remains unchanged. If either note1
or
note2
is null then this method does nothing.
note1
- Note that absorbs the rhythm featuresnote2
- Note that passes on its rhythm featurespublic static void transpose(Note note, int transposition)
If note
is null then this method does nothing. If the
transposition shifts a pitch above MAX_PITCH
or
below MIN_PITCH
, the pitch will probably cap at
those values. See the description of Note.setPitch(int)
method for
exact details of what occurs when trying to set the pitch beyond the
allowed range.
note
- The Note to be transposedtransposition
- the amount to transpose in semitonespublic static void transpose(Note note, int transposition, int[] mode, int key)
If note
is null then this method does nothing. If the
transposition shifts a pitch above MAX_PITCH
or
below MIN_PITCH
, the pitch will probably cap at
those values. See the description of Note.setPitch(int)
method for
exact details of what occurs when trying to set the pitch beyond the
allowed range.
Transposition is in diatonic steps. For example in C major the note C
transposed 1 will become D, transposed 4 will become G, and transposed
by 7 will beome C an octave above. This can be somewhat unintuitive
so be careful.
note
- Note to be transposedtransposition
- the amount to transpose in semitonesmode
- the scale to use for the transposition
(the JMC has some scale constants)key
- the chromatic note to be used as the root
of the mode. i.e., 0 = C, 1 = C# etc.public static void quantizePitch(Note note, int[] mode, int key)
note
- Note to be qantizedmode
- the scale to use for the process
(the JMC has some scale constants)key
- the chromatic note to be used as the root
of the mode. i.e., 0 = C, 1 = C# etc.public static final void crescendo(Phrase phrase, double startTime, double endTime, int startDynamic, int endDynamic)
public static final void diminuendo(Phrase phrase, double startTime, double endTime, int startDynamic, int endDynamic)
public static final void decrescendo(Phrase phrase, double startTime, double endTime, int startDynamic, int endDynamic)
public static void transpose(Phrase phrase, int transposition)
If phrase
is null then this method does nothing. If the
transposition shifts a pitch above MAX_PITCH
or
below MIN_PITCH
, the pitch will probably cap at
those values. See the description of Note.setPitch(int)
method for
exact details of what occurs when trying to set the pitch beyond the
allowed range.
phrase
- Phrase to be transposedtransposition
- the amount to transpose in semitonespublic static void transpose(Phrase phrase, int transposition, int[] mode, int key)
If phrase
is null then this method does nothing. If the
transposition shifts a pitch above MAX_PITCH
or
below MIN_PITCH
, the pitch will probably cap at
those values. See the description of Note.setPitch(int)
method for
exact details of what occurs when trying to set the pitch beyond the
allowed range.
Transposition is in diatonic steps. For example in C major the note C
transposed 1 will become D, transposed 4 will become G, and transposed
by 7 will beome C an octave above. This can be somewhat unintuitive
so be careful.
phrase
- Phrase to be transposedtransposition
- the amount to transpose in semitonesmode
- the scale to use for the transpositionkey
- the chromatic note to be used as the
rooth of the mode. i.e., 0 = C, 1 = C# etc.public static void repeat(Phrase phrase)
phrase
to the end of itself.
If phrase
is null then this method does nothing.
phrase
- Phrase to be repeatedpublic static void repeat(Phrase phrase, int n)
phrase
n
times as long by repeating.
If phrase
is null or n
is less than on
then this method does nothing.
phrase
- Phrase to be repeatedn
- integer representing the number of repeats, 1 will leave
the phrase unchanged, 2 a single added repetitions, and
so forthpublic static void repeat(Phrase phrase, double startLoc, double endLoc)
If phrase
is null; or startLoc
is greater
than or equal to endLoc
then this method does nothing.
phrase
- Phrase with section to be repeatedstartLoc
- double describing the time of the beginning of the
repeated section, in crotchets.endLoc
- double describing the time of the end of the repeated
section, in crotchets.public static void repeat(Phrase phrase, int times, double startLoc, double endLoc)
phrase
n
times.
If phrase
is null; startLoc
is greater than
or equal to endLoc
; or n
is less than one then
this method does nothing.
phrase
- Phrase with section to be repeatedtimes
- integer representing the number of repeatsstartLoc
- double describing the time of the beginning of the
repeated section, in crotchets.endLoc
- double describing the time of the end of the repeated
section, in crotchets.public static void increaseDynamic(Phrase phr, int amount)
Phrase
- the phase that is to be affectedint
- the amount that it is to be affected bypublic static void fadeIn(Phrase phrase, double fadeLength)
phrase
.
If phrase
is null; or if fadeLength
is less
than or equal to zero then this method does nothing.
phrase
- Phrase to be fadedfadelength
- double describing the number of beats (crotchets) to fade
overpublic static void fadeIn(Phrase phrase, double fadeLength, double phraseStartTime)
phrase
, with the fade beginning before
the phrase
.
This is mainly used by when fading multiple Phrases of a Part.
If phrase
is null; fadeLength
is less than
or equal to zero; phraseStart
is less than zero; or
fadeLength
is less than or equal to phraseStart
then
this method does nothing.
phrase
- Phrase to be fadedfadeLength
- double describing the duration of the fade, in
crotchetsphraseStartTime
- double describing how far into the fade the
phrase startspublic static void fadeOut(Phrase phrase, double fadeLength)
phrase
.
If phrase
is null; or if fadeLength
is less
than or equal to zero then this method does nothing.
phrase
- Phrase to be fadedfadeLength
- double describing the duration of the fade out in
crotchetspublic static void fadeOut(Phrase phrase, double fadeLength, double phraseEndTime)
phrase
, with the fade ending after
the phrase ends.
This method is mainly used by a Part when fading multiple Phrases.
If phrase
is null; fadeLength
is less than
or equal to zero; phraseEndTime
is less than zero; or
fadeLength
is less than phraseEndTime
then this
method does nothing.
phrase
- Phrase to be fadedfadeLength
- double describing the duration of the fade out in
crotchetsphraseEndTime
- double describing the length of time, in crotchets,
between the end of the phrase and the end of the
fade.public static void compress(Phrase phrase, double ratio)
This compression applies only to the volume, technically the dynamic,
of the notes. It will multiply the difference between each of the notes'
dynmaics and the average dynamic, by the compression factor. Thus, a
ratio
of zero will change every note's volume to the average
volume; one will leave every note unchanged; and two will make every
note's volume twice as far from the mean;
Negative values will have a similar affect but leave the dynamic of each note on the other side of the mean.
Note also that if the dynamic is expanded to a value greater than
MAX_DYNAMIC
or less than MIN_DYNAMIC
then the dynamic will be set to a value as described in the
Note.setDynamic(int)
method.
Finally, if phrase
is null then this method will do
nothing.
phrase
- Phrase to be expanded/compressedratio
- double describing the compression factor.public static void append(Phrase phrase1, Phrase phrase2)
If either phrase1
or phrase2
is null then
this method does nothing.
phrase1
- the base Phrasephrase2
- the Phrase to be appendedpublic static void quantize(Phrase phrase, double qValue)
phrase
. See quantise(Phrase, double)
for more details.phrase
- Phrase to be quantizedqValue
- the rhythm value to quantize to, in crotchetspublic static void quantise(Phrase phrase, double qValue)
phrase
. See quantise(Phrase, double)
for more details.phrase
- Phrase to be quantizedqValue
- the rhythm value to quantize to, in crotchetspublic static void quantize(Phrase phrase, double qValue, int[] mode, int key)
This is a basic quantisation that doesn't take into account a note's
offset, duration or position within a phrase. Each note is quantised by
changing it's rhythm value to a integer multiple of qValue
.
As an example of how this might cause unwanted side-effects consider
quantising the three notes in a quaver triple, to the qValue
of 0.25. Each note's rhythm value is slightly less than a quaver, so is
quantised to exactly a quaver. Together the three notes now extend over
a dotted crotchet, whereas previously they occupied only a crotchet. If
this triple was in a larger phrase all notes beyond the triplet would
begin a quaver later. In common time this would have the effect of
syncopating the rhythm.
If phrase
is null or qValue
is less than
or equal to zero then this method does nothing.
phrase
- Phrase to be quantised.qValue
- the beat subdivision value to quantise to, in crotchetsmode
- the scale to use for the transposition
(the JMC has some scale constants)key
- the chromatic note to be used as the root
of the mode. i.e., 0 = C, 1 = C# etc.public static void cycle(Phrase phrase, int numNotes)
phrase
by repeating it until it contains the
number of notes as specified by numNotes
.
The repetitions work in the same manner as repeat(jm.music.data.Phrase)
, except
that the final repetition will not be a complete copy of the original
phrase if the note count is reached before the repetition is
completed.
If phrase
is null or if numNotes
is less
than or equal to the number of notes in the phrase then this method does
nothing.
phrase
- Phrase to be cyclednumbNotes
- the number of notes in the final phrasepublic static void cycle(Phrase phrase, double numBeats)
phrase
by repeating it until it is as long as
the specified length.
The repetitions work in the same manner as repeat(jm.music.data.Phrase)
, except
that the final repetition will not be a complete copy of the original
phrase if the rhythm value count is reached before the repetition is
completed.
This method does not truncate the last note to make the final phrase
exactly equal to numBeats
. It guarantee that the final
phrase is at least numBeats
but may be greater depending on
the rhythm value of the last note added.
If phrase
is null or if numNotes
is less
than or equal to the number of notes in the phrase then this method does
nothing.
phrase
- Phrase to be cyclednumBeats
- double describing the minimum length of the final
phrase, in crotchetspublic static void shuffle(Phrase phrase)
If phrase
is null then this method does nothing.
phrase
- Phrase to be shuffledpublic static void palindrome(Phrase phrase)
If phrase
is null this method does nothing.
phrase
- Phrase to be extended with its mirrorpublic static void palindrome(Phrase phrase, boolean repeatLastNote)
If phrase
is null this method does nothing.
phrase
- Phras to be extended with its mirrorrepeatLastNote
- boolean specifying whether the last note is to
be repeatedpublic static void rotate(Phrase phrase)
If phrase
is null this method does nothing.
phrase
- Phrase whose notes are to be rotatedpublic static void rotate(Phrase phrase, int numSteps)
numSteps
which each step involving the first note becoming the second,
second the third, and so forth with the last becoming first.
If phrase
is null this method does nothing.
phrase
- Phrase whose notes are to be rotatedint
- number of stepspublic static void retrograde(Phrase phrase)
If phrase
is null then this method does nothing.
phrase
- Phrase to be mirroredpublic static void inversion(Phrase phrase)
For exact details of what happens when pitches are shifted below
MIN_PITCH
or above MAX_PITCH
see the description for Note.setPitch(int)
If phrase
is null then this method does nothing.
phrase
- Phrase to be invertedpublic static void invert(Phrase phrase)
public static void diatonicInvert(Phrase phrase, int[] scale, int root)
public static void changeLength(Phrase phrase, double newLength)
If phrase
is null or newLength
is less
than or equal to zero then this method does nothing.
phrase
- Phrase to be lengthenednewLength
- double describing the number of beats to change the
phrase to.public static void elongate(Phrase phrase, double scaleFactor)
scaleFactor
If phrase
is null or scaleFactor
is less
than or equal to zero then this method does nothing.
phrase
- Phrase to be lengthenedscaleFactor
- double describing the scale factorpublic static void accents(Phrase phrase, double meter)
The dynamic of each note starting on the beat will be increased by
20. If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
If phrase
is null or meter
is less than or
equal to zero then this method does nothing.
phrase
- Phrase whose beats are to accentedmeter
- double describing the number of croctets per
bar/measurepublic static void accent(Phrase phrase, double meter)
The dynamic of each note starting on the beat will be increased by
20. If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
If phrase
is null or meter
is less than or
equal to zero then this method does nothing.
phrase
- Phrase whose beats are to accentedmeter
- double describing the number of croctets per
bar/measurepublic static void accents(Phrase phrase, double meter, double[] accentedBeats)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Each accented note's dynamic will be increased by 20.
If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If phrase
is null or meter
is less than or
equal to zero then this method does nothing.
phrase
- Phrase to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.public static void accent(Phrase phrase, double meter, double[] accentedBeats)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Each accented note's dynamic will be increased by 20.
If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If phrase
is null or meter
is less than or
equal to zero then this method does nothing.
phrase
- Phrase to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.public static void accents(Phrase phrase, double meter, double[] accentedBeats, int accentAmount)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Accented beats will have their dynamic increased by
accentAmount
. If this causes the dynamic to be above MAX_DYNAMIC
or below MIN_DYNAMIC
(when accentAmount
) then the dynamic will be
set to a value as described by Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If phrase
is null or meter
is less than or
equal to zero then this method does nothing.
phrase
- Phrase to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.accentAmount
- integer describing the value that the dynamic of
accented beats are increased by.public static void accent(Phrase phrase, double meter, double[] accentedBeats, int accentAmount)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Accented beats will have their dynamic increased by
accentAmount
. If this causes the dynamic to be above MAX_DYNAMIC
or below MIN_DYNAMIC
(when accentAmount
) then the dynamic will be
set to a value as described by Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If phrase
is null or meter
is less than or
equal to zero then this method does nothing.
phrase
- Phrase to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.accentAmount
- integer describing the value that the dynamic of
accented beats are increased by.public static void normalise(Phrase phrase)
If phrase
is null then
this method does nothing.
phrase
- the Phrase to be effectedpublic static void shake(Phrase phrase)
If phrase
is null then
this method does nothing.
phrase
- the Phrase to be effectedpublic static void shake(Phrase phrase, int amount)
If phrase
is null then
this method does nothing.
phrase
- The Phrase to be effectedint
- The amount of effect - e.g., 5 will be +-5 from the current amountpublic static void mutate(Phrase phrase)
phrase
by changing one pitch and one rhythm
value.Phrase
- Phrase to be mutatedpublic static void mutate(Phrase phrase, int pitchCount, int[] scale)
phrase
by changing pitches and rhythm
values.
The number of pitches and rhythm values to change can be set, and
the pitches and rhythmValues to select from can be specified. The notes
within the phrase to change are selected at random. The scale values
need to be within 0-11 and will typically use the JMC scale constants.Phrase
- Phrase to be mutatedint
- pitchCount The number of notes to have pitch altereddouble
- rhythmCount The number of notes to have thier rhythm alteredint[]
- pitches The scale values from which to select for relacementsint
- lowestPitch The smallest value a relacement pitch can beint
- highestPitch The largest value a replacement pitch can bedouble[]
- rhythms The rhyythm values from which to select replacementspublic static void mutate(Phrase phrase, int pitchCount, int rhythmCount, int[] pitches, int lowestPitch, int highestPitch, double[] rhythms)
phrase
by changing pitches and rhythm
values.
The number of pitches and rhythm values to change can be set, and
the pitches and rhythmValues to select from can be specified. The notes
within the phrase to change are selected at random. The scale values
need to be within 0-11 and will typically use the JMC scale constants.Phrase
- Phrase to be mutatedint
- pitchCount The number of notes to have pitch altereddouble
- rhythmCount The number of notes to have thier rhythm alteredint[]
- pitches The scale values from which to select for relacementsint
- lowestPitch The smallest value a relacement pitch can beint
- highestPitch The largest value a replacement pitch can bedouble[]
- rhythms The rhyythm values from which to select replacementspublic static void tiePitches(Phrase phrase)
phrase
that
have the same pitch, creating one longer note.
This is simmilar to the musical function of a tie.
All note in the phrase meeting the conditions
are effected.
This modification may reduce the overall note count.Phrase
- Phrase to be processedpublic static void tieRests(Phrase phrase)
phrase
creating one longer note.
This is simmilar to the musical function of a tie.
This modification may reduce the overall rest count.Phrase
- Phrase to be processedpublic static void fillRests(Phrase phrase)
phrase
by creating one longer note and deleting the rest.
This modification may reduce the overall note count in the phrase,
be careful that use of this method does not to cause
array out of bounds exceptions.Phrase
- Phrase to be processedpublic static void spread(Phrase phrase)
If phrase
is null then
this method does nothing.
phrase
- the Phrase to be effectedpublic static void bounce(Phrase phrase)
If phrase
is null then
this method does nothing.
phrase
- The Phrase to be effectedpublic static void varyLength(Phrase phrase, double minLength, double maxLength)
If phrase
is null then this method does nothing.
phrase
- The Phrase to be effectedminlength
- The shortest possible durationmaxlength
- The longest possible durationpublic static void randomize(Phrase phrase, int pitchVariation)
If phrase
is null then this method does nothing.
phrase
- The Phrase to be effectedpitchVariation
- The degree of pitch change to apply.public static void randomize(Phrase phrase, int pitchVariation, double rhythmVariation)
If phrase
is null then this method does nothing.
phrase
- The Phrase to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.public static void randomize(Phrase phrase, int pitchVariation, double rhythmVariation, int dynamicVariation)
If phrase
is null then this method does nothing.
phrase
- The Phrase to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.dynamicVariation
- The degree of dynamic change to apply.public static void slurUp(Phrase phrase)
Phrase
- The phrase to be modified.public static void slurDown(Phrase phrase)
Phrase
- The phrase to be modified.public static void slurUp(Phrase phrase, int numberOfNotes)
Phrase
- The phrase to be modified.int
- The number of notes in a row to consitute a sequencepublic static void slurDown(Phrase phrase, int numberOfNotes)
Phrase
- The phrase to be modified.int
- The number of notes in a row to consitute a sequencepublic static void increaseDuration(Phrase phrase, double multiplyer)
Phrase
- The phrase to be modified.double
- The amount to multiply the duration by.public static void addToDuration(Phrase phrase, double amount)
Phrase
- The phrase to be modified.double
- The amount to add to the duration.public static void addToRhythmValue(Phrase phrase, double amount)
Phrase
- The phrase to be modified.double
- The amount to add.public static void addToLength(Phrase phrase, double amount)
phrase
- The phrase to be modified.double
- The amount to add.public static void expandIntervals(Phrase phrase, double amount)
phrase
- - The phrase to be modified.amount
- - The scaling multiplyer for the intervals, i.e., 2.0 doubles width.public static void transpose(CPhrase cphrase, int trans)
cphrase
.
If cphrase
is null then this method does nothing. If
the pitch is transposed to a value greater than MAX_PITCH
or less than MIN_DYNAMIC
then the pitch
will be set to a value as described in the Note.setPitch(int)
method.
cphrase
- CPhrase to be transposedtranspose
- integer describing the amount to transpose in semitonespublic static void transpose(CPhrase cphrase, int transposition, int[] mode, int key)
If cphrase
is null then this method does nothing. If the
transposition shifts a pitch above MAX_PITCH
or
below MIN_PITCH
, the pitch will probably cap at
those values. See the description of Note.setPitch(int)
method for
exact details of what occurs when trying to set the pitch beyond the
allowed range.
Transposition is in diatonic steps. For example in C major the note C
transposed 1 will become D, transposed 4 will become G, and transposed
by 7 will beome C an octave above. This can be somewhat unintuitive
so be careful.
cphrase
- CPhrase to be transposedtransposition
- the amount to transpose in semitonesmode
- the scale to use for the transpositionkey
- the chromatic note to be used as the
rooth of the mode. i.e., 0 = C, 1 = C# etc.public static void repeat(CPhrase cphrase)
If cphrase
is null this method does nothing.
cphrase
- CPhrase to be repeatedpublic static void repeat(CPhrase cphrase, int times)
If cphrase
is null or times
is less than
one this mthod does nothing.
cphrase
- CPhrase to be repeatedtimes
- number of repeats (default is 1)public static void repeat(CPhrase cphrase, double startLoc, double endLoc)
If cphrase
is null; or startLoc
is greater
than or equal to endLoc
then this method does nothing.
cphrase
- CPhrase to be repeatedstartLoc
- location of the loop start in beatsendLoc
- location of the loop end in beatspublic static void repeat(CPhrase cphrase, int times, double startLoc, double endLoc)
If cphrase
is null; startLoc
is greater
than or equal to endLoc
; or n
is less than one
then this method does nothing.
cphrase
- CPhrase to be repeatedtimes
- int number of repeats (default is 1)double
- location of the loop start in beatsdouble
- location of the loop end in beatspublic static void fadeIn(CPhrase cphrase, double fadeLength)
If cphrase
is null; or if fadeLength
is
less than or equal to zero then this method does nothing.
cphrase
- CPhrase to be fadedfadeLength
- double describing the time of the fade, in crotchets.public static void fadeIn(CPhrase cphrase, double fadeLength, double cphraseStartTime)
If cphrase
is null; fadeLength
is less than
or equal to zero; cphraseStartTime
is less than zero; or
fadeLength
is less than or equal to cphraseStartTime
then this method does nothing.
cphrase
- CPhrase to be fadedfadeLength
- double describing the time of the fade, in
crotchetscpharseStartTime
- double describing how far into the fade the
phrase starts.public static void fadeOut(CPhrase cphrase, double fadeLength)
If cphrase
is null; or if fadeLength
is
less than or equal to zero then this method does nothing.
cphrase
- CPhrase to be fadedfadeLength
- double describing the time of the fade out in
crotchetspublic static void fadeOut(CPhrase cphrase, double fadeLength, double cphraseEndTime)
If cphrase
is null; fadeLength
is less than
or equal to zero; cphraseEndTime
is less than zero; or
fadeLength
is less than cphraseEndTime
then
this method does nothing.
cphrase
- CPhrase to be fadedfadeLength
- double describing the time of the fade out in
crotchetsphraseEndTime
- double describing the length of time, in crothcets,
between the end of the phrase and the end of the
fade.public static void compress(CPhrase cphrase, double ratio)
See compress(Phrase, double)
for further details.
If cphrase
is null then this method does nothing.
cphrase
- CPhrase to be compressedretio
- double describing the compression factor.public static void append(CPhrase cphrase1, CPhrase cphrase2)
If cphrase1
or cphrase2
is null then this
method does nothing.
cphrase1
- the base CPhrasecphrase2
- CPhrase to be appendedpublic static void merge(CPhrase cphrase1, CPhrase cphrase2)
If cphrase1
or cphrase2
is null then this
method does nothing.
cphrase1
- the base CPhrasecphrase2
- the CPhrase to be merged with the firstpublic static void quantize(CPhrase cphrase, double qValue)
cphrase
- CPhrase to be quantizedqValue
- the amount to quantize topublic static void quantise(CPhrase cphrase, double qValue)
cphrase
- CPhrase to be quantizedqValue
- the amount to quantize topublic static void quantize(CPhrase cphrase, double qValue, int[] mode, int key)
See quantise(Phrase, double)
for further details.
If cphrase
is null or qValue
is less than
or equal to zero then this method does nothing.
cphrase
- CPhrase to be quantisedqValue
- the amount to quantise topublic static void shuffle(CPhrase cphrase)
cphrase
- -The CPhrase that contains phrases to be shuffledpublic static void cycle(Part part, double to)
Part
- the part to cycledouble
- position of where it should cycle topublic static void elongate(CPhrase cphrase, double scaleFactor)
See elongate(Phrase, double)
for further details.
If cphrase
is null or scaleFactor
is less
than or equal to zero then this method does nothing.
cphrase
- CPhrase to be lengthenedscaleFactor
- double describing the scale factorpublic static void accents(CPhrase cphrase, double meter)
The dynamic of each note starting on the beat will be increased by
20. If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
If cphrase
is null or meter
is less than or
equal to zero then this method does nothing.
cphrase
- CPhrase to be accentedmeter
- double describing the number of croctets per
bar/measurepublic static void accents(CPhrase cphrase, double meter, double[] accentedBeats)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Each accented note's dynamic will be increased by 20.
If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If cphrase
is null or meter
is less than or
equal to zero then this method does nothing.
cphrase
- CPhrase to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.public static void accents(CPhrase cphrase, double meter, double[] accentedBeats, int accentAmount)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Accented beats will have their dynamic increased by
accentAmount
. If this causes the dynamic to be above MAX_DYNAMIC
or below MIN_DYNAMIC
(when accentAmount
) then the dynamic will be
set to a value as described by Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If cphrase
is null or meter
is less than or
equal to zero then this method does nothing.
cphrase
- CPhrase to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.accentAmount
- integer describing the value that the dynamic of
accented beats are increased by.public static void normalise(CPhrase cphrase)
If cphrase
is null then
this method does nothing.
cphrase
- the CPhrase to be effectedpublic static void spread(CPhrase cphrase)
If cphrase
is null then
this method does nothing.
cphrase
- the CPhrase to be effectedpublic static void bounce(CPhrase cphrase)
If cphrase
is null then
this method does nothing.
cphrase
- The CPhrase to be effectedpublic static void tiePitches(CPhrase cphrase)
CPhrase
that
have the same pitch, creating one longer note.
This is simmilar to the musical function of a tie.
All note in the phrase meeting the conditions
are effected.
This modification may reduce the overall note count.CPhrase
- CPhrase to be processedpublic static void tieRests(CPhrase cphrase)
CPhrase
creating one longer note.
This is simmilar to the musical function of a tie.
This modification may reduce the overall rest count.CPhrase
- CPhrase to be processedpublic static void fillRests(CPhrase cphrase)
CPhrase
by creating one longer note and deleting the rest.
This modification may reduce the overall note count in the phrase,
be careful that use of this method does not to cause
array out of bounds exceptions.CPhrase
- CPhrase to be processedpublic static void varyLength(CPhrase cphrase, double minLength, double maxLength)
If cphrase
is null then this method does nothing.
cphrase
- The CPhrase to be effectedminlength
- The shortest possible durationmaxlength
- The longest possible durationpublic static void randomize(CPhrase cphrase, int pitchVariation)
If cphrase
is null then this method does nothing.
cphrase
- The CPhrase to be effectedpitchVariation
- The degree of pitch change to apply.public static void randomize(CPhrase cphrase, int pitchVariation, double rhythmVariation)
If cphrase
is null then this method does nothing.
cphrase
- The CPhrase to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.public static void randomize(CPhrase cphrase, int pitchVariation, double rhythmVariation, int dynamicVariation)
If cphrase
is null then this method does nothing.
cphrase
- The CPhrase to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.dynamicVariation
- The degree of dynamic change to apply.public static void slurUp(CPhrase cphrase, int numberOfNotes)
CPhrase
- The cphrase to be modified.int
- The number of notes in a row to consitute a sequencepublic static void slurDown(CPhrase cphrase, int numberOfNotes)
CPhrase
- The cphrase to be modified.int
- The number of notes in a row to consitute a sequencepublic static void increaseDuration(CPhrase cphrase, double multiplyer)
CPhrase
- The cphrase to be modified.double
- The amount to multiply the duration by.public static void addToDuration(CPhrase cphrase, double amount)
cphrase
- - The cphrase to be modified.amount
- - The number of beats to add to the duration.public static void addToRhythmValue(CPhrase cphrase, double amount)
cphrase
- - The phrase to be modified.amount
- - The number of beats to add.public static void addToLength(CPhrase cphrase, double amount)
cphrase
- - The cphrase to be modified.amount
- - The number of beats to add.public static void expandIntervals(CPhrase cphrase, double amount)
cphrase
- - The CPhrase to be modified.amount
- - The scaling multiplyer for the intervals, i.e., 2.0 doubles width.public static void shake(CPhrase cphrase, int amount)
cphrase
- - The CPhrase to be modified.amount
- - The dynamic change possible either side of the curent dynamic.public static void repeat(Part part)
If part
is null this method does nothing.
part
- Part to be repeatedpublic static void repeat(Part part, int times)
If part
is null or times
is less than
one this method does nothing.
cphrase
- Part to be repeatedtimes
- number of repeats (default is 1)public static void repeat(Part part, double startLoc, double endLoc)
If part
is null; or startLoc
is greater
than or equal to endLoc
then this method does nothing.
part
- Part to be repeatedstartLoc
- location of the loop start in beatsendLoc
- location of the loop end in beatspublic static void repeat(Part part, int times, double startLoc, double endLoc)
If part
is null; startLoc
is greater
than or equal to endLoc
; or n
is less than one
then this method does nothing.
part
- Part to be repeatedtimes
- int number of repeats (default is 1)double
- location of the loop start in beatsdouble
- location of the loop end in beatspublic static void transpose(Part part, int transposition)
part
- the Part to be transposedtransposition
- the number of semitone steps to shift the pitchpublic static void transpose(Part part, int degrees, int[] mode, int key)
If part
is null then this method does nothing. If the
transposition shifts a pitch above MAX_PITCH
or
below MIN_PITCH
, the pitch will probably cap at
those values. See the description of Note.setPitch(int)
method for
exact details of what occurs when trying to set the pitch beyond the
allowed range.
Transposition is in diatonic steps. For example in C major the note C
transposed 1 will become D, transposed 4 will become G, and transposed
by 7 will beome C an octave above. This can be somewhat unintuitive
so be careful.
part
- Part to be transposeddegrees
- the number of scale degrees to transposemode
- the scale to use for the transpositionkey
- the chromatic note to be used as the
rooth of the mode. i.e., 0 = C, 1 = C# etc.public static void compress(Part part, double ratio)
This is a basic compression routine and is not perfect. Specifically, each phrase compresses relative to itself, not to the overall part as might be expected.
If part
is null then this method does nothing.
part
- Part to be compressedratio
- double describing the compression factorpublic static void append(Part part1, Part part2)
If part1
or part2
is null then this method
does nothing.
part1
- the base Partpart2
- the Part to be appendedpublic static void append(Part part1, Part part2, double fromLoc)
If part1
or part2
is null
part1
- the base Partpart2
- the Part to be appendedfromLoc
- double describing the start time for the second part to
be appendedpublic static void increaseDynamic(Part p, int amount)
Part
- the part that is to be affectedint
- the amount that it is to be affected bypublic static void fadeIn(Part part, double fadeLength)
If part
is null; or if fadeLength
is less
than or equal to zero then this method does nothing.
part
- Part to be fadedfadelength
- double describing the number of crotchets to fade
overpublic static void fadeIn(Part part, double fadeLength, double partStartTime)
If part
is null; fadeLength
is less than or
equal to zero; phraseStart
is less than zero; or
fadeLength
is less than or equal to phraseStart
then
this method does nothing.
part
- Part to be fadedfadeLength
- double describing the duration of the fade, in
crotchetspartStartTime
- double describing how far into the fade the part
startspublic static void fadeOut(Part part, double fadeLength)
If part
is null; or if fadeLength
is less
than or equal to zero then this method does nothing.
part
- Part to be fadedfadeLength
- double describing the duration of the fade out in
crotchetspublic static void fadeOut(Part part, double fadeLength, double partEndTime)
If part
is null; fadeLength
is less than
or equal to zero; phraseEndTime
is less than zero; or
fadeLength
is less than phraseEndTime
then this
method does nothing.
part
- Part to be fadedfadeLength
- double describing the duration of the fade out in
crotchetspartEndTime
- double describing the length of time, in crotchets,
between the end of the part and the end of the fade.public static void merge(Part part1, Part part2)
If part1
or part2
is null this method does
nothing.
part1
- the base Partpart2
- the Part to be merged to the firstpublic static void quantize(Part part, double qValue)
part
.
part
- Part to be quantizedqValue
- the amount to quantize topublic static void quantise(Part part, double qValue)
part
.
part
- Part to be quantizedqValue
- the amount to quantize topublic static void quantize(Part part, double qValue, int[] mode, int key)
See quantise(Phrase, double)
for details.
If part
is null or qValue
is less than or
equal to zero then this method does nothing.
part
- Part to be quantiseddouble
- - the amount to quantise toopublic static void shuffle(Part part)
part
- -The Part that contains phrases to be shuffledpublic static void accents(Part part, double meter)
The dynamic of each note starting on the beat will be increased by
20. If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
If part
is null or meter
is less than or
equal to zero then this method does nothing.
part
- Part to be accentedmeter
- double describing the number of croctets per bar/measurepublic static void accents(Part part, double meter, double[] accentedBeats)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Each accented note's dynamic will be increased by 20.
If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If part
is null or meter
is less than or
equal to zero then this method does nothing.
part
- Part to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.public static void accents(Part part, double meter, double[] accentedBeats, int accentAmount)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Accented beats will have their dynamic increased by
accentAmount
. If this causes the dynamic to be above MAX_DYNAMIC
or below MIN_DYNAMIC
(when accentAmount
) then the dynamic will be
set to a value as described by Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If part
is null or meter
is less than or
equal to zero then this method does nothing.
part
- Part to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.accentAmount
- integer describing the value that the dynamic of
accented beats are increased by.public static void normalise(Part part)
If part
is null then
this method does nothing.
part
- the Part to be effectedpublic static void elongate(Part part, double scaleFactor)
scaleFactor
If phrase
is null or scaleFactor
is less
than or equal to zero then this method does nothing.
part
- Part to be lengthenedscaleFactor
- double describing the scale factorpublic static void tiePitches(Part part)
phrase
that
have the same pitch, creating one longer note.
This is simmilar to the musical function of a tie.
All note in the phrase meeting the conditions
are effected.
This modification may reduce the overall note count.Part
- Part to be processedpublic static void tieRests(Part part)
part
creating one longer note.
This is simmilar to the musical function of a tie.
This modification may reduce the overall rest count.part
- Part to be processedpublic static void fillRests(Part part)
part
by creating one longer note and deleting the rest.
This modification may reduce the overall note count in the phrase,
be careful that use of this method does not to cause
array out of bounds exceptions.Part
- Part to be processedpublic static void spread(Part part)
If part
is null then
this method does nothing.
part
- the Part to be effectedpublic static void bounce(Part part)
If part
is null then
this method does nothing.
part
- The Part to be effectedpublic static void varyLength(Part part, double minLength, double maxLength)
If Part
is null then this method does nothing.
part
- The Part to be effectedminlength
- The shortest possible durationmaxlength
- The longest possible durationpublic static void randomize(Part part, int pitchVariation)
If Part
is null then this method does nothing.
part
- The Part to be effectedpitchVariation
- The degree of pitch change to apply.public static void randomize(Part part, int pitchVariation, double rhythmVariation)
If Part
is null then this method does nothing.
part
- The Part to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.public static void randomize(Part part, int pitchVariation, double rhythmVariation, int dynamicVariation)
If Part
is null then this method does nothing.
part
- The Part to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.dynamicVariation
- The degree of dynamic change to apply.public static void slurUp(Part part, int numberOfNotes)
Part
- The part to be modified.int
- The number of notes in a row to consitute a sequencepublic static void slurDown(Part part, int numberOfNotes)
Part
- The part to be modified.int
- The number of notes in a row to consitute a sequencepublic static void increaseDuration(Part part, double multiplyer)
Part
- The part to be modified.double
- The amount to multiply the duration by.public static void addToDuration(Part part, double amount)
part
- - The Part to be modified.amount
- - The number of beats to add to the duration.public static void addToRhythmValue(Part part, double amount)
part
- - The Part to be modified.amount
- - The number of beats to add.public static void addToLength(Part part, double amount)
part
- - The Part to be modified.amount
- - The number of beats to add.public static void expandIntervals(Part part, double amount)
part
- - The Part to be modified.amount
- - The scaling multiplyer for the intervals, i.e., 2.0 doubles width.public static void shake(Part part, int amount)
part
- - The Part to be modified.amount
- - The dynamic change possible either side of the curent dynamic.public static void consolidate(Part p)
public static void transpose(Score scr, int transposition)
score
- Score to be fadedtransposition
- The number of semitones to transpose bypublic static void transpose(Score score, int degrees, int[] mode, int key)
If score
is null then this method does nothing. If the
transposition shifts a pitch above MAX_PITCH
or
below MIN_PITCH
, the pitch will probably cap at
those values. See the description of Note.setPitch(int)
method for
exact details of what occurs when trying to set the pitch beyond the
allowed range.
Transposition is in diatonic steps. For example in C major the note C
transposed 1 will become D, transposed 4 will become G, and transposed
by 7 will beome C an octave above. This can be somewhat unintuitive
so be careful.
score
- Score to be transposeddegrees
- the amount to transpose in scale stepsmode
- the scale to use for the transpositionkey
- the chromatic note to be used as the
rooth of the mode. i.e., 0 = C, 1 = C# etc.public static void fadeIn(Score score, double fadeLength)
If score
is null or fadeLength
is less
than or equal to zero then this method does nothing.
score
- Score to be fadedfadelength
- double describing the number of crotchets to fade
overpublic static void increaseDynamic(Score s, int amount)
Score
- the score that is to be affectedint
- the amountpublic static void fadeOut(Score score, double fadeLength)
If score
is null or fadeLength
is less
than or equal to zero then this method does nothing.
score
- Score to be fadedfadelength
- double describing the number of crotchets to fade
overpublic static void compress(Score score, double ratio)
If score
is null then this method does nothing.
score
- Score to be expanded/compressedratio
- double describing the compression factorpublic static void repeat(Score score)
score twice times as long by repeating
If score
is null then this method does nothing.
score
- Score to be repeatedpublic static void repeat(Score score, int times)
score
n
times.
If score
is null or times
is less than
one then this method does nothing.
score
- Score to be repeatedtimes
- integer representing the number of repeatspublic static void append(Score score1, Score score2)
If score1
or score2
is null then this
method does nothing.
score1
- the base Scorescore2
- the Score to be appendedpublic static void merge(Score score1, Score score2)
If score1
or score2
is null then this
method does nothing.
score1
- the base scorescore2
- the Score to be merged to the base scorepublic static void quantize(Score score, double qValue)
score
- Score to quantizeqValue
- double describing the amount to quantize topublic static void quantise(Score score, double qValue)
score
- Score to quantizeqValue
- double describing the amount to quantize topublic static void quantize(Score score, double qValue, int[] mode, int key)
quantise(Phrase, double)
.
If score
is null or qValue
is less than or
equal to zero then this method does nothing.
score
- Score to quantiseqValue
- double describing the amount to quantise tomode
- The scale to quantize pitch values to, e.g., MAJOR_SCALEkey
- The key of the mode. e.g., 0 = C, 1 = C# etc.public static void shuffle(Score score)
score
- -The Score that contains phrases to be shuffledpublic static void accents(Score score, double meter)
The dynamic of each note starting on the beat will be increased by
20. If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
If score
is null or meter
is less than or
equal to zero then this method does nothing.
score
- Score whose beats are to be accentedmeter
- double describing the number of crochets per bar/measurepublic static void accents(Score score, double meter, double[] accentedBeats)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Each accented note's dynamic will be increased by 20.
If this raises the dynamic above MAX_DYNAMIC
then the dynamic will be set to a value as described in Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If score
is null or meter
is less than or
equal to zero then this method does nothing.
score
- Score to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.public static void accents(Score score, double meter, double[] accentedBeats, int accentAmount)
accentedBeats
is an array of values describing where
the accents begin relative to the start of each bar, in crochets.
Accented beats will have their dynamic increased by
accentAmount
. If this causes the dynamic to be above MAX_DYNAMIC
or below MIN_DYNAMIC
(when accentAmount
) then the dynamic will be
set to a value as described by Note.setDynamic(int)
.
Each of the double values in accentedBeats
must be
greater than or equal to zero and less than meter
or this
method does nothing.
If score
is null or meter
is less than or
equal to zero then this method does nothing.
score
- Score to be accentedmeter
- double describing the number of croctets per
bar/measureaccentedBeats
- double array describing the time of the accents in
the bar.accentAmount
- integer describing the value that the dynamic of
accented beats are increased by.public static void normalise(Score score)
If score
is null then
this method does nothing.
score
- the Score to be effectedpublic static void consolidate(Score score)
If score
is null then
this method does nothing.
score
- the Score to be effectedpublic static void elongate(Score score, double scaleFactor)
scaleFactor
If phrase
is null or scaleFactor
is less
than or equal to zero then this method does nothing.
score
- Score to be lengthenedscaleFactor
- double describing the scale factorpublic static void tiePitches(Score score)
phrase
that
have the same pitch, creating one longer note.
This is simmilar to the musical function of a tie.
All note in the phrase meeting the conditions
are effected.
This modification may reduce the overall note count.score
- Score to be processedpublic static void tieRests(Score score)
phrase
creating one longer note.
This is simmilar to the musical function of a tie.
This modification may reduce the overall rest count.score
- Score to be processedpublic static void fillRests(Score score)
score
by creating one longer note and deleting the rest.
This modification may reduce the overall note count in the phrase,
be careful that use of this method does not to cause
array out of bounds exceptions.Score
- Score to be processedpublic static void spread(Score score)
If score
is null then
this method does nothing.
cphrase
- the CPhrase to be effectedpublic static void bounce(Score score)
If score
is null then
this method does nothing.
score
- The Score to be effectedpublic static void varyLength(Score score, double minLength, double maxLength)
If the Score
is null then this method does nothing.
score
- The Score to be effectedminlength
- The shortest possible durationmaxlength
- The longest possible durationpublic static void randomize(Score score, int pitchVariation)
If Score
is null then this method does nothing.
score
- The Score to be effectedpitchVariation
- The degree of pitch change to apply.public static void randomize(Score score, int pitchVariation, double rhythmVariation)
If score
is null then this method does nothing.
score
- The Score to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.public static void randomize(Score score, int pitchVariation, double rhythmVariation, int dynamicVariation)
If Score
is null then this method does nothing.
score
- The Score to be effectedpitchVariation
- The degree of pitch change to apply.rhythmVariation
- The degree of rhythm value change to apply.dynamicVariation
- The degree of dynamic change to apply.public static void slurUp(Score score, int numberOfNotes)
Score
- The score to be modified.int
- The number of notes in a row to consitute a sequencepublic static void slurDown(Score score, int numberOfNotes)
Score
- The score to be modified.int
- The number of notes in a row to consitute a sequencepublic static void increaseDuration(Score score, double multiplyer)
Score
- The score to be modified.double
- The amount to multiply the duration by.public static void addToDuration(Score score, double amount)
score
- - The Score to be modified.amount
- - The number of beats to add to the duration.public static void addToRhythmValue(Score score, double amount)
score
- - The Score to be modified.amount
- - The number of beats to add.public static void addToLength(Score score, double amount)
score
- - The Score to be modified.amount
- - The number of beats to add.public static void expandIntervals(Score score, double amount)
score
- - The Score to be modified.amount
- - The scaling multiplyer for the intervals, i.e., 2.0 doubles width.public static void shake(Score score, int amount)
score
- - The score to be modified.amount
- - The dynamic change possible either side of the curent dynamic.