public class MidiPlayer extends AbstractPlayer
Modifier and Type | Class and Description |
---|---|
static class |
MidiPlayer.DeviceChannel
Container for the combination of device, channel and preselected program.
|
Modifier and Type | Field and Description |
---|---|
protected Logger |
logger
The logger.
|
randomSeed
Constructor and Description |
---|
MidiPlayer() |
Modifier and Type | Method and Description |
---|---|
void |
abortPlay()
Aborts play().
|
void |
configure(SongContext songContext,
Node node)
Configures the instance using the specified XML node.
|
int |
getCurrentTick()
Returns the current tick of the player.
|
int |
getMilliBPM()
Gets the number of beats per minute for playback.
|
void |
muteAllChannels()
Mutes all channels of all devices.
|
void |
play(SongContext songContext)
Plays the arrangement from the song context.
|
void |
setAfterPlayWaitTicks(int postWaitTicks) |
void |
setBeforePlayWaitTicks(int preWaitTicks) |
void |
setChannelMap(Map<String,MidiPlayer.DeviceChannel> channelMap)
Sets the channel map, which maps instruments to MIDI devices and channels.
|
void |
setControllerLFOs(com.soundhelix.component.player.impl.MidiPlayer.ControllerLFO[] controllerLFOs) |
void |
setControllerValues(com.soundhelix.component.player.impl.MidiPlayer.ControllerValue[] controllerValues) |
void |
setGroove(String grooveString)
Sets the groove for playback.
|
void |
setInstrumentControllerLFOs(com.soundhelix.component.player.impl.MidiPlayer.InstrumentControllerLFO[] instrumentControllerLFOs) |
void |
setMaxWindowSize(int maxWindowSize) |
void |
setMidiFilename(String midiFilename) |
void |
setMilliBPM(int milliBPM)
Sets the number of beats per minute for playback.
|
void |
setMinWindowSize(int minWindowSize) |
void |
setTransposition(int transposition)
Sets the transposition.
|
void |
setWaitForStart(boolean waitForStart) |
boolean |
skipToTick(int tick)
Skips to the specified tick.
|
getRandomSeed, setRandomSeed
protected final Logger logger
public int getMilliBPM()
public void setMilliBPM(int milliBPM)
milliBPM
- the number of millibeats per minutepublic void setTransposition(int transposition)
transposition
- the transposition pitchpublic final void setGroove(String grooveString)
grooveString
- the groove stringpublic void setChannelMap(Map<String,MidiPlayer.DeviceChannel> channelMap)
channelMap
- the channel mappublic void play(SongContext songContext)
Player
songContext
- the song contextpublic final void muteAllChannels() throws InvalidMidiDataException
InvalidMidiDataException
- in case of invalid MIDI datapublic final void setControllerLFOs(com.soundhelix.component.player.impl.MidiPlayer.ControllerLFO[] controllerLFOs)
public final void setInstrumentControllerLFOs(com.soundhelix.component.player.impl.MidiPlayer.InstrumentControllerLFO[] instrumentControllerLFOs)
public final void configure(SongContext songContext, Node node) throws XPathException
XMLConfigurable
songContext
- the song contextnode
- the parent XML node of the configuration tagsXPathException
- in case of an XPath problempublic boolean skipToTick(int tick)
tick
- the tickpublic void abortPlay()
Player
public void setBeforePlayWaitTicks(int preWaitTicks)
public void setAfterPlayWaitTicks(int postWaitTicks)
public int getCurrentTick()
Player
public void setMidiFilename(String midiFilename)
public final void setControllerValues(com.soundhelix.component.player.impl.MidiPlayer.ControllerValue[] controllerValues)
public void setMinWindowSize(int minWindowSize)
public void setMaxWindowSize(int maxWindowSize)
public void setWaitForStart(boolean waitForStart)