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:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -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 -----
|
||||
|
||||
Reference in New Issue
Block a user