[-1 +1 ] range | 2nd Ed FX Book Questions | Forum

guest

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

[-1 +1 ] range
Member
Members
November 27, 2020 - 4:09 am
Member Since: February 7, 2020
Forum Posts: 15
Offline

How do we map analogue values within the range -1 +1? I'm reading the addendum on valve emulation but I don't understand how, after the whole elaboration, we do the "re-ranking" to the range -1 +1. I'll give a further example to better explain. If I wanted to make a plugin that models only an ideal non-inverting op amp (Vout=(1+R2/R1)Vin)how do I map the values inside -1 +1? If I consider Vin as the input audio samples to the plugin, and for example the gain is 10, how do I do it? I can't Just multiply each sample by 10 because I could go out of the range -1 +1. How do I manage this? And besides, what would change if the gain was 100? So my question is how to relate all these quantities to make elaborations inspired by analog circuits.

November 27, 2020 - 11:09 am
Member Since: January 29, 2017
Forum Posts: 693
Offline

The digital range of [-1.0, +1.0] maps to the analog range that is determined by the rails of the analog system. If your op-amp example were ideal, and running on +/-15V, then your *theoretical* max input before clipping would be 30Vpp (it will usually be +/-0.7 to +/-1,4V inside this range, but that is inconsequential for the example).

That 30Vpp input would map to the floating point digital range of [-1, +1]. And, if you applied an input of 30Vpp to your analog system, then you would likewise clip it if you applied a gain of x50 or x100.Â

So the answer is to use a x50 multiplier just as you normally would - it's all the same, just mapped to a different range. This also gets into the area of dynamic range, nominal signal levels, and headroom. All the same stuff applies, just remapped to that range.Â

WillÂ

Member
Members
November 27, 2020 - 5:56 pm
Member Since: February 7, 2020
Forum Posts: 15
Offline

Thank you very much. So, for this example, +15 V would be +1 and instead -15 V would be -1 and I start from here to map the other quantities with a proportion. Right?
And for other systems it changes according to the situation, such as maximum and minimum tensions. Right?

December 4, 2020 - 3:45 pm
Member Since: January 29, 2017
Forum Posts: 693
Offline

Well, the system rails govern the maximum signal value, and that all scales to [-1, +1], so yes it scales depending on the system voltages (tensions). But as long as you are dealing with linear circuits, and you aren't trying to model the noise floor, then that is less important (until your rails drop so low that the components are operating in a nonlinear range). For tubes and nonlinear devices, the rails play a much larger role in the behavior of the circuits in a way that you'd need to worry about.Â

Member
Members
December 14, 2020 - 9:37 am
Member Since: February 7, 2020
Forum Posts: 15
Offline

Thank you. Iâ€™m learning a lot. I was reading the vacuum tube addendum and I saw that you treated input samples values like volts. This brings you to exceed the range [-1 +1]. After some processing you did some scaling but I donâ€™t understand how:

Iâ€™m talking about pag. 97 (but I think this will apply everywhere)where you perform final output scaling and inversion. Why scaling is performed here if we multiply by -1? Is not only inversion? How the signal get rimapped into [-1 +1]?

and what do you mean when you say (pag 95) Â â€œI use a lot of headroom for the ClassAValve modelingâ€?

Â Thank you very much Will. Sorry for all these questions but Iâ€™m really passionate about these things and I want to do amp simulations one day (as I play guitar and I am in my third year of electrical engineering).Â

December 28, 2020 - 8:55 am
Member Since: January 29, 2017
Forum Posts: 693
Offline

The headroom and volts issues are basically the same. The digital input/output sample values must lie in the range of [-1, +1] however, internal to the plugin, the values may grow as large as the float or double datatypes allow. That is the "headroom" that I am talking about. As long as the final output is scaled back to the unity bipolar range, everything is OK.Â

For the 12AX7 example, the maximum input signal to the grid is about 3Vp-p. That would correspond to an input range of [-1 +1].Â

Hope that helps - if you are not familiar with the terms dynamic range, signal-to-noise ratio, headroom, and noise floor (which are critical for analog audio) then do some research on it; the Yamaha Sound Reinforcement Handbook is a great source for that info.

WillÂ

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
4 Guest(s)

1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 2

Members: 784

Moderators: 1