Skip to content

Pattern language synchronisation #382

@bradrn

Description

@bradrn

Currently, the pattern language is hardcoded to start patterns every four beats:

(,name (*metro* 'get-beat 4) 0 0 (if (> ,beats 1) 1/2 (/ ,beats 2))))

This is fine for patterns which are multiples of four beats long (which I expect is most of them). But for patterns which aren’t, it’s nearly impossible to get any sort of synchronisation between patterns. It would be nice to fix this; I’m thinking that the best solution would be to add another parameter to :> and :| to specify on which beat it should be synchronised, although as a breaking change I’m wary of sending this in as a PR without any prior discussion.

For a concrete example:

(:> pat-1 4 0 (play syn1 @1 85 dur) '(60 62 64 65))
(:> pat-2 4 0 (play syn2 @1 85 dur) '(72 74 76 77))

(:> pat-1 3 0 (play syn1 @1 85 dur) '(60 62 64))
(:> pat-2 3 0 (play syn2 @1 85 dur) '(72 74 76))

The first pair of patterns will always start on the same beat, even when run at different times, while the second pair of patterns will almost never start on the same beat (although they will be synchronised with any other 4-beat-long pattern which is being played).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions