Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add universal every() method across Pattern classes #54

Open
ideoforms opened this issue Jan 17, 2024 · 0 comments
Open

Add universal every() method across Pattern classes #54

ideoforms opened this issue Jan 17, 2024 · 0 comments

Comments

@ideoforms
Copy link
Owner

ideoforms commented Jan 17, 2024

Extend PRandomImpulseSequence's every() method across all Pattern subclasses, so that any pattern is able to schedule its own periodic events.

This means a that hook will need to be injected at the start of every class's __next__ method. Nicest option is probably to alter the convention so that the generic processing method for Pattern subclasses becomes next(), and have the top-level Pattern class define a generic __next__ method that triggers hooks before calling and returning self.next().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant