Update list of Midi Devices in Java

不羁岁月 提交于 2019-12-06 13:17:03

There is now a library, CoreMidi4J, that correctly supports hot-plugging (as well as a few other things) on macOS. I am not the author, but it appears to work well for my needs.

https://github.com/DerekCook/CoreMidi4J

One way is to set up a system as follows:

shell script:

start program with input 1 // that means it's the receiver

while(true) {
  start program with input 2 // that means it's the sender
  wait for an amount of time
}

end shell script

inside the program is the following:

    if code==1:
      while(true) {
      do whatever you have to do
      at specified point in time:
          read file "myfile"
          assemble the info
      }
      if code==2:
        read the device info
        write the info to "myfile"
        exit
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!