phoenix6.controls.music_tone#

Module Contents#

class phoenix6.controls.music_tone.MusicTone(audio_frequency: phoenix6.units.hertz)#

Plays a single tone at the user specified frequency.

Parameters:

audio_frequency (hertz) – Sound frequency to play. A value of zero will silence the device. The effective frequency range is 10-20000Hz. Any nonzero frequency less than 10 Hz will be capped to 10Hz. Any frequency above 20Khz will be capped to 20KHz.

property name: str#

Gets the name of this control request.

Returns:

Name of the control request

Return type:

str

property control_info: dict#

Gets information about this control request.

Returns:

Dictonary of control parameter names and corresponding applied values

Return type:

dict

audio_frequency#

Sound frequency to play. A value of zero will silence the device. The effective frequency range is 10-20000Hz. Any nonzero frequency less than 10 Hz will be capped to 10Hz. Any frequency above 20Khz will be capped to 20KHz.

with_audio_frequency(new_audio_frequency: phoenix6.units.hertz) MusicTone#

Modifies this Control Request’s audio_frequency parameter and returns itself for method-chaining and easier to use request API.

Parameters:

new_audio_frequency (hertz) – Parameter to modify

Returns:

Itself

Return type:

MusicTone

with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MusicTone#

Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).

If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.

Parameters:

new_update_freq_hz (hertz) – Parameter to modify

Returns:

Itself

Return type:

MusicTone