public final class MidiCommon
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MidiCommon.MoreMidiInfo |
Modifier and Type | Method and Description |
---|---|
static javax.sound.midi.MidiDevice |
chooseMidiDevice(boolean inputDevice,
boolean outputDevice)
Choose a MIDI device using a CLI.
|
static javax.sound.sampled.Mixer |
chooseMixerDevice()
Choose a Mixer device using CLI.
|
static javax.sound.midi.MidiDevice.Info |
getMidiDeviceInfo(int index)
Retrieve a MidiDevice.Info by index number.
|
static javax.sound.midi.MidiDevice.Info |
getMidiDeviceInfo(java.lang.String strDeviceName,
boolean bForOutput)
Retrieve a MidiDevice.Info for a given name.
|
static java.util.Vector<MidiCommon.MoreMidiInfo> |
listDevices(boolean input,
boolean output) |
static double[] |
tuningFromPeaks(double[] peaks)
Create a MIDI tuning from a tone scale (defined by peaks).
|
public static java.util.Vector<MidiCommon.MoreMidiInfo> listDevices(boolean input, boolean output)
public static javax.sound.midi.MidiDevice.Info getMidiDeviceInfo(java.lang.String strDeviceName, boolean bForOutput)
strDeviceName
- the name of the device for which an info object should be
retrieved.bForOutput
- If true, only output devices are considered. If false, only
input devices are considered.public static javax.sound.midi.MidiDevice.Info getMidiDeviceInfo(int index)
index
- the index of the device to be retrievedpublic static javax.sound.midi.MidiDevice chooseMidiDevice(boolean inputDevice, boolean outputDevice)
inputDevice
- is the MIDI device needed for input of events? E.G. a keyboardoutputDevice
- is the MIDI device needed to send events to? E.g. a (software)
synthesizer.public static javax.sound.sampled.Mixer chooseMixerDevice()
public static double[] tuningFromPeaks(double[] peaks)
peaks
- The peaks (from e.g. a Scala file or histogram).