Basic data structures for holding symbolic music information.
Basic SMucK note object carrying information about the note's onset, duration, pitch, and velocity. To be used in score importing, generating, editing, and playback.
ezNote()
Default constructor, creates a note with onset 0, duration 1, pitch 60, and velocity 1.0.
ezNote(float onset, float beats, float pitch, float velocity)
Constructor for ezNote specifying onset, beats, pitch, and velocity.
float beats()
Get the duration of the note in beats.
void beats(float value)
Set the duration of the note in beats.
float onset()
Get the onset of the note in beats, relative to the start of the measure.
void onset(float value)
Set the onset of the note in beats, relative to the start of the measure.
float pitch()
Get the pitch of the note as a MIDI note number.
void pitch(float value)
Set the pitch of the note as a MIDI note number.
float velocity()
Get the velocity of the note.
void velocity(float value)
Set the velocity of the note.
[ top ]
SMucK measure object. An ezMeasure object contains one or more ezNotes. Note contents can be set using the SMucKish input syntax.
ezMeasure()
Default constructor, creates an empty measure.
ezMeasure(string input)
Create an ezMeasure from a SMucKish input string.
void addNote(ezNote note)
Add an ezNote to the measure.
void length(float value)
Set the length of the measure in beats.
float length()
Get the length of the measure in beats.
void onset(float value)
Set the onset of the measure in beats, relative to the start of the score.
float onset()
Get the onset of the measure in beats, relative to the start of the score.
void printNotes()
Print the parameters for each note in the measure.
void setPitches(string input)
Set the pitches of the notes in the measure, using a SMucKish input string.
void setPitches(string[] input)
Set the pitches of the notes in the measure, using an array of SMucKish string tokens.
void setPitches(float[][] input)
Set the pitches of the notes in the measure directly from a 2D array of MIDI note numbers.
void setRhythms(string input)
Set the rhythms of the notes in the measure, using a SMucKish input string.
void setRhythms(string[] input)
Set the rhythms of the notes in the measure, using an array of SMucKish string tokens.
void setRhythms(float[] input)
Set the rhythms of the notes in the measure directly from an array of floats.
void setVelocities(string input)
Set the velocities of the notes in the measure, using a SMucKish input string.
void setVelocities(string[] input)
Set the velocities of the notes in the measure, using an array of SMucKish string tokens.
void setVelocities(float[] input)
Set the velocities of the notes in the measure directly from an array of floats.
ezNote[] notes
The ezNote objects in the measure.
[ top ]
SMucK part object. An ezPart object contains one or more ezMeasures. Measure contents can be set using the SMucKish input syntax, or when importing a MIDI file into an ezScore object.
ezPart()
Default constructor, creates an empty part.
ezPart(string input)
Create an ezPart from a SMucKish input string.
void addMeasure(ezMeasure measure)
Add an ezMeasure to the part.
void setPitches(string input)
Set the pitches of the notes in the last measure, using a SMucKish input string. If the part contains no measures, a new measure is created.
void setPitches(string[] input)
Set the pitches of the notes in the last measure, using an array of SMucKish string tokens. If the part contains no measures, a new measure is created.
void setPitches(float[][] input)
Set the pitches of the notes in the last measure, using a 2D array of MIDI note numbers. If the part contains no measures, a new measure is created.
void setRhythms(string input)
Set the rhythms of the notes in the last measure, using a SMucKish input string. If the part contains no measures, a new measure is created.
void setRhythms(string[] input)
Set the rhythms of the notes in the last measure, using an array of SMucKish string tokens. If the part contains no measures, a new measure is created.
void setRhythms(float[] input)
Set the rhythms of the notes in the last measure, using an array of floats. If the part contains no measures, a new measure is created.
void setVelocities(string input)
Set the velocities of the notes in the last measure, using a SMucKish input string. If the part contains no measures, a new measure is created.
void setVelocities(string[] input)
Set the velocities of the notes in the last measure, using an array of SMucKish string tokens. If the part contains no measures, a new measure is created.
void setVelocities(float[] input)
Set the velocities of the notes in the last measure, using an array of ints. If the part contains no measures, a new measure is created.
ezMeasure[] measures
The ezMeasure objects in the part.
[ top ]
SMucK score object. An ezScore object contains one or more ezParts. Score contents can be set using the SMucKish input syntax, or by importing a MIDI file. ezScore objects can be passed to an ezScorePlayer object for playback.
ezScore()
Default constructor, creates an empty score.
ezScore(string input)
Create an ezScore from a SMucKish input string or MIDI file. If the input argument is a MIDI filename (ending in .mid), the MIDI file is imported. Otherwise, the input string is interpreted as a SMucKish input string.
ezScore(string input, float bpm)
Create an ezScore from a SMucKish input string or MIDI file, with a specified BPM.
void addPart(ezPart part)
Add an ezPart to the score.
void addPart(string input)
Add an ezPart to the score, using a SMucKish input string.
void bpm(float value)
Set the tempo in BPM (beats per minute) for the score.
float bpm()
Get the tempo in BPM (beats per minute) for the score.
void importMIDI(string filename)
Read a MIDI file into the ezScore object.
int maxPolyphony(int part)
Get the maximum polyphony for a given part.
int numParts()
Get the number of parts in the score.
dur scoreDuration()
Get the duration of the score in milliseconds.
float scoreEnd()
Get the end of the score in beats (the last note's release point)
void setPitches(string input)
Set the pitches of the notes in the last part, using a SMucKish input string. If the score contains no parts, a new part is created.
void setPitches(string[] input)
Set the pitches of the notes in the last part, using an array of SMucKish string tokens. If the score contains no parts, a new part is created.
void setPitches(float[][] input)
Set the pitches of the notes in the last part, using a 2D array of MIDI note numbers (floats). If the score contains no parts, a new part is created.
void setRhythms(string input)
Set the rhythms of the notes in the last part, using a SMucKish input string. If the score contains no parts, a new part is created.
void setRhythms(string[] input)
Set the rhythms of the notes in the last part, using an array of SMucKish string tokens. If the score contains no parts, a new part is created.
void setRhythms(float[] input)
Set the rhythms of the notes in the last part, using an array of floats. If the score contains no parts, a new part is created.
void setTimeSig(int numerator, int denominator)
Set the time signature for the score.
void setVelocities(string input)
Set the velocities of the notes in the last part, using a SMucKish input string. If the score contains no parts, a new part is created.
void setVelocities(string[] input)
Set the velocities of the notes in the last part, using an array of SMucKish string tokens. If the score contains no parts, a new part is created.
void setVelocities(float[] input)
Set the velocities of the notes in the last part, using an array of floats. If the score contains no parts, a new part is created.
ezPart[] parts
The ezPart objects in the score.
[ top ]