Audio Feature Core (f8.audiofeat.core)¶
Audio SHM core feature extraction service (rms, onset, centroid).
- Service class:
f8.audiofeat.core - Version:
0.0.1 - Source directory:
f8/audiofeat/core - Tags:
audio,feature,rms,onset,centroid
When to Use¶
- Use
f8.audiofeat.coreto extract continuous audio features such as loudness, peak level, spectral centroid, and spectral change. - It is a good fit for audio-driven visuals, device control, silence detection, and general energy tracking.
- In many graphs it is the foundation of the audio analysis path.
Common Wiring Patterns¶
- A common chain is
f8.audiocap -> f8.audiofeat.core -> f8.pyengine. - If you just want to inspect the analysis result, route the output to
f8.viz.textor another lightweight visualizer. - For smooth control behavior, follow it with operators such as
Range Map, filters, or envelope shaping.
Pitfalls / Gotchas¶
- Raw energy ranges are often source-dependent, so normalization or remapping is usually needed before driving sensitive controls.
- Larger
windowMstends to improve stability; smallerhopMsimproves responsiveness but raises CPU cost. - If the module is producing numbers but the graph behavior feels erratic, inspect input level and feature range before rewriting downstream logic.
Service Reference¶
How to Run¶
pixi run -e default f8pyaudiofeat_core
- Workdir:
../../../../ - Environment overrides: none
Typical Inputs / Outputs¶
- Data inputs: none
- Data outputs:
coreFeatures,monitor - Commands: none
Service State Fields¶
| Name | Access | Required | On Node | Schema | Description |
|---|---|---|---|---|---|
audioShmName |
rw |
true |
true |
string / default= |
Audio SHM mapping name (e.g. shm.audiocap.audio). |
channelMode |
rw |
true |
true |
string / enum[mono_mix, left, right] / default=mono_mix |
Channel selection for analysis. |
windowMs |
rw |
true |
true |
integer / default=768 |
Feature analysis window size in milliseconds. |
hopMs |
rw |
true |
true |
integer / default=64 |
Feature analysis hop size in milliseconds. |
emitEveryHops |
rw |
true |
true |
integer / default=1 |
Emit one coreFeatures payload every N analysis hops. |
lastError |
ro |
true |
false |
string / default= |
Last runtime error string. |
active |
rw |
true |
false |
boolean / default=True |
Service lifecycle state (activate/deactivate). |
svcId |
ro |
true |
false |
string |
Readonly: current service instance id (svcId). |
Key Fields That Matter¶
audioShmName(Audio SHM,rw): Audio SHM mapping name (e.g. shm.audiocap.audio). Schema:string / default=.channelMode(Channel Mode,rw): Channel selection for analysis. Schema:string / enum[mono_mix, left, right] / default=mono_mix.windowMs(Window (ms),rw): Feature analysis window size in milliseconds. Schema:integer / default=768.hopMs(Hop (ms),rw): Feature analysis hop size in milliseconds. Schema:integer / default=64.emitEveryHops(Emit Every Hops,rw): Emit one coreFeatures payload every N analysis hops. Schema:integer / default=1.lastError(Last Error,ro): Last runtime error string. Schema:string / default=.active(Active,rw): Service lifecycle state (activate/deactivate). Schema:boolean / default=True.svcId(Service Id,ro): Readonly: current service instance id (svcId). Schema:string.
Service Commands¶
None
Service Data Input Ports¶
None
Service Data Output Ports¶
| Name | Required | On Node | Schema | Description |
|---|---|---|---|---|
coreFeatures |
true |
true |
object{hopLength, onsetEnvelope, onsetStrength, rms, ...} |
Core feature payload with onset envelope history. |
monitor |
true |
false |
object{active, alive, cpu, error, ...} |
Unified runtime monitor snapshots (health/resource/perf/error). |
Operators¶
None