How clementrivaille/godot-simple-sampler works
Core Components
a) Input Components (Top Layer):
• Sample Files Container (showing supported formats: .wav, .ogg)
• NoteSample Resources (showing properties: Stream, Tone, Octave, Velocity)
• Input Interface (showing play_note, release methods)
b) Processing Layer (Middle):
• NoteValueCalculator (Core Utility)
• -to-Value Conversion
• Value-to-Note Conversion
• Octave Calculation
• Sampler Base Class
• Envelope Processing (Attack, Sustain, Release)
• Pitch Calculation
• Sample Selection Logic
• SamplerInstrument Class
• Polyphony Management
• Chord Processing
• Glide/Glissando Processing
c) Output Layer (Bottom):
• AudioStreamPlayer Integration
• Audio Bus System Connection
• Sound Output
Specific features
Create sub-sections showing:
• Polyphony System
• Max Notes Management
• Queue
• Velocity System (0-10 scale)
• Gliding System
• Single Note Glide
• Chord Glide
Important Relationships
• Sample File → NoteSample Resource conversion
• NoteSample → Sampler loading
• NoteValueCalculator's global accessibility
• Sampler → AudioStreamPlayer inheritance
• SamplerInstrument → Sampler inheritance
Technical Details
Small technical notes showing:
• Supported note formats (C, C#, Db, etc.)
• Octave range
• Velocity range (0-10)
• File format support (.wav, .ogg)