-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a blob containing many unrelated commits:
snap
is renamed toquant
: better terminology, it is indeed behaving much like thequant
keyword in SuperCollider. It is currently half-broken, withnow
not working like intended. Fixes were implemented by @thegamecracks to fix a double iteration happening when a Player starts.quant
mode is nowbar
: functions are updated/executed on the beginning of a new bar.Player
, now implemented inAsyncRunners
.Player
now depends on theAsyncRunner
iterator.sync
will sync onePlayer
to anotherPlayer
iterator.n
forD
,d
,ZD
andzd
is now used to change the sample number.midi
ormidinote
is used to define a note.solo
function is fixed!runners
convenience function to print the currently runningAsyncRunners
.as_text: bool
parameter toPat
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
.