# maximestevenot/automixsoftware architecture

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

- Interactive diagram: https://gitdiagram.com/maximestevenot/automixsoftware
- Repository: https://github.com/maximestevenot/automixsoftware

## Overview

##### Project type and purpose
- This is a desktop “full-stack” C#/.NET application (Windows Forms) that acts as an “intelligent DJ,” taking a user’s music collection, extracting audio features, running mix-ordering algorithms (AI), and producing a seamless output mix.

##### File structure
- Top‐level modules:
- Automix UI – WinForms presentation layer (Forms, IView interfaces, Presenter classes).
- Automix Data Management – core business logic for loading tracks, feature extraction, persistence, playback, and export.
- Automix AI – algorithmic engine: distance metrics (profiles) + sorting algorithms (genetic, simulated annealing).
- Automix Setup – installer script (Inno Setup).
- Tests – unit tests for Data Management and AI packages.
- External Libraries – Essentia executables, LAME encoder for audio analysis & processing.
- Solution & config files – .sln, .csproj, log4net.config, app.config.

##### README for additional insights
- Confirms C#/.NET 2017, Visual Studio solution, no web component, standard build & deployment.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer" 
        direction TB
        MainForm["MainForm"]:::frontend
        ParameterForm["ParameterForm"]:::frontend
        AboutForm["AboutForm"]:::frontend
        UserDocForm["UserDocForm"]:::frontend
        Presenter["Presenter"]:::frontend
        PresenterParameter["PresenterParameter"]:::frontend
        IViewWithParameters["IViewWithParameters"]:::frontend
        IViewWithTrackCollection["IViewWithTrackCollection"]:::frontend
        ListViewDrawer["ListViewDrawer"]:::frontend
        AutomixColorTable["AutomixColorTable"]:::frontend
        UI_log4net["log4net.config"]:::frontend
        UI_appconfig["App.config"]:::frontend
    end

    %% Application Layer
    subgraph "Application Layer (MVP)" 
        direction TB
        Presenter
        PresenterParameter
        IViewWithParameters
        IViewWithTrackCollection
    end

    %% Business Logic - Data Management
    subgraph "Business Logic: Data Management"
        direction TB
        Extraction["Extraction\n(IAudioDataExtraction, AudioDataExtractionProxy, ExecutableExtraction, DataBaseExtraction)"]:::business
        Model["Model\n(Track, TrackCollection, Settings)"]:::business
        Storage["Storage\n(DataBase, SettingsManager)"]:::persistence
        Exportation["Exportation\n(IExportation, SmoothMix)"]:::business
        Mp3Player["Mp3Player"]:::business
        AudioIO["AudioIO"]:::business
        Utils["Utils"]:::business
        DataMgmtProj["Automix Data Management.csproj"]:::business
    end

    %% Business Logic - AI Engine
    subgraph "Business Logic: AI Engine"
        direction TB
        DistanceMetrics["Distance Metrics\n(AbstractTracksDistance, Profiles, Distance interfaces)"]:::business
        SortAlgorithms["Sort Algorithms\n(AbstractSortAlgorithm, GeneticSortAlgorithm, SimulatedAnnealingSortAlgorithm)"]:::business
        AIProj["Automix AI.csproj"]:::business
    end

    %% Persistence Layer
    subgraph "Persistence Layer"
        direction TB
        DataBase["DataBase"]:::persistence
    end

    %% External Tools
    subgraph "External Tools / Libraries"
        direction TB
        Essentia["Essentia Tools\n(fadedetection.exe, streaming_extractor.exe)"]:::external
        LAME["LAME Encoder"]:::external
    end

    %% Installer
    Installer["Automix Setup\n(setup.iss)"]:::infra

    %% Unit Tests
    subgraph "Unit Tests"
        direction TB
        AI_Tests["AI Tests"]:::tests
        DM_Tests["Data Management Tests"]:::tests
    end

    %% Core Workflow Connections
    MainForm -->|handles clicks| Presenter
    ParameterForm -->|configures| Presenter
    Presenter -->|"LoadTrackList()"| Extraction
    Extraction -->|executes| Essentia
    Extraction -->|populates| Model
    Presenter -->|"ComputeDistances()"| DistanceMetrics
    DistanceMetrics -->|"provides distances"| SortAlgorithms
    SortAlgorithms -->|returns ordered list| Presenter
    Presenter -->|"ExportMix()"| Exportation
    Exportation -->|calls| LAME
    Presenter -->|"Play()"| Mp3Player
    Presenter -->|"Read/Write Settings"| SettingsManager
    Storage -->|reads/writes| DataBase
    Extraction -->|"Store features"| Storage
    AudioIO -->|utility| Extraction
    Utils -->|utility| All{All Business Nodes}
    All -->|log events| UI_log4net

    %% Tests connections
    AI_Tests -->|tests| DistanceMetrics
    AI_Tests -->|tests| SortAlgorithms
    DM_Tests -->|tests| Extraction
    DM_Tests -->|tests| Model
    DM_Tests -->|tests| Storage

    %% Installer connection
    Installer -->|deploys| MainForm

    %% Click Events - Presentation Layer
    click Presenter "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/Presenter.cs"
    click PresenterParameter "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/PresenterParameter.cs"
    click IViewWithParameters "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/IViewWithParameters.cs"
    click IViewWithTrackCollection "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/IViewWithTrackCollection.cs"
    click MainForm "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/Forms/MainForm.cs"
    click ParameterForm "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/Forms/ParameterForm.cs"
    click AboutForm "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/Forms/AboutForm.cs"
    click UserDocForm "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/Forms/UserDocForm.cs"
    click ListViewDrawer "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/Drawing/ListViewDrawer.cs"
    click AutomixColorTable "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/Drawing/AutomixColorTable.cs"
    click UI_log4net "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/log4net.config"
    click UI_appconfig "https://github.com/maximestevenot/automixsoftware/blob/master/Automix UI/App.config"

    %% Click Events - Data Management
    click Extraction "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Extraction/AudioDataExtractionProxy.cs"
    click Model "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Model/TrackCollection.cs"
    click Storage "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Storage/DataBase.cs"
    click Exportation "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Exportation/SmoothMix.cs"
    click Mp3Player "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Audio Playing/Mp3Player.cs"
    click AudioIO "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/AudioIO.cs"
    click Utils "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Utils.cs"
    click DataMgmtProj "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Automix Data Management.csproj"

    %% Click Events - AI Engine
    click DistanceMetrics "https://github.com/maximestevenot/automixsoftware/blob/master/Automix AI/Distances/AbstractTracksDistance.cs"
    click SortAlgorithms "https://github.com/maximestevenot/automixsoftware/blob/master/Automix AI/Sort Algorithms/GeneticSortAlgorithm.cs"
    click AIProj "https://github.com/maximestevenot/automixsoftware/blob/master/Automix AI/Automix AI.csproj"

    %% Click Events - Persistence
    click DataBase "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/Storage/DataBase.cs"

    %% Click Events - External Tools
    click Essentia "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management/External Libraries/Essentia/essentia_standard_fadedetection.exe"
    click LAME "https://github.com/maximestevenot/automixsoftware/tree/master/Automix Data Management/External Libraries/Lame/"

    %% Click Events - Installer
    click Installer "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Setup/setup.iss"

    %% Click Events - Tests
    click AI_Tests "https://github.com/maximestevenot/automixsoftware/blob/master/Automix AI Tests/Distances/SimpleTracksDistanceTest.cs"
    click DM_Tests "https://github.com/maximestevenot/automixsoftware/blob/master/Automix Data Management Tests/Extraction/AudioDataExtractionTest.cs"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,color:#004085;
    classDef business fill:#d4edda,stroke:#155724,color:#155724;
    classDef persistence fill:#ffeeba,stroke:#856404,color:#856404;
    classDef external fill:#e2e3e5,stroke:#6c757d,color:#6c757d;
    classDef infra fill:#f5c6cb,stroke:#721c24,color:#721c24;
    classDef tests fill:#fdfd96,stroke:#333333,color:#333333;
```
