Waiting 1 microsec before change_vol() results in ~50 millisec attack

on init declare $new_id end on on note ignore_event($EVENT_ID) $new_id := play_note($EVENT_NOTE, $EVENT_VELOCITY, 0, 500000) change_vol($new_id, -100000, 0) change_vol($new_id, 0, 0) wait(600000) $new_id := play_note($EVENT_NOTE, $EVENT_VELOCITY, 0, 500000) change_vol($new_id, -100000, 0) wait(1) change_vol($new_id, 0, 0) end on
Take a look at this script. When you press a key, two notes will fire. Both events will start at -100db, but will immediately raise to 0db. The only difference is that the second event waits a single microsecond before raising the volume. The thing is, there's no way you should be able to tell the difference; 1 millisecond would be hard to identify, let alone 1 microsecond. But what ends up happening is that the second event sounds like it has a smooth ~50 millisecond attack. Am I missing something?
If you test the script yourself, make sure you have no volume AHDSR.
Best Answer
-
That's because change_vol has a slew, a smoothing. If there is no wait at all, the first change_vol is overwritten before it's even applied.
0
Answers
-
That's because change_vol has a slew, a smoothing. If there is no wait at all, the first change_vol is overwritten before it's even applied.
0 -
Is there any work-around for this? I'm using 200 consecutive calls to change_vol(..., ..., 1) according to specific curve equations for fading in/out different marks of voices. When the fade-in time is really short (like < 20 milliseconds), I get this really noticeable fade-in from the change_vol() slew.
0 -
I don't think there's any way to change it or turn it off, no, it's fixed.
It's also very likely that your curve won't be what you intend, if you use change_vol to try and make a curve, because of that slew.
Can you not design your curves with envelopes? Flexi envelopes? They're much more precise.
0 -
No, the envelope has to be completely from the script for what I'm doing. The envelope gets applied under different circumstances, and to different marks of voices. If I used an internal envelope, I wouldn't have the control I need. I wrote the equations by ear with the iterative change_vol() mechanic already in place, so the curves sound as I want them to. I wonder if I should scrap the change_vol() algorithm and instead use a from_script modulator on the volume knob. It would require me to completely redo the math because the volume knob doesn't scale linearly (and also because the changes would be absolute, not relative), but that may be my only option.
0 -
Yeah, listen to the difference between change vol and from_script in this test! Pretty extreme.
1
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 65 NI News
- 818 Tech Talks
- 4.2K Native Access
- 17K Komplete
- 2.1K Komplete General
- 4.4K Komplete Kontrol
- 5.9K Kontakt
- 1.6K Reaktor
- 390 Battery 4
- 871 Guitar Rig & FX
- 440 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.9K Maschine
- 7.6K Traktor
- 7.6K 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