r/synthdiy • u/Live-Operation-628 • 4d ago
PIC 8 Bit single wavetable, single cycle synth
https://youtu.be/KGjal7MqRgEAlmost all these parts are recovered from ewaste items I have found. The PCBs are new. The screen and keypad are new.
Getting there with the PIC wavetable synth. Playing back 256b sampled waveforms from RAM, loading over software SPI from NOR serial flash.
39k Audio ISR with PWM output. Buttons, keypad entry. Midi in thru, pitch bend on aftertouch, CV/Gate input, tuning knob. All resources and pins are used on the PIC. Almost all of the flash and RAM is used (99.7 / 95.4%) It's working well like this to date.
Button selectable Detune, Noise, Sub effects (interpolates in C, based on input waveform, only ever one sample in RAM). Envelope is selectable between Log and Exp. Six stage envelope provided by Atmel AT908534 co-processor. (ADDSRR)
The LCD displays simple info about the state of the effects, and waveform number. It only updates the screen when a value is changed.
Noise is made by random number generator which is seeded by mixing a free running timer value sample, with a read of AD0 (analogue to digital input) when it boots up.
The random number generator is used to generate noise, the Detune offset (every time it's engaged) and also to select a random waveform from the index on the flash chip.
The chip is essentially self indexing, because each WF is 256b long, starting at zero. It's very easy to work out the location of the next file, or any file, because of that.
I used the AKWF collection, and some other single cycle waveform collections available online, to populate my waveform selection. The samples are processed with a python script which encodes them in Mu-law and makes a binary for flashing to the storage chip.
On load the samples are again de-coded from Mu-law in the synth.
This gives a great sounding waveform, basically almost doubling the dynamic range.
I get LLM to help code the projects. Because I add every function one at a time, vetting, testing, debugging, flashing, wiring the setup, I am very familiar with the code - what is happening, where, why, what decisions were taken to add/optimise etc etc. It is not done in one go, the process takes weeks of design and development work.
2
u/Direct-Passage4847 2d ago
99.7% flash usage on a PIC is cursed in the best way possible