Quote Originally Posted by Jorge View Post
What does it do? And how can I benefit from such a subject?
it's a programming language. You can make programs.

Quote Originally Posted by DuB View Post
To answer your question about the parameters I'm planning on using, I recently wrote a very brief paper (~1500 words) for some of the faculty in my department which summarizes the experiment I'll be using the program for.
Sounds fascinating. Do you know how to generate the coefficients so that the resulting trig sum generate pink noise? That's not an area of math I've done too much with (though it would be fun to get into). If you can do that, then


Code:
import math

def make_wave(coefficients):
    def wave(x):
        return sum(c * math.cos(i * x) for i, c in enumerate(coefficients))
    return wave
Is an example of how to put them together. This creates a function make_wave that returns the actual wave function. to use it, just pass it the coefficients in a list or tuple and it will return a function that takes a single numeric variable and returns a float representing the value of the trig sum on that number.

Code:
durations = make_wave((1, 2, 3, 1.4, 12, .001))

print durations(1)
print durations(2)
print durations(1.4)
But you want to partition the image of the waves into discrete pieces for duration and note. There's two ways to figure that out. you can either have a fixed set of intervals that applies to all functions and only generate functions whose output falls within the range of the function or you can determine the range of each function and partition it equally. From your paper, I'm not sure which you intend to do (I might have missed it). Again, I'm not up on my signal theory. Is equal length partitions what you want or should their lengths be weighted?


Their might be a library to do a lot more than just generate sounds as well. I'll poke around.