Sound Card device
- WhoAmI
- 1280
- Log files
SoundCard_<address>.bin
Use the Harp device pattern to initialize the device, log data, and send commands to and receive messages from the Sound Card.
Check out the following in-depth guides to learn how to access the device functionality with the Harp.SoundCard package:
- Play sounds
- Adjust volume
- Configure digital inputs
- Control digital outputs
- Acquire analog data
- Manage stored sounds
Registers
The core registers implemented by every Harp device, such as WhoAmI and OperationControl, are described in the Device Registers and Operation specification.
| Name | Address | Type | Access | DefaultĀ [range] | Description |
|---|---|---|---|---|---|
Start |
32 | U16 | Write, Event | 2 [2:40000] | Starts the sound index if the value is less than 32, or otherwise the waveform generator at the specified frequency in Hz. |
Stop |
33 | U8 | Write, Event | Stops the sound or frequency being played when the written value is non-zero. | |
AttenuationLeft |
34 | U16 | Write | Specifies the attenuation for the left channel (1 LSB is 0.1dB). | |
AttenuationRight |
35 | U16 | Write | Specifies the attenuation for the right channel (1 LSB is 0.1dB). | |
AttenuationBoth |
36 | U16[2] | Write | Specifies the attenuation for the left and right channels simultaneously [Att L] [Att R] (1 LSB is 0.1dB). | |
AttenuationStart |
37 | U16[3] | Write | Specifies attenuation and simultaneously starts the sound index or frequency [Index] [Att L] [Att R]. | |
DeleteSound |
38 | U8 | Write | 2 [2:31] | Deletes the sound stored at the specified index. |
DeleteAllSounds |
39 | U8 | Write | Deletes all sounds stored in the device when the written value is non-zero. | |
InputState |
40 | U8 | Event | Reports the state of the digital inputs. Events are sent only for inputs configured in Digital mode. | |
ConfigureDI0 |
41 | U8 | Write | Specifies the operation mode of the digital input 0 (DI0). | |
ConfigureDI1 |
42 | U8 | Write | Specifies the operation mode of the digital input 1 (DI1). | |
StartOnDI0 |
43 | U16 | Write | 2000 [2:40000] | Specifies the sound index or frequency to start when triggering DI0, following the same rules as Start. |
StartOnDI1 |
44 | U16 | Write | 4000 [2:40000] | Specifies the sound index or frequency to start when triggering DI1, following the same rules as Start. |
AttenuationLeftDI0 |
45 | U16 | Write | 60 | Specifies the attenuation to set on the left channel (1 LSB is 0.1dB) when triggering DI0. |
AttenuationLeftDI1 |
46 | U16 | Write | 60 | Specifies the attenuation to set on the left channel (1 LSB is 0.1dB) when triggering DI1. |
AttenuationRightDI0 |
47 | U16 | Write | 60 | Specifies the attenuation to set on the right channel (1 LSB is 0.1dB) when triggering DI0. |
AttenuationRightDI1 |
48 | U16 | Write | 60 | Specifies the attenuation to set on the right channel (1 LSB is 0.1dB) when triggering DI1. |
ConfigureDO0 |
52 | U8 | Write | 1 | Specifies the operation mode of the digital output 0 (DO0). |
ConfigureDO1 |
53 | U8 | Write | 0 | Specifies the operation mode of the digital output 1 (DO1). |
ConfigureDO2 |
54 | U8 | Write | 0 | Specifies the operation mode of the digital output 2 (DO2). |
OutputSet |
58 | U8 | Write | Sets the specified digital output lines. | |
OutputClear |
59 | U8 | Write | Clears the specified digital output lines. | |
OutputToggle |
60 | U8 | Write | Toggles the specified digital output lines. | |
OutputState |
61 | U8 | Write | Writes the state of all digital output lines. | |
EnableAdcControlState |
64 | U8 | Write | Specifies whether the ADC control state is reported, sampled at 1 kHz. | |
AdcControlState |
65 | U16[5] | Event | Reports sampled analog input data and current sound parameters. |