The SoundImp module supports single or dual channel digital data to be acquired using a regular PC sound card.
Both mono and stereo modes are supported. Each of the channels can be independently calibrated.
The importer supports continuous mode, ensuring realtime recording without discontinuities.
Below is a list of the module capabilities:
Signal processing and internal data representation have 312 dB SNR.
Below is a table of settings versus behavior of the SoundImp module-
| Settings |
Behavior |
| Mode |
Left Data Channel Out |
Right Data Channel Out |
Left Data Channel Out |
Right Data Channel Out |
| Mono |
Not Used |
Used |
- |
Left + Right Mic Inputs |
| Mono |
Used |
Not Used |
Left + Right Mic Inputs |
- |
| Mono |
Used |
Used |
Left + Right Mic Inputs |
Left + Right Mic Inputs |
| Stereo |
Not Used |
Used |
- |
Right Mic Input |
| Stereo |
Used |
Not Used |
Left Mic Input |
- |
| Stereo |
Used |
Used |
Left Mic Input |
Right Mic Input |
To import from a sound card, select the sound-In Device, sample rate and record length.
The SoundImp module supports the graphical and programming user interfaces as explained below.
Graphical Interface
Ports
CH1
Left channel data output port.
CH2
Right channel data output port.
|
|
Schematic Symbol
|
Settings
Sound-In Device [Dropbox]
This is a list of available sound recording devices in the PC. Select the device you want to use.
Sample Rate [Textbox]
This is the sound card sample rate in samples per second (SPS) or kilo samples per second (KSPS).
Sound cards usually support 11.025 KSPS, 22.05 KSPS and 44.1 KSPS only.
If you enter any other sample rate value and the sound card doesn't support it,
then the sampling might not be accurate resulting in distorted sound recording.
Rec Length [Textbox]
Record length, i.e. number of samples to be acquired in one go.
Be aware that entering a large value can increase the sweep time to very large values due to
low sample rate of sound card.
Sweep Time [Textbox]
Time required to acquire the specified number of samples at the specified sample rate.
Freeze Signal [Checkbox]
Marking the Freeze Signal Checkbox freezes the output waveform and no new samples are acquired.
More [Checkbox]
Marking the More Checkbox shows more advanced options.
CHL Gain [Textbox]
Enter the gain for the left channel if you want to calibrate it.
CHL Offset [Textbox]
Enter the dc offset for the left channel
CHR Gain [Textbox]
Enter the gain for the right channel if you want to calibrate it.
CHR Offset [Textbox]
Enter the dc offset for the right channel
Horizontal Offset (s) [Textbox]
Enter horizontal offset in seconds. If Additive is unchecked, the entered horizontal offset is absolute and is the
horizontal offset for the first point in the waveform, i.e. it overrides the horizontal offset inherent in the waveform.
If Additive is checked, the entered horizontal offset is additive to any horizontal offset inherent in the waveform.
Additive [Checkbox]
Marking the Additive checkbox makes the entered horizontal offset as additive to the horizontal offset inherent in
the waveform. Unmarking the Additive Checkbox makes the entered horizontal offset as absolute and is the horizontal
offset for the first point in the waveform, i.e. it overrides the horizontal offset inherent in the waveform.
Mono [Option]
Selecting the mono option makes the sound card behave as a mono sound card.
Refer the table at the top to see the sound card behavior when mono is selected.
Stereo [Option]
Selecting the stereo option lets you to use the sound card in stereo mode.
Refer the table at the top to see the sound card behavior when stereo is selected.
Programming Interface
Settings
Record Length
| Syntax | :reclen |
| Type | :long |
| Unit | :Points |
| Default | :1000 |
Number of data points to be acquired from the sound card.
Sample Rate
| Syntax | :samplerate |
| Type | :long |
| Unit | :Samples/second |
| Default | :44100 |
Number of samples per second acquired by sound card. A higher number gives higher resolution.
Most of the sound cards support sample rates of 11025, 22050 and 44100 samples/second.
Gain Calibration
| Syntax | :chl.gain or chr.gain |
| Type | :double |
| Unit | :n/a |
| Default | :1 |
Used to calibrate sound card left or right channel gain.
Specify a value that plots a 1 V signal as a 1 V signal.
Offset Calibration
| Syntax | :chl.offset or chr.offset |
| Type | :double |
| Unit | :n/a |
| Default | :0 |
Used to calibrate sound card left or right channel offset.
Specify this value to center an AC signal around 0 V.
Sound-In Device
| Syntax | :device |
| Type | :long |
| Unit | :n/a |
| Default | :0 |
Selects the sound-in device to be used for data acquisition.
Mono/Stereo Mode
| Syntax | :stereo |
| Type | :long |
| Unit | :n/a |
| Default | :0 |
Setting this setting to 1 enables stereo mode and setting it to 0 enables the mono mode.
See the table at the top to see the module behavior for this setting.
Functions
Sound-In Device List
Detects sound input i.e. sound recording devices available and returns them in a comma separated list.
String devices()
| Returns | :Comma separated list of sound input devices |
Window Size
Changes the width and height of the GUI window.
void gui.size(float width, float height)
| Returns | :None |
| width | :Window width in pixels |
| height | :Window height in pixels |
Window Location
Moves GUI window to the specified location and optionally changes size.
void gui.move(float left, float top, float width, float height)
| Returns | :None |
| left | :Horizontal coordinate for the left edge of the window in pixels. |
| top | :Vertical coordinate for the top edge of the window in pixels. |
| width | :Optional. Window width in pixels |
| height | :Optional. Window height in pixels |
Ports
Left Channel Data Out
| Syntax | :chl.out |
| Type | :Output |
Left channel data output
Right Channel Data Out
| Syntax | :chr.out |
| Type | :Output |
Right channel data output