FINDING, TIME STAMPING, AND SAVING SELECTED PORTIONS OF WAV FILE

Hello Everyone,
LV 6.1
What I'm trying to do is build an app that
captures, timestamps and saves peaks only in a *.wav file from the sound card.
Specifically, dog barking.  My dream would be that I have a constant input
from a mike into the sound card which LV will real time analyze. When a threshold is triggered
(a dog bark) the app will save the bark only with a time stamp.  My case against
my neighbors would be better exemplified is I were able to present them with a
time-of-day graph with tic marks at each bark and a cd they could listen to of
the barks only.
Explorations so far:
  The sound VI's don't have time stamp outputs
  I have searched the knowledge base and found a few apps but came to a dead end with my knowledge
  I have experimented with various waveform analysis vi's but can't find the combo that gives me what I'm looking for
I can handle the post processing of graphs / spreadsheets but the waveform analysis for capturing the bark is eluding me. If someone could just get me started I could run with it but so far I ain't smart enough.
Thank You...........

Hi rscully,
I think a great starting place is the "Sound Input to File.vi" example found in the Example Finder. Since the output is waveform data, you should be able to extract the timing information from the waveform data. Try using the "Get Waveform Components" function. If that doesn't work for you, you may also want to just grab the time stamp from the system clock with the "Get Date/Time String" function.
To record the bark, you can perform signal processing to match the bark frequency. The first thing that comes to mind, is to record a bark, analyze the power spectrum to find the peak power at a specific frequency range. Then in your program, you can find the power spectrum for that specific frequency range, and if the peak within that range exceeds a threshold, record the bark and time-stamp. This method should be simple if you have the NI Spectral Measurements Toolkit. See this tutorial.
Once you have verified that a bark has occurred, you may want to record the previous bark sound data and the post bark sound data. This will ensure that the entire bark is captured in a sound file. I have edited the "Sound Input to File.vi" example to demonstrate this. Please see the attached picture. I hope this helps!
Mike Lyons
National Instruments
http://www.ni.com/devzone
Attachments:
record_bark.jpg ‏105 KB

Similar Messages

  • Need help with Time Stamps and saving Strings in Excel

    Hi, Am learing LabView now....and my task is
    Everytime start button is pressed, a Random number must be generated.
    The Random number is to be staroed in an Excel sheet such that the Random Number is in the first column and Time at which it was generated in the second column...
    I used to work with Agilent Vee before and am finding it hard to adjust to LabView
    Thanks
    Sanjay

    Am making the same mistake again......
    Here yougo in LV 8.5 version....
    The best solution is the one you find it by yourself
    Attachments:
    Time Number.vi ‏12 KB

  • I am using Garageband and saving my tunes as iTunes files but can´t find them in iTunes on my computer after syncing. Where are they?

    I am using Garageband and saving my tunes as iTunes files but can´t find them in iTunes on my computer after syncing. Where are they?

    My answer in the older thread is still valid
    Maybe the "iTunes Music" folder is hidden.
    Please open Terminal and issue the following command
    ls -ladO /epoche/Music/iTunes/iTunes\ Music
    you should get a line similar to this
    drwxrwxrwx  13 yourusername  staff  hidden 442 12 Mar 21:49 /epoche/Music/iTunes/iTunes Music
    Numbers, date and time may differ.
    If you see hidden then the folder is hidden. To unhide "iTunes Music", in Terminal issue the following command
    chflags nohidden /epoche/Music/iTunes/iTunes\ Music

  • On Pages 09, my word documents I've been saving it to iCloud, to access anywhere, but I would like to keep my docs organized in files on my finder as usual, and saving to iCloud, I lose my local one.How can I fix it and not desorganize my files?

    On Pages 09, my word documents I've been saving it to iCloud, to access anywhere, but I would like to keep my docs organized in files on my finder as usual, and saving to iCloud, I lose my local one.How can I fix it and not desorganize my files?

    It's either in local folders, as it seem you had been doing, or in icloud.  If you go into the mac's Pages and view the icloud files, you can drag on onto another to create a folder.  But you can only have folder one level deep, so you can't organize your files/folders like you can on a mac, using nested folder several levels deep.

  • Extract date/time stamp and modifier name from memo field

    I need to extract all date/time stamps and modifier name strings from the Work Log memo field - or conversely, filter out all of the comments after the date/time modifier strings.    I have the string extract but it only extracts the first one.  I need to loop until all are found - how can I do this?  The memo field will look something like this:
    3/5/2009 3:32:05 PM John Doe
    Comments - string can be any length
    3/4/2009 12:35:43 PM John Doe
    Comments - string can be any length
    3/4/2009 12:28:17 PM Jane Dough
    Comments - string can be any length and include date format 2009-06-04 14:20 CST.
    3/4/2009 12:27:47 PM Mary HadaliddleLam
    Comments - string can be any length
    3/4/2009 12:26:55 PM Lamseedivy
    Comments - string can be any length
    3/4/2009 12:15:22 PM Mareseedoes
    Comments - string can be any length.

    Here is a formula that will strip all 'comment' and blank lines and puts the datetime stamp and user names into an array.  You have to manipulate the elements of the array to further separate the datetime stamp and user name if required.
    // Declare two indices
    numbervar i := 1;
    numbervar j := 1;
    // Split each row of the memo field into an array
    // if chr(10) does not work then try with chrw(13) or chr(13)
    stringvar array x := split({Sheet1_.Comments},chr(10));
    // Declare a holding array
    stringvar array y;
    // Declare the size of the new array to be equal to the elements in array 1
    redim y[ubound(x)];
    // Copy only if the first word of each element of array 1 is neither "comments" nor a blank line
    for i := 1 to ubound(x) do
    if split(x<i>) = 'comments' or x<i> = '' then
    else
    (y[j] := x<i>;
    j := j + 1;
    // Compress the new array to eliminate the last blank element
    redim preserve y[j-1];
    // Joining the elements of the new array and the number of elements for display
    join(y,chrw(13)) & chrw(13) & ubound(y);
    With your example, this formula will return:
    3/5/2009 3:32:05 PM John Doe
    3/4/2009 12:35:43 PM John Doe
    3/4/2009 12:28:17 PM Jane Dough
    3/4/2009 12:27:47 PM Mary HadaliddleLam
    3/4/2009 12:26:55 PM Lamseedivy
    3/4/2009 12:15:22 PM Mareseedoes
    6.00
    Make sure the "can grow" option is checked to display the results and also check for case sensitivity of "comments".
    Edited by: Sanjay Kodidine on Jun 30, 2009 10:13 AM

  • GetSelectedFields()  for time stamp and user stamp using java api

    using Java API's
    getSelectedFields() returns NULL  value if values presented also, for Time stamp and User stamp
    properties in Flat tables , is there any other alternative way to get the SelectedFields values ?
    Edited by: Vijaya Sekhar Reddy Alla on Mar 19, 2008 3:16 PM

    Well, I can't say I solved the problem, because I got another one afterwards.
    As usually I created a GetFieldListCommand, set its needed attributes and executed it. Then I read all the field properties out:
    FieldProperties[] fieldProp = getFieldListCommand.getFields();
    Afterwards it is possible to do what you want. Using a for-loop.
    for (FieldProperties fp : fieldProperties) {
        UserStampFieldProperties usfp = (UserStampFieldProperties) fp; // <= Cast error
        FieldId[] fieldIDs = usfp.getSelectedFields();
    And this is what I get now:
    Exception in thread "main" java.lang.ClassCastException: com.sap.mdm.schema.fields.FixedWidthTextFieldProperties cannot be cast to com.sap.mdm.schema.fields.UserStampFieldProperties
    Why this happens, I don't know. But it should somehow be solveable.

  • Append time stamp as a column in an excel file

    Hi
    i want to add timestamp to the last column  of my excel file
    my data is this 
    columnA   columnB  column C  columnD
    temp10     temp11    temp12     timestamp       these are header name
    74.212     73.122     73.222      11AM:23:59.012
    73.444     73.223     74.322      11AM:24:02.083
    73.445     73.478     75.555       11AM.24:03.833
      and continue
    I can use write spreadsheet to have the three numeric tempdata but the last column formatted as time stamp and string 
    how do I add time stamp to my data and call the spreadsheet write VI to append to the excel file ?
    help
    Solved!
    Go to Solution.

    You have at least two possibilities:  One is to do the formatting yourself with string functions and write the data as a text file or an array of strings.
    Another is to convert the timestamp to a Double and save it as numeric data.  This is only useful if your are going to read the data back into LV and analyze it there, because Excel's numeric representation of date and time is different from that used by LV.
    Lynn 

  • I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    That depends on why it won't open.  Most of the time it means the file is corrupted and unlikely to be recovered. If you saved it right after adding or copying a LOT of layers - then it might just be the layer limit and we can attempt to recover it.

  • I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is j

    I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is just a plain photoshop file, a watermark is added, then save as jpeg - the jpeg is saved to a different folder than the original photoshop file.)  It happens for about 10 of 30/40  files approximately . Thank you, Kathryn

    I believe I have figured it out - I need to flatten the image, even though there are no layers except for layer 0, first.

  • I used "Get Waveform Components" to separate waveform data. I need to get the time stamp and write it on file as an header.

    I am not able to solve the problem because I can't find an I/O vi that writes on file time stamp data. An error occurs, because of connecting different data types. How can I convert time stamp data so that I can use it as input in a write on file vi? Please, help me!

    The problem with the selection seems to be that you are using two different indexing tunnels on the for loop. One of them loops over every value of the first incoming waveform, the other one over all waveforms in the incoming array. The value you wire to the N terminal will be ignored, the number of loop executions will be the minimum of your indexes. Anyway, the loop doesn't seem to do what you wanted:
    - If you want to store the complete waveform: loop over all waveforms, check for the maximum of each of them and write it just like you do now.
    - If you want to store only the values of each waveform that actually exceeded the threshold: You can either use 2 nested for loops to iterate over each value of each waveform. Use shift registers t
    o create new arrays of timestamps / values for the values you want to store. You need to either convert the waveform to x-y-pairs (VI on analog waveform palette) or calculate your own timestamps. You might as well want to check out the "Search waveform" VI. Configure it so that value+-tolerance covers the band between your expected minimum value and your threshold value. The VI will give you the indices and timestamps of all fits.

  • Formatting a string with time stamp and double precision numbers

    %s\t%f\r%f
    This is a format string that I have in old code that I've decided to change.  Problem is I cannot make sense of the string codes in my own old code! Let me explain what I want, and hopefully someone can explain how to do it.
    I am using the format into string subvi to merge a time stamp (formatted as %m%d%Y%H%M%S%5u) and two different double precision numbers.  This string is then wired into the Write Characters to File subvi so that I can record data as a .txt file, and open it in either Matlab or Excel.  There is a minor problem with the string format above because in excel the first time stamp entry is blank, and the first loop only gives the two double precision numbers withouth the time stamp - the time stamp appears in the next loop (probably a looping issue and not due to the string format, but if you see differently please let me know).  Now what I want to do is 1. potentially fix that problem and 2. add some more doubles. 
    1. Is there a string format issue that is evident that I am not seeing that causes the time stamp to be formatted into the string after a carriage return?  Or should I be looking at looping issues?
    2. How do I add another one - three floating point numbers (double precision)?  Are the \'s marking different numbers in this string constant?  Or is it the %?  I can't find any information about the \'s, but I see that % begins the format specifier. 
    Ideally, I want these data in the following columns:  Date, Time(absolute), FP, FP, FP, carriage return for the next loop (FP is floating point double precision number).
    Thanks,
    Brad

    Hi JonN,
    Here there is no need of string concordinate function (in your code), the same result you can find if you connect the output of the format string to shift register, and shift register in data to initialize string connector in format into string function.
    <<KUDOS ARE WELCOME>>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

  • Time stamp and local time stamp

    Dear sirs...
    i am a little confused about the time stamp datatype and how to handle it in my applications. i want to display the time for every user in its time zone. so the fields in the database are timestamp with local time zone. is this correct?
    i want it to be such that if one stores the time in USA time , the other can display that same data in UK time.
    best regards

    repost

  • Time stamp and title

    How do I add qoutes around the time stamp so the date and time can be displayed on a network analyzer? I can display a title on the screen of the analyzer but not the time stamp. When I cancatinate the title and time stamp is when I have a problem.
    Mike

    Feed your timestamp into this function
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
    Attachments:
    timestamp.JPG ‏7 KB

  • Changed Computer. Old HDD is now slave. FF is not finding old settings and saved passwords. Very Important Saved Passwords.

    Hi,
    I have changed my Computer. Essentially, the M/B, CPU, RAM, HDD, etc. I still have my old HDD and Mozilla was installed there. I have a lot of saved passwords on that Firefox. I have started Firefox from there itself. Yet, FF doesn't find those passwords and other things. These are very important as they are passwords for Income Tax, Service Tax, VAT websites of various clients. I am a tax consultant. So, If I cant recover those, I'm dead. Please help.

    For the passwords you need key3.db and signons.sqlite
    See:
    *https://support.mozilla.com/kb/Recovering+important+data+from+an+old+profile
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    The "Application Data" folder in XP/Win2K and the "AppData" folder in Vista/Windows 7 are hidden folders.
    *http://kb.mozillazine.org/Show_hidden_files_and_folders

  • Time stamp and skip test report

    Hello, all
    I am new to teststand and just beginning to do some work with teststand.
    My interest is to report every step with data begin with a time stamp.
    I create  subtest in the Numeric type property to report timestamp in the form of YYYY-MM-DD-HH-mm-ss
    These substep are pre-step and post-step and in pre-step I get timestamp at the beginning and
    post step I get a timestamp at the ens of the step.
    Thing workout pretty well until I report a skip test.
    A skip step does not run so a pre-step and post-step report a time stamp as 00000000000000.
    how can I over come this problem since i want the skip test report as exact the same with "Normal Step"
    is there any way to have a f(x) at the beginning and the end of the step type, and theses f(x) of course
    should be execute even that step is skipped
    Thanks
    TP
    Solved!
    Go to Solution.

     Hello
    For me that is important and for many thing I do the step carried out take a longtime than normal, especial if you test with around 20 socket and more.
    I am surprised that a step type does not have some thing reserved for Pre-execution.  This can help condition further a costumed step.
    The only way I can poke in there may be using "precondition" to put my time stamp.  But that mean my costumed model leaves a bunch of f(x) in there and look ugly

Maybe you are looking for

  • Solaris 8 Download Install - Install CD Question

    Hello, I am new to Solaris. I do have experience with BSD/LINUX/SCO installations. I too have downloaded the zipped images from Sun. Actually 4 as I downloaded the install, v1, v2, docs and the additional pgm zipped image file. I checked each CD afte

  • Debugging on Nokia device

    Hi, I have written a J2ME application. I have some problems when I run the application on Nokia 3230 device. Is it possible to view the debug traces from the device? I have a data cable connection between mobile and PC through USB port. Thanks,

  • Can't select "Built-in Line Output" in Audio/MIDI prefs

    I have audio on my MacPro going out "Built-in Line Output" via the mini-jack at the back to a receiver. Everything works fine. When I open GarageBand's preferences to set up Audio Output it has defaulted to "Built-in Output" (the little speaker and j

  • WLC and Point-to-Point Bridge/Repeater

    Hi all, I have a WLC2125 and 11 LAPs installed in our warehouse. There is going to be one additional AP but the problem is we can´t provide cabling in that area. The idea is to have this additional AP connected to one of the existing LAPs and repeat

  • Demand in MRP after backflush

    Hi all Something very weird...after i backflush (repetitive manufacturing), i still seeing the demand in MRP....How should i troubleshoot ? As in repetitive manufacturing, once plan order backflush, the plan order is disappear...how can i track the s