Skip to main content


Showing posts from February, 2022

Decode Morse code from a wave file using SQLite

A recent programming puzzle from Wunderdog caught my interest for one simple reason: it had the word wave file in it. Music and audio-related technology is something close to my heart. Besides, I have not had a DIY project related to music in a while, so why not look into it. The conundrum is straightforward. A wave file contains morse code, and one must decode it to dash and dot letters. The choice of technology is free. A pragmatic developer would look into some popular audio processing library - in my case, something written in go - and write a simple program. I had something different in mind, though. I've recently read The Art of PostgreSQL book and done some exercises in more advanced Postgres features. Why not apply the lessons learned in morse code parsing? The outcome is Endeavour , a no-frills Python wrapper + some exotic SQL window functions. It is neither fast nor pretty, but it proves that analyzing waveform files with SQLite is possible.