Skip to content

Inspect Mode — runtime introspection #7

Description

@christoph-hart

Overview

Implement the inspect mode for real-time introspection of the running HISE instance. All read-only — examining CPU, voices, module state, MIDI activity, connections, and routing.

Entry

> /inspect
[inspect] >

Commands

# Performance
cpu                    # CPU usage, buffer size, sample rate, voice count
memory                 # memory usage breakdown
voices                 # active voice list with note, velocity, module, age

# Module State
modules                # module tree with bypass/CPU status indicators
<name>                 # inspect specific module (params, state, children)

# Signal Flow
connections            # modulation connections list
routing                # audio routing matrix

# Live Monitoring
midi                   # live MIDI event monitor (Esc to stop)

Output Examples

[inspect] > cpu
  Audio Thread:    12.3%
  Sample Rate:     44100 Hz
  Buffer Size:     512
  Voices:          8 / 256

[inspect] > modules
  MasterChain          SynthChain         ●  12.3%
    Interface          ScriptProcessor    ●
    Sampler1           StreamingSampler   ●   8.1%
      GainAHDSR        AHDSR              ●
      SimpleGain1      SimpleGain         ○  (bypassed)
    Reverb1            SimpleReverb       ●   2.1%

[inspect] > midi
  Listening for MIDI... (Esc to stop)
  12:34:01.234  Note On    C4   vel: 100  ch: 1
  12:34:01.456  Note On    E4   vel: 80   ch: 1

MIDI Monitor

The midi command is a live stream — it continuously displays incoming MIDI events until Escape is pressed. In CLI mode, it runs for a specified duration or until interrupted:

hise-cli inspect midi --duration 5000 --json

Tasks

  • Implement cpu command (query HISE for performance data)
  • Implement voices command (query active voices)
  • Implement modules command (tree display with status indicators)
  • Implement module detail view (params, state, children)
  • Implement connections command (modulation connections)
  • Implement midi live monitor (streaming output, Esc to stop)
  • Structured output for all commands (table, tree, keyvalue types)
  • CLI support with --json flag for all commands

Dependencies

  • Phase 1 (Command Engine Core)
  • Phase 2 (Mode System)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions