Channel routing matrix gets reset upon sample map adding or changing
-
Adding or changing a sample map resets the matrix for the sampler to a 2-channel stereo, regardless of how it was set up previously.
To reproduce:
- Set a multi-out sampler and set the routing to "all channels".
- Add samples, save the sample map or load a sample map not currently loaded
- The routing matrix defaults to a stereo output.
-
@gorangrooves There's a Scripting function to prevent that:
https://docs.hise.audio/scripting/scripting-api/sampler/index.html#setusestaticmatrix
-
@Christoph-Hart Hmmm why would we need to specify this with a scripting function? A sample map doesn't contain routing info. It makes no sense to me that routing would change upon sample map changing. This is not something I would expect to happen.
-
@gorangrooves Of course a sample map contains routing information. If you have multimic samples you want the matrix to resize when you load a sample map with a different amount of mic positions.
This is the default use case. For all other use cases (like yours), there's that function, just call it once at onInit and forget about it.
-
@Christoph-Hart OK, so if I put this onInit in the main script, will it do the job, or it needs to be put in each sampler?
Sampler.setUseStaticMatrix(1);
Probably need to pull in all of the samplers in an array and apply the script function to each?
I guess this explains why some samplers were mysteriously set to stereo and unable to be routed to multi-out in my compiled plugins when I was sure I set them all properly.