feat: load air-piano and hook hand modulation

Wire finger_piano.scd into both data-only boot paths so
OSCdef /pose/finger and ~fp* API are available at runtime.
Call ~fpModTick on every /pose/hands frame (~30 Hz) for
continuous air-piano modulation. Document FINGER_PIANO env
vars in CLAUDE.md.
This commit is contained in:
clement
2026-06-28 13:17:31 +02:00
parent 4cabf12eac
commit 764bf02dc8
4 changed files with 6 additions and 0 deletions
+3
View File
@@ -68,6 +68,9 @@ Toujours répondre en français à l'utilisateur. Code, commentaires de code, co
| `ICP_LIDAR_HOST` | _(unset)_ | iPhone ARBodyTracker IP when `ICP_FUSION=1` |
| `ICP_LIDAR_PORT` | `5500` | iPhone ARMesh TCP port |
| `ICP_LIDAR_EXTRINSIC` | `~/.config/av-live/lidar_extrinsic.json` | extrinsic JSON path |
| `FINGER_PIANO` | `0` | `1` enables air-piano finger strike emission from data_only_viz |
| `FINGER_STRIKE_VEL` | `0.02` | downward relative-velocity threshold for a strike (normalized image units/frame) |
| `FINGER_STRIKE_REFRACTORY_MS` | `120` | min ms between strikes per finger |
## Conventions globales
+1
View File
@@ -38,6 +38,7 @@ Routine({
"[boot.data-only] loading data_feeds OSCdef...".postln;
(~base ++ "control/data_feeds.scd").load;
(~base ++ "control/finger_piano.scd").load;
1.0.wait;
"[boot.data-only] loading web_bridge OSCdef + sync push...".postln;
+1
View File
@@ -509,6 +509,7 @@ OSCdef(\poseHands, { |msg|
~handFeat[\ropen] = msg[8];
~handFeat[\rspeed] = msg[9];
~handFeat[\dist] = msg[10];
~fpModTick !? { ~fpModTick.value }; // air-piano modulation continue
}, '/pose/hands');
// Body wrists (skeleton, tracked even when hands are occluded/too small).
+1
View File
@@ -149,6 +149,7 @@ Routine({
// -- 5) OSCdef des flux data_feeds -----
(~repoRoot ++ "control/data_feeds.scd").load;
(~repoRoot ++ "control/finger_piano.scd").load;
0.5.wait;
// -- 6) Bibliotheque de scenes -----