# steverussell33/aepelzensparasites architecture

> Architecture diagram of the GitHub repository steverussell33/aepelzensparasites, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/steverussell33/aepelzensparasites
- Repository: https://github.com/steverussell33/aepelzensparasites

## Overview

##### Main Components

a. Plugin Core Layer:
- Main plugin entry point (AepelzensParasites.cpp)
- Module implementations (Tapeworm.cpp, Tides.cpp, Warps.cpp)
- Configuration handling (plugin.json)

b. Firmware Emulation Layer:
- Parasites firmware components (organized by module)
- DSP processing units
- UI controllers
- Resource managers

c. Hardware Abstraction Layer:
- Driver emulations
- Hardware interface adaptations
- CV/Gate handling

##### Component Relationships

- Data flow between VCV Rack engine and plugin modules
- Signal processing chains within each module
- Resource management and sharing between components
- Mode switching mechanisms
- UI interaction paths

##### Specific Module Implementations

a. Wasp/Tapeworm (Warps-based):
- Signal processing paths
- Mode switching system
- Delay line implementation (Tapeworm)
- DSP algorithms for each mode

b. Cycles (Tides-based):
- Envelope generation paths
- Harmonics processing
- Mode switching system
- Wavetable implementation (optional)

##### Implementation Details

Key aspects:
- Module initialization flow
- Parameter handling
- Mode switching logic
- Resource loading and management
- Signal processing chains
- Error handling paths

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph VCV_Integration
        VCV[VCV Rack Engine]
        Plugin[Plugin Entry Point]:::core
        Config[Plugin Configuration]:::core
    end

    subgraph Module_Layer
        Tapeworm[Tapeworm Module]:::module
        Tides[Tides Module]:::module
        Warps[Warps Module]:::module
    end

    subgraph DSP_Layer
        TidesDSP[Tides Generator]:::dsp
        WarpsDSP[Warps Modulator]:::dsp
    end

    subgraph HAL
        TidesDrivers[Tides Drivers]:::hal
        WarpsDrivers[Warps Drivers]:::hal
    end

    subgraph UI_Control
        TidesUI[Tides UI Controller]:::ui
        WarpsUI[Warps UI Controller]:::ui
    end

    subgraph Resource_Management
        TidesRes[Tides Resources]:::resource
        WarpsRes[Warps Resources]:::resource
    end

    VCV --> Plugin
    Plugin --> Config
    Plugin --> |Initialize| Module_Layer

    Tapeworm --> WarpsDSP
    Tides --> TidesDSP
    Warps --> WarpsDSP

    TidesDSP --> TidesDrivers
    WarpsDSP --> WarpsDrivers

    TidesUI --> TidesDSP
    WarpsUI --> WarpsDSP

    TidesRes --> TidesDSP
    WarpsRes --> WarpsDSP

    %% Click events for component mapping
    click Plugin "https://github.com/SteveRussell33/AepelzensParasites/blob/master/src/AepelzensParasites.cpp"
    click Config "https://github.com/SteveRussell33/AepelzensParasites/blob/master/plugin.json"
    click Tapeworm "https://github.com/SteveRussell33/AepelzensParasites/blob/master/src/Tapeworm.cpp"
    click Tides "https://github.com/SteveRussell33/AepelzensParasites/blob/master/src/Tides.cpp"
    click Warps "https://github.com/SteveRussell33/AepelzensParasites/blob/master/src/Warps.cpp"
    click TidesDSP "https://github.com/SteveRussell33/AepelzensParasites/blob/master/parasites/tides/generator.cc"
    click WarpsDSP "https://github.com/SteveRussell33/AepelzensParasites/blob/master/parasites/warps/dsp/modulator.cc"
    click TidesDrivers "https://github.com/SteveRussell33/AepelzensParasites/tree/master/parasites/tides/drivers"
    click WarpsDrivers "https://github.com/SteveRussell33/AepelzensParasites/tree/master/parasites/warps/drivers"
    click TidesUI "https://github.com/SteveRussell33/AepelzensParasites/blob/master/parasites/tides/ui.cc"
    click WarpsUI "https://github.com/SteveRussell33/AepelzensParasites/blob/master/parasites/warps/ui.cc"
    click TidesRes "https://github.com/SteveRussell33/AepelzensParasites/tree/master/parasites/tides/resources"
    click WarpsRes "https://github.com/SteveRussell33/AepelzensParasites/tree/master/parasites/warps/resources"

    classDef core fill:#4a90e2,stroke:#2a6cb7,color:white
    classDef module fill:#67b246,stroke:#4a8032,color:white
    classDef dsp fill:#50e3c2,stroke:#2cb79b,color:white
    classDef hal fill:#b4a7d6,stroke:#8e7cc3,color:white
    classDef ui fill:#f5a623,stroke:#d4850f,color:white
    classDef resource fill:#9013fe,stroke:#7011ca,color:white

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Module Components]:::module
        L3[DSP Processing]:::dsp
        L4[Hardware Abstraction]:::hal
        L5[UI Controllers]:::ui
        L6[Resources]:::resource
    end
```
