Create audio spectrum
create_spectrumBuild an FFT audio-spectrum analyzer that exposes N separate frequency-bin channels (band0..band{N-1}) on a Null CHOP. Bind these channels to drive a bank of bars or pick a specific frequency.
Instructions
Build an FFT audio-spectrum analyzer that exposes N separate, ready-to-bind frequency-bin channels (band0..band{N-1}) on a Null CHOP. This is the per-band complement to extract_audio_features (which only gives overall level + bass/mid/treble): bind a row of parameters to op('…/spectrum/spectrum')['band0'], ['band1'], … to drive a bank of bars, or pick one frequency. A Sensitivity knob scales every band. Source can be the live device (mic/line — may prompt for macOS permission), an audio file, a synthetic oscillator (for testing), or an existing CHOP. Use extract_audio_features when you want coarse level/bass/mid/treble bands instead of N fine bins, create_audio_reactive for a ready-made spectrum visual, and feed this Null into bind_audio_reactive to drive a COMP.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bands | No | Number of frequency bins to expose as separate, bindable channels (band0..band{N-1}). 16 or 32 is typical; higher = finer frequency resolution. | |
| source | No | Audio source. 'device' = live microphone/line in (the real-world default; creating it may pop a one-time macOS microphone-permission dialog — click Allow). 'file' = an audio file. 'oscillator' = a synthetic tone (white noise → energy in every band, handy for testing without any device permission). 'existing_chop' = reuse a CHOP you already have. | device |
| parent_path | No | Parent COMP path the self-contained 'spectrum' container is created inside. | /project1 |
| audio_file_path | No | Audio file path (source='file'). | |
| expose_controls | No | Expose a live 'Sensitivity' knob (a gain over every band channel). | |
| existing_chop_path | No | Path of an existing audio CHOP to analyze (source='existing_chop'). |