dzlonline / the_synth

A simple to use 4 polyphonic wavetable synthesizer library for Arduino.
336 stars 68 forks source link

Sampling longer waves (arrays) #14

Open novusabeo opened 6 years ago

novusabeo commented 6 years ago

Hello!

Been really enjoying this project. Had no idea Arduino could make such great sounds. I've been experimenting converting single cycle .wavs to c arrays and testing different waves with the voices. Theres an awesome project where you can check out all kinds of single cycle waveforms and then use a simple c program called wav2c to convert them to c arrays: Was wondering -- is there a way to have the synth engine cycle through longer waves? I know it's capped it 128 or 256 (can't seem to figure out which). If i wanted the engine to play longer arrays via another non-PROGMEM source -- like an SD card or somewhere with more space for longer arrays. I know in essence I could have each voice trigger a different wave in sequence thus creating a single 4x wave -- but hoping to have it uniform with a single voice.

Is there a way to do that? Even expanding the wavetable length x 2 (512) would make it to the moon!!

nathanRamaNoodles commented 6 years ago

You can try https://github.com/nathanRamaNoodles/MusicWithoutDelay-LIbrary

novusabeo commented 6 years ago

Thanks. I found a pretty good alternative — can have the wavs be cycled through on the hardware side using a pot to select and essentially run through each wav. Still trying to figure out how I would initialize different wavetables from alternative sources.

Able to set up ~ 50 to arrays (waves) in the PROGMEM space while maintaining a decent amount of free space. Not really an issue at this point. Not sure about reading from an SD as opens and closes would probably detract from looping triggers. But not sure i’m using this code as directly intended. We’ll see where it goes!