Add musical optimization examples and modernize C++ code#1
Open
thorinside wants to merge 2 commits into
Open
Conversation
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds three new musical applications that demonstrate how
to use the NGAL genetic algorithm library for audio synthesis and
music parameter optimization:
synth_optimizer.cc - Waveform synthesis parameter optimizer
oscillator_params.cc - Oscillator parameter optimizer
filter cutoff, and resonance
rhythm_evolution.cc - Rhythm pattern evolution
Also includes:
These examples demonstrate practical applications of genetic algorithms
for musical parameter optimization, sound design, and pattern generation.