How mayfer/string_pluck works
Main Components
• User Interface (UI) Layer:
• index.html (and other HTML files in subfolders such as wavecomputer) provide the visual front end.
• Audio Engine / Processing Layer:
• Scripts like audio_shader.js, plucker.js, tonejs_midi.js, and various legacy worklet files (under the “legacy” and “legacy/worklet” folders) suggest that this layer handles sound synthesis, audio processing (using web audio worklets and shaders), and MIDI playback.
• MIDI and Sound Resource Management:
• The “midis” folder is a key repository containing MIDI files from various composers and genres. This resource likely enables the simulation to load and interact with pre-defined musical pieces.
• Legacy / Experimental Modules:
• The “legacy” folder contains several older or alternate implementations (like chopin.js, oscillator modules, and various experimental worklets) that may still influence current behavior or are available for fallback purposes.
• The “AppIcons” folder (with its both iOS and Android structures) shows that the project is tailored to be deployed as a mobile web or hybrid application.
Out Relationships and Interactions
• The Audio Engine works with Web Audio API components such as Audio Worklets—with files in “legacy/worklet” and audio_shader.js—to generate sound, possibly visualizing audio waveforms in sync with the UI.
• MIDI files provided in the “midis” repository are loaded (likely via tonejs_midi.js or similar modules) into the audio engine for synthesis or playback.
• Third-party libraries such as preact (via preact.htm.module.js) and tonejs libraries should be included to indicate integration points.