jkboyce / jugglinglab

Juggling Lab juggling animator
https://jugglinglab.org
GNU General Public License v2.0
86 stars 17 forks source link

Support for non integer throws (like 3.5p) #113

Open hapiel opened 2 years ago

hapiel commented 2 years ago

Are you considering support for non integer number siteswaps?

In passing it is quite common to have patterns such as [3 2.5p 2]

I think this could also be interesting for solo juggling to get polyrhythmic patterns. For example the siteswap (4,5.3x) 4 5.3x 4 5.3x 4 could refer to juggling 4 over 3.

I'm also interested in patterns that have a galloping rhythm. For example, (4^4)4.5 4 4.5(4^4)4.5 4 4.5 would take you in and out of a galloping rhythm with 4 balls.

As a syntax, I suggest that as soon as a . is encountered, the following digits belong to the siteswap until a whitespace character (`) follows, with more whitespaces being optional. So the siteswaps above could be written as32.5p 2and(4,5.3x)45.3x 45.3x 4and(4^4)4.5 44.5(4^4)4.5 44.5. Also I suggest that we round fractions depending on the context, in this case above a .3 needs to be rounded to 1/3 in order for the pattern to work, but in another pattern it might refer to 3/10 (and .33 needs to be written to refer to 1/3). An x is needed to define crossing or not depending on the floored value of the siteswap (4.9x` would be crossing).

Do these ideas make sense, and do you think it would be possible to implement them in jugglinglab?

jkboyce commented 2 years ago

Nice ideas @hapiel !

At one point there was discussion about adding support for staggered symmetric passing based on Prechac's idea (see Sean Gandini's doc) but we haven't yet. In concept it would be similar to hand siteswap where a converter translates into Juggling Lab's siteswap notation. For example 3 2.5p 2 could be converted to either pattern=645;hss=4;dwellmax=false or pattern=<(0,6x)(5xp,0)(0,4)|(0,0)!(0,4)(6x,0)(0,5p)!>*

There's a Reddit post describing this conversion for one specific case. Fairly straightforward.

One way to implement this would be an operator analogous to *, which would essentially mean "repeat again with jugglers swapped and staggered". (In the same way that * means "repeat again with hands swapped".) In general the number of jugglers cannot be inferred from the pattern: For example 4p 3 can either refer to a 7-object pattern with 2 jugglers, or a 14-object pattern with 4 jugglers (or corresponding patterns with 6, 8, 10, ... jugglers; see page 25 in the Gandini doc). So a syntax that could work would be something like:

4p 3#2

which means "repeat again with two jugglers swapped and staggered". I'm not sold on # as the symbol; the above is for concreteness.

One thing to think through is how the # operator interacts with sync and multiplex notation. At the moment I don't see any incompatibilities. One thing that wouldn't be supported is the # operator on a throw sequence that contains the <|> symbols for passing notation.

Another thing to decide is whether the # operator could be used in a subpattern, as in(4p 3#2^4)(5p 2#2^4) to do 4 iterations of one pattern, followed by 4 iterations of the second. Likewise, how would the transition-finder deal with patterns containing the # operator is an open question.

(I separately filed #115 regarding symmetric passing pattern support in the siteswap generator; an important but distinct feature.)

hapiel commented 2 years ago

Very clever to use hand siteswaps for this! Setting the beats per second to twice the default (8) gives indeed the perfect 3 2.5p 2 pattern. The Reddit method makes sense too, but is way more cumbersome, at the time that was written the hss feature was not available yet of course.

As for 4p3, I haven't thought about this very long yet and need to give the Gandini doc a proper read so I need to puzzle perhaps with the implications of the notation, but with patterns with more than 2 jugglers it is customary to denote which juggler the pass goes to. Maybe from this information it can be deduced how many jugglers are involved in a pattern? Prechacthis calls the 2 person variant 4p3, the 4 person 4p3₂ and the 6 person version 4p3₃ which can all only be interpreted as one specific version of the pattern.

I haven't thought yet about what would be the best way to input that subscript number...

Ugh, passing siteswaps get confusing for my midnight brain, sorry to dump all this here, I'll try to think about this more seriously later. Thanks for taking all my crazy suggestions seriously!