aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jsyn/midi
diff options
context:
space:
mode:
authorPhil Burk <[email protected]>2016-11-30 19:02:58 -0800
committerPhil Burk <[email protected]>2016-11-30 19:02:58 -0800
commit2785ec51000f9dd7a7640f1a4edb69f541d757f1 (patch)
tree7b5ab76a669bf0b92b5d13109076c145af0f904c /src/com/jsyn/midi
parent5cc223574b43d3f72b746e8f0bb4f31cbd2fd52f (diff)
cleanup for 16.7.8, doc MultiChannelSynthesizer, add DoubleTable.length()
Diffstat (limited to 'src/com/jsyn/midi')
-rw-r--r--src/com/jsyn/midi/MidiSynthesizer.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/jsyn/midi/MidiSynthesizer.java b/src/com/jsyn/midi/MidiSynthesizer.java
index e011430..30204b0 100644
--- a/src/com/jsyn/midi/MidiSynthesizer.java
+++ b/src/com/jsyn/midi/MidiSynthesizer.java
@@ -16,8 +16,28 @@
package com.jsyn.midi;
+import com.jsyn.instruments.DualOscillatorSynthVoice;
import com.jsyn.util.MultiChannelSynthesizer;
+/**
+ * Map MIDI messages into calls to a MultiChannelSynthesizer.
+ * Handles CONTROLLER_MOD_WHEEL, TIMBRE, VOLUME and PAN.
+ * Handles Bend Range RPN.
+ *
+ * <pre><code>
+ voiceDescription = DualOscillatorSynthVoice.getVoiceDescription();
+ multiSynth = new MultiChannelSynthesizer();
+ final int startChannel = 0;
+ multiSynth.setup(synth, startChannel, NUM_CHANNELS, VOICES_PER_CHANNEL, voiceDescription);
+ midiSynthesizer = new MidiSynthesizer(multiSynth);
+ // pass MIDI bytes
+ midiSynthesizer.onReceive(bytes, 0, bytes.length);
+ </code></pre>
+ *
+ * See the example UseMidiKeyboard.java
+ *
+ * @author Phil Burk (C) 2016 Mobileer Inc
+ */
public class MidiSynthesizer extends MessageParser {
private MultiChannelSynthesizer multiSynth;