Change specific samples "pan"
-
Is there a way to set a specific samples "pan", in the sampler, via scripting?
like the way you can do with the gainMessage.setGain()
-
-
@d-healey Ahh, thank you David, it seems a bit complicated for me at the moment I guess, I wish it could be as simple like:
Message.setPan()
:)
-
-
@d-healey I found a solution using the
Sampler.setSoundPropertyForSelection()
I have this in my NoteOn Callback
function onNoteOn() { if(SoundsKey.indexOf(Message.getNoteNumber()) != -1) { local idx = SoundsKey.indexOf(Message.getNoteNumber()); // Individual gain per sound ---------------------------- Message.setGain(SoundsGain[idx]); // Individual pan per sound ---------------------------- Sampler1.selectSounds(SoundsNames[idx]); Sampler1.setSoundPropertyForSelection(9, PanKnbs[idx].getValue()); } }
and it seems to work fine so far, however I'm a bit afraid this will interfere with the audio thread, what do you think?
-
I'm not sure, I haven't played around with those functions much. Try it and see.
-
Nonononono, multiple no-gos. I am surprised that the AudioThreadGuard didn‘t fire ;)
Use a stereo FX and modulate it polyphonically.
-
@Christoph-Hart haha...yes I figured this would cause a lot of nonos..., so the gogos is to use a stereo FX, is there any examples around?
-
@Christoph-Hart Never mind, I figured it out, thanks!