What's new

Possible to change Amplifier modulator table values via script?

Mike Greene

Senior Member
Moderator
I want to use the Mod Wheel to adjust the volume of a group, but I have a lot (a dozen or so) different volume curve options I want to use for each group. Rather than having a dozen tables where all are deactivated except one, is it possible to have just one modulator and send new table curves to it via KSP?

If not, is my best option to use a Constant modulator, and send values to it from the scrip as the script reads the CC1 data? In some ways, that would be easier, except my understanding is that Lag is not available with the Constant modulator, so movements might not be as smooth.


Screen Shot 2020-05-26 at 4.52.56 PM.png
 
Nope, not possible. Unfortunately. You could in theory remap CC1 events, but this would work across all groups, if you need separate curves for different groups that won't work. So yeah, Constant modulator, oooooor change_vol() your way out of it, since that CAN be per event.
 
Drat! I wanted you to give me good news, Mario. You're banned! :grin:

I'm curious about your mention that change_vol can be per event. Wouldn't the Constant Modular also be per event if I send new values in the CC[1] callback? In other words, is there a downside to this:

Code:
on controller
    if (CC_NUM = 1)
        set_engine_par($ENGINE_PAR_INTMOD_INTENSITY, %Volume[%CC[1]], $Group, find_mod($Group), "CONST_VOL"), -1)
    end if
end on

Also, does the Lag do anything in this situation? My concern is that with only 127 MIDI divisions for the mod wheel, I don't want to get the "zipper effect."
 
The lag doesn't have any effect when you change the Constant depth... I've tested this for similar reasons. ;)

EDIT might be worth pointing out that change_vol is very smooth... it's got a built-in lag which is sometimes a bit too slow imo
 
The lag doesn't have any effect when you change the Constant depth... I've tested this for similar reasons. ;)
That's good to know.

EDIT might be worth pointing out that change_vol is very smooth... it's got a built-in lag which is sometimes a bit too slow imo
That's really interesting. For Realivox, I have a scripted vibrato (a custom curve) with pitch/volume changes done manually using change_vol and change_tune. For initial testing, it was a very coarse curve that I used (maybe 30 points in an entire LFO cycle?), and I always assumed it would be a little bumpy and I'd need to fill in more points for the final. I never did, though, because it already sounded smooth, so I kinda forgot about it and never went back. Must be the built in lag you're talking about.
 
Wouldn't the Constant Modular also be per event if I send new values in the CC[1] callback? In other words, is there a downside to this:

No because CCs are global for the whole MIDI channel that would apply to all events. As soon as you change the value of constant mod it will change for all sounding voices. While it would work for monophonic case, it doesn't work for polyphony.
 
No because CCs are global for the whole MIDI channel that would apply to all events. As soon as you change the value of constant mod it will change for all sounding voices. While it would work for monophonic case, it doesn't work for polyphony.
Ah, now I see what you meant by "per event." That makes sense. I thought "event" meant each touch of a CC controller or each note. My error.

Thanks Mario and Dan!
 
Can you mult MIDI channels?

I know as much about scripting as I do about gonad surgery, but that's how I'd try to get the Logic Environment to do what I want.
 
I'm not sure I see the connection here? ;)

Well, ED said each MIDI channel was processed as a whole. So if you want to process, say, four different things, my thought was to mult the MIDI into four streams, channelize each one differently, and process each one independently.

And I'm sure that anyone who knows anything about scripting/programming is laughing hysterically at how inefficient that is. But if I were to try and set up independent volume curves for different [whatever it is] in the Logic Environment, which has a graphic programming environment, that's how I'd go about it.
 
Top Bottom