Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Save Trace as .WAV Data File
This option saves standard .WAV files, without the special Daqarta supplemental information added in .DQA format. It saves the data from the current display to a single-screen file, which contains data for 1024 samples per channel. All active channels will be saved, even if they are not currently displayed. Files are always stored in standard signed 16-bit format, which all .WAV software supports.
The main reason to use this option is if the file must be opened by other software that doesn't comply with the Microsoft RIFF standard. This standard requires that each section of the file be properly labeled, and that programs ignore any sections they can't handle properly, such as the special Daqarta data section in .DQA files. However, many older programs were hard-coded to expect only the most common format of the vast majority of .WAV files.
The .WAV option is disabled when the current display shows averaged data. The averager stores 64 bits per sample plus a separate frames count, which the standard .WAV format does not support. Use .DQA files for averager data.
Files may be saved with up to four channels of data (Left and Right Input plus Left and Right Output), which may be more than some older programs that read .WAV files can handle.
It is also disabled when Decimate is active, since the standard .WAV header does not support the fractional-Hz sample rates that are needed for accurate data readouts and axis display. But you can use Save Trace as DQA Data File, and when the Save As dialog opens select .WAV from the Save as Type drop-down control at the bottom. The data will be saved correctly, but with the wrong (undecimated) sample rate in the .WAV header. When opened later, the X axis and readouts will be off by Decimate Factor.
You can not save Spectrogram or Pitch Track (Sgram/PT) data to a .WAV file using this option. If you try that, the saved file will be the waveform data used for the most recent spectrum computation. If you want to save a complete spectrogram or pitch track, you will need to use DDisk mode and save the raw waveform data, then display it in Sgram or Pitch Track mode when you later open it.
The SaveWAV macro has no effect if any File Open or Save As dialog is already active.
SaveWAV= without a name will open the Save As dialog showing all .WAV files, with the default set to Data or the most recent name.
SaveWAV="MyFile" will open the Save As dialog with the default name set to MyFile. (Note that quotes are needed around all filenames in macros.) If you accept this by hitting Enter or the Save button in that dialog, Daqarta will assume you want to save a file named MyFile.WAV. If that file already exists, you will be prompted to replace it.
After either of the above commands, you may use IF.Posn?f=0 to see if the user has hit Cancel instead of choosing a file name. This allows your macro to exit gracefully or take other action.
A.SaveWAV="MyFile" will save MyFile.WAV directly, without any Save As dialog. Note that if the file already exists, it will be overwritten without any confirmation prompt.
Similarly, if the Macro Variable Var0 holds a value of 12, then SaveWAV="Test"+Var0 will set a default file name of Test012.
A.SaveWAV= will save directly using the current default file name. If you have previously set file names to Auto-Increment, either manually or using AutoInc=1, then this will save using the next file name (MyFile-001.WAV, MyFile-002.WAV, etc).
See Macro Variables for a way to use a Field to supply the initial name that AutoInc starts with.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved