
#idString HKJ,Soundcard input,
#name Soundcard input
#handle SO
#port none

#helpurl http://lygte-info.dk/project/TestControllerSoundcard%20UK.html#Input

#notes In Windows recording requires a privacy permission.
Mono will probably be an average of left+right, this means when only using left or right input it is best to select it directly.
Frequency calculations works best when sample frequency is at least 3 times input frequency.

#outputOff on 0

#interfaceType SI

#interface readFrequency 0 
#interface readVoltage 1 



; Strings to configure device in different modes
; First parameter must match a #value (4 parameter) and second parameter must match what #askMode returns
; First parameter is also used in shortcut menu
;#cmdMode 




; Setup menu functions
; The parameters on the first line is: type name page 
; Settings on the following lines are:
; read: SCPI to read value from device, is used to synchronize when opening setup page or setting equal named fields. Not always used
; askValuesReadFormat: Parse read value.
; write: Send the value to device, this field is used in combination with data fields in the details to send updates to device.
; tip: Add this tip to all components for this input field.


#cmdSetup comboboxFillHot Device
:read: audiodevice?
:write: audiodevice
:update: Bits Sample_rate
audiodevices?

#cmdSetup comboboxFillHot Bits
:read: bit?
:write: bit
:tip: More bits means better resolution and more precision in amplitude values.
bits?

#cmdSetup comboboxFillHot Sample_rate
:read: samplerate?
:write: samplerate
:tip: High sample rate makes higher input frequency measureable.  The OS/output device may limit the actual rate.
samplerates?

#cmdSetup radio Channels
:read: CHANNEL?
:write: CHANNEL
:string:
:tip: Be careful with mono input, it may prevent seeing an overload.
Mono Mono
Left Left
Right Right



;#cmdSetup slider Volume
;:read: volume?
;:write: volume
;:tip: This will adjust the sensitivity, but it not always supported.
;:enable: HasVolume
;dB -80 6

; This control is hidden and only used to set the variable "HasVolume" use by the "Volume" control
;#cmdSetup numberInt HasVolume
;:read: HASVOLUME?
;:visible: 0
;x 0 1


#cmdSetup radio Measurement_speed
:read: speed?
:write: speed
:tip: Measurements each second, lower value is more precise, higher values tracks fast logging and readouts better.
1 1
3 3
6 6
15 15


#cmdSetup indicatorNum Status
:read: SAMPLING?
:tip: When failing to start sampling, check restriction on the computer.
Failed 99 green
Sampling 1 green

#cmdSetup indicatorNum Status
:read: OVERLOAD?
:tip: In-range is below 80%, High is above 80% and Overload is above 95%. When Mono is selected this may not detect overload.
In-range 0 green
High 1 orange
Overload 2 red

#cmdSetup button View
:write: popup
:tip: Shows a popup with the actual sample data.

#cmdSetup updater Updater
:update: Status
0.3