Propeller Synthesizer
Hello everyone. I am going to attempt to create a simple sytnthesizer with the propeller. It would have 5 controls in total. A pitch control, volume control, and three different effects. Not sure about the programming or the wiring for this. Any help is appreciated.
- Android
- Android

Comments
Step 2: ???
Step 3: Profit!
I am not the most intelligent person with electronics
- Android
How do you intend to control your synth? MIDI?
While many keyboards have built in synthesizers, there are also some piano type keyboards that don't produce music on their own. They require a separate sound generator.
For example, I have an Alesis keyboard synthesizer but I wanted to learn to play the organ so I added a second keyboard that's just a "controller" meaning it provides information about the notes played but it doesn't produce sound. This "controller" is plugged into the Alesis so when I press a key on the controller, the Alesis generates a sound to go with it.
While there's lots of ways to generate this note information, it's tough to beat a good keyboard for producing a wide range of notes (it of course helps to know how to play the piano or other keyboard type instrument).
One project I keep intending to try is a MIDI signal merger. I also have a pedal board which generates MIDI instructions but my synthesizer only has one "MIDI in" port. I have to run the two MIDI signals through a PC in order to merge them. It would be nice to free my two keyboards with foot pedals from the need of having a PC in the mix.
I think what Circuitsoft was asking was how do you want to tell the Propeller which note to play? One option, as he mentioned, is a potentiometer. Another option would be to use some sort of MIDI controller to generated instructions to the Propeller.
Here's a project I did using my little PMC project for a SIDcog enable synth that accepts MIDI-in.
http://www.instructables.com/id/Building-a-Retro-Synthesizer-with-the-Pocket-Mini-/
Jeff
http://linusakesson.net/bitbuf/index.php
It was made with Atmega88. The Propeller can do much more.
And this:
http://linusakesson.net/chipophone/index.php
is a synth made with two Atmegas 88.
As I said, the Propeller is much more powerful than Atmega 88. It is much more powerful than two of them, too.
With the Propeller you can simply make any synth you want.
There is a midi interface ready in OBEX.
There is a lot of sound producing libraries
There is sidcog, a SID emulator, AY emulator, Retronitus and some other synths available here
Yu only have to look at these parts and make something with them. Or develop a new one
http://propellerpowered.com/forum/index.php?PHPSESSID=501e63f33767d74c9f20db32c0be4289&topic=32.0
Andy
The actual code pulls in code written by others, so I've posted the bit I wrote below.
Sorry it is a bit blurry on the video. Below is the background file to give an idea of the resolution. Draw the sliders and switches on top of this and set them as active areas on the touchscreen as per the code. Look for touches to the keys and play the sound.
CON _clkmode = xtal1 + pll16x ' use crystal x 16 _xinfreq = 5_000_000 OBJ tch: "Touch" ' touchscreen driver synth : "tinysynth" ' Thanks Ahle2 http://forums.parallax.com/showthread.php?139724-TinySynth-! VAR long DecRate ' synth settings long SusLevel long PWinit long pwmRate long Filter long Portamento PUB Main | touchtest ' debug value tch.BeginProgram PlaySynthesizer tch.SetWarmBoot ' clears screen, sets a warm boot and reboots PUB PlaySynthesizer | xval,yval,portsw,note ' see next routine for automatic tunes synth.start(21, 23) ' start the synth portsw := false ' portamento off PWinit := 255 ' synth settings all 0-255 pwmRate := 12 decRate := 200 susLevel := 255 filter := 16 portamento := 6 tch.Clearscreen(%00000000_00000000) ' tch.ClearRam ' clear all but file 0 and 1 tch.SDBMPtoRam(string("synth2.bmp")) ' file 2 tch.SDBMPtoRam(string("synoff.bmp")) ' file 3 tch.SDBMPtoRam(string("synon.bmp")) ' file 4 tch.SDBMPtoRam(string("synknb.bmp")) ' file 5 tch.SDBMPtoRam(string("synslbk.bmp")) ' file 6 tch.DrawBMPRam(2,0,0) ' draw the picture tch.DrawBMPRam(3,148,241) ' draw file 2 tch.DrawBMPRam(4,148,283) ' draw file 3 RefreshSliders ' draw all the sliders tch.SelectSPIGroup ' talk to the spi touchscreen repeat yval := tch.TouchYPercent ' decode yval 0-100% xval := tch.TouchXPercent ' decode xval 0-100% if (xval <> 255) and (yval <> 255) ' valid keypress xval := (xval*24)/10 ' 0-240, use portrait mode but it doesn't matter yval := (yval*32)/10 if xval>143 and xval <199 and yval >280 and yval <320 synth.stop ' close down the synthesizer return if xval >143 and xval <199 and yval > 240 and yval < 275 ' portamento switch tch.SelectMemGroup !portsw ' change status if portsw tch.DrawBMPRam(4,148,241) ' switch on synth.noteOn(30, 19, 60, 12, 3, 6) ' turn on a note, next notes slide to this else tch.DrawBMPRam(3,148,241) ' switch off synth.noteOff(18) ' turn off any portamento tch.pause1ms(250) ' debounce delay tch.SelectSPIGroup if xval >132 and xval <202 and yval >9 and yval <244 ' one of the 5 sliders case yval 9..9+34: DecRate := ReadSlider(xval,1) ' move the slider and scale value 53..53+34: SusLevel := ReadSlider(xval,2) 88..88+34: PWinit := ReadSlider(xval,3) 124..124+34:PWMRate := ReadSlider(xval,4) 162..162+34:Filter := ReadSlider(xval,5) 210..210+34:Portamento := ReadSlider(xval,6) if xval < 53 ' white keys case yval 0..23 : note := 20 24..56 : note := 22 57..89: note := 24 90..119 : note := 25 120..148: note := 27 149..177: note := 29 178..207: note := 31 208..238: note := 32 239..266: note := 34 267..297: note := 36 298..320: note := 37 if (xval > 54) and (xval < 118) ' black keys a little bit wider so can play them case yval 10..44: note := 21 47..77: note := 23 102..131: note := 26 133..162: note := 28 166..193: note := 30 221..250: note := 33 255..284: note := 35 if note <> 0 ' play note if portsw ' portamento switch synth.slideToNote(note, portamento/16) else synth.pluck(note, decRate/12, susLevel/4, pwinit, pwmRate/6, filter/32) ' do any scaling here, all values 0-255 note := 0 PUB SynthSlider(x,y,value) ' value is 0-255. assumes bitmaps in ram tch.DrawBMPRam(6,x,y) ' draw background tch.DrawBMPRam(5,x+((value*100)/450),y+5) ' draw the knob PUB RefreshSliders | n repeat n from 1 to 6 RedrawOneSlider(n) PUB ReadSlider(y,n) y := y - 132 ' origin of the slider is 132 y := y*256 ' slider is 69 pixels so convert to 256 y := y / 69 if y < 0 ' check bounds y := 0 if y > 255 y := 255 tch.SelectMemGroup RedrawOneSlider(n) ' redraw this slider tch.SelectSPIGroup result := y PUB RedrawOneSlider(n) ' n = 1,2,3,4,5,6 case n 1:SynthSlider(132,9,decRate) ' decay 2:SynthSlider(132,53,susLevel) ' sustain 3:SynthSlider(132,88,pwinit) ' pwminit 4:SynthSlider(132,124,pwmRate) ' pwmrate 5:SynthSlider(132,162,filter) ' filter (0-12 so multiply by 21) 6:SynthSlider(132,210,portamento) ' portamento 0 - 16 ' ********************************** end synth routines ************************