|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectie.ncl.sms.nbs.Phrase
public class Phrase
Create a musical phrase that is a a collection of Notes.
| Field Summary | |
|---|---|
static int[] |
beats
|
static int |
STYLE_CONTINUOUS
Continuous style. |
static int |
STYLE_NORMAL
Normal style. |
static int |
STYLE_STACCATO
Staccato style. |
static int |
TEMPO_FAST
Fast tempo is 900 beats per minute. |
static int |
TEMPO_SLOW
Slow tempo is 25 beats per minute. |
static int |
VOLUME_HIGH
High volume is the loudest allowable. |
static int |
VOLUME_LOW
Low volume is no sound. |
static int |
VOLUME_MEDIUM
Medium volume is the default volume. |
| Constructor Summary | |
|---|---|
Phrase()
Create a musical phrase. |
|
Phrase(int style,
int tempo)
Create a musical phrase specifying the style and tempo. |
|
Phrase(int style,
int tempo,
int volume)
Create a musical phrase specifying the style, tempo and volume. |
|
| Method Summary | |
|---|---|
void |
add(Note note)
Add a note to the musical phrase. |
static int |
beatsToTempo(int beatsPerSecond)
|
Note |
getNote(int index)
Get the nth note of the musical phrase. |
int |
getStyle()
|
int |
getTempo()
|
int |
getVolume()
|
int |
size()
Get the nth note of the musical phrase. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int STYLE_NORMAL
public static final int STYLE_CONTINUOUS
public static final int STYLE_STACCATO
public static final int TEMPO_SLOW
public static final int TEMPO_FAST
public static final int VOLUME_LOW
public static final int VOLUME_MEDIUM
public static final int VOLUME_HIGH
public static final int[] beats
| Constructor Detail |
|---|
public Phrase(int style,
int tempo,
int volume)
public Phrase(int style,
int tempo)
public Phrase()
| Method Detail |
|---|
public int getStyle()
public int getTempo()
public int getVolume()
public static int beatsToTempo(int beatsPerSecond)
public void add(Note note)
Notepublic int size()
public Note getNote(int index)
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||