First, I create groups of each layer of dynamics and have them triggered simultaneously.
Then I add amp_veltrack=0 in order for the velocity to not have any effect on the amplitude of the sample.
In order to morph between the layers with the modwheel I utilize the xfin & xfout opcodes and decide where I want the samples to blend. So in my case I have 3 layers and I want them to crossfade at 2 middle points.
For the low dynamics group:
xfout_locc1=30
xfout_hicc1=50
for the medium dynamics group:
xfin_locc1=30
xfin_hicc1=50
xfout_locc1=70
xfout_hicc1=90
and for the high dynamics group:
xfin_locc1=70
xfin_hicc1=90
Now I can play the patch and indeed have the sound morph from low to high dynamics with the modwheel. However, I also need the volume to change.
So I use the opcode amplitude_oncc1=100.
And when I hit save on the text sforzando crashes.

It also works if I assign different CCs to the opcodes, ex. CC1 for xf and CC2 for amplitude. Can I somehow bind the modwheel to 2 CCs.