A simple additive synthesizer.
Many thanks to my friend, Uzay Islek, who guided me through the intricacies of music theory and provided feedback on my ideas; the project would not have moved forward without his musical expertise.
Overall, create a simple additive synthesizer in Python.
- Implement four basic oscillators: sine, square, triangle and sawtooth
- Implement a "mixer" which:
- Is able to handle several "tracks"
- Can change the level/volume of the "tracks" in the mix
- Is the interface for making any changes on the actual "track"
- Compiles all the "tracks"
- The "track" will be an internal object which will be responsible for:
- Compiling the oscillator assigned to this track using a step sequence
- Implement a scripted step-sequence - a way to write sheet music as code
- Explore existing solutions:
- Update (11.06.2024): Create a parser for abc notation - clean syntax, get sheet music, and easily expandable.
- Implement envelopes and ADSR for oscillators
- Improve sound richness by adding harmonics - a new oscillator class (?)
- Implement filters e.g. low pass, or high pass
- Add samples from real instruments
- Create a GUI for the synthesizer
- Implementing sheet-music into code may prove to be a huge challenge...
- May require some simplifications
- Making more complex sounds could be computationally expensive
- Can explore HPC technqiues or store data of samples
import pysyn
mix = pysyn.Mixer()
mix.add_track(
osc=pysyn.Oscillator(wave=pysyn.Oscillators.SIN),
steps=[...], # Step sequence of some song
name='Track 1'
)
mix.set_level(track='Track 1', level=0.7)
mix.add_filter(
track='Track 1',
filter=pysyn.LowPassFilter(cutoff=440),
start=5 # seconds
)
mix.compile_play()
For current progress refer to example.py
.
- Additive synthesis - https://en.wikipedia.org/wiki/Additive_synthesis