Auduino Slider Waveform Granular Synthesis

Now I have a version of the Auduino that will use a wavetable as the grain for the granular synthesis, I can start some alternative experiments, so first of all I thought I would try to use my slider potentiometers to build the wavetable.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

If you are new to Arduino, see the Getting Started pages.

Parts list

The Circuit

SliderPotMuxAuduino_bb

This takes the basic circuit from the PWM version of my 16-way slider potentiometer set up and adds five more potentiometers directly off A1-A5 to act as the control parameters for the Auduino synth.

I’ve cheated slightly and used several of my previous builds together here:

Note that I had to add some jumpers to my OLED shield to disable the OLED SPI link.  The OLED display uses SPI SCL and SDA which are mapped to A4 and A5 on the Arduino Uno. I did wonder about just using three pots for the Auduino, maybe just the controls for grain 1 and the sync frequency, but in the end decided I’d rather try with all five, so disabled the OLED. I could have wired it all up directly to the Arduino of course, without the shield, but the shield is quite convenient!  The circuit shown above uses the same pins as the shield.

IMG_5448

The Code

I started with the code from the Auduino Wavetable Granular Synthesis project and added in the multiplexer handling and wavetable building code from the Arduino MIDI Slider PWM Waveform Generator.  There isn’t really anything to add here that isn’t already discussed in these two projects.

I did pull out the wavetable initialisation and processing code into two functions – wavetableSetup() and wavetableLoop(), which need to be called from the Arduino’s setup and loop functions as you might expect.

The code has retained both MIDI functionality (which I’ve not used in this video) and a TEST mode that plots the waveform to the serial plotter (again, not used in the demo).  These are enabled using conditional compilation, but are pretty much untested.

The controls are mapped as follows:

  • A0 – this is the output from the multiplexer slider array.
  • A1 – sync frequency control.
  • A2 – grain 2 decay control.
  • A3 – grain 2 frequency.
  • A4 – grain 1 decay control.
  • A5 – grain 1 frequency.

In the photo (and the video), the pots are connected A5 to A1 from left to right on my 6-pot breakout.  The last, rightmost, potentiometer is unused.

Find it on GitHub here.

Closing Thoughts

The video starts with a very low sync frequency and the grain 1 adjusted so that you can pretty much only hear the grain itself.  You can therefore hear the difference when the slider pots build a new “waveform”.

It is really interesting to find the points where the tonality of the grain itself starts to get eclipsed by the sync frequency reaching audio frequencies itself.  You can hear this at around 1:10 in the video where I turn up the sync frequency.  This is fascinating to play with!

Kevin

 

Leave a comment