Jaco,
thanks, this would work and looks less ugly then I imagined.
If one uses the timebase of juggler B as 1 (which should be
valid) however there would be another requirement:
throws = [
{beat:1, duration:2, from:"A_left_hand”, to:"B_right_hand”},
{beat:1.67, duration:0.67, from:"A_right_hand”, to:"A_left_hand”},
{beat:2.33, duration:3.33, from:"A_left_hand”, to:"A_right_hand”},
.....
{beat:1, duration:3, from:"B_left_hand”, to:"C_right_hand”},
{beat:2, duration:1, from:"B_right_hand”, to:"A_left_hand”},
{beat:3, duration:5, from:"B_left_hand”, to:"B_right_hand”},
{beat:4, duration:3, from:"B_right_hand”, to:"C_left_hand”},
{beat:5, duration:1, from:"B_left_hand”, to:"B_right_hand”},
......
{beat:1, duration:3.75, from:"C_left_hand”, to:"C_right_hand”},
{beat:1.75, duration:2.25, from:"C_right_hand”, to:"B_left_hand”},
{beat:2.5, duration:0.75, from:"C_left_hand”, to:"B_right_hand”},
{beat:3.25, duration:3.75, from:"C_right_hand”, to:"C_left_hand”},
{beat:4.0, duration:2.25, from:"C_left_hand”, to:"C_right_hand”},
{beat:4.75, duration:0.75, from:"C_right_hand”, to:"C_left_hand”}
..... ]
In order to convert the throws of juggler A now correctly to the
fractions one would need to be able to specify the precision somewhere
(to distinguish exact fractions from a floating point value close to a
fraction. This would allow programs wanting to work with exact
fractions to do the conversion without hassle for the programs not
wanting to deal with it). This would be an optional parameter as there
could be programs not wanting to deal with it.
I think if we decide to go to indices instead of strings which was
suggested at some other place we could store it there:
limbs = [{name: "A_left_hand", precision: 0.01},
{name: "A_right_hand", precision: 0.01},
{name: "B_left_hand", precision: 1},
{name: "B_right_hand", precision: 1},
{name: "C_left_hand", precision: 0.01},
{name: "C_right_hand", precision: 0.01}]
I would however suggest to also allow to store an optional scaling
factor there (here called "multiply") and start with 0 indices. Apart
from elegance reasons I would also claim technical reasons for this as
it would make the files smaller:
limbs = [{name: "A_left_hand", precision: 0.01, multiply: 0.67},
{name: "A_right_hand", precision: 0.01, multiply: 0.67},
{name: "B_left_hand", precision: 1},
{name: "B_right_hand", precision: 1},
{name: "C_left_hand", precision: 0.01, multiply: 0.75},
{name: "C_right_hand", precision: 0.01, multiply: 0.75}]
throws = [
{beat:0, duration:3, from:0, to:3},
{beat:1, duration:1, from:1, to:0},
{beat:2, duration:5, from:0, to:1},
.....
{beat:0, duration:3, from:2, to:5},
{beat:1, duration:1, from:3, to:0},
{beat:2, duration:5, from:2, to:3},
{beat:3, duration:3, from:3, to:4},
{beat:4, duration:1, from:2, to:3},
......
{beat:0, duration:5, from:4, to:5},
{beat:1, duration:3, from:5, to:2},
{beat:2, duration:1, from:4, to:3},
{beat:3, duration:5, from:5, to:4},
{beat:4, duration:3, from:4, to:5},
{beat:5, duration:1, from:5, to:4}
..... ]
So I would suggest to introduce two optional (to write) parameters
"precision" and "multiply" in the limb definition. Programs are free to
use or ignore the "precision" parameter as they see fit. If programs
see a "multiply" parameter they should apply it to the values of the
hand it applies to (i.e. "from").
What do you think?
Cheers,
Florian
Am Mon, 26 Oct 2020 13:59:28 +0100
schrieb JaCo Stuifbergen <
j.c.stu...@gmail.com>: