2

Could I use my M-AUDIO Fast Track Ultra as the audio interface in a Java MIDI plugin I'm writing? That virtual driver ASIO4ALL could be a nice way to go as well.

I will code a Live Performance MIDI Modifier, to enhance a keyboardist's level of control and complexity of MIDI-controlled effects. I've already begun a small proof-of-concept app that will get me going, but even when testing Oracle's own demo of the JavaSound API I notice some delay between the mouse input commands and the sound going. Whether this is caused by the way this app is constructed, I'll still find out, but I want to be sure I can deliver almost zero latency (20ms, as I get in my live performance host software). Have you guys found out anything relevant?

CL.
  • 173,858
  • 17
  • 217
  • 259
Ortiz
  • 294
  • 1
  • 4
  • 14

1 Answers1

0

The only portable way to get a synthesizer is MidiSystem.getSynthesizer(), which gives you nothing but the default synthesizer, which outputs to some default audio device. You would have to change the default audio output device of the JVM or of the OS.

The synthesizer has a fixed latency, which you can obtain with Synthesizer.getLatency(). The audio device will add its own latency.

CL.
  • 173,858
  • 17
  • 217
  • 259
  • Sorry, does that mean there is no way I can use the driver from my soundcard? I am trying to get low latency output from a MIDI-only plugin, no audio proccessing. I'll keep searching for content. – Ortiz Aug 18 '14 at 12:10
  • So you want output MIDI, not audio? – CL. Aug 18 '14 at 12:23
  • The question mentions an "audio interface" and "ASIO4ALL". As for MIDI, read the [FAQ](http://www.jsresources.org/faq_midi.html). – CL. Aug 18 '14 at 14:00
  • Of course it mentions "audio interface" and "ASIO4ALL", without one of them, one would strive to get near-zero latency for monitoring MIDI input. That's what I'm talking about: http://johnrofrano.com/training/faq/how-do-i-remove-midi-keyboard-delay/ – Ortiz Aug 18 '14 at 15:27
  • That page talks about the audio output used by a software synthesizer. – CL. Aug 18 '14 at 15:28
  • So you mean there won't be any delay from midi input/output? – Ortiz Aug 18 '14 at 15:29
  • MIDI drivers don't buffer data (except for the 1 ms framing implied by the USB protocol). – CL. Aug 18 '14 at 15:31