jdxi_editor.midi.soundfont

Attributes

HW_PORT_HINT

SF2_PATH

MIDI_FILE_PATH

Functions

find_hw_output_name([prefer_hw])

open_hw_output()

setup_fluidsynth(sf2_path)

midi_to_events(in_port, sink_send, use_sw[, fs])

ticks_to_seconds(→ float)

Convert MIDI ticks to seconds using the same formula as the main player.

get_total_duration_in_seconds(midi_file)

Calculate the correct duration accounting for tempo changes.

play_midi_with_tempo_handling(mid, fs, use_sw)

Play MIDI file with proper tempo change handling using the main player approach

main()

Module Contents

jdxi_editor.midi.soundfont.HW_PORT_HINT = 'Roland JDXi'[source]
jdxi_editor.midi.soundfont.SF2_PATH[source]
jdxi_editor.midi.soundfont.MIDI_FILE_PATH = 'tests/sheep.mid'[source]
jdxi_editor.midi.soundfont.find_hw_output_name(prefer_hw=True)[source]
jdxi_editor.midi.soundfont.open_hw_output()[source]
jdxi_editor.midi.soundfont.setup_fluidsynth(sf2_path)[source]
jdxi_editor.midi.soundfont.midi_to_events(in_port, sink_send, use_sw, fs=None)[source]
jdxi_editor.midi.soundfont.ticks_to_seconds(ticks: int, tempo: int, ticks_per_beat: int) float[source]

Convert MIDI ticks to seconds using the same formula as the main player. :param ticks: int :param tempo: int (μs per quarter note) :param ticks_per_beat: int :return: float

jdxi_editor.midi.soundfont.get_total_duration_in_seconds(midi_file)[source]

Calculate the correct duration accounting for tempo changes. Uses the same approach as the main player.

jdxi_editor.midi.soundfont.play_midi_with_tempo_handling(mid, fs, use_sw)[source]

Play MIDI file with proper tempo change handling using the main player approach

jdxi_editor.midi.soundfont.main()[source]