We investigate in this paper the applicability of the notion monad streams to media stream programming, and, more specifically, audio processing and control. Simply said, a monad stream is sort of a list guarded by a monad action that returns either nothing when the stream is over, or, otherwise, just the current value of the stream and the guarding action of its continuation.
Applied to the IO monad, it appears that monad streams can be used for modeling both input streams and output streams, with full control of the possibly synchronism between input and output streams in stream functions. This allows for defining both synchronous or asynchronous functions, or any combination of both notions.
In the abstract, this opens quite intriguing and generic solutions towards programming systems that are globally asynchronous and locally synchronous (GALS). In the concrete, applied to real-time audio, this allows for combining, in a fairly simple and unified way, both (synchronous) audio processing and (asynchronous) audio control. As far as performance are concerned, our proposal allows non-trivial transformation of audio streams at 44100 Hz with a 10ms latency, a performance comparable to functional programing languages dedicated to real-time audio processing such as FAUST.
1996, PhD in Computer science, Bordeaux University,2005, Habilitation à diriger les recherches, Bordeaux University Since 2015, team leader of the research project PoSET.