C & Wndows.
It's a COM app Sonar inside so I think I'm at the mercy of that environment.
I can get down low and pump hex out the midi ports and look at what comes back.
Looks like I'll have to do something like that.
--- On Sat, 4/16/11, c00lryguy <c00lryguy@...> wrote:
From: c00lryguy <c00lryguy@...>
Subject: [bc2000] Re: Detect BCR2000 count in C?
To: bc2000@yahoogroups.com
Date: Saturday, April 16, 2011, 9:21 PM
What OS? What Language?
On Windows you need to use the WinMM.dll and use the function "midiInGetNumDevs" to find the number of input devices then use and "midiInGetDevCapsA" to fill a "MIDIINCAPS" struct.
An easier way would be to install Ruby then open a console/terminal.
If you're on Windows, the type "gem install midi-winmm".
If on Linux, then type "gem install alsa-rawmidi"
Now make a new file and name it "br2000.rb"
Type the following code (replace "midi-winmm" with "alsa-rawmidi" and "MIDIWinMM" with "AlsaRawMIDI"):
require 'pp'
require 'midi-winmm'
pp MIDIWinMM::Input.all.find_all { |device| device.instance_eval(@name) == "BCR2000" }
This will show all MIDI input devices with the name "BCR2000".
This process on Ruby will soon be much much easier.
I'm not too sure on how to do it on other languages.
C has alot of examples.
--- In bc2000@yahoogroups.com, "bitman2112" <bitman2112@...> wrote:
>
> Hi,
>
> I have a Sonar control surface plugin that I am working on.
> It is fully operational but I would like to be able to sniff out and enumerate the number of bcr2000s attached like the BC Manager can.
>
> Why re-invent the wheel I always say. :-)
>
> Anybody got a code snippet that does this?
>
> Thanks.
> :Ron
>Message
Re: [bc2000] Re: Detect BCR2000 count in C?
2011-04-17 by Ron Anderson
Attachments
- No local attachments were found for this message.