0

I need to read data from the mic input in realtime in my Java program. I experimented with TaroDSP a bit and while it does provide a fairly straightforward API for this, its latency is too high for my purposes.

I was thinking that maybe I can implement this in Max/DSP, write a program that would simply read the mic input levels, export it as a jar and include it in my java program as a library and simply call it from within my java program to query the mic input levels, something like:

ExportedMaxObject o = new ExportedMaxObject();
int currentMicLevel = o.getMicInputLevel();

I know Max/Msp makes somehow possible to use mxj and mxj~ Java objects to access data to and from Max but it is not clear to me how they are used. Do I need to have Max running or installed in my computer in order to use it? I am looking for a solution where I can embed this into my Java program and use my own UI so I can distribute it without any dependencies to Max/Msp.

Thanks in advance for any help.

JohnH
  • 2,713
  • 12
  • 21
user975068
  • 71
  • 1
  • 5

1 Answers1

0

I would say it is very unlikely that you will find a way to load a Max patch in Java.

The other way around might be possible: building an app in Max that incorporates your Java work, however it's important to note that Java support in Max has not received a lot of attention since Apple dropped it.

Mattijs
  • 1,909
  • 3
  • 19
  • 28