Closed slurmulon closed 3 years ago
A less-than-ideal but easier solution is, on each beat, to simply loop through each element in the Set
and invoke their callbacks. The downside is that this only works on one level, breaking recursion / hierarchy.
A hybrid approach is also possible. Loop through each element in the Set
, and for each element we invoke a contextual step
call (would still require step
to be refactored).
This is now supported in bach v3.
We need to be able to nest intervals that process collections of elements. For example:
In the
Set
({}
), the:Scales
and:Chords
will overlap and will be played at the same time.In the nested
List
([]
), eachChord
orScale
will be played for 2 measures at a time using their own contextual/internal timers.The simplest way I know to do this is to introduce a recursive "context" abstraction.
This will also require changes to
bach
, such thatSet
s can be defined without a duration value.