gnu.javax.sound.midi.dssi

Class DSSISynthesizer.DSSIMidiChannel

Enclosing Class:
DSSISynthesizer
Implemented Interfaces:
MidiChannel

public class DSSISynthesizer.DSSIMidiChannel
extends Object
implements MidiChannel

Constructor Summary

DSSIMidiChannel(int channel)
Default contructor.

Method Summary

void
allNotesOff()
Stop playing all notes.
void
allSoundOff()
Stop all sound.
void
controlChange(int controller, int value)
Set a change in a controller's value.
int
getChannelPressure()
Get the key pressure for the channel.
int
getController(int controller)
Get a controller's value.
boolean
getMono()
Get the current mono mode.
boolean
getMute()
Get the current mute mode.
boolean
getOmni()
Get the current omni mode.
int
getPitchBend()
Get the pitch bend for this channel as a positive 14-bit value.
int
getPolyPressure(int noteNumber)
Get the key pressure for a note.
int
getProgram()
Get the current patch for this channel.
boolean
getSolo()
Get the current solo mode.
boolean
localControl(boolean on)
Set whether or not local controls are on or off.
void
noteOff(int noteNumber)
Stop playing a note.
void
noteOff(int noteNumber, int velocity)
Stop playing a note.
void
noteOn(int noteNumber, int velocity)
Start playing a note.
void
programChange(int program)
Change the patch for this channel.
void
programChange(int bank, int program)
Change the bank and patch for this channel.
void
resetAllControllers()
Reset all MIDI controllers to their default values.
void
setChannelPressure(int pressure)
Set the key pressure for the channel.
void
setMono(boolean on)
Turns mono mode on or off.
void
setMute(boolean mute)
Turns mute mode on or off.
void
setOmni(boolean on)
Turns omni mode on or off.
void
setPitchBend(int bend)
Change the pitch bend for this channel using a positive 14-bit value.
void
setPolyPressure(int noteNumber, int pressure)
Change in a key pressure for a note.
void
setSolo(boolean solo)
Turns solo mode on or off.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

DSSIMidiChannel

public DSSIMidiChannel(int channel)
Default contructor.

Method Details

allNotesOff

public void allNotesOff()
Stop playing all notes. Sound may not stop.
Specified by:
allNotesOff in interface MidiChannel

allSoundOff

public void allSoundOff()
Stop all sound.
Specified by:
allSoundOff in interface MidiChannel

controlChange

public void controlChange(int controller,
                          int value)
Set a change in a controller's value.
Specified by:
controlChange in interface MidiChannel
Parameters:
controller - the MIDI controller number (0 to 127)
value - the new value (0 to 127)

getChannelPressure

public int getChannelPressure()
Get the key pressure for the channel.
Specified by:
getChannelPressure in interface MidiChannel
Returns:
the key pressure

getController

public int getController(int controller)
Get a controller's value.
Specified by:
getController in interface MidiChannel
Parameters:
controller - the MIDI controller number (0 to 127)
Returns:
the controller's value (0 to 127)

getMono

public boolean getMono()
Get the current mono mode.
Specified by:
getMono in interface MidiChannel
Returns:
true if mono is enabled, false otherwise

getMute

public boolean getMute()
Get the current mute mode.
Specified by:
getMute in interface MidiChannel
Returns:
true if mute is enabled, false otherwise

getOmni

public boolean getOmni()
Get the current omni mode.
Specified by:
getOmni in interface MidiChannel
Returns:
true if omni is enabled, false otherwise

getPitchBend

public int getPitchBend()
Get the pitch bend for this channel as a positive 14-bit value.
Specified by:
getPitchBend in interface MidiChannel
Returns:
the current patch bend value

getPolyPressure

public int getPolyPressure(int noteNumber)
Get the key pressure for a note.
Specified by:
getPolyPressure in interface MidiChannel
Parameters:
noteNumber - the MIDI note number
Returns:
the key pressure

getProgram

public int getProgram()
Get the current patch for this channel.
Specified by:
getProgram in interface MidiChannel
Returns:
current patch (0 to 127)

getSolo

public boolean getSolo()
Get the current solo mode.
Specified by:
getSolo in interface MidiChannel
Returns:
true is solo is enabled, false otherwise.

localControl

public boolean localControl(boolean on)
Set whether or not local controls are on or off. They are on by default.
Specified by:
localControl in interface MidiChannel
Parameters:
on - true to enable local controls, false to disable
Returns:
the new value

noteOff

public void noteOff(int noteNumber)
Stop playing a note.
Specified by:
noteOff in interface MidiChannel
Parameters:
noteNumber - the MIDI note number

noteOff

public void noteOff(int noteNumber,
                    int velocity)
Stop playing a note.
Specified by:
noteOff in interface MidiChannel
Parameters:
noteNumber - the MIDI note number
velocity - the volcity at which the ket was released

noteOn

public void noteOn(int noteNumber,
                   int velocity)
Start playing a note.
Specified by:
noteOn in interface MidiChannel
Parameters:
noteNumber - the MIDI note number
velocity - the velocity at which the key was pressed

programChange

public void programChange(int program)
Change the patch for this channel.
Specified by:
programChange in interface MidiChannel
Parameters:
program - the patch number to switch to (0 to 127)

programChange

public void programChange(int bank,
                          int program)
Change the bank and patch for this channel.
Specified by:
programChange in interface MidiChannel
Parameters:
bank - the bank to switch to (0 to 16383)
program - the patch to switch to (0 to 127)

resetAllControllers

public void resetAllControllers()
Reset all MIDI controllers to their default values.
Specified by:
resetAllControllers in interface MidiChannel

setChannelPressure

public void setChannelPressure(int pressure)
Set the key pressure for the channel.
Specified by:
setChannelPressure in interface MidiChannel
Parameters:
pressure - the key pressure

setMono

public void setMono(boolean on)
Turns mono mode on or off.
Specified by:
setMono in interface MidiChannel
Parameters:
on - true to enable mono mode, false to disable

setMute

public void setMute(boolean mute)
Turns mute mode on or off.
Specified by:
setMute in interface MidiChannel
Parameters:
mute - true to enable mute mode, false to disable

setOmni

public void setOmni(boolean on)
Turns omni mode on or off.
Specified by:
setOmni in interface MidiChannel
Parameters:
on - true to enable omni mode, false to disable

setPitchBend

public void setPitchBend(int bend)
Change the pitch bend for this channel using a positive 14-bit value.
Specified by:
setPitchBend in interface MidiChannel
Parameters:
bend - the new pitch bend value

setPolyPressure

public void setPolyPressure(int noteNumber,
                            int pressure)
Change in a key pressure for a note.
Specified by:
setPolyPressure in interface MidiChannel
Parameters:
noteNumber - the MIDI note number
pressure - the key pressure

setSolo

public void setSolo(boolean solo)
Turns solo mode on or off. If any channels are soloed, then only those channels make sounds, otherwise all channels will make sound.
Specified by:
setSolo in interface MidiChannel
Parameters:
solo - true to enable solo mode, false to disable

DSSISynthesizer.java -- DSSI Synthesizer Provider Copyright (C) 2005, 2006, 2012 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.