The SoundExp module supports real signal generation using a regular PC sound card.
This module is very fast and queues up the waveform data in its internal buffer for playback,
and is capable of continuous sound generation in forever run mode.
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 SoundExp module-
| Settings |
Behavior |
| Mode |
Left Data Channel In |
Right Data Channel In |
Left Speaker Out |
Right Speaker Out |
| Mono |
Not Used |
Used |
Right Data Input |
Right Data Input |
| Mono |
Used |
Not Used |
Left Data Input |
Left Data Input |
| Mono |
Used |
Used |
Left + Right Data Inputs |
Left + Right Data Inputs |
| Stereo |
Not Used |
Used |
Silent |
Right Data Input |
| Stereo |
Used |
Not Used |
Left Data Input |
Silent |
| Stereo |
Used |
Used |
Left Data Input |
Right Data Input |
To use this module, select the sound-Out Device.
The SoundExp module supports the graphical and programming user interfaces as explained below.
Graphical Interface
Ports
CH1
Left channel data input port.
CH2
Right channel data input port.
|
|
Schematic Symbol
|
Settings
Sound-Out Device [Dropbox]
This is a list of available sound playback 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.
Sound cards usually support 11.025 KSPS, 22.05 KSPS and 44.1 KSPS only.
If you enter any other sample rate value, sampling might not be accurate.
Normally, sample rate is set automatically as per the input waveform.
However, you can check override and then select a new sample rate.
Beware that overriding sample rate will result in incorrect frequencies
in the output signal as no re-sampling is done.
Sample Rate Override [Checkbox]
Check this to override the sample rate of the input waveform.
If disabled, the input waveform's sample rate is used.
Beware that checking this option will result in incorrect frequencies
in the output signal as no re-sampling is done.
Rec Length [Read Only]
Number of points in the input waveform.
Sweep Time [Read Only]
Time required to playback the entire record at the specified sample rate.
Calibration Gain [Textbox]
Enter this figure to generate the signal with correct amplitude.
Calibration Offset [Textbox]
Enter this figure to remove dc offset from the input signal.
Stop Playing [Button]
This module queues up the input waveform data for playback.
So, the sound card keeps on generating the output till all the waveform data has been played,
even if the DspSee run cycle is over.
This button allows you to stop playback.
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 (Read Only)
| Syntax | :reclen |
| Type | :long |
| Unit | :Points |
| Default | :n/a |
Number of data points in the input waveform.
Sample Rate
| Syntax | :samplerate |
| Type | :long |
| Unit | :Samples/second |
| Default | :44100 |
Playback sample rate.
Sound cards usually support 11.025 KSPS, 22.05 KSPS and 44.1 KSPS only.
If you enter any other sample rate value, sampling might not be accurate.
Normally, sample rate is set automatically as per the input waveform.
However, you can enable samplerate.override and then select a new sample rate.
Beware that overriding sample rate will result in incorrect frequencies
in the output signal as no resampling is done.
Sample Rate Override
| Syntax | :samplerate.override |
| Type | :long |
| Unit | :n/a |
| Default | :0 |
Set this to 1 to override the sample rate of the input waveform.
If 0, the input waveform's sample rate is used.
Beware that enabling this option will result in incorrect frequencies
in the output signal as no re-sampling is done.
Gain Calibration
| Syntax | :chl.gain or chr.gain |
| Type | :double |
| Unit | :n/a |
| Default | :1 |
Left or right channel gain. Enter this figure to generate the signal with correct amplitude.
Offset Calibration
| Syntax | :chl.offset or chr.offset |
| Type | :double |
| Unit | :n/a |
| Default | :0 |
Left or right channel offset. Enter this figure to remove dc offset from the input signal.
Sound-Out Device
| Syntax | :device |
| Type | :long |
| Unit | :n/a |
| Default | :0 |
Selects the sound-out device for data playback.
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-Out Device List
Detects sound output devices available and returns them in a comma separated list.
String devices()
| Returns | :Comma separated list of sound output 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 In
| Syntax | :chl.src |
| Type | :Input |
Left channel data input
Right Channel Data in
| Syntax | :chr.out |
| Type | :Input |
Right channel data input