I have created this discussion at the #py5 forum... To collect examples, If anyone else wants to post other experiments...
https://github.com/py5coding/py5generator/discussions/282
wink wink @kantel @TomLarrow @ericof @rzeta0
#Python #PyAudio #CreativeCoding
#py5 #python #pyaudio #creativecoding
Tomorrow or maybe during the week I should read this tutorial mixing #Python #PyAudio and #PySimpleGUI ... https://k3no.medium.com/integrating-pyaudio-pysimplegui-5fa342b1e113
As usual, I have no idea of what I'm doing 😂 #Python #Processing #py5 + #PyAudio microphone listening
#python #processing #py5 #pyaudio
Tone generation with #Python turns out to be relatively simple. I found this short code on a blog https://raw.githubusercontent.com/makermovement/3.5-Sensor2Phone/master/generate_any_audio.py
which can be tweaked fairly intuitively (er, for me, someone who has been playing music for over 20 years): change "samples" number for different length files, add more for loops for different sequences, use different functions for different waveforms.
Since the waveforms are generated by values in lists being packed into byte sequences, I imagine someone could use spike data (maybe transformed a bit to be in range [-128, 127]) instead of something that generates a sinewave or whatever.
My original idea was to have the spikes trigger a wav file to be played, to make a spiking drum machine, which seems possible with #pygame, #pyaudio, or a module called playsound, but I realized it would require stitching them together and also generating silence, so I went for the simpler method that's more like a synthesizer