11-01-2016 12:20 PM
I would like to play a "click" sound each time a user enters data into a numeric or string control. I have found Play Sound File.vi however, this has to load the wav file each time. This would create too long of a delay when clicking on the keyboard. I looked for a way in Windows 7 to make a click sound when keboard is pressed but nothing that work. I found the Windows 7 On Screen Keyboard (OSK) which does behave just like I want - makes a click when pressing OSK key. However, I don't want to use the OSK. Is there a way to load the sound I want with Play Sound File.vi and play it immediatelty to eliminate the the delay when loading?
11-01-2016 12:32 PM
Read the waveform from file once and use Sound Output Write.vi
11-01-2016 12:36 PM
Am I correct that you are a LabVIEW beginner and are using the Express VI? Have you tried, instead, the "Beep" (with nothing wired to its inputs)? It's not a "click", but it is an alert ...
Once you get away from Express VIs and learn better program design (like having an Initialization routine, a "Do Something, perhaps Many Somethings" in the middle, then a "Clean Up After Myself" at the end), you should be able to play whatever sound you want on a millesecond's notice.
Bob Schor
11-01-2016 01:01 PM
Bob, no I am not using an express vi. I was not aware of the Beep vi. Thanks for the heads up. I think the Alert sound would be confusing to the user. I think a "click" sound would be better. Thanks!
11-01-2016 01:02 PM
Jeff, looks great. Could you re-upload as LabVIEW 2014? Thanks!
11-01-2016 01:42 PM
a Snippet in 2014
11-01-2016 02:51 PM
I did exactly as in the video link you posted. I am saving the snippet to my PC. Then dragging onto my block diagram page. I still get this error message. There is not much to enter. I found the sound file VIs. Is there any other events other than than timeout?
11-01-2016 03:51 PM - edited 11-01-2016 03:55 PM
Use the latest snipett. If you look at the top left of the snippets you see a version number
That example was merely to demo a Proof-Of-Concept. I have a custom template that allows me to generate code with a simple event loop quickly and I did not add in any code to link to your exact use needs
11-01-2016 03:56 PM
I did use the lastest snippet. I examined the png file with a hex editor. Here is the tag/text at the end of the file that identifies the LabVIEW version:
"..EXtDescriptionLV: 14.0 11/1/2016 11:39:34 AM"
11-01-2016 04:30 PM
There are only a few functions shown on the Snippet. If you open the Sound Palette, you should be able to find them (Sound Output Read Simple, Sound Output Configure, Sound Output Write). The non-Timeout case has a Stop button. You should be able to "do it yourself" with the LabVIEW 2016 picture as a "blueprint".
Bob Schor