openrndr / orx

A growing library of assorted data structures, algorithms and utilities for OPENRNDR
https://openrndr.org
BSD 2-Clause "Simplified" License
118 stars 36 forks source link

MIDI Connection Delay #299

Open thomas-rndr opened 1 year ago

thomas-rndr commented 1 year ago

Operating System

Mac

OPENRNDR version

0.4.2

ORX version

0.4.2

Java version (if applicable)

No response

Describe the bug

My midi controller is repeatedly taking over 12 seconds to load.

Steps to reproduce the bug

Here is the code I'm running that produces this information

program {
    println("MidiTransceiver.fromDeviceVendor() begin:  ${System.currentTimeMillis()}")
    val controller = MidiTransceiver.fromDeviceVendor("Arturia MiniLab mkII","Arturia")
    println("Controller created:  ${System.currentTimeMillis()}")

this outputs MidiTransceiver.fromDeviceVendor() begin: 1679591166978 Controller created: 1679591179802

hamoid commented 1 year ago

I don't know why this can be, but maybe it's useful to know if it's an M1 CPU.

Does it also happen when running the program from the command line with ./gradlew run.?

hamoid commented 1 year ago

Is

MidiDeviceDescription.list().forEach {
    println("${it.name}, ${it.vendor} r:${it.receive} t:${it.transmit}")
}

also slow?