# RaspBerry Pi 4 and/or 400 # FluidSynth from RPi repository # Launch Qsynth # Launch Thonny (Python) # No sound from channel 10 ???? # This works right with Timidity import os import time os.system("sudo modprobe snd-virmidi") os.system("aconnect 28:0 128:0") fo=open("/dev/snd/midiC3D0","wb",buffering=0) for x in range(4): print("channel 10, any note number") fo.write(bytes([153,60,127])) time.sleep(0.5) fo.write(bytes([153,60,0])) for x in range(4): print("channel 1") fo.write(bytes([144,60,127])) time.sleep(0.5) fo.write(bytes([144,60,0]))