Massive instrument model - is messing with my mind.....
-
@Lindon you can still use velocity to control volume and also assign it to group xf. I'll check out your snippet shortly when I'm at my PC.
-
@d-healey said in Massive instrument model - is messing with my mind.....:
@Lindon you can still use velocity to control volume and also assign it to group xf. I'll check out your snippet shortly when I'm at my PC.
yeah --- but...... thats not all Im trying to do here - I'm modifying the velocity so I can trigger the correct "stacked" RR wav file, so for a single note I would have 5 wav files so using Christophs model these would be on velocity 1-24, 25-50,50-75,75-100, 100-127
To get the correct one to play my on note will need to modify the inbound velocity to fit in one of these ranges - and as soon as I modify the velocity in a script then the volume control using velocity fails.
-
I think this is very easy to specify.
I have this set of files:
StdGuitar_60_RR1.wav
StdGuitar_60_RR2.wav
StdGuitar_60_RR3.wav
StdGuitar_60_RR4.wav
StdGuitar_60_RR5.wavand this set of files:
DistGuitar_60_RR1.wav
DistGuitar_60_RR2.wav
DistGuitar_60_RR3.wav
DistGuitar_60_RR4.wav
DistGuitar_60_RR5.wavThese are all mapped to the same note(Middle C) - each set mapped into 5 RR groups - I wish to cross fade between these two sets of 5 RRs, in a single Sampler. Oh and each one is a multi-mic sample set, but Im ignoring that at the moment.
As far as I can see I can either cross fade between these OR use them as round robins - but not both.
Yet the documentation says this(for setMultiGroupIndex):
"However there are a few legitimate edge cases where you need multiple, but not all groups enabled - the most common one might be if you want to implement round robin behaviour in combination with Group XF samples."
-
@d-healey said in Massive instrument model - is messing with my mind.....:
@Lindon said in Massive instrument model - is messing with my mind.....:
-- which confuses the bejesus out of me.... will it work or wont it with Group XF on?
Oh I wasn't aware of this. I just tested it and no, as soon as group xf is enabled all groups play!
Did you use setMultiGroupIndex in your experiment or not? Because if not then yes they all will play...
https://docs.hise.dev/scripting/scripting-api/sampler/index.html#setmultigroupindex
-
@Lindon said in Massive instrument model - is messing with my mind.....:
as soon as I modify the velocity in a script then the volume control using velocity fails.
Use a global velocity mod instead. This will pick up the incoming velocity before you modify it.
@Lindon said in Massive instrument model - is messing with my mind.....:
I wish to cross fade between these two sets of 5 RRs,
Place each set in a different group, using velocity to separate the RRs.
@Lindon said in Massive instrument model - is messing with my mind.....:
Oh and each one is a multi-mic sample set, but Im ignoring that at the moment.
Makes no real difference, we can treat them as a single sample once they are merged in HISE.
@Lindon said in Massive instrument model - is messing with my mind.....:
Did you use setMultiGroupIndex in your experiment or not? Because if not then yes they all will play...
Yeah I tested with that too
@Lindon said in Massive instrument model - is messing with my mind.....:
"However there are a few legitimate edge cases where you need multiple, but not all groups enabled - the most common one might be if you want to implement round robin behaviour in combination with Group XF samples."
Looks like Christoph intended for this behaviour but forgot to implement it then. But still this is way more complicated than using the velocity separation method because you're going to be dealing with crossfade tables across a massive amount of groups instead of just two.
-
@Lindon said in Massive instrument model - is messing with my mind.....:
and as soon as I modify the velocity in a script then the volume control using velocity fails.
You can still save the event velocity in the script. You then use eventData and the event data node in the voice start script modulator (or the event data modulator itself if you don't need anything extra) for the samoler's gain modulation, and for each event where you're playing the artificial note, just send the correct gain using eventData to the desired slot, which will be picked up, per-event, by the eventData modulator, removing the need to have the samples spread out to use the velocity linearly as a gain control.
This turns velocity into a simple y axis value for mapping the samples, letting you have 127x128 samples per group.
-
@aaronventure Or use a global velocity mod
-
@aaronventure said in Massive instrument model - is messing with my mind.....:
You can still save the event velocity in the script. You then use eventData and the event data node in the voice start script modulator (or the event data modulator itself if you don't need anything extra) for the samoler's gain modulation, and for each event where you're playing the artificial note, just send the correct gain using eventData to the desired slot, which will be picked up, per-event, by the eventData modulator, removing the need to have the samples spread out to use the velocity linearly as a gain control.
This turns velocity into a simple y axis value for mapping the samples, letting you have 127x128 samples per group.
wow this looks like the most complicated way to get per-note velocity modulation ever...
-
@d-healey also true, but here you can do any kind of math to get your volume value, even use data from the interface script without first passing it to the real time script (if using globals), so creating volume curves per-articulation in the UI becomes possible without worrying where the modulator is, what it's called or how many of them are there.
-
@d-healey said in Massive instrument model - is messing with my mind.....:
@aaronventure Or use a global velocity mod
and this one isnt per-note - is it?
-
@Lindon how is it complicated?
Its just a different modulator (it's already built in, just use it instead of the velocity modulator) and one additional method call right under your playNote call.
The gain expression can be as complicated or as simple as you need it to be.
The idea is that you don't need specific modulator names or counts in the script. You just target a slot index for eventData, and in the modulator you set the slot that it'll read from. Then for every event, it'll check if there's a value stored for the event's id and apply it. It's ridiculously simple and scalable.
-
@Lindon Yes, I use a global velocity mod in all my instruments. Another advantage is you get one overall velocity curve you can control, plus an additional table at each of the destinations.
-
@aaronventure can you post a snippet?
-
@Lindon well it would seem Dave is right and
Sampler.setMultiGroupIndex(var groupIndex, bool enabled)
isnt working, if it was all this would just go away...
HiseSnippet 1541.3oc6X01aaaCDVxNJnwqqnsnCneXePnnEvAyv0Nu0MjML2D6zl03XCorrATLDvHQESTIRAJJ25UTr+R6mv.1ul8s8OX6njrkjiyK1y0qCq9CB5NdG0Cui74N5tblENHfwUTW4nA9XE0apYNfJ5saODgpreSE0ao0FEHvb8XU6LvGEDfsUTUK9LoB0UVRI52e9s6fbQTKbpJEkiYDK7ADOhHUa2Fuf35tGxFeDwKi0azXeKFcWlKKDvSQsZJ9HqWgNCeHRZVAME0kaYSDLto.IvAJpKsCydfYO1qow1eLIfbpKVJTWwDlnX06wbskHV9txt8Ht1cGttCTTT05lFEJFGEtmVahMYj9znwsiFPO0irwC0B4gWwbvq9EAuI.I0LPZoXHcGMSKNwWjNhDOeh19TH43ffvdVnDaqh5uqsKCLfJp5gdEdONHLxgxaUqVEc3wpaWpTImPpkfvn5L5gLAtCs7pkdaoUJ8tR5iOjiyDGS9k3LWWLehCKS17KywxzPuSw7J58Qtg3QFBQf7g0kudgUq3EdFCYz8oDQGebhb59h5SHInjD4f2998ahDHYdIQGXmOlKHR3n1D2G1jGmkVQqIN3UBlOrM+boPXyCyNzEIxuiRdLJY.HdjKMJyUz.hXP1iYiuMaoKNdTahmBl3p8ZB26n0kHr5MY7VXB3EhZuuwaxg1OUqkiC1RjB1kz16GuzSnycnbiKfE8lQmCAILu97fC0+ZygpV7+TblScF4eJ+ogwyQTafzZR7mE9C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jTdfuH.rStysg9ryDbHHE0qnQ4YpQJp6CpPd5sNlTJozthCPWQB4t2NiIVNIwVTdpMCWmZmZxd2zk+8SZvoX.qMfVt6IANniQ6mSdsnUnW.7RlqpmcREmRtbRxOiJcwXnSpj1URm0r5hUnI882DxOip5qcGznozGnFMe6HpSQj8rZ3j4OxXIgtDX.Vn7HWxOSd0q2ljazxhRH.jCf71keTgsykayMICEgDN.tDUOV.QIHA.2MVchKV2MGFyCTjC8DWP8NUDpX7tMobbzAIt4M3cYbnXWPMKAx+dar0Ds.ThhrtbgDZnOs7JI12YarsC92H79pwxgGfV8ii5QkuvqwiNpFPQeO5PMm7uGI2fToVgsIngJjj21CCWCPfqnRTNx.vS3f0N0lsdM5Kjj.evg0g4PBn888.xETzCivOlKdbnItAQJINhPzGAJmbYmkwWL.TQFlt6U9axf1ffiBjzHNeD1xW3mrKroc45nqYNSCLOGZrmhGK9tCaDCkaDRW6.+TMhg0GpQL9bbrByLIvX1wXrMSmK2fqy3QJZL9MnU0gF5oFSMc8jlBtvumfyRUj9TPIYcwr6jXelFzSUJ7EFSo7vcNE7.7tzTR+vNOGKdPkneBVRewseL9YFu9dqX3Rz4vj67wAWabuoI0Olf4H3tdLChlCYBK6aFss8D3yObg2kdPhnzfy0WJWxoHs+3Oo6Je1Lo67KrfSlQ9e86UV2BmPrLIJTRtahkSZDiEqvTcKrkVar4sCfnjyAOcOFyL5tAwqKoWGO7M2MZw+heFwzVu1bDS6wL+jbF8oNRwabh6dpqmcuHJncyi9YaxZ0TulXaL3pWd6iCu9FGmza00Tr7xpXkkUwpKqh0VVEqurJt0xp3itYE0us3ogJQ+36F3CtZ0HZbDSy32ZEcMw3+.rT4alD
I lied, it's two additional lines of code, with one of the being the GlobalRoutingManager reference.
Here's my ultra flexible continuous per event modulation snippet
https://forum.hise.audio/topic/10635/snippet-per-event-modulation-from-ui-with-global-storageIf you read the thread you can follow the entire history of that how or why that came to be in HISE.
For continuous modulation of volume per event, you can make it simpler as you don't need a network to just control the volume, the modulator itself will do:
- create EventData Envelope (it's important that it's an envelope)
- now you get two options. In both cases you'll be calling setEventData from the control callbacks, as well as the initial call for each event right after it's played with playNote
- publicize your eventIds by making the array a
global
instead ofreg
, then write into them from your interface script using tables or whatever - link your Dynamics slider to another one in your realtime script, then use that slider's value to deduce your correct volume using tables or whatever
- publicize your eventIds by making the array a
-
@aaronventure said in Massive instrument model - is messing with my mind.....:
HiseSnippet 1283.3oc4XstSabDEdWCKJ1ospoMUzeN+n+vthZ75ajHTUH.FBpwfElPpTTTzvtGaOh0yrZ1YchUUen5aPeD5iPeD5aP6Y10W1EbLFqjPkhQB44bYluyk4bNiaIENPPfPZXl6rg9fg4WX0dHW0audTF23n8ML+Jqlz.EHIwj1cnOMH.bMLMW4PMAyrqZD84edxtTOJ2AlRxv3bAyAdNqOSMkZqc9Elm2ATW3LV+DRWcmibD78DdhPDOqXUxvm5bIsKbLUKVFKimQC5YX9iVUdbmxtUgZUqW8hZ0cqUoZ4NtvVa4Tysds5a4hTsebkspXXtVCWlRHaqnJH.2zcEtCa2S7Vd7AbNKfcgGnWXazFO4XxF60i441ZryIvvvzp0TW0JwtpGZ0j4xlPepK6qiXPlpQRmlYl4AI6aAjLS.oUigzCrZ6HY9pobz349VGwwHXGJFaRBkXYML+Sq8Dn.bUw9zKgCj3hIJjudoRaPv+UX6NgbGESvIB9wBEbBOegb+Vtr498bjqxpSmYxSeLRgmGHmIac5fbdJlmG1+BPtAY.0KDlHHZ9o8oqsX9TmXqNgfB9Qbl5DeXz5CDdtZek96WOBXLxsge6EGsOUQ0AkQzP47Aohogi49v.7ZPbHJq09PvkJgOdQ3ZwOLyQ3F5QUoSmzWzFw.8Gohg5.EOfoFl7h3sHGqzbywVTH9.qVLkSuYiwLy.inm5iAFGcy7KsZzoC3nlBvUsN3WW1qgK9wud7weeqWRG.Q0QiN7uKZcGgrO4PfCRsuydNUR+qEsRp+BWI8DGEBgyjTdfuH.rStysg9ryDbHHE0qnQ4YpQJp6CpPd5sNlTJozthCPWQB4t2NiIVNIwVTdpMCWmZmZxd2zk+8SZvoX.qMfVt6IANniQ6mSdsnUnW.7RlqpmcREmRtbRxOiJcwXnSpj1URm0r5hUnI882DxOip5qcGznozGnFMe6HpSQj8rZ3j4OxXIgtDX.Vn7HWxOSd0q2ljazxhRH.jCf71keTgsykayMICEgDN.tDUOV.QIHA.2MVchKV2MGFyCTjC8DWP8NUDpX7tMobbzAIt4M3cYbnXWPMKAx+dar0Ds.ThhrtbgDZnOs7JI12YarsC92H79pwxgGfV8ii5QkuvqwiNpFPQeO5PMm7uGI2fToVgsIngJjj21CCWCPfqnRTNx.vS3f0N0lsdM5Kjj.evg0g4PBn888.xETzCivOlKdbnItAQJINhPzGAJmbYmkwWL.TQFlt6U9axf1ffiBjzHNeD1xW3mrKroc45nqYNSCLOGZrmhGK9tCaDCkaDRW6.+TMhg0GpQL9bbrByLIvX1wXrMSmK2fqy3QJZL9MnU0gF5oFSMc8jlBtvumfyRUj9TPIYcwr6jXelFzSUJ7EFSo7vcNE7.7tzTR+vNOGKdPkneBVRewseL9YFu9dqX3Rz4vj67wAWabuoI0Olf4H3tdLChlCYBK6aFss8D3yObg2kdPhnzfy0WJWxoHs+3Oo6Je1Lo67KrfSlQ9e86UV2BmPrLIJTRtahkSZDiEqvTcKrkVar4sCfnjyAOcOFyL5tAwqKoWGO7M2MZw+heFwzVu1bDS6wL+jbF8oNRwabh6dpqmcuHJncyi9YaxZ0TulXaL3pWd6iCu9FGmza00Tr7xpXkkUwpKqh0VVEqurJt0xp3itYE0us3ogJQ+36F3CtZ0HZbDSy32ZEcMw3+.rT4alD
Thanks - so I loaded this and first thing that became clear is I lose any ability to let the end user draw the velocity curve they want.
-
@Lindon said in Massive instrument model - is messing with my mind.....:
yeah I understand - but its a work around Im not keen on pushing at the customer....
Workaround? Nope, it's just using a modulator, global mods are great, should be standard practice. I use them whenever I can. They reduce resource usage and make it easier to manage lots of modulators in larger projects.
-
@Lindon said in Massive instrument model - is messing with my mind.....:
Thanks - so I loaded this and first thing that became clear is I lose any ability to let the end user draw the velocity curve they want.
No, you don't. You'll still create a table in the UI, except you can create a global array of its data for each of 127 velocity values, and have the modulator pull from that. You can also just create a Script Modulator instead of the Event Data modulator, use the Event Data node inside and modify its output using a table, which you can then link to an external slot (and access it that way from your UI).
-
@aaronventure all of this in an additional two lines of code....