Project Structure

Understanding the 1500+ projects in the solution file

1,538
Total .vcxproj files
13
Our actual projects
1,525
From dependencies

❓ Why 1500+ Projects?

CMake's FetchContent downloads each dependency's entire source tree and generates Visual Studio projects for everything — including examples, tests, benchmarks, and documentation targets that we never build or use.

The biggest culprit is Eigen — a header-only math library that ships with 1,400+ example programs, each generating its own .vcxproj. None of these are compiled during a normal build.

📊 Project Count Breakdown

SourceWhat It IsProjectsUsed?
Eigen Linear algebra (header-only). Projects are examples/tests/demos/BLAS. 1,462 95% unused
Catch2 Unit test framework. 2 libs + build helpers. 5 test only
GLFW Window/input library. Main lib + examples. 5 1 used
GLAD OpenGL loader. Single lib + build targets. 4 1 used
PortAudio Cross-platform audio I/O. Static lib + extras. 2 1 used
ImGui Immediate-mode GUI. Compiled as our own static lib. 0 via imgui_lib

CMake meta ALL_BUILD, INSTALL, ZERO_CHECK — generated by CMake. 47 auto-generated
Our code The actual Modal Synthesis application. 13 all used

Visual proportion

Eigen 1,462 (95.1%)
Other deps + CMake
Our code: 13 (0.8%)

🎯 Our 13 Projects (The Ones That Matter)

Core Library

libmodal/
modal_lib — Static library. FEM, eigensolver, synthesis, meshing. Links CUDA + Eigen.

Application

modal_viewer/
modal_viewer — The main executable. OpenGL viewer, ImGui UI, PortAudio audio. Links modal_lib + all deps.

UI Support

imgui_lib — Static lib wrapping Dear ImGui (docking branch) + GLFW/OpenGL3 backends.

Tests (7 projects)

tests/
test_fem_assembly — K,M matrix assembly
test_eigensolve — GPU/CPU eigensolver
test_oscillator — Modal oscillator
test_audio_synthesis — CUDA audio kernel
test_radiation — Radiation coefficients
test_triangulator — Mesh generation
test_strike_buffer — Lock-free event queue

CMake Generated (3)

ALL_BUILD — builds everything
ZERO_CHECK — CMake re-configure check
INSTALL — install target (unused)

📦 Dependencies Explained

LibraryVersionRoleHow We Use It
Eigen 3.4+ Linear algebra Sparse matrices (K, M), dense eigensolvers, SimplicialLDLT. Header-only — no .lib is compiled from Eigen itself.
CUDA Toolkit 12.6 GPU compute cuSOLVER for dense eigenproblems, custom CUDA kernels for audio synthesis. Not fetched by CMake — system install.
GLFW 3.3+ Windowing Creates the OpenGL window, handles keyboard/mouse input. Compiles to glfw3.lib.
GLAD — GL loader Loads OpenGL 4.5 function pointers at runtime. Single C file → glad.lib.
Dear ImGui docking User interface Toolbar, panels, mode buttons, sliders, charts. Compiled into imgui_lib.lib with GLFW + OpenGL3 backends.
PortAudio — Audio output Real-time audio callback at 44.1kHz, 512-sample buffer. Compiles to portaudio_static_x64.lib.
Triangle 1.6 2D meshing Delaunay triangulation of polygons and rings. Single C file compiled directly into modal_lib.
Catch2 3.x Testing Unit test framework. Only linked by tests/ executables, not the main app.

🔗 Build Dependency Graph

What actually gets compiled and linked when you build modal_viewer:

modal_viewer.exe ├── modal_lib.lib (our FEM/audio library) │ ├── Eigen3 (headers only, no .lib) │ ├── CUDA::cudart, cusolver, cublas (system) │ └── triangle.c (compiled into modal_lib) ├── imgui_lib.lib (ImGui + backends) ├── glfw3.lib (window/input) ├── glad.lib (OpenGL loader) ├── portaudio_static_x64.lib (audio I/O) └── Windows: opengl32.lib, kernel32.lib, user32.lib, ...

Total: 5 static libraries linked. The 1,462 Eigen projects are never compiled — Eigen is header-only. They exist because CMake generates a project for every example in Eigen's source tree.

🙈 What to Ignore in the Solution

When you open ModalSynth.sln in Visual Studio, the Solution Explorer shows ~1500 projects. Here's what to collapse/ignore:

Folder / ProjectActionWhy
_deps/eigen-build/🔽 Collapse & ignore1,462 examples/tests/demos. Never compiled.
_deps/catch2-build/🔽 CollapseTest framework internals.
_deps/*-subbuild/🔽 CollapseCMake FetchContent download helpers.
ALL_BUILDIgnoreMeta-target that builds everything.
ZERO_CHECKIgnoreTriggers CMake reconfigure if CMakeLists changed.
INSTALLIgnoreInstall target (we don't use install).

modal_viewer⭐ Set as StartupThe main application.
modal_lib⭐ Core libraryFEM, synthesis, meshing.
imgui_lib⭐ UI libraryDear ImGui + backends.

🔨 Quick Build Commands

You don't need Visual Studio to build — use the batch files:

build_release.bat → D:\Claude_modal\build\modal_viewer\Release\modal_viewer.exe
build_debug.bat   → D:\Claude_modal\build\modal_viewer\Debug\modal_viewer.exe

These call MSBuild directly on modal_viewer.vcxproj, which builds only the 5 required projects (~30s). Not the 1,500+ unused ones.