@@ -101,7 +101,7 @@ def num_tracks(self) -> int:
101
101
return self ._num_tracks
102
102
103
103
@property
104
- def is_parsed (self ) -> bool :
104
+ def parsed (self ) -> bool :
105
105
"""Whether the MIDI file has been successfully parsed."""
106
106
return self ._parsed
107
107
@@ -138,7 +138,7 @@ def next_event(self) -> Optional[Dict[str, Any]]:
138
138
return event
139
139
140
140
@property
141
- def has_more_events (self ) -> bool :
141
+ def more_events (self ) -> bool :
142
142
"""Whether there are more events to be played."""
143
143
return self ._current_event_index < len (self ._events )
144
144
@@ -477,7 +477,7 @@ def __init__(self, midi_parser: MIDIParser) -> None:
477
477
:param MIDIParser midi_parser: A MIDIParser instance
478
478
:raises MIDIParseError: If the provided parser hasn't parsed a file yet
479
479
"""
480
- if not midi_parser .is_parsed :
480
+ if not midi_parser .parsed :
481
481
raise MIDIParseError ("MIDI parser must parse a file before creating a player" )
482
482
483
483
self ._parser : MIDIParser = midi_parser
@@ -499,14 +499,14 @@ def restart_delay(self) -> float:
499
499
@restart_delay .setter
500
500
def restart_delay (self , delay : float ) -> None :
501
501
"""
502
- Set the delay in seconds before restarting playback when looping.
502
+ The delay in seconds before restarting playback when looping.
503
503
504
504
:param float delay: Delay in seconds (minimum 0.1s)
505
505
"""
506
506
self ._restart_delay = max (0.1 , float (delay )) # Minimum 0.1 second
507
507
508
508
@property
509
- def is_playing (self ) -> bool :
509
+ def playing (self ) -> bool :
510
510
"""Whether the player is currently playing."""
511
511
return self ._playing
512
512
@@ -523,14 +523,13 @@ def loop_playback(self) -> bool:
523
523
@loop_playback .setter
524
524
def loop_playback (self , value : bool ) -> None :
525
525
"""
526
- Set whether playback should automatically loop when finished.
527
526
528
527
:param bool value: True to enable looping, False to disable
529
528
"""
530
529
self ._loop_playback = bool (value )
531
530
532
531
@property
533
- def is_finished (self ) -> bool :
532
+ def finished (self ) -> bool :
534
533
"""Whether playback has completed (and not set to loop)."""
535
534
return self ._finished
536
535
0 commit comments