Acoustic Labview Library

This library is shared among SONOS JDM partner for PLTS development.


Analyze vi

· Extract FR, phase, THD data from recorded-Y data & Stimulus-Y data

Input:

Unit (int) : or

Stimulus-Y (array double) : Y data extracted from Stimulus

Recorded-Y (array double) : Y data extracted from Recorded waveform

Sampling rate (int)

Signal config (cluster) :

Input config (cluster) : soundcard & microphone calibration info

Method (int) : or

Maximum Harmonic (int) : Max harmonic for THD calculation

Output:

freqArray (array double) : frequency data point

fundamental (cluster) : unsmooth frequency response & phase curve

THD (cluster) : THD curve

Front Panel :


Analyze-tone vi

· Analyze Tone signal for Frequency, Amplitude & THD

·

Input:

signal in (waveform): recorded waveform input

inputMaxVP (Double): Input Max V peak level from soundcard calibration

micSen (Double): microphone sensitivity from soundcard calibration file

Unit (int) : or

Output:

Detected frequency: Analyzed signal frequency

Detected amplitude: analyzed signal amplitude

THD: analyzed signal THD

Front Panel:


Calc Curve Delta VI (Operand A - Operand B = Output)

Calculate delta of 2 curve data (Operand A & Operand B) and Output Curve data referring to Output Name

input:

Curve (array cluster) : Curve data

Dat : external dat file path to import curve data (use external dat file when curve was not connected)

Operand A (str) : Curve name of Operand A

Operand B (str) : Curve name of Operand B

Output Name (str) : Curve name of output delta

output:

Output (array cluster) : output curve data


calcSensitivity vi

· Calculate the sensitivity value within the frequency range

Input:

Frequency range (Cluster):

Frequency (Double Array): Frequency data

Magnitude (Double Array): Level data

Output:

Sensitivity (Numeric): value of Sensitivity

Front Panel:


curvenaming vi

· Automatically name input data for the Mic test or Speaker test.

· Mic test naming will start from Mic[1…n]

· Speaker test will naming with Left[1…n] & Right[1…n]

· If Ref mic enabled, the curve name with Ref Mic will be added into the output

· GS/DUT will add the GS/DUT into the curve name

Naming format:-

FR - Fundamental GS Mic1

FR - Fundamental GS Mic2

FR - Fundamental GS Mic3

FR - Fundamental GS Mic4

FR - Smoothed GS Mic1

FR - Smoothed GS Mic2

FR - Smoothed GS Mic3

FR - Smoothed GS Mic4

FR - Fundamental DUT Mic1

FR - Fundamental DUT Mic2

FR - Fundamental DUT Mic3

FR - Fundamental DUT Mic4

FR - Smoothed DUT Mic1

FR - Smoothed DUT Mic2

FR - Smoothed DUT Mic3

FR - Smoothed DUT Mic4THD - DUT Mic1

THD - DUT Mic2

THD - DUT Mic3

THD - DUT Mic4

Input:

Mic? (Boolean): define if this is mic test or speaker test

Ref Mic (Boolean): enable if the ref mic data was recorded

dBSPL? (Boolean): Value convert to dB SPL (re to 20u) instead of dB V (re to 1)

GS? (Boolean): define if this is GS or DUT data

DUT Curve in (Cluster):

Ref Mic Curve Data (Cluster):

Output:

Curve out (Cluster):

Front Panel:


curvesubstract vi

· Operand A – Operand B = Output

Input:

Operand A (String): Curve Name

Operand B (String): Curve Name

Output Name (String): Subtracted Curve Name

Input curve (Cluster):

Output:

Output curve (Cluster):

Front Panel:


FindHead vi

· Detecting and remove the head tone added during the stimulus process before analysis process

Input:

Stimulus in (waveform array) :

Waveform in (array double) : recorded waveform Y data

Sampling rate (int) : audio sampling rate

HeadLength (int) : number of data point of head

Method : method use to allocate the start point ( [image] or [image])

Output:

Chopped wavelength (int) : total number of data points after chop

Chopped waveform (array double) : chopped waveform Y data

Stimulus out (array double) : waveform Y data after removing head data

Chopped portion (waveform) : chopped head data

Stimulus out (waveform) : Stimulus data after removing head data

Start point (int) : index for new starting point


Footswitch vi

· Read state from Serial port – Pin8 (CTS).

· State Asserted will be set to Serial Port – Pin7.

· Asserted = Connected, Unasserted = Disconnected

Input:

Visa resource name = Serial port number

State in = Set detected state to continue the test

Output:

State out = detected state out


Get SoundCard ID vi

· Get the sound card ID of both the Input and output device with the device name

Input:

Mode(String): Select mode between input, output, input & output

Soundcard Output (String): Name of soundcard for output device

Soundcard Input (String): Name of soundcard for input device

Output:

Output ID (Int): soundcard ID for output device

Input ID (Int): soundcard ID for input device

Front Panel:


http handler

http://(DUT IP):1200/operation/[CMD]

Input:

DUT IP (str) : DUT IP address. eg : 169.254.1.1

cmd (str) : http handler string after /operation/ [getflow, getmode]

Return (str) : String to compare with http return value

Output:

Result : Verdict of http return value matching with Return(str)


importconfig vi

· Generate Sonos Json log format with Curve & Results data

Input:

Config file path (path) : full path of the config file

Output:

Configs (cluster) : contain multiple cluster

Front Panel :


jsonlog vi

· Generate Sonos Json log format with Curve & Results data

Input:

Settings (cluster) :

Curves (cluster) :

Results (cluster) :

Output:

Test time(s) (double) : display total test time

Front Panel :


limits vi

· Plot DUT FR data against limit windows for verdict

Input:

Curve in (Cluster):

Limits (Cluster):

Windowing (Cluster):

Output:

Overall result (Boolean): overall result output

Output curve (Cluster):

Results (Cluster):

Curve Name (out) (String Array):

Front Panel:


Play vi

· Play signal in at selected soundcard and channel. The vi allows you to play a stereo, left or right channel.

· Signal in data was generated from stimulus vi

Input:

pre-play delay(mS) (int): delay in milliseconds added before stimulus begin

signal in (double array): array of Y value extracted from stimulus signal

play channel (int): set the output channel [0 = stereo, 1 = left, 2 = right)

sample rate (int): sample rate of waveform

bit per sample (int): bit rate per sample

Output:


Read SoundCard Calibration vi

· Import Calibration data from Calibration process (Calibrations.ini)

· Calibration data included, Input & output peak value, Amp Gain and Microphone Sensitivity

Calibration.exe: Application to get and store calibration value into Calibrations.ini

Output from Calibration exe: Calibrations.ini

[Input]

Microphone (USB Advanced Audio Device) L = 1

Microphone (USB Advanced Audio Device) R = 1

[Output]

Speakers (USB Advanced Audio Device) L = 1.092

Speakers (USB Advanced Audio Device) R = 1.092

[Amp]

Speakers (USB Advanced Audio Device) - Amp L = 6.32

Speakers (USB Advanced Audio Device) - Amp R = 6.32

[Mic]

Microphone (USB Advanced Audio Device) - Mic L = 1

Microphone (USB Advanced Audio Device) - Mic R = 1

Input:

Channel(1:L 2:R) (Numeric): 1 = Left channel, 2 = Right channel

soundcard Input (String): soundcard input device name

soundcard Output (String): soundcard output device name

Output:

Output Gain (Cluster):

Input Gain (Cluster):

Front Panel:


Record-DUT vi

DUT Mic Recording via HTTP handler

http://(DUT IP):1200/operation/streamaudio?source=mic&mic=(mic qty)&applycoeffs=no&duration=(recording duration)&header=no

DUT IP: 169.254.1.1

mic qty : Binary to Decimal (8 mics = 11111111 = 127, 4 mics = 00001111 = 15)

recording duration: total record time

Input:

record config (cluster): DUT recording configuration

sweep duration (double): stimulus sweep duration

Mics Mapping Index: Mic sequence index to physical label (0 - 7)

Output:

waveform out (array): recorded waveform out

waveform Y (array d): waveform Y data


RecordMultiChns vi

Recording for multi channels (up to Max 8 channels via 4 soundcard IDs)

· Allow to record up to 8 channels using 4 different 2-channel sound cards without ASIO feature

· Come with a dedicated single channel for ref mic recording

Input:

Ref Mic Enable (Boolean): enable ref mic acquisition

SN (str): DUT SN to label waveform file save

InIDs (array int): Sound card ID for input

Sampling Rate (int): Sampling rate for recording

Save waveform? (Boolean): enable/disable waveform save

Waveform path (path): folder path to store wave file

samBitIn (int): waveform bit rate

recordDuration (double): recording duration

InID (RefMic) (int): Sound card ID for input

recordChannels (int): Total recording channel. Current VI support up to 8 channels, but only supports 2 channels per soundcard

Output:

Recorded waveform (Ref Mic) (array waveform): Recorded waveform for ref mic

Waveform length (int): recorded waveform length

Recorded waveform (array waveform): recorded waveform


relaycontrol vi

· 2 channels serial port relay board control

Input:

Visa resource name = Serial port number

Relay num(Int): Relay number selection

Relay On/Off (Boolean) = True = ON, False = Off

Output:

State out = detected state out

Front Panel:


savewavefile vi

· Export waveform to wave file

Input:

Waveform path (path): directory path to store wave file

SN (string): DUT SN use for wave file naming purpose

Waveform in (waveform): waveform data to export

Front Panel :


smoothing vi

· Detecting resolution of input data and apply smoothing according to the setting.

Input:

Smoothing Width (Numeric):

Fundamental (Cluster):

Output:

Y Out (Double Array): Smoothed Y data

Smoothed (Cluster): Smoothed Curve Data

Front Panel:


stepsweep_stimulus vi

· Generate step sweep with or without head signal. Provide duration, frequency array, data num array, and head length info needed for analysis process

Input:

Signal config (Cluster):

Calibration (Cluster): soundcard & amp calibration value to adjust waveform amplitude

Output:

Waveform out (waveform)

numArray (Double Array): number of data for each frequency point

freqArray (Double Array): freq table that is used to generate step sweep

Front Panel :


windowing vi

· Chop the input curve with a range of frequency to provide an output curve that only contains the data within the frequency range set

Input:

Windowing (Cluster):

Curve in (Cluster):

Output:

Curve Out

Front Panel:


generatelimit vi

· Generate limit curve with provided input curve data, limits name, upper limit, and lower limit

Input:

Limits Name (String): Curve name for Limit curve without the “Lim – “

Curve input (Cluster):

Upper Limits (Double Array):

Lower Limits (Double Array):

Output:

Limit curve output (Cluster):

Front Panel:


Record-ASIO vi

Recording via ASIO for multi-channel soundcard

Input:

Ref Mic Enable (Boolean): enable ref mic acquisition

SN (str): DUT SN to label waveform file save

InIDs (array int): Sound card ID for input

Sampling Rate (int): Sampling rate for recording

Save waveform? (Boolean): enable/disable waveform save

Waveform path (path): folder path to store wave file

samBitIn (int): waveform bit rate

recordDuration (double): recording duration

InID (RefMic) (int): Sound card ID for input

recordChannels (int): Total recording channel. Current VI support up to 8 channels, but only supports 2 channels per soundcard

Output:

Recorded waveform (Ref Mic) (array waveform): Recorded waveform for ref mic

Waveform length (int): recorded waveform length

Recorded waveform (array waveform): recorded waveform