Scene 04: Functional TCode Generation¶
Script¶
Goal¶
Build multi-channel control signals from functional operators (Phase, Tempest, Cosine, Expr) and output as TCode.
Main Pipeline¶
Phase -> Tempest -> Expr
Phase 1 -> Cosine -> Expr
Expr/Cosine -> TCode -> Serial Out
Steps¶
- Import the script and start
PyEngine. - Confirm timing link
Tick.tickMs -> TCode.intervalMs(both100by default). - Verify signal paths:
Phase -> Tempest -> Expr.xandPhase 1 -> Cosine -> Expr.y. - Review
Expr.code(current:x*(y*0.5+0.5)) to confirm mixing behavior. - Ensure output mapping is correct:
Expr.out -> TCode.L0/R0,Cosine.value -> TCode.L1. - Configure and enable
Serial Out; inspect behavior withTCodeViz,Text Viz, andWave Viz.
Key Parameters¶
Phase.hz:0.69(main rhythm)Phase 1.hz:0.1(slow modulation)Tempest.eccentric:0.77(waveform shape)TCode.intervalMs:100
Validation¶
Wave Vizshows clear phase/amplitude variation forTempest,Cosine, andExpr.Text Vizcontinuously refreshesTCodestrings.TCodeVizand serial output stay synchronized without abrupt jumps.
Image Placeholders¶
docs/media/images/scenarios/scene-04-overview.pngdocs/media/images/scenarios/scene-04-waveforms.png