draeron/golaunchpad

undefined rxDAW, rxMidiIn, rxMidiOut

Opened this issue · 7 comments

Hi there!

image

Hmm... I'm on MacOS

image

wow, I didn't know that the choice of OS depends on the file name in this case

I'm trying to fix that, and i see some strange

image

Here Ins, but returns Outs.. is it correct? or on mac it looks another?

hi there! Darwin wasn't mentioned as being supported because I haven't tested it.

So yeah, the name varies depending on (I guess) the midi driver. On linux there doesn`t seem to have have any id/count to differentiate devices so I only support one. There should be 3 devices but depending on the OS the midi in/out can be the same device. So my guess is that darwin return 2 midi devices, the DAW and the MIDI. The MIDI one being IN/OUT even though it's name has OUT.

you could try something like this, it will use the midi out for input, might work (or not)

	rxDAW     = regexp.MustCompile(`.*LPMiniMK3 DAW OUT$`)
	rxMidiIn  = regexp.MustCompile(`.*LPMiniMK3 MIDI OUT$`)
	rxMidiOut = regexp.MustCompile(`.*LPMiniMK3 MIDI OUT$`)

Seems works to me, i will test and send you PR

	rxDAW     = regexp.MustCompile(`Launchpad Mini MK3 LPMiniMK3 DAW`)
	rxMidiIn  = regexp.MustCompile(`Launchpad Mini MK3 LPMiniMK3 MIDI Out`)
	rxMidiOut = regexp.MustCompile(`Launchpad Mini MK3 LPMiniMK3 MIDI In`)

Btw, what about checks ins and outs before for's cycles?

So my guess is that darwin return 2 midi devices, the DAW and the MIDI.

And yes, looks like I have only 2 midi devices

Well, now its work, but i receive some signal

2021-03-25T02:36:32.103+0300    INFO    main    midi/main.go:18 starting wave example
2021-03-25T02:36:32.124+0300    INFO    minimk3 minimk3/mk3.go:115      enabling programmer mode
2021-03-25T02:36:32.124+0300    INFO    minimk3 minimk3/mk3.go:165      sending wake message
receive signal urgent I/O condition

And i don't know what is that :)

I guess i accepted the merge request a little too fast hehe

I should add some kind of minimal cli for listings midi IDs. Also my gomidi dependency is quite old and might have some bug.

Maybe the out/in inversion in your patch creates some kind of exception. I just noticed you've put the midi in with a out name.

As I asked above, in #issuecomment-806244760 outs come from ins, and ins from outs, idk why, but it works for me, for ex on text
I think we could try i find solution :)