[Wiki]4.Introduction to Pokitto Sound

Introduction to Pokitto’s sound abilities

Pokitto can make sound in various ways:

  • music streaming from the SD card as a continuous stream
  • beeps and boops (squarewave sounds) like the Arduboy and Gamebuino
  • synthesizer more complex sounds like saw waves & triangle waves, ADSR envelopes etc

Pokitto has 2 hardware output channels that are mixed together:

  • 8-bit DAC channel
  • 8-bit PWM channel

Because Pokitto has 2 hardware channels, it is possible to for example, stream music from SD card and play sound effects on the other at the same time.

##Introduction to the Synthesizer

Pokitto Synthesizer is a quite simple additive synthesizer. Its idea is to use as little memory and be as fast as possible. It was originally made for ATMega 328 MCU, which explains the way it is coded. The synthesizer source files are in the POKITTO_LIBS/Synth subdirectory.

The Synthesizer has the following features:

  • 3 independent oscillators
  • 5 waveform modes Off, Square, Saw, Triangle, Noise and SquareNoise. More will be added later
  • Effects Arpeggio, Pitch bending
  • ADSR envelope ADSR stands for Attack (how the sound begins), Decay (how the initial impact quietens), Sustain (how long the note stays on), Release how the note dies out

Programming synth sounds

4 Likes

I tested this example on Simulator and HW. It is worth mentioning that both of these defines should be in your “my_settings.h”:

#define PROJ_ENABLE_SYNTH 1
#define PROJ_ENABLE_SOUND 1

Also the global volume (the one given at startup screen) must be above 32 to be able to hear anything (at least on the simulator).