02-28-2013 02:01 PM
Can LabView interact with a MIDI-capable piece of HW through a cheap 5 dollar USB MIDI cable?
03-01-2013 12:17 PM - edited 03-01-2013 12:17 PM
I believe it can be done. How easy will depend on if VISA recognizes the MIDI port and what is "sees" is as.
If VISA and NI MAX sees is as a valid port (MIDI or Serial port) or USB instrument then you should be able to read and write to is just like any VISA compatible instrument.
If not then it probably wont work without jumping through a lot of hoops.
Only way to know for sure is to buy one and try.
What have you got to lose besides $5?
03-02-2013 10:11 AM
Unfortunately, NI MAX doesn't seem to detect the cable. I tried 2 different manufacturer's cables...
03-02-2013 11:58 AM
05-28-2013 05:39 PM
LabVIEW is able to communicate though midi, although it's a very very hacky process! I'm assuming your cable has drivers and creates a midi interface
There's two ways to do it, this works if you are on windows and it's probably the cleanest way.
http://zone.ni.com/devzone/cda/epd/p/id/718
which may be enough for some people... The second, more full featured way of getting MIDI out of labview is through OSC... get this
https://decibel.ni.com/content/groups/osc
And use it to generate OSC messages, then grab a complementary piece of software to do the OSC- MIDI translation, unfortunately the OSC to midi conversion department is pretty sad right now, there's a lot of hacky programs, like OSCulator, touchOSC bridge, this thing (http://konkreetlabs.com/2011/05/24/free-win-mac-osc-to-midi-converter/) that all can be persuaded into working, but it's not very pretty. perhaps the best alternative to get MIDI to OSC is though a synthesis software suite such as pureData, MAX/MSP, Max for Live... but I assume you don't want to learn a new programming language (and don't want to spend hundreds of dollars in music software)
As a matter of fact, because labVIEW's native MIDI support is less than stellar,(or inexistent! :() I'm working on third way, basically creating a whole API to communicate to the OS provided midi interfaces, but you need to do some DLL/framework (winMM, CoreMidi, ALSA) in addition to the labVIEW API to get it working... It's actually not that sophisticated, but there's way to much work to be done before it's usable ( so far you can get a listing of MIDI devices and information about them but no messaging just yet..)