Skip to content

Conversation

@thorinside
Copy link
Owner

This commit adds three new musical applications that demonstrate how
to use the NGAL genetic algorithm library for audio synthesis and
music parameter optimization:

  1. synth_optimizer.cc - Waveform synthesis parameter optimizer

    • Finds optimal harmonic amplitudes to approximate target waveforms
    • Demonstrates additive synthesis parameter discovery
    • Example: synthesizing sawtooth waves from harmonics
  2. oscillator_params.cc - Oscillator parameter optimizer

    • Finds musically interesting synthesizer parameter combinations
    • Optimizes 6 parameters: frequency, FM depth/ratio, wave shaping,
      filter cutoff, and resonance
    • Balances spectral richness with musicality
  3. rhythm_evolution.cc - Rhythm pattern evolution

    • Evolves musically interesting 16-step rhythm patterns
    • Optimizes for syncopation, density, and dynamic range
    • Creates patterns with velocity and articulation information

Also includes:

  • MUSICAL_APPLICATIONS.md - Comprehensive guide for musical applications
  • Updated Makefile to build new examples
  • Modernized C++ code to work with current compilers
    • Replaced deprecated _G_uint32_t with standard uint32_t
    • Replaced deprecated _G_config.h with stdint.h
    • Fixed compatibility issues with modern glibc

These examples demonstrate practical applications of genetic algorithms
for musical parameter optimization, sound design, and pattern generation.

This commit adds three new musical applications that demonstrate how
to use the NGAL genetic algorithm library for audio synthesis and
music parameter optimization:

1. synth_optimizer.cc - Waveform synthesis parameter optimizer
   - Finds optimal harmonic amplitudes to approximate target waveforms
   - Demonstrates additive synthesis parameter discovery
   - Example: synthesizing sawtooth waves from harmonics

2. oscillator_params.cc - Oscillator parameter optimizer
   - Finds musically interesting synthesizer parameter combinations
   - Optimizes 6 parameters: frequency, FM depth/ratio, wave shaping,
     filter cutoff, and resonance
   - Balances spectral richness with musicality

3. rhythm_evolution.cc - Rhythm pattern evolution
   - Evolves musically interesting 16-step rhythm patterns
   - Optimizes for syncopation, density, and dynamic range
   - Creates patterns with velocity and articulation information

Also includes:
- MUSICAL_APPLICATIONS.md - Comprehensive guide for musical applications
- Updated Makefile to build new examples
- Modernized C++ code to work with current compilers
  - Replaced deprecated _G_uint32_t with standard uint32_t
  - Replaced deprecated _G_config.h with stdint.h
  - Fixed compatibility issues with modern glibc

These examples demonstrate practical applications of genetic algorithms
for musical parameter optimization, sound design, and pattern generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants