How to make "change_vol" work as in the documentation?
Hello,
Using Kontakt Noire, I am trying to change a note volume using KSP like in the documentation : ni-tech-manuals/ksp-manual/en/event-commands#change_vol--
on note
change_vol ($EVENT_ID, 0, 0)
end on
Whatever the values I use it does not work.
I have managed to change other properties, "change_velo" works. But not "change_vol".
Is this expected? Am I missing something?
Thank you in advance for your help
Comments
-
One thing you are missing is that Noire is a complex instrument and just adding a line in a separate script slot or even in the main script will probably not work.
If you want to change someone else's code, you need to study it deeply, understand everything going on in there and then change it.
The way you are using change_vol function is correct, but due to a number of other things present in that instrument's script(s) there's a high change that it won't work the way you expect.0 -
Thanks for the help.
I understand your point, but Noire scripts contain a total of 16k+ lines of code.
Being able to use change_vol has to be simpler than understanding 16k+ lines of code.
Is there any way to make my script "execute" last, after all other scripts, so that I am certain to be the last instruction to update the volume?
Or any other mean?
0 -
Are you aiming to reduce the volume of all played events or just a single event? You mention needing to lower the volume of a note but use the
change_vol
command without any conditional statements.If you wish to decrease the volume of a specific note, like G0, you can achieve this by adjusting the volume of the corresponding group, as each note is assigned to a distinct group. This modification should be straightforward.
However, you state that your
EVENT_ID
(all played events, given the absence of conditional statements) will be set to 0 dB in volume. I assume you intend to equalize the volume across the velocity layers. This can be accomplished using the "Change Velocity" factory script.
If you don't need to use repedalling, you can delete the last script slot (Repedal script) and add your own script there instead.1 -
Thanks a for the help.
I set 0 db to test if the script is working.
My end goal is this :
I am looking for a way to dissociate Velocity / Zone selection.
I would like to keep using Velocity to scale the envelope, but not anymore for selecting a Zone (pianissimo, fortissimo, etc..).
"change_velo" worked and allowed me to pin an horizontal zone (forte, piano, etc..)
so If "change_vol" also worked, I could provide a db value scaled by the initial MIDI velocity
Any help on making "change_vol" work or an overall alternative solution to my initial problem would be awesome.
The pinned horizontal zone (ff, f, mf, p, etc..) will need to be changed dynamically using a Knob, or by simply updating 1 value in the script if I can not use external data. This means I can not simply delete zones in the instruments.
Thanks for any pointers.
0 -
Do you mean you need something like that?
Place the following script in the first script slot.on init
declare ui_knob velocity_knob (1, 127, 1)
make_persistent(velocity_knob)
end on on note
change_velo(EVENT_ID, velocity_knob)
end on0 -
This script can be part of the solution but it does not do what I am looking for.
I need velocities coming from MIDI data, not from a knob.
It is the velocity Zone selection that will require a Knob.
I would like to keep using Velocity to scale the envelope, but not anymore for selecting a Zone (pianissimo, fortissimo, etc..).
I have described the use case here :
If it is unclear do please help me in making it more understandable.
Thank you for your help
0 -
I have clicked on "bypass" on every scripts of Noire except mine.
change_vol still does not work :
on note
change_vol ($EVENT_ID, 0, 0)
end onI use 0 to test if it works. I also tried 100 mdb, and 1000 mdb, no value works.
0 -
I'm a bit unsure about what you're aiming for. If you intend to use
change_vol
, then you should apply it in the final script slot by replacing the repedal script (Presets < Factory < INIT script).You mentioned wanting to retain the velocity envelope, but since they sampled every possible dynamic of each note, there isn't one included. Therefore, you'll need to manually add it. Additionally, it seems like you want to modify how you trigger the zones, perhaps opting for just a single velocity layer like forte. To achieve this, you'll have to remove unnecessary samples and keep only the ones you need, stretch them to cover the velocity range, and you're good to go! Afterward, you can either add that velocity envelope or utilize the Change Velocity factory script.
But then, you're saying that you'd like to control the zones with a knob. Controlling the zones in what way?0 -
Thanks for the help.
"If you intend to use
change_vol
, then you should apply it in the final script slot by replacing the repedal script (Presets < Factory < INIT script)."I have tried to put it at the last script, it still does not work.
I also tried deleting every other scripts, it still does not work.
"You mentioned wanting to retain the velocity envelope, but since they sampled every possible dynamic of each note, there isn't one included"
They did not sample at every velocity values.
Do you imply to mean that for example the last zone, configured for velocity 124-127, the output volume will be the same whether it is a note with velocity 124 and one with 127 ? There is no scaling at all for these 4 velocities ?
Some zones cover 8 velocity values so I find it hard to conceive.
"Additionally, it seems like you want to modify how you trigger the zones, perhaps opting for just a single velocity layer like forte. To achieve this, you'll have to remove unnecessary samples and keep only the ones you need, stretch them to cover the velocity range, and you're good to go! "
As mentioned in one of my earlier posts, I can not delete zones because I need be able to quickly select the active velocity layer in a dynamic fashion.
0 -
Sorry, but I find it a bit confusing, and I'm not entirely sure what your goal is. It seems you want to activate a zone (I presume you mean a sample), and dynamically switch between zones or velocity layers. Then, you're using change_vol to modify the volume of the played events, but you mentioned that's not what you're after, and you actually want to adjust the velocity layers. However,
change_velo
isn't an option either. Could you please clarify your objective? Maybe @Gablux or another member could help you out.change_vol
→ changes the output volume of the played events (EVENT_ID
)change_velo
→ changes the velocity layer of the triggered event (EVENT_ID
)0 -
"If you intend to use
change_vol
, then you should apply it in the final script slot by replacing the repedal script (Presets < Factory < INIT script)."Any idea why this is not working ?
0 -
You should swap out that script slot with the one that adjusts the volume of the played events.(
change_vol(EVENT_ID, 1)
). The INIT script clears the last script slot; it doesn't perform any actions on its own. This is the only method to remove a script from the script slot (in Noire) because the script slots are locked, correct?0 -
Have you personally successfully managed to use "change_vol" in Noire?
This is just to know if I am trying ideas that are known to work or ideas that "may" work.
0 -
"Is there any way to make my script "execute" last, after all other scripts, so that I am certain to be the last instruction to update the volume?"
To execute last you need to know where last is. Last is not just at the end of a block of code, there are several parts of a script that can be running at any given point. You could have concurrent note callback running at the same time, you could have listener callback code running over and over, concurrently or not, you could have while loops inside ui control callbacks. I don't know the Noire script, but at 16k+ lines of code I would not assume anything until I analyzed the whole script. To believe there has to be a way to do with without knowing the script, is the same as putting square tires in a car and hoping for the best.
Maybe you could be lucky and the process of analyzing the script could be easy. But you need to know where to look for and what to look for. Although this aims for adding a simple command, the third party script analysis work is one of the potentially hardest there is, harder sometimes than remaking the instrument itself. Or again, if you get lucky, it might not be that difficult. And yet again - just plugin code here and there and hoping it will work is still using the square tires faith.1 -
Absolutely. Even though I knew that it’d work, I tried it out the moment you said that it didn’t work on your end.
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 61 NI News
- 774 Tech Talks
- 4K Native Access
- 16.4K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 376 Battery 4
- 835 Guitar Rig & FX
- 425 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.7K Maschine
- 7.2K Traktor
- 7.2K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators