in reply to Normalizing a range of numbers to a percentage

I remember knobs from an electric guitar that weren't linear. For such a potentiometer, you might need a different formula, but for linear ones, it seems correct.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Normalizing a range of numbers to a percentage
by karlgoethebier (Abbot) on Mar 08, 2019 at 18:04 UTC

    It depends. As far as i remember Gibson volume potis are linear and their tone potis are logarithmic. For Fender and Ibanez i‘m not sure. But i think they are all logarithmic. And i also think that there is no audio device with a linear volume poti. It makes no sense. Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help