LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MIDI out with Labview and windows 7

Solved!
Go to solution

Hi there,

 

I'm currently doing a simple project in Labview.

 

Reading the voltage from DAQ, if voltage in channel 1 > 0.5V, laptop plays "do",

                                                         if voltage in channel 2 >0.5V, laptop plays "re"

                                                         if voltage in channel 3 >0.5V, laptop plays "Mi" 

 

I know how to deal with DAQ, but I have no experience in MIDI, I don't know how to make laptop play musical note.

 

Could anyone give me some references or examples in this field? Thank you so much!

0 Kudos
Message 1 of 5
(4,194 Views)
Solution
Accepted by topic author yatang

Hi yatang,

 

if voltage in channel 1 > 0.5V, laptop plays "do",

if voltage in channel 2 >0.5V, laptop plays "re"

if voltage in channel 3 >0.5V, laptop plays "Mi" 

LabVIEW has functions to play WAVE files. You could supply wavefiles for your DoReMi notes and play them as needed…

 

but I have no experience in MIDI, I don't know how to make laptop play musical note.

Do you have a MIDI interface?

Do you have a driver for that interface?

Do you have a LabVIEW driver for that interface?

It's the same as with any other interface/device you want to control programmatically: you need a suitable driver accessable from your programming language!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(4,189 Views)

You can use ActiveX to call Windows Media Player for MIDI files.

 

 

 

George Zou
0 Kudos
Message 3 of 5
(4,183 Views)

wow great idea! I can play "doremi.wav" as needed!! That's much easier than MIDI.

 

Thank you so much!

0 Kudos
Message 4 of 5
(4,167 Views)

hi,

do you use your vi within a windows system? If you do so, you could use the winmm.dll to play midi notes on your speakers,

as shown in this projec by jallen88 :

https://decibel.ni.com/content/docs/DOC-19902

 

2016-06-08_winmdll_midi-output.PNG

 

 

 but I agree, as Gerd pointed, using .wav files is much easier in this context

 

Message 5 of 5
(4,160 Views)