< Back to IRCAM Forum

Mubu granular Hoa Example - Per-grain SPAT question

Hi there,

Just getting my head around the use of multiple output channels in mubu/mc.mubu.granular~ and am curious about per-grain spatialisation, and how the mubu.granular~ outputs grains when set to multiple outputs.

I’ve been hacking the Mubu HOA spatialisation example granular-hoa-spatialization, combining it with the awesome mfcc moaicing example. I’m new to mubu.granular~, but was excited to see ‘per-grain spatialisation’ listed in this hoa example.

After doing some digging into the spat code, I’m not sure it actually is per-grain spatialisation technically, is it? It’s balancing the outputgains using the spat trajectories, but as all grains are sent to all channels with duplicate channels enabled (or pairs of channels) and the spat movement is unrelated to this, it’s not really spatialising per grain. Basically, I’d love to spatialise each output as a spat source, but this would only be useful if it’s receiving a unique stream of grains.

Is it possible to have mubu.granular~ output each grain to a different output when specifying multiple outputs in the object, somewhat like managing polyphony? If I’ve missed something and it does this already, I’d be keen to know how to achieve this!

Sorry for the long question, and thanks Aaron and Thibault for the inspiration.


Hi Ben, great question!

Each grain is spatialised at the current individual but fixed position (you can trigger 100 grains at the same time at different spatial positions). The trick to get movement is to play one grain after the other of a longer file along a trajectory.
Also look at [p output parameters] of mubu.concat help for some explanation.

For grains at individual outputs, just send outputgains with all but one value 0 before triggering each grain.

Best, Diemo

Hi Diemo,

Thanks for this, appreciate the reply :slight_smile:

I see the position message, but I guess using the hoa example and the mosaicing example together I’m probably confusing myself as to how both per grain movement and spatialisation work together. The mosaicing patch has a fixed position message for each grain sent as retrieved via the realtime pipo analysis as a target. So given these could be from any audio file in the mubu container, it’ll take some wrangling to get it to play one grain after another as you suggest.

The spatialisation approach you suggest seems to be how the hoa example deals with things. I’ve done some reading and see how they interact, I guess I just need to be a bit more acquainted with this.

I’ll see how I get on and come back if I have any more questions!