Skip to content

Commit

Permalink
Rename PatternPlayer.initial_offset to initial_seconds (#334)
Browse files Browse the repository at this point in the history
* Rename PatternPlayer.initial_offset to initial_seconds

* Bump version to 23.5b3
  • Loading branch information
josiah-wolf-oberholtzer authored May 12, 2023
1 parent a9aac96 commit 5d5559f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion supriya/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
This follows black's versioning scheme.
"""
__version_info__ = (23, "5b2")
__version_info__ = (23, "5b3")
__version__ = ".".join(str(x) for x in __version_info__)
10 changes: 5 additions & 5 deletions supriya/patterns/players.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ def __init__(
self._notes_by_uuid: Dict[Union[UUID, Tuple[UUID, int]], float] = {}
self._uuid: UUID = uuid or uuid4()
self._next_delta: Optional[float] = None
self._initial_offset: Optional[float] = None
self._initial_seconds: Optional[float] = None

def _clock_callback(
self, clock_context: ClockContext, *args, **kwargs
) -> Optional[float]:
for clock_context, seconds, offset, events in self._find_events(clock_context):
if self._initial_offset is None:
self._initial_offset = offset
if self._initial_seconds is None:
self._initial_seconds = seconds
with self._context.at(seconds):
for event, priority in events:
event.perform(
Expand Down Expand Up @@ -248,8 +248,8 @@ def uuid_to_note_id(self, uuid: UUID, index: Optional[int] = None) -> float:
return self._notes_by_uuid[uuid]

@property
def initial_offset(self) -> Optional[float]:
return self._initial_offset
def initial_seconds(self) -> Optional[float]:
return self._initial_seconds

@property
def uuid(self) -> UUID:
Expand Down

0 comments on commit 5d5559f

Please sign in to comment.