[yoshimi] Re: Use units when showing values of parameters

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Mon, 28 Nov 2016 22:40:46 +0000

On Mon, 28 Nov 2016 21:01:48 +0100
Jörn Eichler <joerneichler@xxxxxxx> wrote:

Am Montag, 28. November 2016, 18:50:57 schrieb Will Godfrey:
On Mon, 28 Nov 2016 18:05:11 +0100
  
LFO freq in Hz
LFO delay time in s
Envelope attack,decay and release times in ms and s
Amp-Envelope sustain val in %
Volume in dB
Panning in random, %left/right and centered

[...]  
Again this looks good so far, but didn't see volume and pan. Is that a
slightly later build? I assume 0dB is max, and the control ranges down from
that. Envelope sustain value would then also be in dB and would be regarded
as relative to the initial value.  

It's in this commit: https://github.com/heuchi/yoshimi/commit/d7097482

I just converted the 0-127 scale for the Amp-Env sustain to 0% - 100%. But if 
dB is considered standard, I'll give it a try.

Regarding the volume controls, the situation is actually quite confusing.

I used the same calculations as the code does. So the default settings for 
the 
volume sliders differ and the maximum is 0.0dB only for the voices in 
ADDsynth.
It looks like -60dB .. 0dB was intended for the synth's controls, however 
it's 
not what the code actually does: 

Look at ADnote.cpp beginning with line 648

NoteGlobalPar.Volume = 
   4.0f * powf(0.1f, 3.0f * (1.0f - adpars->GlobalPar.PVolume / 96.0f))  
      //-60 dB .. 0 dB

The comment says this should give -60 dB .. 0dB. Since the denominator is 
96.0f instead of 127.0f it really  gives: -60dB .. 19.4dB

Maybe it's just a typo, because in line 672, we find the correct version:

NoteVoicePar[nvoice].Volume =
   powf(0.1f, 3.0f * (1.0f - adpars->VoicePar[nvoice].PVolume / 127.0f)) 
      // -60 dB .. 0 dB

This time the denominator is 127.0f, and we get -60dB .. 0dB. However, this 
is 
the only place where the"correct" version exists. SUBsynth and PADsynth also 
use the former (incorrect) one. Since the synth works this way, I kept it for 
the GUI.

Interesting. I just double checked and this is exactly the same right back to
Zyn 2.2.1. My guess is that Paul intended to use the accepted practice of
hardware mixers, which have an overhead gain margin of 20dB, whereas the
individual voices didn't justify that, in fact I wouldn't be surprised if
there was code somewhere to adjust the combined outputs of individual voices
to give 0dB overall fed to the global addsynth control.

Now the master volume in SynthEngine seems to be the reverse:
        volume  = dB2rap((Pvolume - 96.0f) / 96.0f * 40.0f);

and dB2rap is an inline float exp10f(dB) / 20.0f)

One that's going to difficult is amplitude LFO depth. This is waveshape
dependent and can actually go well beyond 100% for sine and triangle giving
a curious doubling effect, not so notiocable for square wave and the ramp
ones.  

Should we then just use 0% - 100% for the actual (graphical) dial position?

That's probably best, unless anyone can come up with something better!
If we wanted to be really clever I guess we could modify what was displayed so
that 100% represents the clipping point for each waveform. These would be fixed
ratios so once discovered could be a simple multiplier.

Sliders are a bit of a cludge. FLTK runs vertical ones upside down, so
increasing value moves the slider down. Also I seem to remember we had
problems trying to attach tooltips to them. The ones that appear to have a
modified value alongside are actually a cheat. They are completely separate
boxes, but drawn look like they are one unit :)  

That's what I guessed.

Phase should be +- degrees  

Agreed.
 
Harmonic amplitude dB *except* subsynth. This is a normalised figure so
every one of them is relative to the overall output - no idea how to handle
that!  

I have not yet looked into that and I might need some more help in this area, 
because my actual experience with synths has only started some months ago.

Brave man :)

Do you have any suggestions for the attack, decay and release values of the 
filter envelope I mentioned in a previous post?


A val, D val, R val dB
A dt, D dt R dt, seconds
Stretch %
The last one changes the overall length of the envelope dependent on frequency.
Zero represents no difference. As you increase the value, high note envelopes
get shorter and low note ones get longer. This is intended to emulate the fact
that real instruments exhibit such behaviour.

HTH

Will.

-- 
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either: 
http://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: