tebillus · projects

 

"audlayers"

is a room-aware music system,
a small program that watches a room through an ordinary camera,
and with loaded music
it adds and removes layers and instruments
according to how many people are in the room

all you really need
is to work with a music producer
to create an arragement for the room
that gets people immersed in the sound
as if it's the music in their head

the current setup is the following:

  loop:
    frame ← camera.capture()                # every frame, 320x240
    every 5th frame:
        people ← count(detector(frame))     # class 0 = person
    if people changed:
        fire person_detected / person_left
    audio: keep exactly `people` tracks looping, mixed into one output
 

i've made two versions of it so far;
a prototype written in python
and another with minimal dependecies (alsa, etc.) written in c

here are the figures, with where each one comes from;

the prototypepython, 84 lines: camera → yolo every 5th frame → looping layers
the version meant to ship (read from the source)c, 1,223 lines: v4l2 camera, hand-mixed alsa output, explicit state machine
what is not real in that c program yetthe detector and the mp3 decode; both are placeholders
camera320 × 240 yuyv, 4 buffers, 2 s timeout
audio44.1 khz stereo, mixed in 4,096-frame blocks ≈ 93 ms, hardware buffer 8,192 ≈ 186 ms
layers at once / tracks it can hold16 / 64
how often it counts (derived)1 frame in 5 ≈ 6 counts a second at 30 fps
tracks in the demo list1, so the demo as committed shows exactly one layer
flicker guard, tracking, beat gridnone, in either version
measurements of it runningnone exist yet
what the c version needs at run timealsa, lgpl, dynamically linked; no model, no python, no network

the source for the prototype is public on gitlab

for any questions, message me on x @ tebillusassort