jdxi_editor.midi.utils.helpers

Helper functions

Attributes

_running_threads

Functions

on_usb_recording_finished(output_file)

on_recording_finished

on_usb_recording_error(message)

on_recording_error

_keep_until_finished(thread) → None

Hold a reference to thread until it has finished.

start_recording(usb_recorder, file_duration_seconds, ...) → None

start_recording

Module Contents

jdxi_editor.midi.utils.helpers.on_usb_recording_finished(output_file: str)[source]

on_recording_finished

Parameters:

output_file – str

Returns:

None

jdxi_editor.midi.utils.helpers.on_usb_recording_error(message: str)[source]

on_recording_error

Parameters:

message – str

Returns:

None

jdxi_editor.midi.utils.helpers._running_threads: set[jdxi_editor.midi.recording.recording_thread.WavRecordingThread][source]
jdxi_editor.midi.utils.helpers._keep_until_finished(thread: jdxi_editor.midi.recording.recording_thread.WavRecordingThread) → None[source]

Hold a reference to thread until it has finished.

jdxi_editor.midi.utils.helpers.start_recording(usb_recorder: jdxi_editor.midi.utils.usb_recorder.USBRecorder, file_duration_seconds: float, usb_file_output_name: str, recording_rate: str, selected_index: int) → None[source]

start_recording

Parameters:
  • usb_file_output_name – str

  • file_duration_seconds – float

  • usb_recorder – USBRecorder

  • recording_rate – str 16-bit PCM (int16)

  • selected_index – int

Returns:

None

Start the recording thread with the selected device index and recording rate.