jmms
Class MSCycle

java.lang.Object
java.lang.Thread
jmms.MSCycle
- All Implemented Interfaces:
- java.lang.Runnable
- public class MSCycle
- extends java.lang.Thread
MSCycle.java
This class is for making it easy to play looped music via MIDI in realtime.
You just give it a score and it keeps on looping.
If you want it to change the looped music, then you give it a different score.
The tempo can be changed independently of the score.
Created on 11 March 2003, 14:17
| Nested classes inherited from class java.lang.Thread |
java.lang.Thread.UncaughtExceptionHandler |
|
Constructor Summary |
MSCycle()
to create an MSCycle with the default score of a one beat long note |
MSCycle(jm.music.data.Score scoreToSet)
Creates a new instance of MSCycle, with a specific score for it to
play. |
MSCycle(jm.music.data.Score scoreToSet,
boolean playing)
Creates a new instance of MSCycle, with a specific score for it to
play. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
tempo
private double tempo
score
private jm.music.data.Score score
seq
private Sequencer seq
playing
private boolean playing
MSCycle
public MSCycle()
- to create an MSCycle with the default score of a one beat long note
MSCycle
public MSCycle(jm.music.data.Score scoreToSet)
- Creates a new instance of MSCycle, with a specific score for it to
play.
MSCycle
public MSCycle(jm.music.data.Score scoreToSet,
boolean playing)
- Creates a new instance of MSCycle, with a specific score for it to
play.
run
public void run()
- To run the thread.
setScore
public void setScore(jm.music.data.Score toSet)
- Use this to set the new score.
setTempo
public void setTempo(double newTempo)
- Use this to set the tempo.
stopPlayback
public void stopPlayback()
- Halt the score looping.
startPlayback
public void startPlayback()
- Start or Restart the score looping.