Python Forum

Full Version: How to create amplitde ramp function in python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to create an amplitude ramp function. Similar to "chirp()" used for creating a frequency ramp function.
Please help me with your suggestions.

P.S. This is my first post, so , sorry in advance for any mistakes/errors
Ok, but what would it do?

What's a chirp()? Is that from another language? Which one?

What have you tried so far, and in what ways is it different from what you expect?
This is a chirp: [attachment=524]

A chirp is a signal with changing frequency in time.
It's used for example in FMCW Radar systems: http://radartutorial.de/02.basics/Freque...ar.en.html

Here the code, I used to generate the signal:

start_freq = 1
end_freq = 100
samples = 44100
time_basis = np.linspace(0, np.pi * 2, samples)
chirp = np.linspace(start_freq, end_freq, samples)
signal = np.cos(time_basis * chirp)
I guess it's clear enough to understand the math.
If you want to do this without numpy, it's a bit more work.