Thursday, February 28, 2013

Juno6pm Input Board: The Software

While looking for examples of bit banging serial, I came across this AVR library called AVR lib. It is a great library for lazy people like myself, not only for serial bit banging, but for anything else you might want to do with the AVR peripherals: ADC, UART, I2C, timers... should be able to finish the code quickly with this cool library.

Wednesday, February 27, 2013

Juno6pm Input Board: The hardware

The Juno6pm input board is the board that will handle MIDI input (to solve the CPU hogging issue caused by Raspberry Pi USB MIDI), the knobs and the switches. It will be connected to the Raspberry Pi through serial. The board I am planning on using is the AVR synth that I bought a while ago from elby-designs:

Since this whole project is a virtual analog synth, I decided that I will not be using my AVR Synth anymore and I better give it a better use (also I have little time do design a new board, build the pcb, solder components, etcetera).
The idea is to keep the 8 potentiometers, replace the 16 switches with momentary pushbuttons and remove the dac completely.
As for the software that will run in the AVR, it will receive MIDI from standard 5 Pin MIDI connector using the hardware UART and send it to the Raspberry Pi, toghether with potentiomer and switches values, by bit banging serial.
Once I am done with the whole project I might think of making a new board just for this project, but till then this will be my juno6pm input board.

Tuesday, February 26, 2013

AVR programming: Open Source saves the day

It was a long time since I last program an AVR micro and last time I did it I was using this programmer:
That I got from microcontroller shop.

So I installed AVR studio 6.0 in my Windows PC (which took ages, BTW), wrote a blinking LED program, set up the programmer and to my surprise flashing the ATMEGA failed. Seems like AVR Studio does not support this particular flavour of programmer. So I went back to AVR Studio 4.XX (don't remember the XX, but the latest AVR studio 4 available in Atmel's website) with same results. After searching for alternatives, I found WinAVR, which I managed to get to work fairly easily (with the help of ladyada's avrdude tutorial). Since it was using AVRDUDE for flashing and that is available for Linux also (and the nice atmel IDE was not good for me anymore), I decided to forget about Windows completely and develop for AVR in Linux. Found this explanation on how to use codeblocks for AVR programming, which is great, cause all the project (the VA synth and the Monome stuff) I did using codeblocks already, so that means I have the whole thing using a single development environment.
So, big thanks to everyone who anonymously helped me get this to work and in general to the open source comunity.

Monday, February 25, 2013

Next Steps

Here is a list of what I will be working on next:
  1. Implement my MIDI to serial conversion: I will be doing a MIDI to 38400kbps serial conversion using an AVR micro. The reasons for doing this are:
    • USB MIDI is a CPU hog in the Raspberry Pi
    • I am still not sure if the raspberry Pi supports MIDI baud rates or not.
    • I want to add some controls to the Pi that will use the same micro and will be sent to the Pi through the same serial
  2. Add the control of the knobs and switches (get the knobs and switches status and send it to the Pi).
  3. Put everything into a nice case.
  4. Add missing functionality to the VA synth (as explained here).
  5. Add missing functionality to  the Monome application.

I am hoping to finish 1 and 2 within the next 2 weeks. We will see...

Friday, February 22, 2013

VA synth

Where am I and what is the plan regarding the VA synth?
As mentioned, my plan is to do a Juno106 workalike (a workalike, not a clone). In that respect, I have the following blocks developed and working:
LFO: I have extended it to support square and sawtooth and I am missing the delay.
DCO: pretty much working as in the Juno, with the addition of triangular wave. I am planning on adding wave table DCO also.
HPF: this is currently missing in my design, but will add it soon.
LPF: I have the 24db/Oct resonant filter. I am not very impressed with its sound, so I might try other filters. I am missing the LFO control of the filter also and the keyboard tracking. I am using "Moog VCF variation 2" from here.
ADSR: done and working.
DCA: done and working.
CHORUS: done and working, but I want to make it a stereo chorus (currently both speakers get the same signal).

Other than that, I am sampling at 88200Hz and still need to add a low pass filter before downsampling to remove possible aliasing. Hopefully the 2 missing filters, HPF and anti aliasing filter, will not take much CPU.
I also want to add an arpeggiator and a step sequencer going to DCO, LPF, DCA to add some "weirdness".

Thursday, February 21, 2013

Monome + Raspberry Pi


Basic monome functionality for now...

Video Description:


Video Showing an Arduinome (arduino based monome) connected to a Raspberrry Pi which is running a sample playback software synth with Linn Drum samples.
There is no pd or Max running on the Pi, not even monomeserial or serialosc, it is just a C program that processes the raw serial stuff coming from the Monome and converts that into calls to the synth.

Wednesday, February 20, 2013