Contents - Index


COM API - Control Functions

The following functions can be used to control the analzyer.

Function Groups

     Analyzer Operations   
     Analyzer Configuration
     Calibration Commands
     Plot and Window Commands
     Overlay Control
     File Management
     File Positioning
     File Post Processing
     Signal Generation
     Digital Input and Output Lines
        
Analyzer Operations

Run()

   Description: Run the analyzer or start recording
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

Stop()

   Description: Stop the analyzer, recording or playback.
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

Play()

   Description: Play the file starting from the current position.  You must be in the Recorder mode and a wave file must be open.
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

Record()

   Description: Start recording.  You must be in the Recorder mode.
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

RecordPause()

   Description: Pause the current recording.  The analyzer will continue running but data will not be stored in the wave file.
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

RecordResume()

   Description: Resume a paused recording.
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

FileStep( int numFFTSteps )

   Description: Performs the specified number of FFTs starting at the current file position and advancing by the overlap setting (Post Processing mode only)
   Parameters: numFFTSteps: 1 or more
   Return: S_OK = success, E_FAIL = unsuccessful

Trigger()

   Description: Forces a single trigger event.  Analyzer must be running and triggering must be enabled.
   Return: S_OK = success, E_FAIL = unsuccessful


Analyzer Configuration

LoadConfig( BSTR cfg_filename )

   Description: Load the specified configuration file.  This is the quickest way to change all the analyzer settings.
   Parameters: cfg_filename = filename of the configuration file.  Full path or just filename if file located in /Config folder
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will look in the Config path as listed in the <File><Set Paths> dialog box.

SaveConfig( BSTR cfg_filename )

   Description: Save the current settings to the specified configuration file
   Parameters: cfg_filename = filename of the configuration file.  
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Config path as listed in the <File><Set Paths> dialog box.

SetMode( long mode )

   Description: Set the current mode
   Parameters: mode: 0 = Real Time, 1 = Recorder, 2 = Post Processing
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetNumChannels( long num_channels )

   Description: Set the number of channels.  This command will fail if a wave file is open and you attempt to change the number of channels.
   Parameters: num_channels: 1 = mono, 2 = stereo
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSamplingRate( long rate )

   Description: Set the sampling rate for the device.  This command will fail if a wave file is open and you attempt to change the sampling rate.
   Parameters: rate = samples per second
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSamplingPrecision( long bits )

   Description: Set the sampling precision for the device.  This command will fail if a wave file is open and you attempt to change the sampling precision.
   Parameters: bits: 8, 16 or 24.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetFFTsize( long fft_size )

   Description: Set the FFT size.
   Parameters: fft_size = 32 through 1048576 pts in powers of 2.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetDecimationRatio( long ratio )

   Description: Set the decimation ratio.
   Parameters: ratio = 1 through 50
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSmoothingWindow( long window )

   Description: Set the Smoothing window
   Parameters: window = values as shown below:
      BARTLETT       0
      BLACKMAN       1
      FLATTOP        2
      HAMMING        3
      HANNING        4
      KAISER         5
      PARZEN         6
      TRIANGULAR     7
      UNIFORM        8
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetAverageMode( long mode )

   Description: Set the Averaging Mode
   Parameters: mode: 0 = Free Run, 1 = Sound Level Meter
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetAverageType( long type )

   Description: Set the Averaging Type
   Parameters: type: 0 = Exponential, 1 = Linear, 2 = Vector
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetAverageSize( long size)

   Description: Set the average size
   Parameters: size = average size 1 - 10000 (free run mode), 0 = Off, 1 = Fast, 2 = Medium, 3 = Slow, 4 = Forever (SLM mode)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ResetAverage( )

   Description: Reset the running average
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetDualChannelProcessingMode( long proc_mode )

   Description: Set the dual channel processing mode.  This will fail if the analyzer is set to mono operation.
   Parameters: proc_mode: 
LEFT_ONLY                      0
RIGHT_ONLY                     1
BOTH_LEFT_AND_RIGHT            2
AVERAGE_LEFT_AND_RIGHT         3
RATIO_LEFT_AND_RIGHT    4
RATIO_RIGHT_AND_LEFT    5
CROSS_SPECTRUM_LEFT_AND_RIGHT       6
CROSS_SPECTRUM_RIGHT_AND_LEFT       7
TRANSFER_LEFT_AND_RIGHT             8
TRANSFER_RIGHT_AND_LEFT             9
COHERENCE_FUNCTION                  10
TRANSFER_L_R_AND_COHERENCE          11
TRANSFER_R_L_AND_COHERENCE          12
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

EnablePSD( long channel )

   Description: Enable Power Spectral Density scaling
   Parameters: channel: 0 = Left, 1 = Right.
   Return: S_OK = success, E_FAIL = unsuccessful

DisablePSD( long channel )

   Description: Disable Power Spectral Density scaling
   Parameters: channel: 0 = Left, 1 = Right.
   Return: S_OK = success, E_FAIL = unsuccessful

SetAmplitudeScaleType( long channel, long scale_type )

   Description: Set the amplitude axis scaling type for the specified channel
   Parameters: channel: 0 = Left, 1 = Right. scale_type: 0 = Linear, 1 = Logarithmic, 2 = Log Magnitude
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetFrequencyScaleType( long channel, long scale_type, long octave_number )

   Description: Set the frequency axis scaling type for the specified channel
   Parameters: channel: 0 = Left, 1 = Right.
                     octave_number: 1,3,6,9,12,24,48,96 (ignored if scale_type not Octave)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSpectrumWeighting( long channel, long weighting )

   Description: Set the spectrum weighting for the specified channel
   Parameters: channel: 0 = Left, 1 = Right.
                      weighting: 0 = Flat, 1 = A, 2 = B, 3 = C
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetTotalPowerWeighting( long channel, long weighting )

   Description: Set the total power weighting for the specified channel
   Parameters: channel: 0 = Left, 1 = Right.
           weighting: 0 = Flat, 1 = A, 2 = B, 3 = C
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

TriggerEnable()

   Description: Enable triggering
   Return: S_OK = success, E_FAIL = unsuccessful

TriggerDisable()

   Description: Disable triggering
   Return: S_OK = success, E_FAIL = unsuccessful

SetTriggerThreshold( float threshold_pct )

   Description: Set the trigger threshold value
   Parameter: threshold_pct: the trigger threshold in percent between 0 and 100
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetPeakHold( long channel_ext, long peak_hold_type )

   Description: Set the peak hold type for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
                      peak_hold_type: 0 = Off, 1 = Fast, 2 = Medium, 3 = Slow, 4 = Forever
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

ResetPeakHold( long channel_ext )

   Description: Resets the peak hold values for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

SetOverlapPercentage( long overlap_percent )

   Description: Sets the overlap percentage value
   Parameters: overlap_percent = 1 - 99
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetCompensationFile( long channel, BSTR filename )

   Description: Set the transducer compensation file for the specified channel
   Parameters: channel: 0 = Left, 1 = Right. filename = mic compensation filename
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will look in the Mic comp path as listed in the <File><Set Paths> dialog box.

EnableCompensationFile( long channel )

   Description: Enable the transducer compensation file for the specified channel
   Parameters: channel: 0 = Left, 1 = Right
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

DisableCompensationFile( long channel )

   Description: Disable the transducer compensation file for the specified channel
   Parameters: channel: 0 = Left, 1 = Right
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetMarkerFreq( long channel_ext, long marker, float freqHz )

   Description: Set the frequency for the specific channel and marker index
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
           marker = 1 - 8, freqHz = frequency in Hz
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

ResetOverloadCount( )

   Description: Reset the overload (clipping) count for all channels
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

DataLoggingEnable()

   Description: Enable data logging
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

DataLoggingDisable()

   Description: Disable data logging
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

SetDataLoggingFile( long channel, BSTR filename)

   Description: Set the data logging output filename for the specified channel
   Parameters: channel: 0 = Left, 1 = Right.   filename = data log filename.  
   Return: S_OK = success, E_FAIL = unsuccessful
   Note: If a short filename is used, it will be stored in the data logging path as listed in the <File><Set Paths> dialog box.

SetRunControl( long mode, long fft_limit, float time_limit, float start_delay_time )

   Description: Set the Run Control options
   Parameters: mode: 0=Continuous, 1=Stop after FFT limit, 2=Stop after time limit
                      fft_limit: number of FFTs to process before stopping when mode = 1
                      time_limit: seconds to process before stopping when mode = 2
                      start_delay_time: seconds to delay before starting processor
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetCrossChannelDelay( float delay )

   Description: Set the cross channel delay value 
   Parameters: delay: delay value in msec.  (must be between -1000 and +1000)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetMetadata( BSTR metadata )
   Description: Set the metadata text to store in the current wafe file. Wave file must be open for this function to suceed.
   Parameters: metadata - up to 2000 characters max of ascii text
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

Calibration Commands

LoadCalibrationFile( long channel, BSTR filename )

   Description: Load the calibration file for the specified channel
   Parameters: channel: 0 = Left, 1 = Right; filename = the filename of the calibration file
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will be stored in the calibration path as listed in the <File><Set Paths> dialog box.

CalibrateToExternalSource( long channel, float source_level )

   Description: Perform a calibration measurement on the specified channel
   Parameters: channel: 0 = Left, 1 = Right; source_level = value to calibrate to (SPL example: 94.0). 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

   Notes
   You must be using the calibration option to calibrate to an external source. 
   The measurement will continue until the following conditions are met:
         1) The measured signal level is stable to within +/-0.1 millivolt. This is approximately +/-0.03 dB with typical mic sensitivities. 
         2) The measured signal level is within 12% of its original value. This is approximately +/-1 dB.  
   If both of these conditions are not satisfied within 60 seconds the measurement will stop and an E_FAIL error will occur.  
   These conditions will assure that settling has completed, the mic calibrator is turned on and the correct mic and channel are used.

CalibrateToZeroDBr( long channel, float freqiemcy )

   Description: Sets the Calibration to 0.0 dBr at the selected frequency.
   Parameters: channel: 0 = Left, 1 = Right; frequency = frequency at which the resulting calibration will become 0.0 dBr
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SaveCalibrationFile( long channel, BSTR cal_filename )

   Description: Save the calibration file for the specified channel
   Parameters: channel: 0 = Left, 1 = Right; cal_filename = filename of the calibration file. 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Cal path as listed in the <File><Set Paths> dialog box.


Plot and Window Commands

OpenPlot( long channel, long plot_type )

   Description: Opens a plot for the specified channel
   Parameters: channel: 0 = Left, 1 = Right.
                      plot_type: 1 = Time Series, 2 = Spectrum, 3 = Phase, 4 = Spectrogram, 5 = 3-D Surface
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ClosePlot( long channel, long plot_type )

   Description: Closes a plot for the specified channel
   Parameters: channel: 0 = Left, 1 = Right.
                      plot_type: 1 = Time Series, 2 = Spectrum, 3 = Phase, 4 = Spectrogram, 5 = 3-D Surface
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

MinimizeApplication( )

   Description: Minimize the overall application window to an icon
   Return: S_OK = success, E_FAIL = unsuccessful

MaximizeApplication( )

   Description: Maximize the overall application window on the screen
   Return: S_OK = success, E_FAIL = unsuccessful

RestoreApplication( )

   Description: Restore the application to it's previous size
   Return: S_OK = success, E_FAIL = unsuccessful

HideApplication( )

   Description: Hide the overall application window and icon.  
   Return: S_OK = success, E_FAIL = unsuccessful

ShowApplication( )

   Description: Show the overall application window and icon (restore from HideApplication())
   Return: S_OK = success, E_FAIL = unsuccessful

ClearSpectrum( long channel_ext )

   Description: Clears the spectral data for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

ClearPeakHoldSpectrum( long channel_ext )

   Description: Clears the peak hold spectral data for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

SetSpectrumPlotFrequencySpan( long channel_ext, float startHz, float stopHz )

   Description: Set the displayed frequency span for the spectrum plot for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
  startHz = start frequency, stopHz = stop frequency
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

SetSpectrumPlotTop( long channel_ext, float plot_top )

   Description: Set the display amplitude plot top parameter for the spectrum plot for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
                      plot_top = plot top value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

SetSpectrumPlotRange( long channel_ext, float plot_range )

   Description: Set the display amplitude plot range parameter for the spectrum plot for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
                      plot_range = plot range value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

SetSpectrumPlotGraphType( long channel_ext, long graph_type )

   Description: Set the spectrum plot graph type for the specified channel
   Parameters: channel_ext: 0 = Left, 1 = Right, 2 = Composite, 3 = Coherence.
        graph_type: 0 = Line, 1= Bars, 2 = Stepped Bars
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: Composite channel = dual channel operation (L&R average, Transfer Function or Cross Spectrum)

SetTimeSeriesPlotTimeSpan(  float start_time, float stop_time )

   Description: Set the time span to be displayed on the time series plot
   Parameters: start_time, stop_time = time span to display 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

WritePlotToBitmapFile( long channel_ext, long plot_type, BSTR bmp_filename )

   Description: Saves the plot image to a bitmap file
   Parameters: channel_ext: 0 = Left, 1 = Right, 2
                      plot_type: 1 = Time Series, 2 = Spectrum, 3 = Phase, 4 = Spectrogram, 5 = 3-D Surface
                      bmp_filename = full filename and path to store bitmap
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Overlay Control

SetOverlay( long channel_ext, long overlay_index, int create_from_peak_hold, BSTR szLegend)

   Description: Create an overlay from the current spectral data
   Parameters: channel_ext: 0 = Left, 1 = Right, 2
                      overlay_index = 1 - 14
                      create_from_peak_hold = 1 to create the overlay from the peak hold values (peak hold must be enabled)
                      szLegend = legend to apply to overlay                     
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ShowOverlay( long channel_ext, long overlay_index)

   Description: Shows the specified overlay
   Parameters: channel_ext: 0 = Left, 1 = Right, 2
                      overlay_index = 1 - 14
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

HideOverlay( long channel_ext, long overlay_index)

   Description: Hides the specified overlay 
   Parameters: channel_ext: 0 = Left, 1 = Right, 2
                      overlay_index = 1 - 14
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SaveOverlay( long channel_ext, long overlay_index, BSTR ovl_filename)

   Description: Save an overlay to a file
   Parameters: channel_ext: 0 = Left, 1 = Right, 2
                      overlay_index = 1 - 14
                      ovl_filename = name of the overlay file.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Overlay path as listed in the <File><Set Paths> dialog box.

LoadOverlay( long channel_ext, long overlay_index, BSTR ovl_filename)

   Description: Load an overlay from a file
   Parameters: channel_ext: 0 = Left, 1 = Right, 2
                      overlay_index = 1 - 14
                      ovl_filename = name of the overlay file to load
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will load it from the Overlay path as listed in the <File><Set Paths> dialog box.


File Management

FileOpen( BSTR wav_filename)

   Description: Open a wave file
   Parameters: wav_filename = wave filename
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will look in the Wave path as listed in the <File><Set Paths> dialog box.

FileSave( BSTR wav_filename)

   Description: Save the wave file.
   Parameters: wav_filename = wave filename
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Wave path as listed in the <File><Set Paths> dialog box.

FileClose(  ) 

   Description: Close the wave file
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


File Positioning

FileRewind( )

   Description: Go to the start of the wave file
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileForward( )

   Description: Go to the end of the wave file
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileGoToTime( float seconds)

   Description: Go to a specific time in the wave file
   Parameters: seconds = file position in seconds
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileGoToSample( unsigned long sample)

   Description: Go to a sample position in the wave file
   Parameters: sample = file position in samples
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


File Post Processing

FilePlaySegmentTime( float start_seconds, float stop_seconds)

   Description: Playback the specified time segment
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FilePlaySegmentSample( unsigned long start_sample, unsigned long stop_sample)

   Description: Playback the specified time segment
   Parameters: start_sample = segment start sample position; stop_sample = segment stop sample position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileFilterSegmentTime( float start_seconds, float stop_seconds)

   Description: Filter the specified time segment
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileFilterSegmentSample( unsigned long start_sample, unsigned long stop_sample)

   Description: Filter the specified time segment
   Parameters: start_sample = segment start sample position; stop_sample = segment stop sample position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileProcessSegmentTime( float start_seconds, float stop_seconds)

   Description: Computes the average spectral data for the specified time segment (same as right clicking on time series plot and choosing "Compute Average Spectrum")
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Note: If the specified time segment is less than a full FFT size, zero padding will be applied
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileProcessSegmentSample( unsigned long start_sample, unsigned long stop_sample)

   Description: Computes the average spectral data for the specified time segment (same as right clicking on time series plot and choosing "Compute Average Spectrum")
   Parameters: start_sample = segment start sample position; stop_sample = segment stop sample position
   Note: If the specified time segment is less than a full FFT size, zero padding will be applied
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCutTime( float start_seconds, float stop_seconds)

   Description: Cut the specified time segment and place it on the clipboard
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCutSamples( long start_sample, long stop_sample)

   Description: Cut the specified time segment and place it on the clipboard
   Parameters: start_sample = segment start position; stop_sample = segment stop position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCopyTime( float start_seconds, float stop_seconds)

   Description: Copy the specified time segment and place it on the clipboard
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCopySamples( long start_sample, long stop_sample)

   Description: Copy the specified time segment and place it on the clipboard
   Parameters: start_sample = segment start position; stop_sample = segment stop position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FilePasteTime( float paste_position_seconds)

   Description: Paste the current clipboard contents (wave data) into the current file at the specified position
   Parameters: paste_position_seconds = location to paste the data
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FilePasteSamples( long paste_position_sample)

   Description: Paste the current clipboard contents (wave data) into the current file at the specified position
   Parameters: paste_position_sample = location to paste the data
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileMuteTime( float start_seconds, float stop_seconds)

   Description: Mute the specified time segment
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileMuteSamples( long start_sample, long stop_sample)

   Description: Mute the specified time segment
   Parameters: start_sample = segment start position; stop_sample = segment stop position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetFilterChannel( long channel )

   Description: Set the filter channel
   Parameters: channel: 0 = Left only, 1 = Right only, 2 = Both Left and Right
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetFilterFile( BSTR filter_filename )

   Description: Set the filter filename
   Parameters: filter_filename = filename of filter file 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will look in the Filter file path as listed in the <File><Set Paths> dialog box.

FileBuildSpectrogramPlot( float start_seconds, float stop_seconds)

   Description: Computes and displays the Spectrogram plot for the specified time segment (same as right clicking on time series plot and choosing "Compute and Display Spectrogram")
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileBuildSurfacePlot( long channel_ext, float start_seconds, float stop_seconds)

   Description: Computes and displays the 3-D Surface plot for the specified time segment (same as right clicking on time series plot and choosing "Compute and Display 3-D Surface")
   Parameters: start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

PerformHilbertTransform( long start_sample, long stop_sample)

   Description: Perform Hilbert Transform on the specified time segment. Results are shown on the Time Series plot
   Parameters: start_sample = segment start position; stop_sample = segment stop position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Signal Generation

OpenGenerator()

   Description: Open the signal generator utility
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

CloseGenerator()

   Description: Close the signal generator utility
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

RunGenerator()

   Description: Start the signal generator
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

StopGenerator()

   Description: Stop the signal generator
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

SetGeneratorSignalType( long channel_sig, long signal_type )

   Description: Set the signal type for the specified signal generator channel
   Parameters: channel_sig = 0 - 1; signal_type - as follows:
         0 = White Noise
         1 = Pink Noise
         2 = Noise Burst
         3 = 1 kHz Tone
         4 = Multiple Tones
         5 = Tone Burst
         6 = IMD Tones
         7 = Freq Sweep
         8 = Level Sweep
         9 = Sawtooth
        10 = Triangular
        11 = Pulse
        12 = Squarewave
        13 = User Defined wave file
        14 = DTMF
        16 = Digital Zero
        16 = Frequency Step
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetGeneratorLevel( long channel_sig, float levelDBr )

   Description: Set the output level for the specified signal generator channel
   Parameters: channel_sig = 0 - 1; level = signal level in dBr (0 = max, -96 = min). 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   
SetGeneratorFreq( long channel_sig, float freqHz )

   Description: Set the signal type to Multiple tones and enable only a single tone at the specified frequency.  The multitone level is set to 0 dBr (use SetGeneratorLeve() to set the output level)
   Parameters: channel_sig = 0 - 1; freqHz = frequency in Hz
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: The signal type will change to Multiple Tones when this command is used.

LoadGeneratorMultiToneFile( long channel_sig, BSTR toneFilename )

   Description: Load a .tones file from disk - this allows you to change the set of tones
   Parameters: channel_sig = 0 - 1; toneFilename = name of .tones file
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: The signal type will change to Multiple Tones when this command is used.


Digital Input and Output Lines

The SpectraDAQ-200 hardware module has Digital Input and Output lines for controlling and 
reading external equipment such as relays.  These functions allow you to read and write the 
state of these lines.  There are 3 input lines and 3 output lines.   

GetDigitalInputLineState( DWORD *state )

   Description: Get the current state of the digital Input lines
   Parameters: state = pointer to value to receive the current state of the digital input lines
   Return: S_OK = success, E_FAIL = unsuccessful


SetDigitalOutputLineState( DWORD state )

   Description: Set the current state of the digital Output lines
   Parameters: state = value containing the new state to set the output lines
   Return: S_OK = success, E_FAIL = unsuccessful