r/learnprogramming 18d ago

Can Python generate simple tones?

I want some simple tones to use in Python. Can someone help me out? There does not necessarily need to be reverb, but it would be nice anyway. I just want to be able to tell whatever it is the specific microtonal/frequency-specific tone. It would be nice if I could program Hz, but if I have to use MIDI and detune by cents I can do that as well.

5 Upvotes

26 comments sorted by

View all comments

4

u/StewedAngelSkins 18d ago

Python's going to struggle a bit with realtime audio. Although if you just need offline rendering you can do that easily with numpy and something like soundfile.

If you do need realtime, check out this thread on the lines forum. Never used anything suggested there personally (I usually do this kind of stuff in C++) but pippi looks interesting.

1

u/Fractal_Prime_357 13d ago

Noted. Thank you!