Signal Scaling¶
Functions for mapping values between ranges and automatic gain control.
- pyminidsp.scale(value, oldmin, oldmax, newmin, newmax)[source]¶
Map a single value from one range to another.
Map a single value from one range to another.
Example:
scale(5.0, 0.0, 10.0, 0.0, 100.0)returns50.0.
- pyminidsp.scale_vec(a, oldmin, oldmax, newmin, newmax)[source]¶
Map every element of a vector from one range to another.
Map every element of a vector from one range to another.