Skip to content

heroineworshiper/cp33

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Piano audio processor

Copyright (C) 2021 Adam Williams <broadcast at earthling dot net>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

******************************************************************************

This program adds outboard metronome, reverb, & recording to a dumb
electric piano with I2S audio exposed somewhere.
Instructions for building are in cp33.c & piano.c


What you'll find here:


cp33.c: STM32 firmware that runs inside the CP33 to convert I2S to USB

cp33.pcb: I2S capture board

recordcp33.c: Original linux program that converted USB output to a sound file.

pdftoreader.c: obsolete sheet music converter
pdftoreader2.c: Convert sheet music to compressed reader files.

reader.conf: example configuration file for pdftoreader2


reader_server.sh
reader_client.sh
piano.sh: wrapper scripts for running the programs on startup


piano.c, pianoserver.c, piano.h: the executable for the realtime audio processor

index.html, metro.wav favicon.ico record.png stop.png single.gif: assets for the GUI

wifi.py: useful script for manetaining a wifi station

elan.X: firmware for reading an Elon/Synaptics touchpad & exposing a USB HID device

touchpad.pcb: electronicals for the reader touchpad





reader.c:
Music display for dual raspberry pi's
--------------------------------------------------------------------------------
This requires configuring Xorg on the raspberry pi.

Set up the framebuffer in /boot/config.txt by adding the following lines

display_rotate=3
framebuffer_depth=16
framebuffer_width=768
framebuffer_height=1366
enable_uart=1


Configure Xorg to disable screen blanking & the default mouse events.
Edit /usr/share/X11/xorg.conf.d/99-fbturbo.conf

------------------------------------------------------------------------------
Section "Device"
        Identifier      "fb"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb0"

        Option          "SwapbuffersWait" "true"
EndSection


Section "Monitor"
	# This identifier would be the same as the name
	# of the connector printed by xrander.
	Identifier	"VGA1"
    Option "DPMS" "false"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    Option "BlankTime" "0"
EndSection


Section "Screen"
	Identifier	"ScreenLeft"
	Device		"fb"
	Monitor		"VGA1"
EndSection

Section "ServerFlags"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    Option "BlankTime" "0"
EndSection



----------------------------------------------------------------------
Install fvwm

apt install fvwm

Copy /usr/share/fvwm/system.fvwm2rc from Ubuntu.
Add a line to /usr/share/fvwm/system.fvwm2rc to disable the window border

Style "Reader" NoTitle, HandleWidth 0

Install missing fonts.  Copy 
    /usr/share/fonts/X11/misc
    /etc/X11/fonts/misc
from Ubuntu


Compile it on a raspberry:
    apt install xorg
    apt install libx11-dev
    apt install libxext-dev
    apt install libxfixes-dev
    apt install libxv-dev
    apt install libxft-dev
    apt install wiringpi
    apt install xinput
    make -C guicast
    make -f Makefile.reader
    scp reader pi2:

The music files are .reader.gz.
Both confusers need a /reader directory with all the music files.  The
client needs to mount it over NFS.



Run it on the client 1st:
mount /reader
Xorg&
export DISPLAY=:0
nohup ./reader -c >& /dev/null&

Run it on the server 2nd:
xinit /usr/bin/fvwm2&
export DISPLAY=:0
xinput
xinput --list-props "McLionhead Trackpad"
xinput --set-prop "McLionhead Trackpad" "libinput Accel Speed" 0
nohup ./reader >& /dev/null&


The server uses page turning buttons connected to GPIO 13, GPIO 14, GND
on the pi B.  The pin numbering is pins 21, 23, 25.  The GPIO numbers
changed on later pi's so there are no more pictures showing the original
GPIO numbers.




lcd.FCStd: LCD stand
    print with .8mm nozzle
    no support when bridging over magnets

    TODO: captive nuts for all farsteners
        shorter nuts for latches


phone.FCStd: phone holder
    print with .4mm nozzle
    stick pad on with double sided tape




About

Piano audio processor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published