Waldorf Quantum/Iridium: keep the instant attack of a percussive sound - #367
Waldorf Quantum/Iridium: keep the instant attack of a percussive sound#367douglas-carmichael wants to merge 1 commit into
Conversation
|
@douglas-carmichael Please resolve the conflicts, I am unsure which code is the current one. |
The device cannot play an amplitude stage shorter than 0.07 seconds. A shorter one was therefore lifted to that length, so that it would not collapse into an instant stage, which snaps the VCA open and clicks when the audio does not start at a zero crossing. That lift was applied to every source. A sampled instrument, however, carries its attack in the audio itself and starts at silence, so there was nothing to click - the lift only faded the recorded attack in over 70 milliseconds and took the strike off every piano, plucked string and drum. An Akai S-1000 electric piano asks for 3 milliseconds and was written as 70, which is 23 times longer. The audio of the zones is now measured and the stage is only lifted when a zone really starts with a step which can be heard: more than 2 % of the peak level of that audio, the ratio at which the wrap of a loop becomes audible. The measurement runs only for a preset whose attack is short enough to be affected at all. Of the 117 presets of a commercial CD-ROM 78 regain their instant attack and 1 - whose audio starts at 3.5 % of its peak - keeps the lift. An instant attack is what the device uses for a percussive sound itself: 35 % of 141 presets written by an Iridium set the amplitude attack to 0.
3cb12ca to
df5f281
Compare
|
Rebased onto current main - same situation, a textual collision rather than two versions of the same fix. This branch predates #356, and both change the de-click of the amplitude envelope in
Current is main, and this adds the audio inspection on top. Verified on two sources with an identical 10 ms attack: one whose audio fades in from silence keeps |
This corrects an over-correction of my own, from #166.
The device cannot play an amplitude stage shorter than 0.07 s (
y = 0.06 × 1000^value), so a shorter one collapses to an instant stage, which snaps the VCA open and clicks when the audio does not start at a zero crossing. #166 fixed that by lifting every short amplitude stage to 0.07 s.Applied unconditionally, that lift is wrong for the normal case. A sampled instrument carries its attack in the audio and starts at silence, so there is nothing to click - the lift only fades the recorded attack in over 70 milliseconds and takes the strike off every piano, plucked string and drum.
An Akai S-1000 electric piano asks for 3 ms and was written as 70 ms, 23 times longer. It stopped sounding like a piano; that is how this was found.
An instant attack is normal on this device
The manual: "If Attack is 0 and Decay set to a medium value you get a percussive sound; if you turn up the attack, you get a soft-sounding start."
Measured over 141 presets written by an Iridium:
60 % use an attack shorter than the lift forced, and a third use exactly the instant stage the lift was written to avoid.
Change
The audio of the zones is measured, and the stage is lifted only when a zone really starts with a step which can be heard: more than 2 % of the peak level of that audio - the ratio at which the wrap of a loop is treated as audible elsewhere in the code (
LoopClickDetector.MINIMUM_RELATIVE_STEP). Measuring against the peak of the same audio keeps it independent of the bit resolution.The measurement runs only for a preset whose attack is short enough to be affected at all, so a preset with a genuine attack reads no audio. Unreadable audio keeps the safe, non-clicking variant. The release is unchanged: a note-off lands at an unpredictable point of the audio, so its step cannot be measured in advance.
Verified
117 presets of an Akai S-1000 CD-ROM converted to Quantum/Iridium:
The one that keeps the lift is
TINESNPAD B, whose worst zone starts at 3.49 % of its peak (first frame 970).DIGIJAZZ, the electric piano, starts at 0.43 % and now gets its instant attack back.Whole-disc conversion time is unchanged at ~4.8 s.