Skip to content

Commit f887306

Browse files
Waldorf Quantum/Iridium: a group gain above 0 dB is kept (#479)
The gain of a group is written as the volume of the oscillator which plays it, and the same amount is taken off the entries of its sample map so that it is not applied twice. The volume of an oscillator ends at 0 dB, though: the part of a higher gain was clamped away there, but still taken off the sample map, so it was lost. A DecentSampler preset whose two layers are raised by 1.7 and 2.3 dB arrived that much quieter and with the balance between its layers changed. Only the part of a group gain up to 0 dB goes to the oscillator now; the rest stays in the entries of the sample map, which carry a gain above 0 dB anyway. Read back, the presets keep the gain of every layer. Co-authored-by: Jürgen Moßgraber <juergen.mossgraber@googlemail.com>
1 parent 1b25502 commit f887306

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎documentation/CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 20.4.0 (work-in-progress)
44

5+
* Waldorf Quantum/Iridium
6+
* Fixed: A group whose gain is above 0 dB lost that part of it. The gain of a group is written as the volume of its oscillator, which ends at 0 dB, and it was taken off the entries of the sample map in full. The part above 0 dB now stays in the entries of the sample map. A DecentSampler preset whose two layers are raised by 1.7 and 2.3 dB arrived that much quieter, with the balance between its layers changed.
57
* New: Added support for the Groove Synthesis 3rd Wave (PGDATA, BIN): a unified program file is read as one instrument with the level, tuning, panning and keyboard range of the parts which play its samples (e.g. stereo, split and layered programs), a multi-sample file as its sample slot; unified program files, whose parts layer and split the samples, and multi-sample files are written. Written files are not yet verified on hardware.
68
* New: A note reports when the samples of a multi-sample sound away from the root keys they are mapped to - e.g. an octave, because the instrument was transposed when it was recorded - and the Transpose processing option set to 'Auto' (`-Zpa` on the command line) moves the root notes of each multi-sample onto its measured pitch. Only the root notes are moved, the audio and the key ranges stay as they are.
79
* Fixed: Reducing the sample frequency with the processing options clipped samples which peak close to full scale. Such a sample is now lowered to fit and its zone plays it louder by the same amount.

‎src/main/java/de/mossgrabers/convertwithmoss/format/waldorf/qpat/WaldorfQpatCreator.java‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,16 +2114,18 @@ private static String toDeviceAttribute (final String attribute)
21142114

21152115
/**
21162116
* Get the gain offset of a group which is stored in the volume of the respective oscillator.
2117-
* The offset is not applied for a fully silenced group, since subtracting negative infinity
2118-
* from the (equally infinite) zone gain would result in a NaN which cannot be written.
2117+
* The volume of an oscillator ends at 0dB, the part of a higher gain stays in the entries of
2118+
* the sample map. The offset is not applied for a fully silenced group, since subtracting
2119+
* negative infinity from the (equally infinite) zone gain would result in a NaN which cannot be
2120+
* written.
21192121
*
21202122
* @param group The group
21212123
* @return The gain offset in dB, 0 if there is none
21222124
*/
21232125
private static double getGroupGainOffset (final IGroup group)
21242126
{
21252127
final double gain = group.getGain ();
2126-
return Double.isFinite (gain) ? gain : 0;
2128+
return Double.isFinite (gain) ? Math.min (gain, 0) : 0;
21272129
}
21282130

21292131

0 commit comments

Comments
 (0)