-
Trackballs won't die
06/25/2021 at 21:57 • 0 commentsTrackpad finally got its surface mount conversion. Only 3 bodges were required.
A bit smaller. Without a top section, lions tend to grab around the button area to hold it. How best to hold it is the next problem. The right paw tends to interfere with the trackpad. It has evolved into a pawheld trackpad for which there are no commercial examples. Even the mighty $130 trackpad requires a table.
The trackball dream still isn't dead. Finally noticed Ross Guy doesn't use a trackpad but a cheap trackball on his easy chair.
Thumb scrollers seem to be their most popular model. Not sure if the smaller trackball is as accurate as the pool ball ones. The home made trackpad glitches a lot from body parts getting near it. Any water screws it up. Keeping the stylus around has been a pain.
-
Zoom function
06/22/2021 at 18:07 • 0 commentsAfter a heroic set of pixel manipulation programming, a 3x zoom function was done. It's toggled by a new right button.
The zoom can be dragged just like the gimp. It directly scales everything. The previews & cursors don't turn into a single pixel outline when they're zoomed. Drawing is much easier in the zoomed mode.
Being a low res 1366x768 bitmap of early 1990's vintage requires more accurate pointing. When lions freepaw text on a PC, they always use a zoom feature.
The math required to draw arcs was the 1 thing keeping 10 year old lions from ever finishing a paint program. The slope intercept function required to draw lines might have been accessible, but connecting the pythagorean therum to how a confuser draws an arc was impossible. It's surprising since then how many people encounter a need to write bitmap editors as part of their programming career.
Annotation routines could be a lot faster. The circle routine should draw circles from the top down instead of left to right, so the confuser doesn't have to look up a row for every pixel in the circle. The line routine should fill the outline of the line instead of copying a complete brush image to every point on the line.
In practice, lions only ever use 1 pixel & 2 pixel brushes. The biggest impact users see is the speed of the XOR previews. Row lookups are negligible when drawing XOR previews, compared to the overhead of the X protocol. They impact final oval drawings, but those are always very small notes.
-
Using the Elan 33059 trackpad over USB
06/20/2021 at 20:14 • 0 commentsAfter 2 full days of hacking, the lion kingdom's recycled trackpad successfully communicated with the X server, thus becoming the world's 1st Elan 33059 to communicate with an X server with a PIC2450 as a bridge.
The USB driver was originally ported from C to assembly by a younger lion when MPlab was for windows only. Then it was heavily optimized & documented. The mane effort was porting the improved driver back to C.
For the USB driver to work in C, it has to be interrupt driven. The assembly language version only got away with polling because it was more efficient. The source code is in the elan.X directory of the repository, but it's probably not going to be used for annotations.
It's obviously pretty large with the microcontroller board. It would need a long 4 wire cable to move the micro somewhere else, but the pad just senses motion. To detect button presses, it would need a bundle of extra wires to the micro. The micro could be moved to a surface mount board so it just has a USB cable.
The T14_L pin shares the tapping bit so it can't be used. The T19_RR, T20_RU, T21_RL, T22_RD pins aren't sent to the status variable at all. The 1 pin with exclusive use of a status bit is T13_R, so there could be 1 button. Another idea for zoom is to use the page turn buttons for zooming when in annotation mode. The GPIO buttons can't be sent to the X server though.
It's still really clumsy to draw with. It needs to be covered with a layer of plastic & placed on a table to be functional at all. It glitches if any body parts get near it. Using a stylus helps keep body parts away.
The 1st enclosure was a big old sheet of coroplastic with everything on it. Connected a button to the PIC18F2450's programming header.
This could be used without a table. With a stylus & the right acceleration setting, it was better than a mouse & probably equivalent to a trackball. A trackball this accurate couldn't be paw held like the Elan.
The crosshatch pattern on the Elan made it impossible to freepaw straight lines. Sometimes, it starts permanently glitching until it gets a drop kick. Freepawing text might have been slightly easier than a mouse, but it definitely needs a zoom feature.
The button
is real bang terrible.
The lion kingdom recommends the MHPS2283V for a momentary pushbutton
https://www.mouser.com/ProductDetail/Apem/MHPS2283V
& the MHPS2283 for a manetained pushbutton
https://www.digikey.com/en/products/detail/apem-inc/MHPS2283/1795387
They also make a MHPS2283N which is a momentary pushbutton with no click. It's terrible.
The trick with the MHPS line is they require a custom button & board mount instead of the screw mount of the bang terrible ones. That's why they make 3D printers.
-
Annotation attempt 2
06/18/2021 at 19:17 • 0 commentsSo the circular & hollow brushes proved useless & implementing XOR previews for a circular brush was more trouble than it was worth, so in keeping with minimalism, everything went back to a square brush. Lions seem to recall PC Paint just supporting square brushes. Helas, the hollow circles don't follow the contours of the XOR preview.
Circle, disc, box, & line tools arrived. Lions can appreciate why the Gimp doesn't have XOR previews of all the tools as PC Paint did. The fast XOR preview entails writing every tool twice, handling corner cases for showing & hiding the XOR previews, making sure the XOR preview matches what's drawn.
10 year old lions had no clue how to program an oval drawing routine & drawing ovals is still hard, in middle age. Even the mighty koala paint didn't have an oval drawing routine, only circles. The easiest way nowadays is to solve the pythagorean therum for every X to get Y on a circle, then scale the Y to get an oval. To speed it up, it's done with a floating point lookup table.
The result is the kind of blinking XOR cursors & line filled brush strokes that lions remember of PC Paint on an 8 Mhz Olivetti 24, but on all off 700Mhz. Maybe it would have been faster on the framebuffer or using SDL. The brush stroke routine is suboptimal in the limit. Brush stroke & hollow circle definitely need improvements. The XOR cursors are all Xorg routines drawing to the frame buffer.
Instead of a full screen clear button, it has a filled box tool with 1 of the colors being erase. That has greatly improved erasing to the point of almost completely replacing the erase tool.
The line, oval tools improved annotating but it's still manely a nightmare. The low resolution makes precision a lot more important, like it was in the days of 640x400. Either it needs a zoom function, a way to lock lines on the axes, or a way to selectively decelerate the pointer. A trackpad won't do the job if it's already hard with a mouse. Lions believe a trackpad with stylus could be the best pointing device.
-
Annotation attempt 1
06/17/2021 at 03:41 • 0 commentsA pretty frustrating experience, to be sure. It's nowhere near as easy with a mouse on a music desk as it was with a pencil or a mouse on a normal desk. Line, oval, zoom tools might help, but drawing text without a keyboard is hopeless. Another idea besides writing a paint program from scratch is to boot up the gimp every time the user wants to annotate, but it requires a keyboard & it's even slower. It's pretty frustrating to not be able to go to a store & try out a trackball.
The annotation system is a minimal drawing program based on PC Paint. Vintage software has once again proven useful as the basis for a modern application. Drawing programs have been the nemesis of lions ever since they tried to program one in childhood but never could finish it.
The mane showstopper is event compression on the pi is non existent. It seemed like a good idea to have PC Paint's XORed brush augmented with a crosshair, but it just sits & redraws single pixel mouse movements without event compression.
The color palette ended up being the 16 original Commodore 64 colors rather than a modern color picker. The rest is a simplified version of what lions remember of PC Paint. Drawing is bitmap based. There's draw & erase with different brush sizes. There's no lasso, selection, fill, or polygon tool. There is a foreground & background layer while the original scanned music is untouched. There are a certain number of undo levels.
Erasing large areas is pretty rough without a selection tool. There is a large eraser brush to try to compensate. The user has to hit the save button to make new annotations appear on both monitors. It automatically saves when the user exits or loads a new file.
Despite every effort, it composites the 2 annotation layers in every single page turn. It would be pretty involved to make it selectively composite the annotation layers only if they're used. The page turns have dropped back to 13 per second, with annotations & the background pixmaps required for any useful menu system.
-
Software
06/13/2021 at 05:37 • 0 commentsMaking a minimal confuser actually do minimal confusing is a lot harder than it used to be. For decades, the raspberry pi foundation has labored to run as much as possible as slowly as possible. With much coercing, it can be made to just run fvwm on X11. The key commands are
apt install fvwm
xinit /usr/bin/fvwm2&
/usr/share/fvwm/system.fvwm2rc has to be copied from somewhere else. It needs an option in system.fvwm2rc to disable the reader's window border.
Style "Reader" NoTitle, HandleWidth 0
Sadly, the current versions of fvwm no longer support keeping a window on top. That has to be done in the program.
Then, there are commands to try to slow down the mouse speed.
xinput
xinput --list-props "PixArt USB Optical Mouse"
xinput --set-prop "PixArt USB Optical Mouse" "libinput Accel Speed" -1The lion kingdom believes the mouse speed still needs a kernel hack to be slow enough.
The server pi needs to export NFS to the client pi so they can access the music files.
The decision was made to finally make the Cinelerra toolkit a standalone library with the ability to strip out all its video editing features. It works quite well as a minimal retro interface, only taking 18 minutes to compile on a 1B. As simple as it is, it's still takes a beast to do all the listbox, textbox, & menu operations a toolkit has to do.
Since it's not a dual head confuser, the mouse only works on 1 monitor. It's a bit contorted to have a mouse 3 octaves away from the screen. It definitely needs a mouse stand on top of the panel.
Despite all the hype about a pointing device which can draw, annotations are going to slow page turns way down. In its simplest form, every page would optionally have 2 annotation layers, a foreground & background. Each layer would have 16 possible colors, including transparent. The resolution wouldn't be able to use RGB subdivisions. Annotations would go in a separate file with flat images & flags saying if an image was used.
It needs to support 1/2 a page turn so every page can be shown on the screen with the pointer. The client confuser needs to poll the annotation file for updates. The annotation file needs to be in RAM along with all the music images. The client would have to reload the entire file when it changed. To speed this up, the annotation file can start with a table of contents, showing what revision each page is on. The client can reload just the latest revision of 1 page.
Then of course, the server needs a full paint program, 1/2 page turn buttons, draw, erase, color palette, layer, save file, brush size, brush type, but no undo is required. The 2 layers need different color palettes.
There's still a dream of just running it without RGB subdivisions, on the dual head 4B, with its horrible aliasing. Page turns with annotations would be a lot faster. The mouse would work on both screens. The networking protocol, NFS, half page turns would go away.
-
Stand version 3
06/10/2021 at 18:06 • 0 commentsA new batch of stands came off the printer.
Featuring all new latches
Much easier access to the electronicals. Farther placement back. Flaps to keep it from sliding forwards.
New confuser placement.
Plans continued for a pointing device. All attention turned from trackballs back to an old fashioned mouse in the short term, eventually being replaced by a trackpad.
So the Elan 33059 isn't documented anywhere, but it's similar to a more common Synaptics described on
https://www.hackster.io/frank-adams/laptop-touchpad-conversion-to-usb-d70519The ribbon cable pinout doesn't match, but the Elan version otherwise has the same signals as the Synaptics. The test points are even labeled
TD - PS2 data
TC - PS2 clock
T13_R - right button
T14_L - left button
T19_RR - scroll right
T20_RU - scroll up
T21_RL - scroll left
T22_RD - scroll down
TN - ?
TP - ?
Source code is scarce. The best example was
https://www.hackster.io/frank-adams/laptop-touchpad-conversion-to-usb-d70519
There were comments about the source code working with an Elan chip. It bit bangs the PS2 pins. Sadly, a quick test showed TN & TP are not USB pins.
-
Setup 1
06/08/2021 at 09:24 • 0 commentsThe fastest possible setup yielded this.
A giant 500W Dell power supply made barely enough pixies to feed 3 raspberry pi's.
It was a bit weird to turn pages with the buttons. It was hard to turn pages with the left paw, but anything was better than the ipad. A 3rd button on the left side might aid the left paw. Ventilation was worse. It's going to be brutal in hot weather.
It needs to be 5mm farther back. The magnet holders need to be without walls so they can sit farther back. There's a case for bolting it on the back so it can go a few inches farther back. Maybe the viewing angle can be more horizontal. Making it completely fold when not in use would require a major overhaul of the cables.
The back needs panels to keep it from sliding forward. The corners need latches. The confusers all need to go under the instrument instead of on top of it. Maybe that would free up enough space for a pointing device.
As cramped as it is, it's a function of what $30,000 in annual rent can afford. Want more space? Pay $50,000 in rent or $80,000 after everyone moves back.
The pointing device is the next big deal. Selecting files without a GUI is really slow.
There's not enough room for a mouse pad anywhere. Alternative pointing devices have gotten nosebleed expensive. The cheapest solution is the mighty $20 Perixx trackpad.
https://www.amazon.com/Perixx-PERIPAD-501-Professional-Wired-Touchpad/dp/B001CX85I8
It's 76x64mm.
Good trackpads are hundreds of doll hairs. Good trackballs start 3x more expensive than mice & a are bit bulkier than trackpads.
It's been 25 years, but balls have retro appeal & lions remember having a better experience with them than pads. Based on the memory, a trackball would be a better match than a trackpad for a stationary application. All modern trackballs are just upside down mice with optical sensors pointing up.
The best trackball is the $33 Kensington Orbit
https://www.amazon.com/gp/product/B07YVMXLQC
No dimensions are given, but it's as wide as a paw.
There is a thumb operated trackball
https://www.amazon.com/Wireless-Handheld-Finger-Trackball-Pointer/dp/B0057KL2AU/
But this would be impossible to draw annotations with.
There is a lot of interest in reusing macbook track pads as standalone devices, but the track pads themselves are SPI devices connected by a very fine pitch ribbon cable to the mane board. The brain that converts the keyboard & trackpad to a USB signal is on the mane board.
The touch pads extracted with the LCD panels have undocumented ELAN 33059 chips but appear to use I2C. The internet has never figured out how to use these.
There was a desire long ago to make a pointing device out of a webcam that tracked a blinking LED. It might be too low in resolution & too consuming of space.Both trackballs & trackpads are harder to draw on than mice. Given the need to draw annotations, using a phone as a trackpad may be the best option. An interface which takes both a stylus & paw is a big win. The phone can also show the recording interface. There's a lot of adware for using phones as trackpads.
-
Raspberry pi 4 busted
06/06/2021 at 04:41 • 0 commentsThe goal was to plug the monitors into the existing 4B which is used for sound processing. Things were going well with the raspberry pi 1B on a single monitor, but the 4B does not support 1366x768. The problem is it's a very uncommon mode in modern times so it was phased out in order to support dual HDMI.
They offered an explanation of the compromise:
https://www.raspberrypi.org/documentation/configuration/config-txt/pi4-hdmi.md
They do mention supporting a close 1360x768 resolution.
There's no way to disable scaling on the Novatek NT68676, so 1360x768 always has aliasing which makes it worthless for showing text. No scaled mode would allow individually addressing RGB triplets.
It would have been a bad day for anyone who just spent $200 on portable monitors of 1366x768 resolution.
There is a way to change the language which isn't documented anywhere. That allowed lions to search for a non existent way to disable scaling.
That leaves daisychaining the last 2 raspberry pi 1B's. There were once 3, but lions unwisely stripped the HDMI header from 1 to minimize its footprint. Many thoughts go through a lion's mind about the affordability of getting 2 new 1920x1080 monitors vs wrangling multiple raspberry pi's.
Relying on the sound processor to drive 2 displays & have enough clockcycles for sound processing always was a risky move.
Xorg can be run in 8 bit mode to get the fastest page turns. This requires adding another line to /boot/config.txt
framebuffer_depth=8
8 bit mode caused aliasing in the X direction, yet another unsupported mode. The best it could do was 16 bit.
framebuffer_depth=16
Page turn speed vs depth:
8 bit: 25fps
16 bit: 25fps
24 bit: 12fps
Faster page turns may be possible by writing to the framebuffer directly, but 25 was good enough.
With a simple network protocol & a bag of network cables, the 2 pages finally showed.
Next comes a power system. The combined panels draw 1.1A at 12V. The PI's draw a few more amps at 5V.