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

Landmarks #13

Open
SpencerPark opened this issue Nov 20, 2016 · 1 comment
Open

Landmarks #13

SpencerPark opened this issue Nov 20, 2016 · 1 comment

Comments

@SpencerPark
Copy link
Owner

Landmarks are a proposed feature that allow the composer to mark important parts of a song. Landmarks could then be synchronized on to allow for blocks to be defined in separate files and imported. They could also be used by the CLI to start playback at a certain time in the composition.

Proposed Syntax

@chorus
{ "chorus" } => landmark

Syncing would then be done with a regular sync call but using blockName.landmark instead. The landmark is only required for imported blocks and if not given will sync with the start of the block.

@SpencerPark
Copy link
Owner Author

The @ notation seems to be the natural syntax but the notion for syncing is a little obscure. Instead of the multi-empty block (which is the most common use) synchronization the landmarks would be a global point in time that all blocks that want to synchronize will block on until everyone catches up.

This means that the landmarks must be a lexical construct to determine at compile time which blocks need to synchronize on the landmark. The generated executable will then be able to block until the last block that should synchronize on the landmark has reached it.

For 3 blocks Piano, Guitar, Drums where Piano and Drums want to sync up on start_kick:

Piano {
    [a, b, c]*<e, e, e>
    @start_kick
    [C]*<w!, w!, w!>
}
Guitar {
    //...
}
Drums {
    @start_kick
    3 * { [bass]*<q, q, q, q> }
}

At compile time it is determined that start_kick is a barrier for the Piano and Drums threads. This way of embedding points has the benefit (and downside) of being named. As naming is sometimes more of a hassle than it's worth the current block level synchronization should remain with this auxiliary method available to augment that.

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

No branches or pull requests

1 participant