the loading-global in your module.pd can just be replaced with loadbang-$1
you can see this is being called, as at the top of the patch you can see
[ print loaded:samplerstyleREC into $1] is executed.
the sampler-voice.pd is as i said,
you need to pass in parameters to abstractions, this is how $ arguments work in PD
(nothing magic for orac here )
so the simplest way is in module.pd change each voice to:
[sampler-voice 1.wav 0 $1]
then in sampler-voice.pd you can use
as this you now have sent the module parameter as arg 3
( alternatively you could pass in as arg 1, then shift all the args in the subpatch by 1, but that’s more work, and brings no benefit )
you can actually see me doing this in many modules, as its quite a common thing to have to do.
in fact it was so common, i covered it in my ‘Orac: Converting patches to module’ video, around half way thru (circa 17:00 mins)
(same video also i think describes how i moved away from using throw to outlets)
btw: do NOT use loadbang-global, this is not a substitute for loadbang-$1
it has nothing really to do with loading a particular module, and will means your module will start doing things any time ANY module is changed in orac, which will harm performance and useabilty.
his is only use where changing a module can affect other modules - primarily this is used by the router module, since the tempo is stored on it, so changing it / loading a preset will mean that other modules need to react if they stored the tempo.
in this case the impact is very minor, it’s just updating an internal variable.