LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sound Effects on Controls?

Is there a simple way to make my controls--buttons, knobs, etc.--have sound effects attached to them? I don't want to unnecessarily clutter up my programs with extra case structures and such, and I don't see any simpler way to do it, but I'd just like to double-check that there is, in fact, no simple way to attach sounds to the operation of controls in general.

On a related note, does anyone know of a good place to go to get some stock sounds that I can use for those controls which I do stick sounds with? (Free "galleries" of some sort would be preferable, of course, as this is not a necessary feature of the programs that I am making.)

(Edit to fix line breaks.)

Message Edited by DJDDA on 11-06-2007 05:55 PM

Message Edited by DJDDA on 11-06-2007 05:55 PM
0 Kudos
Message 1 of 10
(5,380 Views)

Place a play wav vi in the event for a mouse click or double click.  This is a good use case for an Xcontrol.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 10
(5,366 Views)
Like Paul said, the Play Waveform function in an Event Case is the way to go. And do a google search for 'wave files'. That should turn up about 7 million websites to choose from.

Have fun!

B-)
0 Kudos
Message 3 of 10
(5,349 Views)
Like the others said, the event structure is the way to do this.

But you don't need to make an event case for each button. You can use a user
event, to register all controls. Get all control references with a property
node, and register the entire array. You'll get only one event case that
goes off if any of the buttons is pressed. You'll also get a reference of
the activated control. So you can get the name of the control, look it up in
a table (or name the control with the name of the wav file to play) and play
the result.

Regards,

Wiebe.


Message 4 of 10
(5,339 Views)
some day I really should take the time to learn how to use the programmatic events, they seem like a really good idea for certain situations. The trouble is I haven't really come across too many situations that I couldn't solve with the normal event structure.
0 Kudos
Message 5 of 10
(5,328 Views)
Wiebe:

Brilliant! Thank you!
0 Kudos
Message 6 of 10
(5,311 Views)

I leave an example that can provide, use it in your program

Message 7 of 10
(4,779 Views)

Why are you posting your code to multiple threads that are in some cases 9 years? Please try to post to current threads which are relavent and don't spam the forums with the same post.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 8 of 10
(4,769 Views)

thank you very much for the bounding, only propose a simple example that anyone can understand, if you can review the same issue is with different questions, plus there will always be people who are just starting, Greetings

Message 9 of 10
(4,758 Views)

But enough is enough. There is no justification for posting to so many old threads. Your code isn't even very well written and the shipping example works just fine.

Message 10 of 10
(4,752 Views)