Interest in adding rotary encoders and frame buffer LCD?
Started by Squar0L




4 posts in this topic
bbishop

33 posts 7 threads Joined: May 2021
25-11-21, 00:34 -
#4
(21-11-21, 16:47)Squar0L Wrote: Hi Hans,

I've added wiring to access i2c, and pygame/pygame-menu for framebuffer support. Here is the snippet from the Dockerfile I use to build the image:

Code:
RUN apt-get update && \
    apt-get -y --allow-downgrades install libsdl1.2debian/buster && \
    apt-get -y install git python3-dev python3-pip \
    python3-numpy cython3 python3-smbus portaudio19-dev libportaudio2 alsa-utils wiringpi \
    libffi-dev python3-pbkdf2 python3-tk usbmount libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev \
    exfat-fuse exfat-utils

RUN pip3 install rtmidi2 rtmidi-python pyaudio cffi sounddevice future wifi \
    pyalsaaudio psutil serial RPi.GPIO RPLCD wiringpi pygame==1.9.6 pygame-menu

Pygame fully abstracts out the details of the display. I'm using a 320x240 SPI attached 2.4" Adafruit PiTFT LCD. Not using the resistive touchscreen, I could have. I wrote a rotary encoder python driver to feed into the pygame event queue, to look like a keyboard, so the pygame-menu operates off the encoders. No audible artifacts of any kind when using them during audio play.


I'm very interested in your use of pygame to repackage the menu system, I've been looking for a way to display information from pure data (which I'm running alongside samplerbox for audio processing and digital synthesizer voices) while the menu system isn't actively engaged (my dream would be to plot wavetable coordinates onto the display as a sort of oscilloscope, or even just print the function and value of the last midi cc used)


Messages In This Thread
RE: Interest in adding rotary encoders and frame buffer LCD? - by bbishop - 25-11-21, 00:34