/** * SoundAnalysisMIDIMode — sound analysis → MIDI CC output (audio_in input). * * Schema declares `primary_input: 'audio_in'` and `engine_id: 'thru'` (no * synthesis). The full firmware pipeline feeds audio analysis features * (pitch / aperiodicity / energy / brightness / etc.) into the first 6 * input channels and joystick coords into the last 4. Stream 9 ships a * scaffold UI; mic capture + analysis wiring is a stream-10 task. */ import { Component, Show } from 'solid-js'; import { ModeShell } from './ModeShell'; import { useModeRuntime } from './mode-runtime'; import { VirtualJoystick } from '../primitives/VirtualJoystick'; import { OutputDisplay } from '../primitives/OutputDisplay'; import { SliderBank } from '../primitives/SliderBank'; import { LossPlot } from '../primitives/LossPlot'; import { paramsToSliderConfig, outputsToSliderValues } from './mode-helpers'; import { SoundAnalysisMidiSchema } from './generated/sound_analysis_midi_schema'; export const SoundAnalysisMIDIMode: Component = () => { const schema = SoundAnalysisMidiSchema; const runtime = useModeRuntime(schema); const sliderConfig = paramsToSliderConfig(schema.params); const sliderValues = () => outputsToSliderValues(runtime.processedOutputs(), schema.params); return ( (
{ /* read-only */ }} />

WebMIDI routing is wired up in stream 10. For now CC values are visible in the live readout.

)} primaryInput={() => ( <> runtime.setInput(x, y)} position={runtime.pipedInput} ariaLabel="Sound analysis joystick" /> } >
Mic input — TODO Stream 10 will request `getUserMedia` and feed audio analysis features into the MLP. For now you can still drive the model manually with the joystick below. runtime.setInput(x, y)} position={runtime.pipedInput} ariaLabel="Manual joystick fallback" />
)} outputArea={() => ( <> )} /> ); }; export default SoundAnalysisMIDIMode;