Wednesday, January 25, 2012

Saturation functions (the math of sound aesthetics)

I'm an electric guitar player (not professionally). I think about distortion quite often, and as a mathematician (without a PhD) I am utterly fascinated. I need a way to study the phenomenon of distortion.

One way to do it is to study nonlinear functions; sin arctan x, tanh x, and others. The easy thing to do is to throw sine waves into these functions and look at the harmonics produced. I'm also interested in how the harmonics change as the input amplitude changes. I haven't learned Fourier series yet, but when I take a class on differential equations, you can be sure I'll pay attention. I want to see if I can create a function for the amplitude of the nth harmonic, the independent variable being the input amplitude to the saturation function.

One can use calculus and algebra to extract meaningful information about the functions. Plot them on a logarithmic graph; do this by substituting

x=10^(t/20) and
y=10^(q/20)

and plotting t vs. q. This gives a dB in/dB out relation which is very insightful, for both the behavior of the function and that of logarithms.

Functions like tanh x represent a particular soundworld, or a certain timbre. Indeed, changing the input amplitude will change the harmonics, but one has still not escaped "tanh world". What about other saturation functions? How can we find new families of such curves?

In order to plunge into the "genetics" of saturation functions, I fiddled around with a basic one and gave it a parameter affecting its shape.

y = x/sqrt(1 + x^2)

This turns out to be equal to sin arctan x; very interesting. The trig functions return powers of 2. If you rewrite the function as

2 -> 1/p

y = x[1 + x^(1/p)]^-p, x within [0, inf),

Now we can let p be something other than two, but the same basic process has been applied. This is now a family of saturation functions, all of which have

dy/dx = 1 , x = 0
lim (y,x->inf) = 1

One issue is that negative x can yield undesired values for odd or irrational p; the function loses symmetry about x=0. Just take |x|^(1/p) instead.

p can range from (0, inf). Hmm. Sounds like the range of a^x.

My suspicion is that, for all functions which will yield square-waves when the input amplitude approaches infinity (which would include every function I've mentioned), the distinguishing factor between them is the manner (trajectory?) in which harmonics of the square wave rise to the appropriate amplitude. Sometimes a distortion becomes fizzy very quickly, other times it is very slow. These different sounds can be witnessed with the above f(x,p). I am continually working to improve the function by adding and manipulating the parameters, giving more control over its behavior. One change I swiftly made was to normalize the function to y = 1 for a certain x. How about x=1?

y = x[2 / (1 + |x|^[1/p] ) ]^p

y = x 2^p (1 + |x|^(1/p))^-p

Now, p will have no effect on the function, and y(1) = 1 for all p>0.

Monday, January 25, 2010

Analog Computation

I'm interested in designing analog computers. It can be a discouraging mission at times, what with the extreme success of digital computers, but it is a field I must explore. Because I am not interested in what has already been discovered, I push myself to exist in a mode of constant discovery. As a result, sometimes my discoveries are nothing new. But I am motivated by the chance that I could find something new and worthwhile.

Mathematician Gregory Chaitin has something interesting to say about the exploration of math (and therefore, other fields tied to math). He believes that there is no ultimate law of mathematics; a prospect that arouses horror in the minds of many analytical types. Yet, the idea makes sense. The rules of mathematics are not all connected, and not everything can be arrived at from one single idea. Such would imply a great deal of redundancy in logic, math, and physics. Yet the reason that we may keep progressing and discovering new phenomena is because mathematics is an infinite field of mostly-unrelated truths. It's horrible for the guy looking to find a Theory of Everything. But for the persistent discoverer, it is a much-needed affirmation. Perhaps I'm inclined to like it because it might give job security to thinkers. Hoorah! I'm a thinker AND I need a job!

For my job, I'll choose to explore analog computers. Nevermind that they've been abandoned for decades. Surely, there is something we did not find. Greg has given me hope; he has refuted the "nothing new under the sun" idea that many cling to for security. I don't like security! The world is nothing to be afraid of.

I came up with an interesting architecture for analog multiplication. If it's an original idea, I don't want to make it too public, but I'll give you a hint: the area of a rectangle.

Monday, January 18, 2010

Expressing inexpressible inverse functions

In a differential pair of transistors, the differential input voltage is limited to a narrow range; outside of that range, distortion becomes greater than negligible. This phenomenon has led to the traditional sound of voltage-controlled filters and amplifiers as they are found in analog synthesizers. The distortion curve of the system happens to be proportional to the hyperbolic tangent function: tanh.

I sought other mathematical expressions that could be useful as distortion curves. I found one in what would be the inverse function of y = x^3 + x. The problem is that the resultant function eludes mathematical expression. You can't use the techniques you learned in high school. Is it worth plunging into this issue any further? I feel very determined to explore the possibilities. Is not mathematics a wide-open landscape for us to explore?

Hello!

Greetings. This blog is a place to discuss various interests: math, electronics, music, synthesizers, language, philosophy, life, and anything else interesting to me; perhaps even beer, coffee, and bread.

My past attempts at "blogging" were essentially publicized teenage diaries. This, however, will be different; more focused on the subjects, and less about my personal life. As a young man filled with personal and professional aspirations, I create this blog to give presence to myself and my ideas, so that I may find my niche in this big world. I've got something to contribute; and so do you! Often I search on the internet for information, only to wish that I had a real person to bounce ideas off of. (Yes, I just ended a sentence with a preposition.) I need a blog; I need connection to like-minded people.

A bit about myself. I was raised in a small Pennsylvanian town, Boyertown, and lived there until I was twenty. I moved to Lacey, Washington in late 2007. Since high school, I've tried to go to college three times, and now finally I insist that my future lies elsewhere.