Multitone generator with more inputs and with output to computer speakers

I want to add several (perhaps 10)  harmonically related sinewave tones and output to the computer speakers or line out. Ideally would like to use the full audio range so 44100 Hz sample rate. I've managed to combine a couple of VIs and get something that works at lower sample rates but doesn't dynamically update if I change frequency or phases. And at higher sample rates it isn't a continuous sound. It just beeps, then waits, beeps then waits. I'm sure oters have tried to tackle this in the past but don't find much info. Currently using a Mac but could switch to a pc if needed. Guidance will be most graciously accepted.
Solved!
Go to Solution.
Attachments:
Dans Multitone Generator with amplitude and phase.vi ‏59 KB

I found several things which together keep your VI from working the way you want. The VI attached works fine on my Mac.
1. I configured the sound and the tone generator to use the same sampling info. Any other combination creates complications.
2. I found out the hard way that the tone generator wants the frequncy to be an integer multiple of (sampling rate)/(# samples). This does not appear in the documentation (help file) but other combinations throw errors.
3. Set the amplitude input (not Tone Amplitudes) on the Multitone Generator.vi to 1.00. This makes its output compatible with the Sound VIs. This is documented in the help but you have to read several places and put thepieces together.
4. The reset input to Multitone Generator.vi must be true for it to respond to changes in the tone frequencies, amplitudes, or phases inputs. I just wired a true constant for now. Later this might be better handled by an event structure.
5. Consider making the frequency, amplitude, and phase controls into arrays or one 2D array so that an arbitrary number of tones cna be used without modifying the program.
6. Some kind of Wait may be required. Without it I occasionally received a Timeout error. Several options are in different cases of the Diagram Disable Structure. The Sound Output Wait will guarantee that the timeout does not occur but it also produces small gaps in the sound. The Wait (ms) works fairly well but it is a guess as to the optimum value for the Wait.  After all the changes I have madevene the no wait case seems to work.
Lynn
Attachments:
Dans Multitone Generator with amplitude and phase.2.vi ‏38 KB

Similar Messages

  • Why should i buy a macbook pro while the i7 windows laptop comes with more features and with a lesser price??

    why should i buy a macbook pro while an i7 windows laptop comes with greater specs with less price???????
    i love mac but i need strong points for mac to convince my father!!!!

    osamawazarat wrote:
    why should i buy a macbook pro while an i7 windows laptop comes with greater specs with less price???????
    i love mac but i need strong points for mac to convince my father!!!!
    For me, presonall, becasue the Mac will run OS X, while the windows machine will run, well, Windows.  Seriously, whenever given the option, I greatly prefer to use OS X over windows without hesitation.  I buy Apple hardware because I prefer OS X to Windows and have since the OS X public beta.  Apple hardware is very good quality, but so are many Windows PC (Lenovo IMO makes some great hardware, if picking a Windows machine).
    I use windows at work because that's what they give me, but I'd not pick it if given the choice.

  • I have a MacBook with no more guarantee and with  Mac OSX 10.5.8. There some sites which do not accept this version . I tried to update with no success. What do I have to do?

    I have a MacBook with no more guarantee and with  Mac OSX 10.5.8. There some sites which do not accept this version . I tried to update with no success. What do I have to do?

    Hi, which sites Andrea?
    You might update...
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It looks like they do still have it:
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    And it's been reported that if you have a MobileMe account Apple will send one free.

  • Digital input and digital output at the same time

    Hi all
    I have a PCI-6503 board. I have done 2 task that run simultaneously: the first one is port0_16 output and the second one is port2 input.
    I get sometimes (not every times...this is strange...) error-200587 saying:
    'Requested operation could not be performed, because the specified digital lines are either reserved or the device is not present in NI-DAQmx.
    It is possible that these lines are reserved by another task, the device is being used through the Traditional NI-DAQ interface, or the device is being reset. You might also get the error if the specified resource is currently in use by LabVIEW network variables bound to the DAQ Channel, or if the DAQ Channel is being used in any OPC Client software.
    If you are using these lines with another task, wait for the task to complete.  If you are using the device through the Traditional NI-DAQ interface, and you want to use it with NI-DAQmx, reset (initialize) the device using the Traditional NI-DAQ interface. If you are resetting the device, wait for the reset to finish.'
    In the attached VI i have recreated the basic structure of my real VI (the error is present even here of course...).
    How can i do?
    I want to have both digital input and digital output with the same PCI-6503 every single cycle... Is it possible?
    Please help me!!!
    Kind regards.
    I love the smell of napalm in the morning
    Attachments:
    DIO simultaneously error.vi ‏31 KB

    Hello Maverick,
    Did you have any luck with the example Raven sent you?
    In Raven's example, it properly passes the DAQmx task from one SubVI to another to avoid having to open the task again. These errors are likely to occur when you have multiple DAQmx calls in a VI that call the same task again without clearing the previously opened task. If at any given time you try to open a task that already is being used, you might receive an error "resource is reserved"... similar to your original example.
    If you are interested, here is an awesome link that gives a detailed explanation of the LabVIEW dataflow paradigm
    Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
    Thanks and good luck!
    Jordan Randall
    National Instruments Italy

  • Xbox digital audio input and then output through MacBook digital audio port

    Hi,
    Sorry if this has been asked before but I'm trying to output a Dolby Digital (I think AC3) signal from my Xbox 360 into the MacBook's digital audio input and then output it through the digital audio output. I can output 5.1 sound from the MacBook itself but I can't get the Xbox audio to pass through. I don't know if the audio is at a sample rate not supported or needs decoding or what!
    Any help would be appreciated!

    If that doesn't work, I'm not quite sure.
    A combination of the Audio MIDI Utility (in Applications/Utilities), SoundSource, LineIn, and Soundflower (http://cycling74.com/products/soundflower/) might work, otherwise I'm stumped. Your best bet is probably a dedicated external USB or FireWire audio interface.

  • Hello, I have a "clé usb" with a imovie film in. I want to read it with my mac and with iMovie but it didn't work! Can you help me please

    hello, I have a "clé usb" with a imovie film in. I want to read it with my mac and with iMovie but it didn't work! Can you help me please

    Jeanne, you are going to have to give us some additional information: what kind of files are they, on what computer, using what application, were they made, how was the USB key formatted in the first place?
    Do the files not copy to your desktop?

  • If i bought iphone 5s from apple retail store on t mobile with free contract and with full price it will work with egypt's local carrier ????

    If i bought iphone 5s from apple retail store on t mobile with free contract and with full price it will work with egypt's local carrier ????

    Yes

  • My camera works with the photobooth and with skype but does not work with online applications such as "lolcam from facebook" or "faceonthehole" application. Please help

    My camera works with the photobooth and with skype but does not work with other applications like the "lolcam" from facebook or the " faceonthe hole" application. Can anyone help?

    There was a issue with school computers being used to spy on kids in their bedrooms, Mac's were involved.
    So Apple most likely tightened the API's to only select, trustworthy companies as not to abuse the web cam access priviledge.
    If you want to use a web cam with these other programs and services, you'll likely have to buy a third party USB one, so you can manually disconnect it.
    There isn't a way to physcially disconnect the built in web cam on Mac's without busting open the machine.

  • Is snow leopard compatible with microsoft office and with quicken 2007?

    Is snow leopard 10.6.3 compatible with Microsoft office and with quicken 2007.  I am about to upgrade to snow leopard and wanted to see if there are any problems with interfacing with non apple applications.  Any help is appreciated.

    Yes. Snow Leopard includes Rosetta, which will allow Office 2004 and Quicken 2007 to run. Office 2008 and 2011 are Intel native and will also run under SL.

  • How do I create an xControl with multiple inputs and outputs?

    Hello,
    i am trying to write a new Xcontrol Element. In the data model I can create data types using the cluster to create compound types, eg an int and an int array. But how do I create an xcontrol which has multiple data inputs and outputs?
    Kind Regards

    Limping_Twerp wrote:
    Alright: I see: An xcontrol is either an input OR an output. How do I achieve an output? Secondly: So you are saying the only Elements that can have multiple inputs and outputs are VIs?
    Can you take a few steps back and explain what you are actually trying to do. SubVIs and Xcontrols have nothing in common and it is not clear why you even try to compare them side by side (e.g. in terms of the number of connectors).
    Your questions about input or output tell us that you seems to have some misconceptions about xcontrols. Xcontrols are like regular controls, except they have some built-in intelligence that you can program. Most front panel object can be either controls or indicators and the same is true for Xcontrol. You create an Xcontrol, and after placing it on the front panel you can decide if it should be a control (where the code reads the value) or an indicator (were the code writes values to it). When you define the xcontrol facade, you also need to program how the visuals change if it is changed from control to indicator or vice versa.
    As a first step, you should opend the example finder and look at some xcontrol examples.
    Again, what are you actually trying to do? 
    LabVIEW Champion . Do more with less code and in less time .

  • Planning Folders with multiple input and output layouts

    Hi,
    I have a planning folder with one input layout and 4 output layouts. The input layout has a GPS assigned to it which will be executed before layout change. Will this function get executed when I open any of the output layouts(out of 4) not necessarily the immediate output layout (next to the input layout) and will the calculated data be displayed accordingly. Can some one please confirm me on how that works.
    Scenario2: I have one input layout and 2 output layouts. The input layout has a GPS assigned which will be executed before layout change and the first output layout has another GPS assigned which is basically a push button. Then how does this work.
    Points will be assigned . Help is greatly appreciated.
    Thanks,
    Vamsi

    GPS will not be executed when you open any of the output layouts but will be executed only when you open the input layout. Yes, the calculated data gets stored in planning buffer so it will the displayed in input/output layouts accordingly.
    Scenario2: The GPS assigned to input layout will be executed when you open the input layout. GPS which is assigned to output layout in the form of a button will be only executed when user will click on that button. Calculated results will be available in all the layouts as the result remains in planning buffer until user explicitly click the 'SAVE' icon in applpication toolbar.

  • Problem with File Input and Output

    I'm using a class named Output which takes 2 arrays as input and is simply supposed to output them to a file named myfile.txt. However, every time I call it it catches an exception and just prints out Error Writing to File. Here is the source:
    import java.io.*;
    public class Output
         public Output(int[][] orig, int[][] orig2)
              int[][] first = orig;
              int[][] second = orig2;
              try
                   FileOutputStream out = new FileOutputStream("myfile.txt");
                   PrintStream p = new PrintStream( out );
                   p.print("{");
                   for(int i = 0; i < 50; i++)
                        for(int j = 0; j < 30; j++)
                             p.print(" " + first[i][j]);
                   p.print("}");
                   p.println("\n\n\n");
                   p.print("{");
                   for(int i = 0; i < 50; i++)
                        for(int j = 0; j < 30; j++)
                             p.print(" " + second[i][j]);
                   p.print("}");
                   p.close();
              catch (Exception e)
                   System.err.println ("Error writing to file");
    }

    Equis.Scry wrote:
    So basically is my computer not letting this APPLET create a txt file? For security reasons, applets by default cannot access the local file system (on the client) and cannot open any network connections except back to the server that served them up. You can sign your applet, and set up permissions in the JRE that your browser runs to allow the signed applet to do things that applets normally can't. However, before starting down that path, I suggest you examine whether your applet really needs to access the local file system, and if it does, if it should really be an applet, or would be more appropriate as an application.

  • My question has to do with analog input and triggering? Does anyone have any suggestions on how i can improve the attached vi so it can trigger on a 50kHz ten cycles pulse after the pulse has been sent out on the output?

    Could you just look at this vi and tell me if i am doing anything wrong? I get errors that are different each time I change something. here are the inputs I am using
    Output Side:
    amplitude = 1
    freuency = 50kHz
    Sampling Frequency = 1MHz
    3 of Samples = 200
    Input Side:
    Input Buffer 4000
    trigger type = analog
    pretrigger = 5
    edge or slope = rising
    scan rate = 500kHz
    # of scans = 2000
    Conditional Retrieval
    mode = on
    slope = rising
    skip count = 0
    level = .1
    offset = 0
    hysteresis = 0
    So what we want to do is capture the ten
    cycles of the 50k output pulse on the input and need to store that so we can plot it later, do you have any suggestions. we are using the PCI-MIO- 16E board.
    Thanks,
    Jarrod
    Attachments:
    InputOutput2.vi ‏88 KB

    1) Toss the sequence frames (no flames please).
    2) Set you read and have it ready to trigger before oing the output.
    3) After the output, go back and read the data that is waiting for you.
    4) If you have errors tell us what they are and under what conditions they occured.
    End of Ben's suggestions for now.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Difference in analog input and analog output values

    i am using 6014 DAQ card for providing motor speed reference voltage to Driver and reading back speed
    feedback voltage using LabVIEW 6.0. For this i have used AO Single Update and AI Single scan. Both are in the same while
    loop.The loop has a Wait timer of 50ms. When i take a plot of Analog o/p and input, i get a shift
    between input and output. Why is the shift or the time not synchrnised..please help..When the while loop wait timer is 200ms instead of 50ms, the shift is not there.

    I believe the problem is 2 fold. First if you are using traditional DAQ, or DAQ 6.9.3 or before, the driver is single threaded. Therefore the 2 VIs will not run simultaneous. Try DAQmx and you may be more successful.
    The other is that you are using higher level 1 point VIs. In general they are not the best to use in a time sensitive loop. You are better off using hardware timing, rather than software timing. With hardware timing you have more control over the synchronization of the 2.

  • 2 inputs and 1 output.

    Hi all,
    This is my first post.
    I use an arduino 1 board to read 2 (x & y) analog signals.
    I would like to command 1 pwm output on the bases of the 2 analog signals.
    The idea is create a table 3x3 in wich x and y axes are based on the values of the analog signals and the output is the pwm output.
    I have tried in several modes but no succes.
    Can someone help me?
    Thanks a lot in advance

    thanks for the reply.
    I woul like to realize a simple PWM controller. I made the same writing the SW in C and it was working, but no flexible and without a graphical interface.
    Well...
    inputs:
    Two analog signals; range  0-5V f(t).It could vary very fast in the time. I use two simple potentiometers to simulate the voltage variations.
    output:
    PWM: range 0 - 255. connected to a led.
    I woul like to have the possibility to change the PWM with a table m X n where m is related to input 1 and n is related to input 2.
    I will post the the SW tried by me as soon as possible. Now... dinner!
    thanks all and best regards!

Maybe you are looking for

  • Two ipod touches one apple id

    Hi My two kids both have an ipod touch, and I have the apple id on my computer.   However when my daughter sends and receives messages from her ipod my son can read them and join in conversation (which is annoying my daughter)  how can I stop this ha

  • NOKIA lumia windows 8 phones not supporting JAVA

    Hi Nokia lumia latest windows 8 phones not supporting java. I Think its a big draw back because we cant install any java apps like Mobile banking Apps. Java apps market increasing day by day. Why nokia avoid this feature. is there any solution for th

  • Numbers template problem

    I'm using the expenses template, but when I add a new page it's just a normal blank page. I'm sure there's an obvious solution, but I can't work out how to get the template on the next page too. Thanks

  • Power Adapter/charger LED flickers?

    Searched the PB forum but haven't found this one... My 1ghz Ti PB power adapter charge LED (the plastic circle at the end of the plug that goes into the computer) starts flickering slightly. Just a very slight rapid flicker. There is no damage to the

  • MOPZ configuration

    Hi all, when i run tcode SM_MOPZ for maintenance optimizer its give me warning:-- SAP MOPZ auto-configuration warnings Message no. IMG_FASTCONF030 kindly suggest. Andrew.