Stochastic Music with Band-Pass Filters, 1: Ideas

Mar 18 2023 · LastMod: Mar 18 2023

Actually the passing probabilities here are non-passing probabilities, but whatever. Nothing really changes. I'll correct those things later.

General Settings

Let $S = [20,22000]\subset \mathbb{R}$. Suppose that there is a linearly ordered sequence of frequencies $X = \{x_i\}_i$ with $i=1,...,n$ and $x_i < x_j$ for $i<j$, and a band-pass filter $F_B$ with allowed band $[b_1, b_2] = B\subseteq S$. For simplicity, assume that $F_B$ as a filter has a high Q is perfect, so that $F_B$ can really be seen as $$ F_B = (\operatorname{Id} \cdot \chi_B,\chi_B): S \to \mathbb{R}\times \{0,1\} : x \mapsto \begin{cases} (x,1) & x\in B \\ (x,0) & x\notin B \end{cases}\quad , $$ then $F_B$ (can be regarded as a function that) takes $X$ to $X\cap B$.

Now suppose that $B$ is randomised. By this we mean for $B=[b_1,b_2]$, the numbers $b_1, b_2$ are now seen as (measurable, but we don't need to be that rigorous) functions $b_1, b_2: S \to \mathcal{F}$ associated to a probability function $P$ on a probability space $(S,\mathcal{F},P)$. The condition $b_1 < b_2$ now translates, in general, to $P(b_2 < b_1|b_1) = 0$. The dependency introduced by this might have interesting applications, but we put it aside for the time being. If we regard $b_1,b_2$ as independent and as random variables in two different probability spaces then upon appropriate modifications we only need to ensure that $\operatorname{max}[\operatorname{dom}b_1] < \operatorname{min}[\operatorname{dom}b_2]$.

Low-Pass Filter

A low-pass filter is realized by putting $b_1$ alone as a random variable and keeping $b_2$ fixed.

Given a low-pass filter $F_B = F_c$ where $c$ (c ut-off) stands for $b_1$ associated to a probability function $P$, and further has a probability density $\rho_c$, the probability for a frequency $f$ to pass is given by, $$ \mathsf{Pass}_L(f) = \int_S h_f \rho_c $$ where $h_f$ is the shifted Heaviside function for $f$, i.e. $$ h_f(x) = \begin{cases} 1 & x>f \\ 0 & x\leq f\end{cases}\quad . $$

For a linearly ordered sequence of frequencies $\{f_i\}$, if $f_i$ passes, each $f_j$ with $j\geq i$ passes, hence $f_i$ really stands for the subsequence $\{f_j\}$ given by $j \geq i$, the probability for the subsequence $\{f_j\}$ to pass can be characterized by $\mathsf{SPass}_L(f_j) = \mathsf{Pass}_L(f_j) - \mathsf{Pass}_L(f_{j+1})$.

Single-Band Filter

Let the (perfect) filter pass the frequencies $f \in [b_1,b_2]$ and let $S=[20,22000]$. If the random variables $b_1,b_2$ are independent (i.e. with appropriate changes in the probability spaces $\operatorname{max} \operatorname{dom} b_1 \leq \operatorname{min}\operatorname{dom} b_2$), given probability densities $\rho_{b_1}, \rho_{b_2}$, $$ \mathsf{Pass}(f) = \int_S (1-h_f(y))\rho_{b_2}(y) \int_S h_f(x) \rho_{b_1}(x) dx dy = \mathsf{Pass}_{H}(f)\mathsf{Pass}_{L}(f) $$ where $h_f: \mathbb{R}\to \{0,1\}$ is the (shifted) Heaviside step function; $\mathsf{Pass}_H(f)$ and $\mathsf{Pass}_L(f)$ are the passing probabilities of $f$ for High- and Low-pass filters with cutoffs $b_2$, $b_1$.

For a sequence of frequencies $\{f_i\}_i \subset S$ that is strictly ordered by '$<$' inherited from $\mathbb{R}$ s.t. $i< j$ then $f_i < f_j$, let $F_{mn}$ be the subsequence $\{f_m,...,f_n\}$. There is a notion of the passing probability of a subsequence $F_{mn}$: $$ \mathsf{SPass}(F_{mn}) = \int_S (1-h_{f_n}(y))\rho_{b_2}(y) \int_S h_{f_m}(x)\rho_{b_1}(x)dx dy = \mathsf{Pass}_{H}(f_n) \mathsf{Pass}_{L}(f_m). $$ This should be regarded as the probability for a certain timbre to appear. The function $\mathsf{SPass}$ can be regarded as an partial order-reversing homomorphism from the space $\mathsf{Sq}$ of subsequences $\{F_{mn}\}$ with the order given by subsequence inclusions to $[0,1]$ with the obvious order. A further characterization of $F_{mn}$, given by $$ \mathsf{sPass}_L (F_{mn}) = \mathsf{SPass} (F_{m,n}) - \mathsf{SPass}(F_{m+1,n}) $$ and $$ \mathsf{sPass}_H (F_{mn}) = \mathsf{SPass} (F_{m,n}) - \mathsf{SPass}(F_{m,n-1}), $$ would be handy, since the pair given by these two functions captures that which is unique to a certain timbre.

Groupoid Structure

In fact there is a groupoid structure lurking behind that is worthy of further study. Via the quantities on the RHS of $$ \mathsf{SPass}(F_{m,n+q}) - \mathsf{SPass}(F_{m,n}) = \mathsf{SPass}(F_{n,n+q}), $$ the function $\mathsf{SPass}$ endows $\mathsf{Sq}$ with the structure of a groupoid $\mathcal{G}$: the objects are subsequences $F_{mn}$ identified with $\mathsf{SPass}(F_{mn})$, the morphisms are $\mathsf{SPass}(F_{n,n+q})$ which are identities when the value of $\mathsf{SPass}(F_{n,n+q})$ is zero.

Convoluting $\mathcal{G}$ over a ring $R$, the groupoid $\mathcal{G}$ is made into a groupoid convolution algebra $R(\mathcal{G})$, that characterises, or should characterise,

  1. by the representation of elements, the different routes from a timbre to another one.
  2. by the algebra product, the "real distances" between two timbres.

but what the ring $R$ corresponds to is unclear, and is subject to further studies.

To probe $R$, it is instructive to study an example. For the time being what I can think of is modelling the hydrogen spectral series in soundwaves and convolute the groupoid as in Old Quantum Theory, Special: Algebra of observables from convolution. This I'll do next.