No effect of gain in configuration.txt
Started by Zottelcello




3 posts in this topic
Zottelcello

2 posts 1 threads Joined: Jun 2021
01-06-21, 20:49 -
#1
I was able to set the gain for all my presets in version 20200810.

For this I added the command GAIN = 0.2 in the configuration.txt. Otherwise I would always have crackling distortion.

With version 20210521 this command did not work anymore.

Does anyone know what I can do? I don't want to add the command GAIN = 0.2 to every definition.txt.


Wait, I remember: That didn't work there either, I had to change the files on the SD card with Putty. Can this feature be added in the next update please?


I had changed the samplerbox.py file in the following way: 



Under
Code:
gv.volumeCC = gv.cp.getfloat(gv.cfg,"volumeCC".lower())
comes this:
Code:
gv.globalgain = gv.cp.getfloat(gv.cfg,"GAIN".lower())
And this I have commented out:
Code:
gv.globalgain = 1
This post was last modified: 01-06-21, 21:20 by Zottelcello.
hansehv

168 posts 17 threads Joined: Dec 2020
02-06-21, 21:43 -
#2
Hi Zottelcello,
Ofcourse local changes get regressed when going to a new version. No crystal bowls, so I perceive your complaint plus question on what you should do as a bit unfair. Local changes have to be dealt with locally.
Having said that: I like the idea of a system default other than hardcoded=1, so thanks for that - it's on my wishlist now.
Final implementation will be slightly different as your change is not compatible with people using %%gain in the definition.txt.
Thanks for the hint, Hans
This post was last modified: 02-06-21, 21:47 by hansehv.
Zottelcello

2 posts 1 threads Joined: Jun 2021
03-06-21, 09:56 -
#3
I had asked the question because I had forgotten that I had changed it myself. When I remembered it again, the question became obsolete, of course.
I have expanded the entry later.
This post was last modified: 03-06-21, 09:57 by Zottelcello.
hansehv

168 posts 17 threads Joined: Dec 2020
27-08-21, 21:54 -
#4
(03-06-21, 09:56)Zottelcello Wrote: I had asked the question because I had forgotten that I had changed it myself. When I remembered it again, the question became obsolete, of course.
I have expanded the entry later.

You're right, I had some bad days then making me grumpy, sorry.
Anyway: want to let you know that next release will have configurable gain according your requirements and compatible for %%gain users.
Config parameter will be BOXGAIN, which still/again means a change for you.
But current configuration.txt's will be unusable anyway, as the layout has to change because of python upgrade  from 2.7 to 3.x.
The advantages outweigh the inconvenience of the one-time change.
Regards, Hans