Quick Start - loudifier/chirplab GitHub Wiki
Quick Start
- Download the latest release zip file. This guide assumes you are using Chirplab on Windows. For Linux or Mac, see Running and Building
- Extract the entire
chirplab
folder from the zip file and runchirplab.exe
- The Chirplab GUI will open a default new project
Quick-est start
- Open the Sound properties control panel (press Win+R and run
mmsys.cpl
) - Set the default Playback and Recording devices to your desired speaker and microphone
In the Chirplab window:
- Click through the tabs along the tab bar at the top of the GUI window to explore a few basic measurements in the default new project with measurement results for the example response file
- Go to the Chirp Stimulus/Response tab
- Expand the Input and Output sections, and set them both to 'Device' input mode
- Adjust your system speaker volume to a medium level
- Click 'Play and Capture' near the bottom of the Input section. After a few seconds you should hear a chirp from your speakers and the graph on the right will update
- Click through the measurements again and you should see the measurement results for a chirp from your default system speakers to your default system microphone
The Chirplab GUI widow consists of:
- A menu bar at the top for saving and loading Chirplab project files, adding and removing measurements, saving measurement data, etc.
- A tab bar below the menu bar for switching between the Chirp Stimulus/Response tab and tabs for each measurement in the project
- A configuration panel on the left
- A graph on the right
The first tab is the Chirp Stimulus/Response tab. The configuration panel on the left lets you set:
- The chirp and analysis parameters
- The chirp frequency range. Some software will start and end chirps outside of the specified chirp range, but Chirplab uses the exact frequency range specified, so you may want to start lower and end higher than the target measurement range
- The chirp length. Increasing the chirp length can improve signal to noise ratio, but 1 second is usually a good tradeoff between measurement time and SNR
- Chirp analysis parameters
- The analysis sample rate used internally for all measurements. If your input signal has a very high sample rate setting the analysis sample rate lower can speed up processing time, but it is usually recommended to set this to 'use input rate'
- Pre/post sweep include a small portion of the input signal before and after the chirp to account for slight misalignment and phase shift between the stimulus and detected chirp timing
- The stimulus output settings. Either file mode, where you set the parameters of a chirp stimulus WAV file to be exported and played with other software or loaded to and played from a DUT, or device mode, where you select a sound card output and settings for Chirplab to play the chirp stimulus directly. Both modes let you control:
- The amplitude of the output signal
- Pre- and post-sweep padding, which is independent from the chirp analysis pre/post-sweep padding. This allows you to adjust the padding to account for differences in latency and timing between the playback and capture paths and make sure the entire chirp signal is captured
- Whether to include a section of silence before the output chirp signal, which is used for measurement noise floor estimates showing the chirp stimulus signal, the detected response from the input file, and a sample of the input noise floor if there is enough silence in the input file preceding the detected chirp
- Output format and channel selection
- You can also generate an input file or trigger output device playback through the Measurement menu or pressing F6
- The captured chirp input settings. Either file mode, where you specify an input WAV file recording of a chirp signal, or device mode, where you select a sound card input and settings for Chirplab to capture a chirp signal directly.
- Device mode lets you set the capture length manually, to account for timing differences between the playback and capture paths, as well as the input device sample rate. File mode will search the entire input file to detect an input chirp signal
- In device mode, the Save Last Capture button below the Capture button allows you to save a WAV file of the most recently captured raw response, including all input channels and in the sample rate as it was captured. This allows you to capture a chirp response using sound card input in Chirplab, save the response for later for processing with different analysis software or using Chirplab file input with different measurements or analysis settings
- Both modes allow you to select the input channel
- Input calibration settings let you set conversion factors to output measurement data in acoustic or electrical units. Unless you know your microphone and/or interface acoustic/electrical sensitivity or have a reliable way to calibrate your input it is recommended to output data in digital (dBFS) or relative (dB/%) units
- You can also re-analyze the input file (useful when the input file has been overwritten by a new recording) or trigger a new input device capture through the Measurement menu or pressing F5
The Chirp Stimulus/Response tab has a graph on the right side that displays:
- The stimulus signal that is used as the reference for measurements and for input signal recognition and time alignment. The stimulus is always shown at full scale, regardless of the output amplitude setting
- The chirp signal detected in the input signal
- A sample of the idle channel noise will be included if there is enough time before the detected chirp signal in the input file or sound card capture. This noise sample is used by measurements to estimate the effective noise floor for individual measurements in the project. See [noise floor estimation] for a detailed explanation
Each measurement in the project can be selected from the other tabs in the tab bar
Individual measurements may be configured or displayed differently, but will usually consist of:
- A configuration panel on the left
- A text box at the top that lets you set the measurement name
- A measurement parameters section with controls for different processing options for the measurement. For example, the Frequency Response measurement has settings to adjust the impulse response windowing (time-gating) to find a tradeoff between accuracy and noise rejection
- An output settings section with controls for:
- The desired output unit, including acoustic/electrical/digital units and absolute or relative units for distortion measurements
- The frequency range of the output points, independent of the chirp sweep range
- The number of output points, and the spacing between the points, usually defaulting to 12 proportionally-spaced points per octave (120 points for a range of 20-20kHz)
- See individual [measurement descriptions] for explanations of the measurement parameters, output options, and how the measurements are derived from the input chirp signal
Managing measurements:
- To add a new measurement, click the '+' tab at the end of the tab bar, use the menu bar and navigate to Measurement > Add Measurement, or press CTRL+A. A dialog box will pop up that lets you select the measurement type and give the measurement a name. The new measurement will be added to the project with default parameters.
- To remove a measurement, use the menu bar and navigate to Measurement > Remove Current Measurement or press CTRL+R
- To reorder measurements, click and drag the measurement tab in the tab bar
- If you want to reuse an individual measurement with another Chirplab project, use the menu bar and navigate to Measurement > Save Measurement Preset to save the measurement parameters and output settings as a Chirplab Measurement file (.clm)
- To use a previously saved measurement file with the current project use the menu bar and navigate to Measurement > Add Measurement From Preset
Saving data
- Use the menu bar and navigate to Mesurement > Save Measurement/Graph Data or press CTRL+M, which opens a file save dialog
- In the save file dialog, the default file type will save the output data from the measurement. This data will usually be a .csv file with the frequency points and output data points matching the measurement output settings. Some measurements will have different default output types, like Impulse Response saving a WAV file of the measured impulse response. To include (or exclude) the estimated measurement noise floor with the data output, use the menu bar and check (or uncheck) Measurement > Include Noise Floor in Data Output
- To save an image of the graph shown on the measurement tab select Graph Image (*.png) in the save dialog type dropdown
To use the Chirplab Command-Line Interface:
- First, save a Chirplab Project file (.clp) from the GUI. The project file format is plain text YAML and it can be manually created or edited, but it is much easier to configure project files using the GUI.
- Run
chirplab.exe <project file> -c
to process the input file defined in the project file against the measurements in the project file, with the output data being saved to the same directory where the project file is located - Run
chirplab.exe -h
to see additional command-line options