The code

Here is the code:

from pysound.buffer import BufferParams
from pysound.oscillators import sine_wave
from pysound import soundfile
from pysound.graphs import Plotter

params = BufferParams()
out = sine_wave(params, frequency=500)
soundfile.save(params, 'sine-500.wav', out)

Martin McBride

Software developer. Java, Python, C++ etc. I write for pythoninformer.com and maintain the generativepy library.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store