Open Klave

Tutorial 7: Detect the Pad, Fader, and Knob movements via ADC

Detect Pad, Fader and Knob Movements via the Analog to Digital Converter (ADC) and DMA

We’re going to dive in to both the DMA and the ADC in this tutorial.

read more

Tutorial 8: Colors! using the serial peripherial interface (SPI)

Colors!

In this tutorial we’re going to figure out how to light up the pads and buttons, as well as read their current values, via the SPI. Our research into the pad colors yields a meaningful improvement over the factory operating system: we can use timing and animation to cycle the red, green, and blue LED cycles and achieve 1000s of distinct colors, where the factory default only permits 17.

read more

Tutorial 9: Compile-time testing in C-ish

Compile-time testing in C-ish

Open Klave is written in C, but its target architecture is a piano, not the development computer. It can be difficult creating data structures and abstractions for a different chip. You don’t know stuff works until you try to run it.

In this tutorial we review C-ish, which is my term for writing in C, except we also permit the constexpr keyword from C++17 on, and we use a C++ compiler. By writing in C-ish, we can dramatically reduce the complexity of our operating system by mostly sticking to C conventions. But the constexpr keyword will permit some compiler testing and sanity-checking before anything is transmitted to the device.

We will finish by examining Open Klave’s “Global Event Stack,” and write some compile time tests. And we’ll consider some caveat and limitations to this approach.

read more