Pages: [1] 2 3   Go Down
Author Topic: My stab at an Arduino Synth  (Read 6486 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://narbotic.net/?p=95

It's quite limited at this point, but hey - it's my first project.  smiley-grin
The code is pretty hacked together bits from other sketches, and I had to 'cheat' a bit by using a little Lowpass filter.
see source for more detail

I'd love to hear any feedback if anyone has any.
Thanks!
Logged

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 293
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wow. i'm quite impressed by the sound you're getting. do you have sound sample without the low pass? i did some arduino sound experiments using a piezo speaker, but that wasn't much thrilling...

i'd like to create a simple bass synth with a warm bassy sound. i think your results can motivate me again. i'd really be interested in more sound samples.

did you think of using midi as input, or do you want to be an one-piece instrument? i did not have a look into your code yet, but i think if you are using the built-in PWM to generate the tones, Midi should be no big deal. i'm currently finishing a midi drum interface using arduino and am quite fascinated by the idea of being able to design and create interchangeable in- and output devices using arduino and midi.

kuk
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

here's that dry sample:
http://narbotic.net/audio/ArduinoSynth_alpha_dry.mp3

not so pretty.  It's not made with the PWM function actually.  (not sure how you'd get that to do different frequencies)  It's made using the "freqout" function, found here:
http://www.arduino.cc/playground/Main/Freqout

As far as MIDI goes - It would be very cool to add it in.  I understand how to implement midi out, but midi in is a bit of a mystery to me at this point.

I was envisioning a bass synth as well actually - working on a lil drum machine right now.
Logged

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 293
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the dry sample. the low pass really is a good thing. i didn't know it was that simple to add. did you you yet experiment with the capacitors values? you can simply add an euqualizer with a variable resistor before the capacitor!

i finally managed to built the smallest (yet quite powerful) possible amplifier yesterday, using a single darlingtion transistor (tip120) and 2 resistors. it was quite hard to figure out the right resistor values, but when they were set it was great fun to add and remove additional capacitors as their impact on the sound was quite big.  

your absolutely right, concerning the PWM. it's not possible to generate tone frequencies using PWM. but it might be difficult using frequout together with midi-in. i think creating the frequencies is a very time-critical task. you'd have to be able to read the serial port in between the phases to get and interpret the midi messages... but i f you want to try i could help you with the general "midi-in" circuit and code. it's alpha, but does work reliably for me.

another idea would be to create the frequencies in a seperate circuit - that is controllable by PWM - to be able to use arduinos computing capabilities for more interesting stuff than switching one pin on and off. i'm not an electronics genius but i guess this should be possible. the second advantage would be to be able to mix multiple frquencies as we are not limited to one PWM.

best,
kuk



Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Thank you for the dry sample. the low pass really is a good thing. i didn't know it was that simple to add. did you you yet experiment with the capacitors values? you can simply add an euqualizer with a variable resistor before the capacitor!
I did mess with the caps a bit, but found the results . . . 'uneven' sounding?
By equalizer do you mean a seperate equalizer circuit with 3-band control?  So then I'd dial in a setting on the EQ and then adjust the varistor accordingly?  interesting!

Quote
i finally managed to built the smallest (yet quite powerful) possible amplifier yesterday, using a single darlingtion transistor (tip120) and 2 resistors. it was quite hard to figure out the right resistor values, but when they were set it was great fun to add and remove additional capacitors as their impact on the sound was quite big.  
This too sounds mega-interesting, mind sharing a bit more info? (ie - res values?)

Quote
your absolutely right, concerning the PWM. it's not possible to generate tone frequencies using PWM. but it might be difficult using frequout together with midi-in. i think creating the frequencies is a very time-critical task. you'd have to be able to read the serial port in between the phases to get and interpret the midi messages... but i f you want to try i could help you with the general "midi-in" circuit and code. it's alpha, but does work reliably for me.
Yes I was thinking the same regarding serial in + freqout.  Freqout seems to account for the processing 'overhead' - adding midi may require a new value.

Quote
another idea would be to create the frequencies in a seperate circuit - that is controllable by PWM - to be able to use arduinos computing capabilities for more interesting stuff than switching one pin on and off. i'm not an electronics genius but i guess this should be possible. the second advantage would be to be able to mix multiple frquencies as we are not limited to one PWM.
This sounds like CV, control voltage - the old standard for synthesizer inputs.  Now if we could use Arduino to convert midi-in to CV compatible PWM out, we would have the simplest MIDI2CV converter ever!  I've been considering building this one:
http://www.musicfromouterspace.com/analogsynth/midi2cv.htm
but of course I'd much rather explore the arduino option smiley-wink


Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mind sharing a schematic for your synth ? I'm not a musician or anything like that but I just love the sounds from your sample and would love to try this.
« Last Edit: August 23, 2007, 12:06:21 pm by tvdbon » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sure, they keys just need to be switches that connect each input pin to ground, like so:

ARDUINO PINS:
1   2   3   4   5   6   7   8   9   10  12  13
|    |    |   |   |    |   |    |   |     |    |    |
|    |    |   |   |    |   |    |   |     |    |    |
 \    \    \   \   \    \   \    \   \     \    \    \
|    |    |   |   |    |   |    |   |     |    |    |
|    |    |   |   |    |   |    |   |     |    |    |     GND

The pitch transpose pot:
                   __________Analog Pin 0
                   |
                   V
+5v______/\/\/\_______+5V
                  10K


then pin 11(output) does a little low pass RC filter:

11
 |
 |           1M resistors
 |___/\/\/\______/\/\/\_________+SOUND OUT (ground audio jack as well)
                    |                 |          
                    |                 |        
                    T                T      .1uF caps
                    |                 |          
                  GND            GND

man, why do I love ascii schematics so much?

you can find some other info here:
http://narbotic.net/?p=95
« Last Edit: August 24, 2007, 04:43:18 am by Narbotic » Logged

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 293
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi,

i posted the midi in code here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/0
i actually wanted to post it to the playground, but wikis seem to dislike me.

the code should be really easy to adapt for PWM output.

best, kuk
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 ;D

You are a kind soul, thanks!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

CORRECTION -  The pot wiring should have one pin to ground like so:

                   __________Analog Pin 0
                   |  
                   V
+5v______/\/\/\_______GND
                 10K
Logged

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 293
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you're welcome.

do you know about a simple VCO yet? i'd really appreciate a solution that is 0-5 volts controllable. the less components the better. bread board friendly!

concerning my 1-transistor-amp: it works, but i think i'm doing something seriously wrong. i think there is supposed to be a capacitor in series before the speaker. I didn't mind for my tests, but i think i have a constant currentflow through my speakers, which is not ideal. it'll take me some reading(and probably shopping) to finish a design. i keep you updated.

!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

kuk: here's a VCO circuit that's fairly simple but musically useful: http://www.uni-bonn.de/~uzs159/vco4069.html

if you're interested in a DIY bass synth that's based around an AVR, you might check out http://ladyada.net/make/x0xb0x/index.html
Logged

berlin
Offline Offline
Sr. Member
****
Karma: 0
Posts: 293
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks, that looks interesting. i like the x0xb0x project a lot. still they put a lot of afford in remaking a tb303 not keeping the design simple. it's not that i'm lazy, i just want to start at a point where i know each of the components and know what they do.

do you have any experience in using a 555 circuit as a VCO? i think the circuit would be super easy. i'm a little unsure about the bandwidth and accuracy though. i think i will give it a try as soon as i find the time. unfortunately not in the next couple of days.

best, kuk





Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Check this pdf for simple 555 schematics:
http://experimentalistsanonymous.com/diy/Schematics/Oscillators%20LFOs%20and%20Signal%20Generators/555%20BASIC%20astable%20theory.pdf
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
What's that sound?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW - Kuk I agree with you about the xoxbox.  It's so encrusted with complexity it kind of loses the thrill of building the thing yourself.  I played with it a bit a local event recently and it was quite sturdy and professional but a little too 'stiff' for my liking.
Logged

Pages: [1] 2 3   Go Up
Jump to: