Xmodal / autonomX

Experiment with life-like processes to generate dynamic, emergent and self-organizing patterns and output these patterns via OSC.
10 stars 4 forks source link

Format OSC output in the form /generatorName/output(s) #383

Closed aalex closed 2 years ago

aalex commented 2 years ago

Closes #357

aalex commented 2 years ago

The output looks like this:

/SpikingNet_01/region/1 f 0.011469
/SpikingNet_01/region/2 f 0.010028
/SpikingNet_01/region/3 f 0.006239
/SpikingNet_01/region/4 f 0.007276
/SpikingNet_01/regions ffff 0.011469 0.010028 0.006239 0.007276
/SpikingNet_01/region/1 f 0.019475
/SpikingNet_01/region/2 f 0.018273
/SpikingNet_01/region/3 f 0.002809
/SpikingNet_01/region/4 f 0.000000
/SpikingNet_01/regions ffff 0.019475 0.018273 0.002809 0.000000
/SpikingNet_01/region/1 f 0.034265
/SpikingNet_01/region/2 f 0.018967
/SpikingNet_01/region/3 f 0.008385
/SpikingNet_01/region/4 f 0.000000
/SpikingNet_01/regions ffff 0.034265 0.018967 0.008385 0.000000
aalex commented 2 years ago

We'll need to update the doc and the example patches, before a release, if we merge this.

netherwaves commented 2 years ago

actually, something completely passed me by: since we renamed /output to /regions for outputs only, and that /[generator name]/inputs is still in action, shouldn't we actually keep the output convention to avoid the semantic discrepancy? inputs are still regions, after all :o)

aalex commented 2 years ago

I would go the other way around: remove the inputspath part, and change it to regions. The reason is: it can be confusing to see "input" or "output" in an OSC message. Is it an input for the receiver, or for the sender? Instead, I would use regions for the incoming messages as well. Of course you are either sending to or receiving from AutonomX. The input/output path part is not necessary.

alx-s commented 2 years ago

We originally had "input" and "ouput" present for the sake of clarity with the autonomX interface where regions are labeled as "input" and "output." Also, all artistic equipment is labelled with "inputs" and "outputs" and we benefit from this skeumorphism to make things more accessible given that autonomX is already not trivial for most (not everyone doing ALife and stuff). That being said, the question of perspective in the labelling of input and output is a common source of ambiguity for all technical equipment. That's a debate that's never gonna get solved^^ @aalex what is the usual practice in OSC? set aside the ambiguity it can generate, is it usual or not to see "input" and "output" in OSC addresses?

alx-s commented 2 years ago

if we go for the region approach we need to do the change to the input now too. We also need to make sure that it does not create any ambiguity to have both input and output regions addressed in the same way when users manipulate an interface that distinguishes between inputs and outputs...

aalex commented 2 years ago

In OSC, the standard is usually to go /object Name/property

In this case, I would not call them input/output, but rather something more descriptive about what it does.

The goal of the "input" regions is to allow the artist to trigger some number changes in the generator.

The goal of the "output" region is to allow us to receive the numbers from our regions of interest in our generator.

Let me think about it.

aalex commented 2 years ago

I think that it might be better to stick to /generatorName/output and /generatorName/outputs, for the version 1. We can then take our time to think of a better name for version 2.

In GStreamer, they use the terms "source" and "sink".

alx-s commented 2 years ago

yes, let's stick to what we have so far and avoid adding extra work. We will design a more appropriate naming for the next version!

aalex commented 2 years ago

Here an example of the new output format: (the id at the beginning of each line is not part of the OSC message)

e518b2c9.ab89c5e6 /SpikingNet_01/output/1 f 0.014303
e518b2c9.ab8bdec5 /SpikingNet_01/output/2 f 0.035737
e518b2c9.ab8c9751 /SpikingNet_01/output/3 f 0.017924
e518b2c9.ab8d3f17 /SpikingNet_01/output/4 f 0.042189
e518b2c9.ab8dd616 /SpikingNet_01/outputs ffff 0.014303 0.035737 0.017924 0.042189
e518b2c9.af253da6 /SpikingNet_01/output/1 f 0.000601
e518b2c9.af272430 /SpikingNet_01/output/2 f 0.000000
e518b2c9.af27cbf6 /SpikingNet_01/output/3 f 0.023870
e518b2c9.af2873bb /SpikingNet_01/output/4 f 0.026762
e518b2c9.af294dd6 /SpikingNet_01/outputs ffff 0.000601 0.000000 0.023870 0.026762
e518b2c9.b3a91968 /SpikingNet_01/output/1 f 0.000621
e518b2c9.b3ac710b /SpikingNet_01/output/2 f 0.001213
e518b2c9.b3aecd06 /SpikingNet_01/output/3 f 0.008303
e518b2c9.b3b00bcb /SpikingNet_01/output/4 f 0.031557
e518b2c9.b3b18dab /SpikingNet_01/outputs ffff 0.000621 0.001213 0.008303 0.031557