public class MultiChannelSynthesizer
extends java.lang.Object
lfo -> pitchToLinear -> [VOICES] -> volume* -> panner
bend --/
Note: this class is experimental and subject to change.Constructor and Description |
---|
MultiChannelSynthesizer()
Construct a synthesizer with a maximum of 16 channels like MIDI.
|
MultiChannelSynthesizer(int maxChannels) |
Modifier and Type | Method and Description |
---|---|
double |
getMasterAmplitude() |
UnitOutputPort |
getOutput() |
void |
noteOff(int channel,
int noteNumber,
double amplitude)
Turn off a note.
|
void |
noteOff(int channel,
int noteNumber,
int velocity)
Turn off a note.
|
void |
noteOn(int channel,
int noteNumber,
double amplitude)
Turn on a note.
|
void |
noteOn(int channel,
int noteNumber,
int velocity)
Turn on a note.
|
void |
programChange(int channel,
int program) |
void |
setBendRange(int channel,
double semitones) |
void |
setMasterAmplitude(double masterAmplitude)
Set amplitude for a single voice when the velocity is 127.
|
void |
setPan(int channel,
double pan)
Pan from left to right.
|
void |
setPitchBend(int channel,
double offset)
Set a pitch offset that will be scaled by the range for the channel.
|
void |
setPressure(int channel,
double pressure) |
void |
setTimbre(int channel,
double timbre) |
void |
setup(Synthesizer synth,
int startChannel,
int numChannels,
int voicesPerChannel,
VoiceDescription voiceDescription)
Specify a VoiceDescription to use with multiple channels.
|
void |
setVibratoDepth(int channel,
double semitones) |
void |
setVolume(int channel,
double volume)
Set volume for entire channel.
|
public MultiChannelSynthesizer()
public MultiChannelSynthesizer(int maxChannels)
public void setup(Synthesizer synth, int startChannel, int numChannels, int voicesPerChannel, VoiceDescription voiceDescription)
synth
- startChannel
- channel index is zero basednumChannels
- voicesPerChannel
- voiceDescription
- public void programChange(int channel, int program)
public void noteOff(int channel, int noteNumber, int velocity)
channel
- noteNumber
- velocity
- between 0 and 127, will be scaled by masterAmplitudepublic void noteOff(int channel, int noteNumber, double amplitude)
channel
- noteNumber
- amplitude
- between 0 and 1.0, will be scaled by masterAmplitudepublic void noteOn(int channel, int noteNumber, int velocity)
channel
- noteNumber
- velocity
- between 0 and 127, will be scaled by masterAmplitudepublic void noteOn(int channel, int noteNumber, double amplitude)
channel
- noteNumber
- amplitude
- between 0 and 1.0, will be scaled by masterAmplitudepublic void setPitchBend(int channel, double offset)
channel
- offset
- ranges from -1.0 to +1.0public void setBendRange(int channel, double semitones)
public void setPressure(int channel, double pressure)
public void setVibratoDepth(int channel, double semitones)
public void setTimbre(int channel, double timbre)
public void setVolume(int channel, double volume)
channel
- volume
- normalized between 0.0 and 1.0public void setPan(int channel, double pan)
channel
- pan
- ranges from -1.0 to +1.0public UnitOutputPort getOutput()
public void setMasterAmplitude(double masterAmplitude)
masterAmplitude
- public double getMasterAmplitude()