Babyface Pro - michaelforney/oscmix GitHub Wiki

Babyface Pro

iPad to Device

Interface Settings (Sub ID 0)

[0-15]	mask?
[16-30]	new value

[0]	clock source (0=internal 1=optical)
[6]	eq for record
[10]	optical out (0=ADAT 1=SPDIF)

Mixer (Sub ID 1)

[0-11]	26*output + input (0-11 input, 12-23 playback)
[12-31]	level (reference 20000000), negative if phase inverted

Loopback (Sub ID 2)

[0-15]	output channel
[16]	loopback enabled

Input Channel Settings (Sub ID 3)

[0-15]	what changed
[16-30]	current state

[0]	AN1 48v
[1]	AN2 48v
[4]	AN1 pad
[5]	AN2 pad
[15]	AN1->2

Input Channel Gain (Sub ID 4)

[0-15]	channel
[16-23]	gain
	see https://github.com/stistrup/rme-gain-kernel-patch?tab=readme-ov-file#gain for mic channels
	value / 2 for inst. channels

EQ/Low Cut (Sub ID 6)

The payload consists of 16 32-bit integers.

Payload index Description
0 EQ/lowcut control
1 Band 1 $a_1 / a_0$
2 Band 1 $a_2 / a_0$
3 Band 1 $b_1 / b_0$
4 Band 1 $b_2 / b_0$
5 Band 2 $a_1 / a_0$
6 Band 2 $a_2 / a_0$
7 Band 2 $b_1 / b_0$
8 Band 2 $b_2 / b_0$
9 Band 3 $a_1 / a_0$
10 Band 3 $a_2 / a_0$
11 Band 3 $b_1 / b_0$
12 Band 3 $b_2 / b_0$
13 Product of $b_0 / a_0$ for each band
14 Low cut filter $1 - k$
15 Unknown, seems to always be 0

The first payload integer is divided up into several fields.

Bits Description Details
0:7 EQ index 0-21, must not be used by another channel
8 Low Cut pole 1 0=off 1=on
9 Low Cut pole 2
10 Low Cut pole 3
11 Low Cut pole 4
16:19 Channel index 0-11
20 Channel type 0=input 1=output
31 Enabled 0=disabled 1=enabled

The Babyface Pro can enable EQ on up to 21 channels. Each channel with EQ and/or lowcut enabled must be assigned an EQ index (for lack of a better term) from 0-20. When EQ is enabled on a channel, the lowest available EQ index is chosen. When EQ is disabled on a channel, that EQ index becomes free again and can be used to enable EQ and/or lowcut on another channel.

The next 13 payload integers encode the coefficients of the DSP biquadratic filters used to implement the three EQ bands. These coefficients are encoded in 5:27 signed binary fixed point. For example, -2.375 is encoded as 11101_101 00000000 00000000 00000000, i.e. -3 + (0x5000000 * 2^-27) = -3 + 0.625 = -2.375.

The coefficients are normalized in both the numerator and denominator, and the overall gain is collected into a single coefficient.

$$H(z) = \left(\frac{b_0}{a_0}\right) \frac{1 + \frac{b_1}{b_0} z^{-1} + \frac{b_2}{b_0} z^{-2}}{1 + \frac{a_1}{a_0} z^{-1} + \frac{a_2}{a_0} z^{-2}}$$

Using this scheme, we need 4 coefficients per band, plus one additional coefficient for the overall gain (13 total).

See the Audio EQ Cookbook for coefficient formulas for various filter types. TotalMix uses the "peakingEQ", "lowShelf", and "highShelf" filter types.

The low cut function uses a fixed filter with a single coefficient, applied once for each low cut pole bit set earlier. This results in a 6 dB/oct, 12 dB/oct, 18 dB/oct or 24 dB/oct low cut filter.

$$\begin{gather*} k = \frac{1}{\frac{2 \pi c f_0}{f_s} + 1} \\\ H(z) = \frac{k - k z^{-1}}{1 - k z^{-1}} \end{gather*}$$

$f_0$ is the cutoff frequency in Hz, and $f_s$ is the sample rate in Hz. $c$ is a correction factor depending on the filter order, $1, 0.655, 0.528, 0.457$. This is done to keep the gain at the cutoff frequency at -3 dB for each filter order.

The coefficient is encoded in payload index 14 as $1 - k$.

Request State (Sub ID 16)

subid=16 with no payload sent every ~0.1 second

Device to iPad

Device State (Sub ID 0)

fifth and seventh hex both change from 0 to 8 when entering mix mode

word 0
	[30]	clock source 0=optical 1=internal
	[29]	dim button
	[28]	select button
	[27]	out button
	[26]	mix button
	[25]	set button
	[24]	in button
	[20:21]	input 0=ch1/2, 1=ch3/4, 2=opt
	[16:19]	rotary encoder
	[8:9]	output 0=ch1/2, 1=phones, 2=opt
word 1
	[0:7]	output 1 vol/pan
	[9:16]	output 2 vol/pan
word 2
	[23:30]	output 4 vol/pan
	[14:21]	output 3 vol/pan
	[7:13]	channel 2 gain
	[0:6]	channel 1 gain
word 3
	[19:23]	channel 3 gain
	[24:28]	channel 4 gain
	[9:17]	as2 vol/pan
	[0:7]	as1 vol/pan
word 4-27	input 1-12 rms
word 28-43	playback 1-8 rms

output volume

db = 6 + (val - 0xFF) / 2

RMS level meter continued. (Sub ID 1)

word 0-7	playback 9-12 rms
word 8-11	fx in rms?
word 12-35	output 1-12 rms
word 36-39	fx out rms?

Peak level meter (Sub ID 2)

word 0-11	input 1-12
word 12-23	playback 1-12
word 24-25	fx in peak?
word 26-37	output 1-12
word 38-39	fx out peak?

rms levels given in 64-bit low high pair peak level full scale reference 08000000

⚠️ **GitHub.com Fallback** ⚠️