Orklev2 audio

From tweakoz/orkid · View interactive version

Orklev2 audio is an AI agent skill from the GitHub repository tweakoz/orkid. Answer questions about orkid's Singularity synthesizer engine, DSP processing, oscillators, filters, envelopes, modulation, sampling, FM synthesis, audio output, and program/bank structure. Use when the user asks about audio, synth, DSP, or sound.

How to use this skill

Skill file

Orkid Singularity Audio/Synth Engine Reference

When answering questions about audio or the synthesizer in orkid, consult the files below. All under ork.lev2/.

Key Files

| Component | Header |

|-----------|--------|

| Synth Engine | inc/ork/lev2/aud/singularity/synth.h |

| Layer (Voice) | inc/ork/lev2/aud/singularity/layer.h |

| DSP Blocks/Pipeline | inc/ork/lev2/aud/singularity/dspblocks.h |

| Program/Bank Data | inc/ork/lev2/aud/singularity/synthdata.h |

| Oscillators | inc/ork/lev2/aud/singularity/alg_oscil.h |

| Filters | inc/ork/lev2/aud/singularity/alg_filters.h |

| Amplitude/Gain | inc/ork/lev2/aud/singularity/alg_amp.h |

| Nonlinear/Distortion | inc/ork/lev2/aud/singularity/alg_nonlin.h |

| Envelopes | inc/ork/lev2/aud/singularity/envelope.h |

| Controllers/LFO | inc/ork/lev2/aud/singularity/controller.h |

| Modulation Routing | inc/ork/lev2/aud/singularity/modulation.h |

| Sampler | inc/ork/lev2/aud/singularity/sampler.h |

| Wavetable | inc/ork/lev2/aud/singularity/wavetable.h |

| FM Operators | inc/ork/lev2/aud/singularity/fmosc.h |

| TX81Z Emulation | inc/ork/lev2/aud/singularity/tx81z.h |

| CZ1 Phase Distortion | inc/ork/lev2/aud/singularity/cz1.h |

| Delays | inc/ork/lev2/aud/singularity/delays.h |

| DSP Buffer | inc/ork/lev2/aud/singularity/dspbuffer.h |

| Key On/Off | inc/ork/lev2/aud/singularity/konoff.h |

| Types | inc/ork/lev2/aud/singularity/krztypes.h |

| Audio Device | inc/ork/lev2/aud/audiodevice.h |

Architecture Overview

Execution Model

Signal Flow

Voice -> Layer -> Algorithm (multi-stage)
  -> DspStage 0 [Block0, Block1, ...] -> DspStage 1 -> ... -> OutputBus
    -> Insert Effects -> Master EQ -> Audio Device

Core Classes

Program/Bank Structure

BankData
+-- programs (int -> ProgramData)
+-- keymaps (int -> KeyMapData)
+-- multisamples (int -> MultiSampleData)

ProgramData
+-- name, tags, monophonic, portamento
+-- _layerdatas[] (multiple layers per program)
    +-- LayerData
        +-- _algdata (DSP algorithm)
        +-- _ctrlBlock (controllers)
        +-- _kmpBlock (keymap for samples)
        +-- loKey/hiKey, loVel/hiVel (range)
        +-- output bus routing

Oscillator Types

Filter Types

Envelope Types

Modulation System

DspParamData
+-- _coarse (base value)
+-- _fine (fine tuning)
+-- _keyTrack (keyboard follow)
+-- _velTrack (velocity follow)
+-- _mods (BlockModulationData)
    +-- _src1 (primary: LFO, envelope, etc.)
    +-- _src2 (depth modulation)

Custom evaluators: pitch, frequency, amplitude, or lambda-based.

Key On/Off

synth::keyOn(note, vel, program, keyonmods)
  -> Layer::keyOn(note, vel, layerdata, outputbus)
    -> Alg::keyOn() -> all DspBlocks, Controllers

How to Answer

  1. For DSP blocks: check dspblocks.h for base class, alg_*.h for specific types
  2. For modulation: read modulation.h for routing, controller.h for LFO/envelope sources
  3. For sample playback: read sampler.h for KeyMapData, MultiSampleData, SampleOscillator
  4. For program structure: read synthdata.h for BankData/ProgramData hierarchy
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.