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

[WIP] Slowly reworking the scheduler #257

Merged
merged 17 commits into from
Jun 16, 2024
Merged

[WIP] Slowly reworking the scheduler #257

merged 17 commits into from
Jun 16, 2024

Conversation

Bubobubobubobubo
Copy link
Owner

This PR is a blob containing many unrelated commits:

  • snap is renamed to quant: better terminology, it is indeed behaving much like the quant keyword in SuperCollider. It is currently half-broken, with now not working like intended. Fixes were implemented by @thegamecracks to fix a double iteration happening when a Player starts.
  • The default quant mode is now bar: functions are updated/executed on the beginning of a new bar.
  • Removal of the iterator logic in Player, now implemented in AsyncRunners.
  • Player now depends on the AsyncRunner iterator.
  • sync will sync one Player to another Player iterator.
  • All sender parameters can now be callables! This is insanely useful for patterning.
  • n for D, d, ZD and zd is now used to change the sample number. midi or midinote is used to define a note.
  • The solo function is fixed!
  • New runners convenience function to print the currently running AsyncRunners.
  • Adding the as_text: bool parameter to Pat in order to print a pattern in textual format.

This is the first step going forward a new version of Sardine that fixes a lot of issues: synchronisation, temporal precision, etc. Help is welcome to continue the work on refactoring AsyncRunners.

Bubobubobubobubo and others added 17 commits June 14, 2024 21:32
Before, runners would sleep an entire period before running their
first iteration, which always caused desync between two runners
with different periods even when their snap deadlines are synchronized.

BTW, I think jump_start is a poor, obscure name for this fix, but I can't
think of anything else. Please fix me!
This commit replaces the 'iterator' system from the Player class by the
internal iterator already implemented in the AsyncRunner class. These
iterators possess a 'step' and 'limit' argument to control iteration.

It also fixes the 'sync' keywords accessible used by Players. The 'sync'
parameter expects an AsyncRunner, and will lock player A iterator to
player B iterator. This can be quite useful in some scenarios.
This commit updates the coloring of some feedback messages (they need to
be yellow). It also removes the timing indication printed when an
AsyncRunner is getting evaluated. It was obviously not the right time if
I am to believe the model.
The 'n' parameter can now be used to change the sample number.
The old behavior of 'n' is still accessible through the 'midinote' or
'midi' parameters.
Adding the 'as_text' parameter to the Pat function in order to print
patterns in a textual format. This can be quite useful for debugging.
@Bubobubobubobubo Bubobubobubobubo merged commit 46a4d88 into main Jun 16, 2024
1 check failed
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

Successfully merging this pull request may close these issues.

2 participants