jcaas.midi
Interface Staff

All Known Implementing Classes:
GeneralizedStaff, GeneratedStaff, GeneratedStaffOct, GKWHarmony, GKWMelody, Imperial, JingleBells, Mary, StupidSong

public interface Staff

Staff represents a staff of musical score. It will be implemented by classes that represent music that may be played by MIDIPlayer.

Version:
last updated: 4/17/05
Author:
Conrad Hutcheson

Method Summary
 StaffProperty getCurrentProperty(java.lang.String propertyName)
          Returns the current value for a given property in a Staff.
 StaffProperty getDefaultProperty(java.lang.String propertyName)
          Returns the default value for a given property in a Staff.
 NoteVector getNextNote()
          getNextNote returns the next NoteVector in the sqeuence of the Staff.
 void reset()
          Resets all current values for Staff properties to their default values and resets the note-position to the first note.
 void resetProperty(java.lang.String propertyName)
          Resets the current value for a given property in a Staff to its default value.
 void setProperty(java.lang.String propertyName, StaffProperty p)
          Sets the current value for a given property in a Staff.
 

Method Detail

getNextNote

NoteVector getNextNote()
getNextNote returns the next NoteVector in the sqeuence of the Staff. The behavior is such that when the end of the song is reached, the song will loop.

Returns:
the next NoteVector to be played.

getDefaultProperty

StaffProperty getDefaultProperty(java.lang.String propertyName)
Returns the default value for a given property in a Staff. Valid properties are names of classes that extend StaffProperty.

Parameters:
propertyName - - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.
Returns:
the StaffProperty, which will be a class of type propertyName that is defualt for this song. null if this property is not implemented.

getCurrentProperty

StaffProperty getCurrentProperty(java.lang.String propertyName)
Returns the current value for a given property in a Staff. Valid properties are names of classes that extend StaffProperty.

Parameters:
propertyName - - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.
Returns:
the StaffProperty, which will be a class of type propertyName that is current for this song. null if this property is not implemented.

setProperty

void setProperty(java.lang.String propertyName,
                 StaffProperty p)
Sets the current value for a given property in a Staff. Valid properties are names of classes that extend StaffProperty.

Parameters:
propertyName - - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.
p - - the StaffProperty, which must be a class of type propertyName that is current for this song. null if this property is not implemented.

resetProperty

void resetProperty(java.lang.String propertyName)
Resets the current value for a given property in a Staff to its default value. Valid properties are names of classes that extend StaffProperty.

Parameters:
propertyName - - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.

reset

void reset()
Resets all current values for Staff properties to their default values and resets the note-position to the first note. Valid properties are names of classes that extend StaffProperty.