player package

Submodules

player module

Midi Player

class ChannelButton(**kwargs)[ソース]

ベースクラス: ToggleButton, EventDispatcher

ChannelButton _summary_

index

NumericProerty:

class MidiTitleButton(**kwargs)[ソース]

ベースクラス: ToggleButton, EventDispatcher

MidiTitleButton _summary_

channels_preset

channel preset

Type:

ListProperty

filename

filename

Type:

StringProperty

total_tick

total ticks

Type:

NumericProperty

class PLAYER_STATUS(value)[ソース]

ベースクラス: IntEnum

An enumeration.

PAUSE = 3

pause

PLAYBACK = 2

playback

STANDBY = 1

standby

class PlayerView(**kwargs)[ソース]

ベースクラス: Screen

PlayView

add_channelbuttons(num=16)[ソース]

add_channelbuttons _summary_

パラメータ:

num (int) -- _description_, defaults to 16

戻り値の型:

None

add_midititlebutton(midifile, dt)[ソース]

add_midititlebutton _summary_

パラメータ:
  • midifile (Path) -- _description_

  • dt (int) -- _description_

戻り値の型:

None

cleanup_playback(future)[ソース]

Process after playback is finished.

パラメータ:

future (futures.Future) -- playback process

戻り値の型:

None

mute_channels()[ソース]

Mutes channels set to "down".

Return str:

filename of rules

戻り値の型:

str

pause(state)[ソース]

pause _summary_

パラメータ:

state (str) -- _description_

戻り値の型:

None

playback(state)[ソース]

playback _summary_

パラメータ:

state (str) -- _description_

戻り値の型:

None

progress_ticks(dt)[ソース]

Request number of ticks passed at intervals.

パラメータ:

dt (int) -- interval time

戻り値の型:

None

select(mtb)[ソース]

Select the SMF corresponding to the MidiTitleButton

パラメータ:

mtb (MidiTitleButton) -- pressed MidiTitleButton

status(value)[ソース]

status _summary_

パラメータ:

value (PLAYER_STATUS) -- _description_

戻り値の型:

None

unregister()[ソース]

Processing when terminating a View.

戻り値の型:

None

channels

button group channel

Type:

ObjectProperty

midifiles

button group midifile

Type:

ObjectProperty

pause_button

button pause

Type:

ObjectProperty

play_button

button playback

Type:

ObjectProperty

ticks_slider

slider ticks

Type:

ObjectProperty

property volume: int

volume

Type:

int

midifile module

MIDI file parsing and playback processing

class MidiPlayer[ソース]

ベースクラス: object

MidiPlayer playbacks MIDI files.

start(filename)[ソース]

Starts playback of the specified midi file.

パラメータ:

filename (str) -- midi filename

戻り値:

filename

戻り値の型:

str

stop()[ソース]

Stops the playback of Midi files.

戻り値の型:

None

gain: float = 0.2

gain

Type:

float

pause_tick: int = 0

number of ticks at interruption

Type:

int

property tick: int

tick

Type:

int

property volume: int

volume

Type:

int

gm_sound_set_names()[ソース]

Return GM Sound Set names and GM Percussion Sound Set names

戻り値:

list of GM Sound Set names

戻り値:

list of GM Percussion Sound Set names

戻り値の型:

tuple

info_midifile(midifile)[ソース]

Returns information about the Midi file.

パラメータ:

midifile (Path) -- Target Midi file

戻り値:

keywords: "title", "total_ticks", "channel_presets"

戻り値の型:

dict

mute_rules(**mute_flags)[ソース]

Rule file specifying channels to mute

パラメータ:

mute_flags (dict(str, bool)) --

戻り値の型:

str

{'0':True, '1':False, ..., '15':False}: True is mute, False is unmute

Module contents

MIDI Player function