|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjcaas.midi.GeneratedStaff
jcaas.midi.GeneratedStaffOct
public class GeneratedStaffOct
| Constructor Summary | |
|---|---|
GeneratedStaffOct(NoteVector seedNote,
java.lang.String[] propertyList,
java.lang.Object[] properties)
Constructor |
|
| 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. |
void |
setRand(double num,
double gauss)
A method to load the next set of random values into this class |
void |
useGenScore(GeneratedScore gs)
A method for sychronizing with a Generated Score so the same random values are used for all the score's generated staves. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneratedStaffOct(NoteVector seedNote,
java.lang.String[] propertyList,
java.lang.Object[] properties)
throws java.lang.Exception
seedNote - the note to begin generating music withpropertyList - a string array holding the list of the names of properties defined for this Staff.
Notes and Tempo are the only required properties.properties - an object array holding the properities of this Staff in the order provided by propertyList.
java.lang.Exception - indicating failed constructor.| Method Detail |
|---|
public NoteVector getNextNote()
Staff
getNextNote in interface StaffgetNextNote in class GeneratedStaffpublic StaffProperty getDefaultProperty(java.lang.String propertyName)
Staff
getDefaultProperty in interface StaffgetDefaultProperty in class GeneratedStaffpropertyName - - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.
public StaffProperty getCurrentProperty(java.lang.String propertyName)
Staff
getCurrentProperty in interface StaffgetCurrentProperty in class GeneratedStaffpropertyName - - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.
public void setProperty(java.lang.String propertyName,
StaffProperty p)
Staff
setProperty in interface StaffsetProperty in class GeneratedStaffpropertyName - - 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.public void resetProperty(java.lang.String propertyName)
Staff
resetProperty in interface StaffresetProperty in class GeneratedStaffpropertyName - - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.public void reset()
Staff
reset in interface Staffreset in class GeneratedStaffpublic void useGenScore(GeneratedScore gs)
useGenScore in class GeneratedStaffgs - the score this staff is a part of.
public void setRand(double num,
double gauss)
setRand in class GeneratedStaffnum - the next random number to usegauss - the next random gaussian to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||