Week 8
This week I learned...
This week, I learned...
... how to set up NeoVim. I got a decent setup working using Kickstart. I got a LSP server stuff working for Rust and Typescript.
...how to use libevdev, a low-level linux kernel library for handling input events. I learned just enough to parse events from 3 separate drawing events. I used libevdev with libsoundio and my VoxBox Rust vocal synthesis DSP library to build some singing demos.
...a bit more about the tic80 sound engine. TIC-80, similar to PICO-8, is a fantasy console that can be used to make small games with early 8-bit console aesethetics. I've been attempting to inject my singing DSP code into the TIC-80 sound engine. It has been a humbling experience. This audio system is built quite strangely compared to other systems I've worked with.
...that NAND can be used to build AND, OR, and NOT. I've just started reading "The Elements of Computer Systems" (AKA the nand2tetris textbook), and have been reading the first chapter on boolean algebra and HDLs.
...a little bit of TypeScript and React. Just enough to port my first interactive singing synthesizer demo.
Saturday, July 6th
kickstart neovim / slider groups typescript react / rust-analyzer
Neovim setup
task: investigate-kickstart-neovim.
Got a neovim setup working with kickstart, language server works for both Rust (rust-analyzer) and Typescript (typescript-nvim). Learned a little bit about installing plugins with neovim.
React + Typescript: UI progress and porting webaudio bits
tasks: demo-react-UI, how-big-are-react-apps.
I've been trying to find excuses to learn React, and now with suggestions from others, I'm learinng Typescript too. So, I've been porting
Spent time writing more abstractions to match the slider groups in my singer UI. Did some initial work trying to get the webaudio JS code ported to typescript.
Also, learned how to export npm projects to minified JS. The total size of this app so far is 600kb, compared to the 12kb for my vanilla JS demo. A little bit yikes, but not unexpected. It is what it is.
TeX backend for resume generator
I've been yak-shaving my resume by building a new resume generator (as is tradition). I had an older CV I wrote using plain TeX (yup, just TeX, not LaTeX, because reasons), and used that to build a TeX backend. Now my resume has a markdown and TeX, and the markdown can be converted to HTML via pandoc.
Sunday, July 7th
Tasks: consider-drawing-tablet, investigate-tic80-audio, drawing-tablet-demo, investigate-css-codestudy, resume-setup, react-managing-state.
TIC-80 Sound Code / Drawing tablets for music? / Planning next demo.
Bought a mini drawing tablet to use as a musical interface, codestudy CSS debugging, studied audio code in TIC80, project details to my resume.
Monday, July 8th
Tasks: resume-setup, concept-concerto, investigate-tic80-audio, drawing-tablet-experiments, react-managing-state
tic80: buffers? / staggered voice algorithm, / wacom tablet fun
More studying of TIC-80 codebase to learn how audio works there, talk with Chirag, parsing Wacom Tablet events with libevdev, react reading (finished "managing state" yesterday), some planning of staggered voice algorithm.
Tuesday, July 9th
Drawing tablets. Lots / of singing drawing tablets. / So many tablets.
Tasks: LC75-scraper, demo-react-UI, drawing-tablet-experiments, consider-poke-follow-up
Borrowed two drawing tablets, managed to get them both working on my Linux machine using libevdev. Singing program written using a mix of C (libevdev, libsoundio) and Rust (VoxBox).
Spent way too much time trying to build a web scraper for the LC75 list. They really don't want you to scrape their pages! Lots of tools used in my attempts: wget, curl, selenium, jq, w3m.
More thoughts on Poke demo. Created some follow-up tasks.
Paired with Dan, got the rest of the typescript react demo working.
Wednesday, July 10th
I truly do not / understand how the sound works / inside TIC-80
Tasks: tic80-sine-tone, drawing-tablet-experiments.
Throwing singing synthesizers at innocent Recursers
Late morning. The first half of the day was spent playing with my XP-Pen drawing tablet that arrived in the mail. I got it hooked up to my drawing synth, and had a good time getting people to play around with it.
Some good ideas presented: somehow adding ostinato rhythms and grooves, and adding in fricatives when when you suddenly accelerate, and also adding virtual "bumps" in the space that cause frications to happen.
Sine tones in TIC-80... some attempts were made
Second half was spend trying to code in a sine tone in the TIC-80 audio system. I didn't get too far, and frankly I'm surprised at how difficult it is to do seemingly basic things like injecting a sine tone into the signal path.
A few difficulties in this codebase. First, the sound engine code is designed as if it were a low level virtual machine, which makes the code logic a little hard to follow. Second, there seems to be a lot of macro magic going on, so it is difficult to trace certain definitions in the codebase.
Towards the end of my tic80 troubleshooting, I just started putting printfs everwhere in a desperate attempt to see something - anything really - work.
Planning: chord generation algorithms for voice
Finally, I snuck in a few minutes inking down a few more ideas about chord generation in this ensemble interface I'm thinking about. I'm working towards having a single voice you control the pitch of, with two other voices automatically picking notes to form a triad. It is my hope that, delaying the notes chosen, otherwise known as "staggering", will cause some interesting "in-between" harmonies and tensions during the transitions from one stable triad to the next.
Thursday, July 11th
More sine tone attempts / More singing drawing tablets / All you need is NAND
Tasks: poke-sound-warning, drawing-tablet-demo, tic80-sine-tone, read-elem-compsys.
Added a sound warning to Poke.
To the person who opened my Poke demo in public and immediately shut it off after the first warble: I am sorry. I should have mentioned that there was sound.
There was another attempt to get tic80 sound working
I had more attempts to tic80 sound working. I found myself going outwards in the abstraction towards the OS audio callbacks again, and learned that my build was using the SDL backend. I also was figuring out more about the tic80's tick start/end mechanics, and how it relates to the audio callback. It would seem that because tic80's tick functions are managed inside of the drawing thread, audio timing is partially controlled by the drawing callback. Which is weird. I'm wondering if their "blip buffer" resampling solution is somehow involved in making this work. It's very strange code to follow, and there seems to be a lot of macro magic which makes it difficult to grep for stuff.
The singing tablet proof of concept is done
I basically "completed" my singing tablet demo. I took my experiment, refactored the wrong things (argument parser), then I refactored the right things (pulled the message handler out into another file), then finally added some pitch quantization, vibrato, and reverb.
I think I might have nerfed the experience with the pitch quanitization to be honest. It seems like the people I showed the quantized version to used it for less time compared to when it was "fretless". People really enjoyed the fluidic expressiveness of the pitch control and getting it to emote things using just inflection. Food for thought for another demo?
Career Meetings
I had my first career meeting today. They pegged me as a systems guy, which I think is a good fit? I do tend to think in terms of systems in my work, and so far quite enjoy what I've been reading about. I am rethinking my priorities slightly, and wondering if it's worth my time to do any more with frontend tools. I might shift my focus to more systems stuff.
Elements of Computer Systems
Partially motivated by my career meeting, I started more seriously diving into "Elements of Computer Systems", AKA the textboook used in nand2tetris. There is a hard copy of here at the RC library. I do like reading on paper instead of screen.
Reaching out about Computer Engineering
I pinged CE again about computer engineering stuff, and they gave me a treasure trove of things to look at. I am grateful for their thoughtfulness. I hope to look dig into that in the next couple days.
Friday, July 12th
some zettelkastens / directed acyclic graphs, / bytebeats, and trios
Tasks: dagzet-rust, demo-trio
Porting Dagzet To Rust
"dagzet" stands for Directed-Acyclic-Graph ZETtelkasten, and it is a markup language and tool I wrote for myself to produce knowledge graphs, such as the one I built specifically for RC.
The current implementation is written in Lua, but I thought it would be a neat challenge to try porting it to Rust. I spent time setting up some scaffolding: a comprehensive plan document for implementing, and then some initial boilerplate.
Initial Auto-chords in my "Trio" demo
I implemented some initial triad chord logic for my "trio" demo, based on the singing tablet experiment code I wrote earlier this week. The voice managment logic has been moved from the C bits of code to Rust. The goal is to look at less C code and more Rust