Multi-channel volume and pan control
-
This should work:
<?xml version="1.0" encoding="UTF-8"?> <Processor Type="StreamingSampler" ID="Sampler" Bypassed="0" Gain="1" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" PreloadSize="8192" BufferSize="4096" VoiceAmount="128" SamplerRepeatMode="0" RRGroupAmount="3" PitchTracking="1" OneShot="0" CrossfadeGroups="1" Purged="0" NumChannels="1" Group0Table="36..........9C...vOKfJ.+.........vO...f+.........vO" Group1Table="36...............vOKfJ.+....9C...vO...f+.........vO" Group2Table="36...............vOKfJ.+.........vO...f+....9C...vO" Group3Table="24...............vO...f+....9C...vO" Group4Table="24...............vO...f+....9C...vO" Group5Table="24...............vO...f+....9C...vO" Group6Table="24...............vO...f+....9C...vO" Group7Table="24...............vO...f+....9C...vO" SampleMap=""> <EditorStates BodyShown="1" Visible="1" Solo="0" MapPanelShown="1" BigSampleMap="1" GainModulationShown="1" CrossfadeTableShown="0" SettingsShown="1" WaveformShown="1"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0"/> <ChildProcessors> <Processor Type="SimpleEnvelope" ID="DefaultEnvelope" Bypassed="0" Intensity="1" Attack="5" Release="10" LinearMode="1"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors> <Processor Type="ModulatorChain" ID="Attack Time Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="0" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Sample Start" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Group Fade" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="MidiController" ID="Midi Controller" Bypassed="0" Intensity="1" UseTable="0" Inverted="0" ControllerNumber="1" SmoothTime="200" DefaultValue="0"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <channels> <channelData enabled="1" level="0" suffix=""/> </channels> <samplemap ID="" SaveMode="0" RRGroupAmount="3" MicPositions=";"/> </Processor>
You don't have to call
Synth.enableRoundRobin()
. Just set the RR Group Amount to your dynamic layer amount and set Group XF to enabled. This automatically deactivates the round robin behaviour and plays back all groups simlultaneuosly). You can then setup the crossfade curves for up to 8 layers by setting the table values for each group (you can choose different layer tables with the Edit XF drop down in the sampler settings.The example uses three dynamic layers (take a look at the tables 1 - 3).
You can now use any modulator to morph between the dynamic layers (even polyphonic ones). The modulation output
0...1
will be the input for each table.I might make this easier though - and I don't know why I chose this ugly colour for the modulator chain :)
-
Thanks Christoph I'll give it a whirl
-
I tried dropping samples into the sampler you've set up but even though I have samples mapped to the same keys in all three groups it's only playing one voice from group 1.
-
Just wanted to give this a little bump. I've still not managed to get more than one sample triggered with the built in x-fade behavior.
-
This is an example project which uses a LFO to morph between two sustained samples (in this case, just a sine wave and a triangle).
Beware what you post next, it will be the 1000th post :)
-
Thanks, I made a new build from github to try your example and it worked perfectly so then I retried my own project and it worked, so I'm thinking I just needed to update my build :)
-
Weird, I haven't touched that code since ages.
-
Strange, maybe I derped somewhere else then :p
-
Ok there is definitely an issue with this. I think I might have found the trigger for it. If there is already a sampler in the instrument and then you add another and try and setup the group xfades on the new sampler it won't work. If you only have one sampler though, or the group xfade sampler was the first sampler you added then it works. It also works if you duplicate a sampler that has the xfades already set up.
-
You were right. Although the problem was a more generic one: If you activate the
KillNote
retrigger behavior, it kills also samples that are just started and leaves only the last sample in the crossfade list alive. My example (and every time I used this feature) magically had theKillNote
property disabled so I didn't notice it.This is of course highly counterintuitive so I added a check that doesn't fire the retrigger behaviour if the voice was started with the same event. It's on GitHub now.
This also fixes the velocity X-Fade behavior and actually all cases where one event starts multiple samples (excluding multimic samples) so nice catch!
But it has nothing to do with another sampler and it would highly violate our precious encapsulation principle, so please make sure this problem does not persist.
-
Excellent, glad it wasn't just me being mad