scieee AI-readable full text Open interactive document viewer

A Mixed Timing Method for Designing Natural Rhythms in Real-Time Media

Audry, Sofian

Abstract

Timing is a core expressive material of real-time media. Practitioners regularly need to generate periodic events at controlled paces such as blinking lights or rhythmic sounds. Since strict periodicity often feels artificial and machinic, a common approach consists in adding randomness to create a more organic, less predictable cadence. However, simple jittering approaches that inject noise directly into the period or frequency of a process provide limited control and can distort the expected timing. This report presents a method that overcomes these limitations by generating irregular but statistically reliable event sequences. Based on the Poisson distribution, it preserves the desired long-run event rate while allowing variability to be modulated precisely, yielding rhythms that feel natural without compromising timing accuracy. We compare several approaches and introduce a mixed Poisson model that offers a continuous, intuitive control over randomness, from stable metronome-like pacing to expressive, burst-like irregularity. Practical implementation on embedded systems with limited computational resources is also presented, demonstrating that the method is expressive and lightweight.

Full text

mXlab December 2025 MX-25-01-EN A Mixed Timing Method for Designing Natural Rhythms in Real-Time Media Sofian Audry Abstract Timing is a core expressive material of real-time media. Practitioners regularly need to generate periodic events at controlled paces such as blinking lights or rhythmic sounds. Since strict periodicity often feels artificial and machinic, a common approach consists in adding randomness to create a more organic, less predictable cadence. However, simple jittering approaches that inject noise directly into the period or frequency of a process provide limited control and can distort the expected timing. This report presents a method that overcomes these limitations by generating irregular but statistically reliable event sequences. Based on the Poisson distribution, it preserves the desired long-run event rate while allowing variability to be modulated precisely, yielding rhythms that feel natural without compromising timing accuracy. We compare several approaches and introduce a mixed Poisson model that offers a continuous, intuitive control over randomness, from stable metronome-like pacing to expressive, burst-like irregularity. Practical implementation on embedded systems with limited computational resources is also presented, demonstrating that the method is expressive and lightweight. Keywords: generative media, interactive media, periodic processes, Poisson distribution, random processes, real-time media. A mXlab technical report Université du Québec à Montréal http://mxlab.uqam.ca This document is licensed under the Creative Commons license Attribution-ShareAlike 4.0 International To view a copy of the license, visit: https://creativecommons.org/licenses/by-sa/4.0/deed.en Introduction Real-time media such as interactive installations, live electronic music performances, immersive spaces, video games, and robotic art, frequently rely on temporal repetition to generate effects and shape experiences. Arduino’s Blink sketch and Max/Pd’s metro objects are emblematic of this reliance on pacing. From simple toy programs to complex artworks such as audiovisual performances and robotic installations, the structuring of time through periodic events constitutes a fundamental design layer. Temporal control is not merely a technical scheduling issue, but a core expressive concern that mediates perception and interaction (Emmerson 2017). Perfect periodicity, however, often feels machinic: a perfectly timed ticking may convey an unintended feeling of automation. Human performers, whether in music or dance, typically introduce slight variability in timing, known as microtiming, which shapes perception and expressivity (Johnson and Gotham 2023; Gullö and Bromham 2025). In real-time media, the same principle applies: irregularity conveys a sense of aliveness. When designing such systems, it is often more intuitive to think in terms of period or frequency rather than in terms of event probability. Artists and designers want to specify actions in temporal units that align with human experience: “once every second,” “about five times per minute,” or “at a regular beat of 120 beats per minute (BPM).” These quantities are directly relatable to everyday rhythms, whether in bodily movement, musical tempo, or cycles in nature. By contrast, reasoning in terms of an abstract probability per step feels less connected to human temporality and harder to control in practice. Examples abound in digital creative practice: fast blinking lights, audiovisual pulses, breathinglike modulations, robotic behavioral patterns, or evocative sonic events. All rely on temporally controlled repetition, where the balance between regularity and unpredictability defines aesthetic outcomes. Yet, it is not enough to blindly add randomness. Different contexts ask for different levels of irregularity: sometimes just a gentle fluctuation to make a repetitive process feel more natural, at other times more chaotic processes with sudden bursts and long pauses to create surprise and 2 contrast. The ability to adjust the level of randomness is therefore essential. What is needed are strategies that let practitioners intuitively specify “about once every Tseconds”, while also shaping how tight or loose the rhythm should feel. This paper presents different approaches to generating irregularities in periodic processes. We begin by showing two simple ways that are based on period and frequency jittering. Analyzing these processes shows important implicit limitations. This leads us to propose alternative eventgeneration processes based on the Poisson distribution (Poisson 1837), a probability law designed specifically to represent such random event processes.1 Period Jittering Let us start with the following Plaquette (Audry and Fredericks 2025) code, which creates a metronome unit that triggers once per second, toggling the built-in LED on and off each time it fires: const float BASE_PERIOD = 1.0f; Metronome metro(BASE_PERIOD); DigitalOut led(LED_BUILTIN); void begin() {} void step() { if (metro) led.toggle(); } The most straightforward way to introduce randomness to such a process is simply to add noise to the timer by varying the interval by a random amount at the end of each repetition. Considering a base period Tbase and a noise level εbase ∈[0,1), the period Tnat step nis chosen by randomly sampling noise εnfrom the range [−εbase, εbase]and adding it to the next interval: Tn= (1 + εn)Tbase (1) 1Siméon Denis Poisson derived this distribution to model wrongful convictions in a given country by counting the number of rare events that occur during a given time interval. 3 Example with εbase = 0.2(20%): const float NOISE = 0.2f; ... void step() { if (metro) { metro.period( (1 + randomFloat(−NOISE, +NOISE)) *BASE_PERIOD ); led.toggle(); } } Naive period jittering provides a simple and intuitive way to introduce noise to periodic processes with simple code. The zero-centered noise guarantees that it is unbiased in the periodic domain, meaning that the average interval is equal to the base interval Tbase: E[Tn] = E[(1 + εn)Tbase] = Tbase (2) Its long-run event rate R, which corresponds to how often things happen on average if you watch for a long time, is also unbiased: R= lim t→∞ N(t) t=1 E[Tn]=1 Tbase =Fbase.(3) For example, if you run a period jittering process with a Tbase of one second, for a duration of 1000 seconds, you should expect to trigger events approximately 1000 times, and the average period will be one second. However, these bias properties come at a cost: the process constrains variability to a narrow, regular band around a fixed interval bounded superiorly by twice the base period Tbase. Indeed, the amount of noise εbase needs to be bounded in [0,1) so that it never exceeds the oscillation period, which could result in a negative period or frequency. The period remains bounded such that Tn∈(0,2Tbase). This results in relatively monotonic randomness (see Fig. 1), whereas natural processes often have 4 Figure 1: Event raster for period jittering, Tbase = 1, uniformly sampled noise at different levels εbase. As is shown, higher noise increases the jitter but the period Tnis bounded between 0and 2. bursts, pauses, and rare unbounded events. Frequency Jittering Naive interval jittering inevitably introduces bias in the conjugate domain: period jittering preserves E(Tn)but biases E(Fn), while frequency jittering preserves E(Fn)but biases E(Tn). This is a direct consequence of the convex nonlinearity T=1 Fnand F=1 Tn. One way to understand this is to consider how, as εbase →1, the boundaries of Tntend towards (0,2Tbase)while the corresponding boundaries of Fnapproach (1 2Tbase ,∞). This is especially problematic when doing frequency jittering, where the frequency, rather than the period, is randomly modified after each event. In the frequency domain, the update rule for frequency Fnbecomes: Fn= (1 + εn)Fbase (4) 5 Figure 2: Event raster for frequency jittering, Fbase = 1, uniformly sampled noise at different levels εbase. As is shown, although the frequency Fnis bounded between 0and 2, the upper bound of the corresponding period Tnexplodes with high levels of noise. Example with εbase = 0.5(50%): const float NOISE = 0.5f; const float BASE_FREQUENCY = 1.0f; ... void step() { if (metro) { metro.frequency( (1 + randomFloat(−NOISE, +NOISE)) *BASE_FREQUENCY ); led.toggle(); } } Poisson Timing Poisson timing circumvents the limitations of both period and frequency jittering. It picks intervals randomly, not from a uniform range, but from an exponential distribution of waiting times. In very simple terms, Poisson timing replaces the bounded uniform jitter with an unbounded distribution of intervals. Events can occasionally cluster (bursts) or be widely spaced (pauses), yet still preserve a specific long-run average rate. This property makes Poisson timing qualitatively different from naive jittering: 6 • It does not constrain events to a narrow range around the base period. • It naturally produces variability at different scales, including both micro-irregularities and rare, longer gaps. • It guarantees that the long-run event rate Requals the desired base frequency, without introducing bias. The Poisson process is well-suited to describe many real-world temporal phenomena where events occur irregularly yet with a well-defined average rate: •Physical systems: radioactive decay of atoms; arrival of cosmic rays at a detector; photon counts in a photodiode. •Biological systems: neuronal spikes in the brain; heartbeats with irregular rhythms; random seed dispersal events in plants. •Animal and human behavior: arrival of customers at a service desk; keystrokes while typing; timing of coughs, sneezes, or blinks. •Social and urban processes: cars passing a checkpoint; pedestrians entering a space; phone calls arriving at a call center. These examples show that the Poisson distribution captures irregular but structured rhythms that occur across scales, from the micro (molecular or neuronal events) to the macro (flows of people or vehicles). For real-time media, this means adopting a model that resonates with patterns already found in the world, providing a perceptually more natural sense of rhythm and flow. Mathematically, a Poisson process with rate parameter λ(average events per second) is defined such that the probability of observing kevents in a time interval tis given by: P(N(t) = k) = (λt)k k!e−λt (5) From this definition, one can show that the intervals Tnbetween events are distributed according to an exponential law with mean 1/λ: 7 P(Tn≤t) = 1 −e−λt (6) which yields the sampling rule: Tn=−1 λlog U(7) where U∼ U(0,1) is a uniform random number. This is the core mechanism: pick a uniform random number Ubetween 0and 1, apply the logarithm transformation, and scale by the base period. The result is a natural, bursty rhythm with the correct long-run event rate. The critical limitation of period jittering is that it constrains the variability to a narrow, regular band around a fixed period, resulting in a process that remains machine-like, just slightly perturbed. By contrast, Poisson timing yields an exponential distribution of intervals: most events occur near the mean, but occasionally very close or very far apart. These bursts and gaps produce a texture that feels alive, much closer to natural processes. From an artistic standpoint, this qualitative shift is the central reason to adopt Poisson-based methods. Yet, Poisson distribution does not suffer from the interval explosion of frequency jittering, because probabilities of picking outliers decreases exponentially. Thus, it ensures that the perceived pace matches the target long-run rate R=λby directly controlling the distribution of Tnwith mean 1/λ. Here is an example implementation of the Poisson timing in Plaquette. void step() { if (metro) { float u = max(randomFloat(), FLT_MIN); // makes sure u > 0 metro.period( −BASE_PERIOD *logf(u) ); led.toggle(); } } 8 Figure 3: Event raster comparison of Poisson timing with period and frequency jittering, Fbase = 1, uniformly sampled noise εbase = 0.999. Poisson Mix The Poisson distribution has a shortfall: it is not possible to directly control the level of randomness εbase. With pure Poisson timing (εbase = 1), inter-arrival intervals Tnfollow the exponential law and may vary wildly, occasionally clustering or leaving long gaps. While this is desirable for naturalistic textures, it may be too irregular for some design contexts. A simple solution is to mix the exponential distribution with the deterministic base period, using εbase as a mixing factor: Tn= (1 −εbase)Tbase +εbase (−1 λlog U)(8) where U∼ U(0,1) is a uniform random variable and λ= 1/Tbase. This equation can be further simplified: Tn= (1 −εbase)Tbase −εbaseTbase log U =Tbase −εbaseTbase −εbaseTbase log U =Tbase(1−εbase(1 −log U))(9) 9