What's new

FX: External modulator for setting value from script?

Levitanus

Senior Member
I found, that within an external source of velocity every event has the unique value.
But if constant is used, it always quals max, and within setting its intencity, it affects all the sounds. If cc is chosen, default value is used...
I'm confused of how set the personal event value for the modulator...
 
Tried to use MONO_AT and CC1 in on_note. Works, just like constant, to all active events
 
Velocity is the only modulator behaving like that (apart from random unpolar and bipolar modulators), aftertouch or CCs or constants are applied for all voices.
 
I feel there has to be some cheat trick to use velocity as a modulator. But can't find how.

OFFTOP: the third time a day feel NI ****s me as a programmer. Why? They can do polyphonic modulation, why not to give the API for doing it? Why DnD behaves only for midi and only out? As I know there is no difference in implementation, where DnD goes.
Why cannot be retrieved zone name? Now I need an extra script for synchronizing zone ids within their names.
Christoph should be faster in adding any TS library to his engine ;)

P.S. Yeah, wi will set release of AHDSR polyphonically from the CC by the start of the event, but fx will take the cc value shared, but only within on note callback)) :mad:
 
Why cannot be retrieved zone name?

Because it would be too slow in large instruments. find_group() is one of the slowest operations in KSP (for obvious reasons). These things should be used with care. It's much better and faster to use a zone ID lookup table, anyways.

Remember that KSP is ran in the realtime audio thread, always. Using heavy string-based operations (like text search) is going to create glitches in audio output if overzealously used. Which is also the answer why we cannot process strings in any meaningful way apart from concatenation, or compare strings, or any other such nicety.

P.S. Yeah, wi will set release of AHDSR polyphonically from the CC by the start of the event, but fx will take the cc value shared, but only within on note callback)) :mad:

Envelopes in Kontakt are precalculated at note on, any changes to any envelope parameters during a note event won't be applied until the next note event. This means if you have any CCs modulating any envelope parameters, only the value of CC at the note on will be taken. This is by design - precalculated envelopes are less CPU intensive :)
 
Because it would be too slow in large instruments.
First of all, find_zone is too slow, that I never use it in prod. Only as pre-processor) But without zone_name(id) preprocessor starts to be a little bit more unstable and much more complex, including parsing files, within counting which sample is used in the particular instrument.
At the second, find_zone(name) is the operation of linear complexity, based on zones amount, zone_name(id) is the operation of constant complexity, and can be used, at least, to display what the sample is being played, not so unuseful, regarding the fact we can view zone in the waveform.
This is by design
Remembered @vosk, told me, "Cubase is only DAW can be used for orchestra, because of Instrument track 2.0"))
No, I agree with you, that it works as it works. But I pointed to the logical conflict of, at least, UX.
Anyway, if 3-4 AHDSR are used as operators of polyphonic value, I think, architecturally it would be cheaper than have a personal group per sample

PS.
any meaningful way apart from concatenation, or compare strings
also can't find any reason not to implement this:
  • strings concatenation means they are not using char type, but string type. So strings still can be immutable, but still being dynamically allocated.
  • Only ASCII symbols are allowed for strings, it is not too scary to compare them char by char. It's not more scary, than search(<array>, <value>).
  • char by char comparison can be optimized not to go up to the worst case within every function call, opposite to search(), which would do it a bit more often
 
Last edited:
Top Bottom