From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-08-2016 03:32 PM
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!
Solved! Go to Solution.
06-08-2016 03:41 PM
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!
06-08-2016 03:47 PM
You can use ActiveX to call Windows Media Player for MIDI files.
06-08-2016 04:25 PM
wow great idea! I can play "doremi.wav" as needed!! That's much easier than MIDI.
Thank you so much!
06-08-2016 04:30 PM - edited 06-08-2016 04:32 PM
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
but I agree, as Gerd pointed, using .wav files is much easier in this context