My PyConDE 24 talk is online!

#Python #Son et vidéo #Musique #Flûte #Linux #Pyo

It took some time, but the video of my PyConDE 24 talk is now available on youtube!

For some reason, embedding is disabled for this video, so please click on the image below to see the video on youtube:

click here to see the video

You might also be interested in the companion post I’m mentioning in the talk (with slides and references).

I’m not very fond of the AI-generated description text they’re using on youtube, so let me quote below the description I wrote for the conference program:

Callbacks have become an ubiquitous programming technique that we use every day without even thinking about it. They are definitely handy in many situations, but sometimes they feel more like a burden than a help. In developing an interactive realtime audio processing system for use on stage in live music, we encountered such a situation. This talk will present how a few dozen lines adding a thin abstraction layer allowed us to replace a complex callback mess with tremendously more readable generators (yes, you know, those functions which yield results instead of returning them…).

At Les Chemins de Traverse we explore ways of “augmenting” acoustical musical instruments with new sonic possibilities offered by computers (think “augmented reality” for live music). For doing so, we are using Olivier Bélanger’s great pyo module for realtime audio processing. To make the system interactive, this module allows to register callbacks on some events. While this works great in many situation, it can get very cumbersome when we design a stateful system, where the same event must trigger different callbacks depending on the system’s inner state.

This talk will present how we developed a thin abstraction layer that allows us to replace many callback functions together with many registering/unregistering of these functions by a nice, streamlined generator definition that’s incomparably more readable than the many-callbacks version. This allows us to keep our mind focused on what’s important, namely supporting the music we want to play, instead of tedious boilerplate code.

While our use case is admittedly very specific, we believe that the ideas we present could be adapted in many other situations where callbacks are used for technical reasons, but lead to bulky and contrived code.