Package com.softsynth.jmsl.midi
Class MidiNoteRecorder
java.lang.Object
com.softsynth.jmsl.MusicJob
com.softsynth.jmsl.MusicShape
com.softsynth.jmsl.midi.MidiNoteRecorder
- All Implemented Interfaces:
Composable,DimensionNameSpace,MidiListener,Playable,java.lang.Cloneable,java.lang.Runnable
public class MidiNoteRecorder extends MusicShape implements MidiListener
MusicShape that logs Midi noteon's to a 3 dimensional MusicShape (timestamp, note, vel)
NoteOff's are logged at noteOn's with vel 0 See MidiParser
NoteOff's are logged at noteOn's with vel 0 See MidiParser
- Author:
- Nick Didkovsky and Phil Burk
-
Field Summary
Fields inherited from class com.softsynth.jmsl.MusicJob
repeatCount -
Constructor Summary
Constructors Constructor Description MidiNoteRecorder() -
Method Summary
Modifier and Type Method Description voidhandleChannelAftertouch(double timeStamp, int channel, int pressure)does nothingvoidhandleControlChange(double timeStamp, int channel, int id, int value)does nothingvoidhandleNoteOff(double timeStamp, int channel, int pitch, int velocity)If record flag is set, add time, pitch and velocity=0 to shapevoidhandleNoteOn(double timeStamp, int channel, int pitch, int velocity)If record flag is set, add time, pitch and velocity to shapevoidhandlePitchBend(double timeStamp, int channel, int lsb, int msb)does nothingvoidhandlePolyphonicAftertouch(double timeStamp, int channel, int pitch, int pressure)does nothingvoidhandleProgramChange(double timeStamp, int channel, int program)does nothingvoidhandleSysEx(double timeStamp, byte[] data)does nothingvoidsetThru(boolean f)Set Midi thru emulation.voidstartRecording(double startTime)clear old notes and set flag to ready recordingvoidstopRecording(double stopTime)Set startDelay and differentiate note ON/OFFs.Methods inherited from class com.softsynth.jmsl.MusicShape
add, add, add, add, add, add, add, add, add, add, add, add, add, calcDimStats, calcStats, clipValDim, clone, convertTimeBaseDim, copyDataFrom, copyDataFrom, copyDimensionNameSpace, differentiate, dimension, dimensionNames, dumpSource, dumpSource, dumpSource, fill, finishAll, get, get, getData, getDefault, getDefaultArray, getDefaultArray, getDimension, getDimensionName, getDimName, getHighLimit, getInt, getLowLimit, getMax, getMean, getMin, getNumberOfNames, getSum, insert, integrate, internalRepeat, invert, isClippingEnabled, isConstrainedToLimits, isSafeOrdering, load, main, prefab, prefab, print, printDim, printDimNames, printStats, qa, randomize, readBinaryHMSLShape, remove, remove, reverse, save, scale, scramble, set, set, set, set, setClipped, setClippingEnabled, setConstrainedToLimits, setDefault, setDimensionName, setDimName, setDimName, setLimits, setSafeOrdering, sort, sort, sort, sort, start, statsCalculated, stop, sumSet, sumSet, swap, toString, translate, transpose, usesStandardInvariants, useStandardDimensionNameSpace, useStandardInvariantsMethods inherited from class com.softsynth.jmsl.MusicJob
add, addPlayLurker, addRepeatPlayable, addStartPlayable, addStopPlayable, advanceCurrentTime, contains, elements, finish, getChild, getChildren, getCurrentTime, getDataTranslator, getDuration, getInstrument, getName, getParent, getPlayLurkers, getRepeatCount, getRepeatPause, getRepeatPlayables, getRepeats, getStartDelay, getStartPause, getStartPlayables, getStartTime, getStopDelay, getStopPlayables, getTimeStretch, getTransposition, halt, indexOf, insert, isRunning, launch, launch, play, play, printHierarchy, printHierarchy, remove, removeAll, removeAllPlayLurkers, removeAllRepeatPlayables, removeAllStartPlayables, removeAllStopPlayables, removePlayLurker, removeRepeatPlayable, removeStartPlayable, removeStopPlayable, repeat, run, setCurrentTime, setDataTranslator, setDuration, setInstrument, setName, setParent, setRepeatPause, setRepeats, setStartDelay, setStartPause, setStartTime, setStopDelay, setTimeStretch, setTransposition, size, timeStretch, transposition, waitForDoneMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
MidiNoteRecorder
public MidiNoteRecorder()
-
-
Method Details
-
startRecording
public void startRecording(double startTime)clear old notes and set flag to ready recording -
stopRecording
public void stopRecording(double stopTime)Set startDelay and differentiate note ON/OFFs. Set flag to ignore incoming MIDI. -
setThru
public void setThru(boolean f)Set Midi thru emulation. Noteon's are sent to JMSL.midi if true -
handleNoteOn
public void handleNoteOn(double timeStamp, int channel, int pitch, int velocity)If record flag is set, add time, pitch and velocity to shape- Specified by:
handleNoteOnin interfaceMidiListener
-
handleNoteOff
public void handleNoteOff(double timeStamp, int channel, int pitch, int velocity)If record flag is set, add time, pitch and velocity=0 to shape- Specified by:
handleNoteOffin interfaceMidiListener
-
handlePolyphonicAftertouch
public void handlePolyphonicAftertouch(double timeStamp, int channel, int pitch, int pressure)does nothing- Specified by:
handlePolyphonicAftertouchin interfaceMidiListener
-
handleControlChange
public void handleControlChange(double timeStamp, int channel, int id, int value)does nothing- Specified by:
handleControlChangein interfaceMidiListener
-
handleProgramChange
public void handleProgramChange(double timeStamp, int channel, int program)does nothing- Specified by:
handleProgramChangein interfaceMidiListener
-
handleChannelAftertouch
public void handleChannelAftertouch(double timeStamp, int channel, int pressure)does nothing- Specified by:
handleChannelAftertouchin interfaceMidiListener
-
handlePitchBend
public void handlePitchBend(double timeStamp, int channel, int lsb, int msb)does nothing- Specified by:
handlePitchBendin interfaceMidiListener
-
handleSysEx
public void handleSysEx(double timeStamp, byte[] data)does nothing- Specified by:
handleSysExin interfaceMidiListener
-