Package samer.midi
Class MidiRecorderBase
- java.lang.Object
-
- samer.tools.AnonymousTask
-
- samer.tools.NamedTask
-
- samer.midi.MidiRecorderBase
-
- All Implemented Interfaces:
- Task
- Direct Known Subclasses:
- MidiRecorder
public abstract class MidiRecorderBase extends NamedTask
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description VInteger
T
-
Constructor Summary
Constructors Constructor and Description MidiRecorderBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
execute(java.lang.String cmd, Environment env)
void
getCommands(Agent.Registry r)
void
noteOff(int ch, int num)
void
noteOn(int ch, int num, int vel)
given 120 bpm: (120 bpm) / (60 seconds per minute) = 2 beats per second 2 / 1000 beats per millisecond (2 * resolution) ticks per second (2 * resolution)/1000 ticks per millisecond, or (resolution / 500) ticks per millisecond ticks = milliseconds * resolution / 500void
saveMidiFile(java.io.File file)
void
tick()
-
Methods inherited from class samer.tools.AnonymousTask
starting, stopping
-
-
-
-
Constructor Detail
-
MidiRecorderBase
public MidiRecorderBase() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
getCommands
public void getCommands(Agent.Registry r)
-
execute
public void execute(java.lang.String cmd, Environment env) throws java.lang.Exception
- Throws:
java.lang.Exception
-
noteOn
public void noteOn(int ch, int num, int vel)
given 120 bpm: (120 bpm) / (60 seconds per minute) = 2 beats per second 2 / 1000 beats per millisecond (2 * resolution) ticks per second (2 * resolution)/1000 ticks per millisecond, or (resolution / 500) ticks per millisecond ticks = milliseconds * resolution / 500
-
noteOff
public void noteOff(int ch, int num)
-
tick
public void tick()
-
saveMidiFile
public void saveMidiFile(java.io.File file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-