public class Part extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable, JMC
Score score = new Score("Concerto for Solo Clarinet"); Part inst = new Part("Clarinet"); score.addPart(inst);
Score
,
Phrase
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CHANNEL |
static int |
DEFAULT_DENOMINATOR |
static int |
DEFAULT_INSTRUMENT |
static int |
DEFAULT_KEY_QUALITY |
static int |
DEFAULT_KEY_SIGNATURE |
static int |
DEFAULT_NUMERATOR |
static double |
DEFAULT_PAN |
static double |
DEFAULT_TEMPO |
static java.lang.String |
DEFAULT_TITLE |
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
Constructor and Description |
---|
Part()
Creates an empty Part
|
Part(CPhrase cphrase)
Constructs a Part containing the specified
cphrase . |
Part(int instrument)
Creates an empty Part
|
Part(int instrument,
int channel)
Creates an empty Part
|
Part(Phrase phrase)
Constructs a Part containing the specified
phrase . |
Part(Phrase[] phrases)
Constructs a Part containing the specified
phrases . |
Part(Phrase[] phrases,
java.lang.String title)
Constructs a Part containing the specified
phrase with the
specified title . |
Part(Phrase[] phrases,
java.lang.String title,
int instrument)
Constructs a Part containing the specified
phrase with the
specified title and with the timbre of the specified
instrument . |
Part(Phrase[] phrases,
java.lang.String title,
int instrument,
int channel)
Constructs a Part containing the specified
phrase with the
specified title , with the timbre of the specified
instrument and using the specified MIDI channel. |
Part(Phrase phrase,
java.lang.String title)
Constructs a Part containing the specified
phrase with the
specified title . |
Part(Phrase phrase,
java.lang.String title,
int instrument)
Constructs a Part containing the specified
phrase with the
specified title and with the timbre of the specified
instrument . |
Part(Phrase phrase,
java.lang.String title,
int instrument,
int channel)
Constructs a Part containing the specified
phrase with the
specified title , with the timbre of the specified
instrument and using the specified MIDI channel. |
Part(java.lang.String title)
Creates an empty Part
|
Part(java.lang.String title,
int instrument)
Creates an empty Part
|
Part(java.lang.String title,
int instrument,
int channel)
Creates an empty Part
|
Part(java.lang.String title,
int instrument,
int channel,
Phrase phrase)
Constructs a Part containing the specified
phrase . |
Part(java.lang.String title,
int instrument,
Phrase phrase)
Constructs a Part containing the specified
phrase . |
Modifier and Type | Method and Description |
---|---|
void |
add(Phrase phrase)
Add a phrase to this Part
|
void |
addCPhrase(CPhrase cphrase)
Add a chord phrase to the part
as part of this process we need to remove the
CPhrase's phrase list and add them to the Part's
normal phrase list.
|
void |
addNote(Note n,
double startTime)
Add a note directly to a part, this method
automatically encapsulates the note within a phrase.
|
void |
addPhrase(Phrase phrase)
Add a phrase to this Part
Phrases with a 'true' append flag are added to the end of the part.
|
void |
addPhraseList(Phrase[] phraseArray)
Adds multiple phrases to the part from an array of phrases
|
void |
appendPhrase(Phrase phrase)
Add a copy of a phrase to the end of this Part
|
void |
clean()
Remove phrases from the score.
|
Part |
copy()
Make a duplicate of the current part
|
Part |
copy(double startLoc,
double endLoc)
Returns a copy of the Part between specified loactions
|
Part |
copy(double startLoc,
double endLoc,
boolean trimmed,
boolean truncated,
boolean relativeStartLoc)
Returns a copy of the Part between specified loactions
|
Phrase |
createPhrase()
Generates and returns a new empty phrase
and adds it to this part.
|
void |
empty()
Empty removes all elements in the vector
|
int |
getChannel()
Gets the channel for this channel
|
int |
getDenominator()
Returns the Parts time signature denominator
|
double |
getEndTime()
Return the Parts endTime
|
int |
getHighestPitch()
Return the value of the highest note in the part.
|
int |
getInstrument()
Get Instrument number / MIDI Program Change
|
int |
getKeyQuality()
Returns the Parts key quality
0 is Major, 1 is minor
|
int |
getKeySignature()
'
Returns the Parts key signature
The number of sharps (+) or flats (-)
|
double |
getLongestRhythmValue()
Return the value of the longest rhythm value in the part.
|
int |
getLowestPitch()
Return the value of the lowest note in the part.
|
Score |
getMyScore()
get a reference to the score that contains this part
|
int |
getNumerator()
Returns the Parts time signature numerator
|
double |
getPan()
Return the pan position for this part
|
Phrase |
getPhrase(int number)
Get an individual phrase object from its number
|
Phrase[] |
getPhraseArray()
Returns the all phrases in this part as a array
|
java.util.Vector |
getPhraseList()
Returns the entire phrase list
|
double |
getPoint() |
double |
getShortestRhythmValue()
Return the value of the shortest rhythm value in the part.
|
int |
getSize()
get the number of phrases in this part
|
double |
getTempo()
Returns the Part's tempo
|
long |
getTime() |
int |
getTimeIndex() |
java.lang.String |
getTitle()
Returns the Parts title
|
int |
length()
Get the number of phrases in this part
|
void |
removeAllPhrases()
Deletes all the phrases previously added to the part
|
void |
removeLastPhrase()
Deletes the last phrase added to the part
|
void |
removePhrase(int phraseNumb)
Deletes the specified phrase in the part
|
void |
removePhrase(Phrase phrase)
Deletes the first occurence of the specified phrase in the Part.
|
void |
setChannel(int channel)
Sets the MidiChannel for this part
|
void |
setDenominator(int dem)
Specifies the Part's time signature denominator
|
void |
setDuration(double val)
Change the duration value of each note in the Part.
|
void |
setDynamic(int dyn)
Change the dynamic value of each note in the Part.
|
void |
setInstrument(int instrument)
Set instrument number / MIDI Program Change
|
void |
setKeyQuality(int newQual)
Specifies the Part's key quality
0 is Major, 1 is minor
|
void |
setKeySignature(int newSig)
Specifies the Part's key signature
The number of sharps (+) or flats (-)
|
void |
setLength(double newLength)
Change both the rhythmValue and duration of each note in the part.
|
void |
setMyScore(Score scr)
set a reference to the score containing this part
|
void |
setNumerator(int num)
Specifies the Part's time signature numerator
|
void |
setPan(double pan)
Determine the pan position for all notes in this part.
|
void |
setPhraseList(java.util.Vector newPhraseList)
Updates the entire phrase list
|
void |
setPitch(int val)
Change the Pitch value of each note in the Part.
|
void |
setPoints(double[] p) |
void |
setProgChg(int program)
Set instrument number / MIDI Program Change
This method is deprecated in favour of setInstrument!!
|
void |
setRhythmValue(double val)
Change the rhythmValue value of each note in the Part.
|
void |
setTempo(double tempo)
Sets the Part's tempo
|
void |
setTime(long[] t) |
void |
setTimeIndex(int index) |
void |
setTitle(java.lang.String title)
Sets the Parts title
|
int |
size()
get the number of phrases in this part
|
void |
sort()
Orders the phrases in the phrase list by start time.
|
java.lang.String |
toString()
Collects the Parts attributes to a string
|
public static final java.lang.String DEFAULT_TITLE
public static final int DEFAULT_INSTRUMENT
public static final int DEFAULT_CHANNEL
public static final double DEFAULT_TEMPO
public static final int DEFAULT_KEY_SIGNATURE
public static final int DEFAULT_KEY_QUALITY
public static final int DEFAULT_NUMERATOR
public static final int DEFAULT_DENOMINATOR
public static final double DEFAULT_PAN
public Part()
public Part(java.lang.String title)
String
- title the title of the Partpublic Part(int instrument)
int
- instrument the instrument number for this Partpublic Part(java.lang.String title, int instrument)
String
- title the title of the Partint
- instrumentpublic Part(int instrument, int channel)
int
- instrument The instrument number for this Partint
- channel The channel number for the part - only required for MIDI writingpublic Part(java.lang.String title, int instrument, int channel)
String
- title the title of the Partint
- instrumentint
- channelpublic Part(Phrase phrase)
phrase
.phrase
- Phrase to be contained in the Partpublic Part(java.lang.String title, int instrument, Phrase phrase)
phrase
.String
- Title of the Partint
- The instrument numberphrase
- Phrase to be contained in the Partpublic Part(java.lang.String title, int instrument, int channel, Phrase phrase)
phrase
.String
- Title of the Partint
- The instrument numberint
- The channel numberphrase
- Phrase to be contained in the Partpublic Part(Phrase[] phrases)
phrases
.phrases
- array of Phrases to be contained in the Scorepublic Part(CPhrase cphrase)
cphrase
.cphrase
- CPhrase to be contained in the Scorepublic Part(Phrase phrase, java.lang.String title)
phrase
with the
specified title
.phrase
- Phrase to be contained in the Parttitle
- String describing the title of the Partpublic Part(Phrase[] phrases, java.lang.String title)
phrase
with the
specified title
.phrases
- array of Phrases to be contained in the Scoretitle
- String describing the title of the Partpublic Part(Phrase phrase, java.lang.String title, int instrument)
phrase
with the
specified title
and with the timbre of the specified
instrument
.phrase
- Phrase to be contained in the Parttitle
- String describing the title of the Partinstrument
- integer describing the MIDI instrument numberpublic Part(Phrase[] phrases, java.lang.String title, int instrument)
phrase
with the
specified title
and with the timbre of the specified
instrument
.phrases
- array of Phrases to be contained in the Scoretitle
- String describing the title of the Partinstrument
- integer describing the MIDI instrument numberpublic Part(Phrase phrase, java.lang.String title, int instrument, int channel)
phrase
with the
specified title
, with the timbre of the specified
instrument
and using the specified MIDI channel.phrase
- Phrase to be contained in the Parttitle
- String describing the title of the Partinstrument
- integer describing the MIDI instrument numberchannel
- integer describing the MIDI channelpublic Part(Phrase[] phrases, java.lang.String title, int instrument, int channel)
phrase
with the
specified title
, with the timbre of the specified
instrument
and using the specified MIDI channel.phrases
- array of Phrases to be contained in the Scoretitle
- String describing the title of the Partinstrument
- integer describing the MIDI instrument numberchannel
- integer describing the MIDI channelpublic Phrase getPhrase(int number)
int
- number - the number of the Track to returnpublic void add(Phrase phrase)
Phrase
- phrase - add a phrase to this Partpublic void addPhrase(Phrase phrase)
Phrase
- phrase - add a phrase to this Partpublic void appendPhrase(Phrase phrase)
Phrase
- the phrase to addpublic void addPhraseList(Phrase[] phraseArray)
phraseArray
- public void removePhrase(int phraseNumb)
int
- noteNumb the index of the note to be deletedpublic void removePhrase(Phrase phrase)
phrase
- the Phrase object to be deleted.public void removeLastPhrase()
public void removeAllPhrases()
public java.util.Vector getPhraseList()
public void setPhraseList(java.util.Vector newPhraseList)
Vector
- containing phrase objectspublic Phrase[] getPhraseArray()
public void addCPhrase(CPhrase cphrase)
CPhrase
- public java.lang.String getTitle()
public void setTitle(java.lang.String title)
String
- titlepublic int getChannel()
public void setChannel(int channel)
short
- midiChannelpublic int getInstrument()
public void setInstrument(int instrument)
int
- program changepublic void setProgChg(int program)
int
- program changepublic double getTempo()
public void setTempo(double tempo)
double
- tempopublic int getKeySignature()
public void setKeySignature(int newSig)
int
- key signaturepublic int getKeyQuality()
public void setKeyQuality(int newQual)
int
- key quality (modality)public int getNumerator()
public void setNumerator(int num)
int
- time signature numeratorpublic int getDenominator()
public void setDenominator(int dem)
int
- time signature denominatorpublic double getPan()
public void setPan(double pan)
double
- the part's pan settingpublic void setMyScore(Score scr)
public Score getMyScore()
public Part copy()
public Part copy(double startLoc, double endLoc)
double
- start of copy section in beatsdouble
- end of copy section in beatspublic Part copy(double startLoc, double endLoc, boolean trimmed, boolean truncated, boolean relativeStartLoc)
boolean
- wether to trim the notes or notboolean
- wether to truncated the notes duration
when trimming them or notboolean
- wether to set the start time of the phrases
in relation to the start of the
double
- start of copy section in beatsdouble
- end of copy section in beatspublic double getEndTime()
public java.lang.String toString()
toString
in class java.lang.Object
public void empty()
public int length()
public int size()
public int getSize()
public void clean()
public int getHighestPitch()
public int getLowestPitch()
public double getLongestRhythmValue()
public double getShortestRhythmValue()
public void setDynamic(int dyn)
public void setPitch(int val)
public void setRhythmValue(double val)
public void setDuration(double val)
public void setPoints(double[] p)
public double getPoint()
public void setTime(long[] t)
public long getTime()
public void setTimeIndex(int index)
public int getTimeIndex()
public void addNote(Note n, double startTime)
Note
- the note to be added.startTime
- the beat position where the note (phrase) will be placedpublic Phrase createPhrase()
public void setLength(double newLength)
newLength
- The new rhythmValue for the note (Duration is a proportion of this value)public void sort()