Posts | Comments

Planet Arduino

Archive for the ‘wavetable synthesis’ Category

A popular tool in chiptune software like LSDJ allows the user to draw a waveform and use it as the basis for a wavetable synth. It’s fun and it can produce some great bleeps and bloops. [Kevin] has created a similar tool using an Arduino and a touchscreen.

You can draw the waveform! That’s neat.

The build is based on the Arduino Uno, the humble mainstay of the Arduino line. It’s hooked up to an ILI9488 color touchscreen display, which acts as the primary user interface. Using a stylus, or presumably a finger, the user can draw directly on the screen to specify the desired waveform for the synth to produce. The Arduino reads the step-by-step amplitude values of the drawn waveform and uses them to synthesize audio according to MIDI messages received over its serial port. Audio output is via PWM, as is common in low-cost microcontroller projects.

It’s a fun build and we’re sure [Kevin] learned plenty about wavetable synthesis along the way. We’ve seen his work on other Arduino synthesis projects before, too! Video after the break.

Apr
27

Slick Six-Voice Synth for AVRs

arduino, arduino hacks, AVR, musical hacks, wavetable synthesis Comments Off on Slick Six-Voice Synth for AVRs 

He started off making an AVR synthesized guitar, but [Erix] ended up with much more: a complete six-voice AVR wavetable synthesis song machine that’ll run on an ATMega328 — for instance, on an Arduino Uno.

If you’re an AVR coder, or interested in direct-digital synthesis or PWM audio output, you should have a look at his code (zip file). If you’d just like to use the chip to make some tunes, have a gander at the video below the break.

It’s pretty sweet to get six channels of 31.25 kHz sampled 8-bit audio running on a 16MHz chip. The code underlying it works through some tricky optimization in the sample update routine (UpdateVoiceSample() in play.c if you’re reading along) and by carefully prioritizing the time critical elements.

For instance, the pitch is updated once every two PWM samples, I/O and other auxiliary player tasks every eights samples, and the sound’s dynamic volume envelope is only recalculated every 48 samples. Doing the slow math as infrequently as possible lets [Erix] make his timing.

And to round out the tools, [Erix] also provides wavetable editors and song generators in Lua to compile the tables of music data that the AVR routines need to run.

If you’re not impressed by this bit of AVR C coding, then you’ve not tried to implement something similar yourself.


Filed under: Arduino Hacks, musical hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook