Playing sound with labview

I have saved some sound clips into a matrix. Now I want to play the
samples back (there are 10 of them) when I press the respective button
(button 1 for sound 1, button 2 for sound 2, etc). My problem is I can't
get the sounds to play when I press the button. I've tried a case
structure that would select the sound, but I also tried to let the sound
play (flipping a boolean). I can't get it to work. Does someone have a
VI that I can get ideas, or does someone want to chit-chat?
*peace*
DG
[email protected]
Sent via Deja.com http://www.deja.com/
Before you buy.

Hi Dorian,
I'm working on something similar. Have you looked at the telephone
dialer example that comes with labview (5.0 and 5.1)? That's a pretty
decent start.
Does someone have something better?
Cid
In article <87di90$dmv$[email protected]>,
Dorian Grey wrote:
>
>
> I have saved some sound clips into a matrix. Now I want to play the
> samples back (there are 10 of them) when I press the respective button
> (button 1 for sound 1, button 2 for sound 2, etc). My problem is I
can't
> get the sounds to play when I press the button. I've tried a case
> structure that would select the sound, but I also tried to let the
sound
> play (flipping a boolean). I can't get it to work. Does someone have a
> VI that I can get ideas, or does someone w
ant to chit-chat?
>
> *peace*
>
> DG
>
> [email protected]
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.

Similar Messages

  • Quicktime movies playing sound with no picture (only in firefox)

    Hi There,
    I'm having a weird issue with quicktime in firefox on apple macs. I'm not really familiar with macs and I was wondering if someone can offer a solution? When I visit the page in firefox on a mac the video plays sound but not the picture. This seems to happen to all firefox browsers that I have tested.
    I have a test link here for people to look at. http://www.wellcom.net.au/quicktime.aspx

    To Apple Discussions!
    Thank you for providing the link for others to test for you. A got a flash video which I had no problem viewing with sound. The picture did take a few seconds to appear. However, the sound came in right away. Here is the direct video link: http://www.wellcom.net.au/images/movingimages/BookCity.mp4
    Picture & sound was instant from the .mp4 link.
    Make sure you have the latest versions of Adobe Flash Player Software, repair permissions & restart your computer.
    If the above does not work, then please advise which version of FireFox you are using?

  • Would a LabVIEW 8.5 Executable play nice with LabVIEW 7.1 Developmen​t on the Same System?

    Our testing computer right now just has the user run the corresponding .vi file since we have LabVIEW 7.1 installed on the computer.
    If I use 8.5 to compile this .vi to an executable, I realize that I must install the run-time support for 8.5.  My question is what effect will installing the 8.5 run-time have on the ability to continue to run the other 7.1 VIs with LabVIEW 7.1. 
    Should I be concerned with losing MAX settings when installing the run-time support for 8.5? I want to be able to run 8.5 executables but also able to open up a 7.1 .vi file in LabVIEW 7.1 and run it that way also.
    Thanks for your help! I have 8.5 on my system and the idea is to slowly replace the running of the .vi files with .exe files, I was just curious in case my .exe doesn't work I can still run the tests with .vi in the mean time.
    Thanks for your help folks!

    Just note one thing - installing the 8.5 RTE should have no effect on 7.1, but if your executable requires drivers (e.g. DAQmx) and you install a version which no longer supports 7.1, you will lose the ability to work with that driver in 7.1. I don't think NI has any drivers yet which are not supported in 7.1, but I believe there are some which are no longer supported in 7.0.
    Try to take over the world!

  • Phone will play sound with headphones only?

    My iPhone 4S will not play sound except on headphones.  When I push the up or down button for volume adjustment it doesn't change on the screen at all ( like bars going up / down?)

    1. Remove the headphone.
        If you see red light in the headphone port, plug the headphone
        in and out of the port 5 or 6 times to flip the microswitch inside.
        Sound output may be stuck in the digital mode.
    2. Reset PRAM.  http://support.apple.com/kb/PH4405
    Best.

  • My computer only plays sound with headphones

    Product Name: pavilion pd6 
    product number: vm22ua#aba
    operating system: Windows 7
    error: my laptop only plays sound when i have headphones plugged in
    no changes made to the system before the issue occurred. new drivers were installed for my audio settings after the problem occurred but nothing worked.

    Do the Music and Videos app still play through the iPad's speakers ? If so then have you got notifications muted ? Only notifications (including games) get muted, so the Music and Videos apps and headphones, still get sound.
    Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad, or via the taskbar : double-click the home button; slide from the left; and it's the icon far left; press home again to exit the taskbar. The function that isn't on the side switch is set via the taskbar instead : http://support.apple.com/kb/HT4085

  • Play sound with JMF on xletview

    How to play a sound (such as midi) file with JMF?
    now I test it on xletview,
    Manager.createPlayer(new MediaLocator("file://D:/Project/Test/classes/0.mid"));
    how can I use relative path instead of using absolute path?
    thx for your help

    Hi Redduke
    Althought your post is from July 2007 I will reply you ;)
    I'm trying to plays video on JMF (on a MHP project), but I can't. Nevertheless I am capable to play audio from two different ways:
    1. Via HSound: You create an HSound player, load the file on it and then plays it
    2. Via JMFPlayer: Like before but with JMF
    The restriction is that the sound would be in .mp1 o .mp2 format. I try with .mp2 and i can plays audio.
    Regards ;)

  • IPad won't play sound with video? Will play music and radio apps, but not if there is a video component. Same for my iTunes movies.

    Help! My iPad won't play any audio when there is a video component to an app or game.   It will play my music and I can see the video on my movies, but not the movie sound.   Turning off and turning it on again worked as a temporary fix once, but now that is not working either.   Been going on for an week or two?

    Try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.

  • IPad only plays sound with music and some games

    My iPad was working great until a week ago but now I only have sound for my music. I have no sound when I type (yes I checked to make sure that the keyboard clicks were on). On certain games I have no sound. When I put my headphones on I have sound on Geometry wars but when i take the headphones out I got nothing. Also when I lock my iPad it doesn't make a sound. Any ideas?

    I don't fully understand what's involved but I've found that a System Reset cures many ills.  It's easy, quick and harmless:
    Hold down the on/off switch and the Home button  simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.
    A System Reset does not remove any apps, music, movies, etc. nor does it cause any settings to revert back to default.
    Also, you might wish to download the iPad-2 User Guide.  Pay special   attention to page 162.  Note that this Guide also applies to the iPad-1 with IOS 4.3 except for those functions that are not supported by the hardware.
    http://support.apple.com/manuals/#ipad
    Finally, the User Guide can be downloaded at no charge via iBooks and a less comprehensive version of the Guide is included as a Safari bookmark.

  • My hp touchpad only plays sound with headphones..what is the problem??

    what is the problem with my hp touchpad ..i could hear the sound only through the headphones

    http://support.apple.com/kb/TS2802

  • My 15in Pro won't play sound with out headphones.

    The red light is on inide the port also. Ive tried wiggling a tooth pic and head phone jacks in gently but no luck. Any help??

    Try inserting the headphone jack into the port and wiggle that and then remove. May have to do it several times. Other option is to remove the bottom and work the port switch manually to put it back so it doesn't register that a plug is inserted.

  • Please.. need help!! Problem with playing sounds

    Hello, any help at all greatly appreciated.
    I need a dead-certain way of playing sounds with my java application.
    Java media player doesn't seem to be working with sound files with a duration of longer than 30 seconds.
    I need a way of accessing the windows sound API from inside my java app.
    Anyone have any ideas??????

    Hello, any help at all greatly appreciated.
    I need a dead-certain way of playing sounds with my java application.
    Java media player doesn't seem to be working with sound files with a duration of longer than 30 seconds.
    I need a way of accessing the windows sound API from inside my java app.
    Anyone have any ideas??????

  • No sound with ALSA & Fluidsynth enabled (as normal user)

    Ahoy!
    I'm using pure ALSA (no pulseaudio) and I have a problem that when I start Fluidsynth I have no sound anymore. Without starting Fluidsynth, everything is working just fine.
    I can play sound with Fluidsynth enabled though when I add myself to the audio group. However, I didn't need to do that in the past. In fact, I have Fluidsynth up and running with ALSA on my laptop and everything works just fine and I remember reading in the wiki that the user is not supposed to be added to the audio group.
    Here's some information:
    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: A2G [AuzenTech X-Meridian 2G], device 0: Multichannel [Multichannel]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: A2G [AuzenTech X-Meridian 2G], device 1: Digital [Digital]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    cat /proc/asound/cards
    0 [A2G ]: CMI8788 - AuzenTech X-Meridian 2G
    C-Media Oxygen HD Audio at 0xc000, irq 17
    1 [NVidia ]: HDA-Intel - HDA NVidia
    HDA NVidia at 0xfa080000 irq 17
    aconnect -o
    client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
    client 16: 'AuzenTech X-Meridian 2G' [type=kernel]
    0 'AuzenTech X-Meridian 2G MIDI'
    And here's how it looks like when I start Fluidsynth (including the error message I get):
    USER@PROBLEM ~ % speaker-test -c 2
    speaker-test 1.0.28
    Playback device is default
    Stream parameters are 48000Hz, S16_LE, 2 channels
    Using 16 octaves of pink noise
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 2048 to 16384
    Period size range from 1024 to 1024
    Using max buffer size 16384
    Periods = 4
    was set period_size = 1024
    was set buffer_size = 16384
    0 - Front Left
    1 - Front Right
    ^CWrite error: -4,Interrupted system call
    xrun_recovery failed: -4,Interrupted system call
    Transfer failed: Interrupted system call
    USER@PROBLEM ~ % sudo systemctl start fluidsynth.service
    USER@PROBLEM ~ % sudo systemctl status fluidsynth.service
    ● fluidsynth.service - FluidSynth Daemon
    Loaded: loaded (/usr/lib/systemd/system/fluidsynth.service; disabled)
    Active: active (running) since Sat 2014-10-04 10:11:18 UTC; 6s ago
    Main PID: 1017 (fluidsynth)
    CGroup: /system.slice/fluidsynth.service
    └─1017 /usr/bin/fluidsynth -is -a alsa -m alsa_seq -r 48000 /usr/s...
    Oct 04 10:11:19 PROBLEM fluidsynth[1017]: fluidsynth: warning: Requested...d
    Hint: Some lines were ellipsized, use -l to show in full.
    USER@PROBLEM ~ % speaker-test -c 2
    speaker-test 1.0.28
    Playback device is default
    Stream parameters are 48000Hz, S16_LE, 2 channels
    Using 16 octaves of pink noise
    ALSA lib pcm_dmix.c:989:(snd_pcm_dmix_open) unable to create IPC semaphore
    Playback open error: -13,Permission denied
    aconnect -o
    client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
    client 16: 'AuzenTech X-Meridian 2G' [type=kernel]
    0 'AuzenTech X-Meridian 2G MIDI'
    client 128: 'FLUID Synth (1017)' [type=user]
    0 'Synth input port (1017:0)'
    Any ideas?
    Last edited by Janusz11 (2014-10-04 08:26:54)

    Thanks. I've set Fluidsynth up the way it is described in the wiki (FluidSynth). If I'm not mistaken it is already started with the "-a alsa" option through the config file (SYNTHOPTS="-is -a alsa -m alsa_seq -r 48000" ).
    Well, since adding the user to the audio group fixes the problem I'll do that now.

  • No Sound with Vidoes!

    hello!just got an ipod yesterday!wel the first experience was much daunting,but then i enjoyed it!the forum helped a lot in setting up the oh so famous topic "ipod just shows a cd pic with a cable..." ...
    i need help,ipod aint playin sound wit ma videos!anyone has any simple solutions?i dont hv quick time pro cuz,so cant use the MPEG streamline s/w 2 export the converted video...

    well it does play sound with some videos...but the videos that i converted from MPEG,its not playing sound with them!and the ipod is showin some strange blue green illusions when i play my video!guess some one else also faced the same issue,so i'll reset it..?

  • Interactive play sound file.vi crashs labview

    While playing with a *.wav file to perform an FFT on the data, I tried running this VI. Labview then crashes. No error.

    Which version of LabVIEW are you using?  I'm using LabVIEW 2011 SP1, and I ran the "Interactive Play Sound File.vi" from the example finder and the VI worked for me.  
    Are you just trying to play a sound file in your own VI?  If so, the DLL library call from the example could be causing the crash.  It could also be that your program isn't crashing, but just terminating before your sound file has a chance to play.
    There is an easier way to play a sound file, just use the "Play Sound File.vi".  You may also need to use the "Sound Output Wait.vi" to prevent your LabVIEW program from terminating before the sound has a chance to play.  I've attached a picture of the setup I'm refering to.
    Product Support Engineer
    National Instruments
    Attachments:
    sound_snippet.png ‏14 KB

  • Help with playing sound in applications

    im new to java and i was practicing playing sound in a swing application but the problem is that when i press the play button no sound is played...here is my code
    import javax.swing.*;
    import java.applet.AudioClip;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.io.File;
    public class JukeBox extends JFrame {
        private JLabel label;
        private JPanel panel, buttonPanel;
        private JComboBox playList;
        private JButton play, stop;
        private URL url1, url2, url3, url4, url5, url6;
        private AudioClip[] musicList;
        private AudioClip current ;
        public JukeBox() {
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setSize(500, 120);
            setLocation(50, 50);
            setTitle("JAVA JukeBox");
            url1 = url2 = url3 = url4 = url5 = url6 = null;
            current = null;
            try {
                url1 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\bottle-open.wav");
                url2 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\BP2.mp3");
                url3 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\fhm.aiff");
                url4 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\jungle.rmf");
                url5 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\spacemusic.au");
                url6 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\trippygaia.mid");
            } catch (MalformedURLException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            musicList = new AudioClip[7];
            musicList[0] = null;
            musicList[1] = JApplet.newAudioClip(url1);
            musicList[2] = JApplet.newAudioClip(url2);
            musicList[3] = JApplet.newAudioClip(url3);
            musicList[4] = JApplet.newAudioClip(url4);
            musicList[5] = JApplet.newAudioClip(url5);
            musicList[6] = JApplet.newAudioClip(url6);
            label = new JLabel("JAVA JukeBox", JLabel.CENTER);
            String[] musicList = {"select a track..."
                    , "bottle open"
                    , "bitch please II"
                    , "flutte, harmonica, mambo"
                    , "jungle"
                    , "spacemusic"
                    , "trippygaia"};
            playList = new JComboBox(musicList);
            playList.addActionListener(new ListListener());
            play = new JButton("Play");
            play.setActionCommand("play");
            play.addActionListener(new ButtonListener());
            stop = new JButton("Stop");
            stop.addActionListener(new ButtonListener());
            buttonPanel = new JPanel();
            buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
            buttonPanel.add(play);
            buttonPanel.add(stop);
            panel = new JPanel();
            panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
            panel.add(label);
            panel.add(Box.createRigidArea(new Dimension(0, 5)));
            panel.add(playList);
            panel.add(Box.createRigidArea(new Dimension(0, 5)));
            panel.add(buttonPanel);
            getContentPane().add(panel);
        private class ButtonListener implements ActionListener {
            public void actionPerformed(ActionEvent e) {
                if(current != null){
                    current.stop();
                if(e.getActionCommand().equalsIgnoreCase("play")){
                    if(current != null){
                        current.play();
        private class ListListener implements ActionListener {
            public void actionPerformed(ActionEvent e) {
                if (current != null) {
                    current.stop();
                current = musicList[playList.getSelectedIndex()];
        public static void main(String[] args) {
            setDefaultLookAndFeelDecorated(true);
            JukeBox jb = new JukeBox();
            jb.setVisible(true);
            jb.setResizable(false);
    }can u please tell me whats wrong with my code coz i cant hear no sound when i press the play button and can u please tell me why i cant simply put the file name in the URL instead of the complete path although the files are in the same directory of the source code and can i play mp3 using this little program ???
    plz help...im a newbie so plz explain as much as u can...

    After
    musicList = new AudioClip[7];
            musicList[0] = null;
            musicList[1] = JApplet.newAudioClip(url1);
            musicList[2] = JApplet.newAudioClip(url2);
            musicList[3] = JApplet.newAudioClip(url3);
            musicList[4] = JApplet.newAudioClip(url4);
            musicList[5] = JApplet.newAudioClip(url5);
            musicList[6] = JApplet.newAudioClip(url6);initialise the variable current with
    current = musicList[1];or similar because the AudioClip current always == null in your code so your listener blocks don`t execute.
    regards

Maybe you are looking for

  • Data Quality Services - Summary report

    Hi, Is anyone has a idea about which table is stored summary information comming out from Activity monitor? the example is below: when I exported the data  the summary as follows: My pourpose is to automate this report if it is stored on DQS data bas

  • Satellite P10-504 - Recovery disk will not load

    Anyone got any ideas why my recovery discs will not load,all i get is the window box asking what would you like windows to do,,like what you get when you insert a vid or music disc, am sure the last time i used them they just went straight into recov

  • Is it safe to use my charger?

    Happy New Year, Can I use my MacBook Air's 45w charger in Kuwait with my old white Macbook which used to run with a 60w charger? Any advice would be greatly appreciated. Thanks everyone.

  • RoboHelp 10 can't update linked FrameMaker book

    TCS 4 Linked FrameMaker book HTML Help output When I open a previously working project and go to update the FrameMaker files, the Update and Update All options are greyed out. A possible culprit is that Windows Update ran automatically while the proj

  • Running Forecast in the backgrd chooses Forecast  from the INTERACTIVE mode

    Folks When I tried to run forecast through background job, instead of running the forecast based on the Master Profle & Univariate profile I had defined in the Activity, forecast is being run based on the Master Profle & Univariate profiles specified