Articles Hierarchy

Articles Home » RPI » Python and Sonic Sound

Python and Sonic Sound

its long i play Python and Sound,
but there was a forum question regarding a old tutorial
what used a ultrasonic sensor by a python program and send data to Sonic Pi (manual) for play
music like a THEREMIN
/ a smart search would have helped all /

now i am not interested in the hardware part.
but first i test SONIC Pi code and found its old / not working
later i tested some python code with random notes and
made a PYGAME window to use the mouse to play it.
you see a window (with black background)
when click or press and drag get a print of sound settings send to SONIC
left --> right is the NOTE / pitch higher
up --> down is louder
update 8.3.2018,
in v.03 added some show to mark the note by a bar in the window,
with 80 notes times 8 pix is 640 window
and color ( yellow to red ) by amp
just adding up / over again.

both applications: PYTHON3 IDLE and SONIC Pi must be in run mode

code here
sound sample here
play video youtube

for a ultrasonic version that might work see here
for keyboard version see here