Jump to content

SID based noise pedal and synth project


Catchpole

Recommended Posts

Hey everyone,

First apologies if this thread is in the wrong group.

Several years back I started designing a rather ambitious device called the SIDrack, a rack mount SID synth will all sorts of bells and whistles.  I am a software engineer rather than an electronics engineer.  Although, I do have enough electronics knowledge to have been able to cobble together my prototypes.  Over time I have distilled exactly what I want in my SID project.  My aim is to design a small SID module with minimal parts and board space to create a SID noise or accompaniment pedal (to use with guitar) - it would also have MIDI IN for programming and to be able to use it a "normal" synth.

This project is not MIDIbox related but the project is open source.  I thought this forum would be the best place to get feedback, advice and share my experiences.

I have had prototypes successfully running on the breadboard.  I started with a dual SID device using an AVR module and a 7 segment display (pictured).  I later changed this to an ATmega32.  Then, scaling back to a single SID, i changed to an ATmega8 and dropped the display.

My current design involves only a few major components.  The 28 pin SID, the 28 pin ATmega8 and an opto-coupler for MIDI IN.  The ATmega8 can divide its 16mhz clock and supply this to the SID.  Lines into the board would be 12(or 9)v, 5v, MIDI IN, LED, 2 Buttons (pedal program select, advance / change).  I'll power it with a laptop PSU which delivers 5 and 12 volt regulated rails.

It's kind of a challenge to make this thing as minimal as possible and flexible at the same time.  So it could be used as a guitar pedal noise / accompaniment box or a full feature synth.  Being a pedal, more than 2 buttons is impracticable - they would be too close together and less simple to use.  The display was originaly a 7 segment display, but im wondering if I can loose the display all together.  A single LED can flash to show status, and perhaps I can use speech samples to "say" program changes.  eg. "one", "two" etc.  The idea is, if you want "full control and visualization", drive it with a computer application, or another device more capable.  I theory, the bus to the SID could be shared with a display of some kind... I just keep having to resist the urge to over complicate something that I wanted to keep simple (but not too simple).

As a software engineer I am a lot more at home behind the keyboard than a soldering iron.  I hope the project can be used by other like myself that want a SID synth with minimal effort. 

As a software engineer I see the benefits in object orientation.  Micro-controllers are typically written in C rather than C++.  I have found though benefit in writing in C++.  If nothing else, it's an exercise in organization.  It allows you to treat your structs a little smarter.  The main use of objects I found was create a class for the Voice, allocating 3 instances.  It removes the need to pass around struct pointers and if the compiler is doing it's job properly, will allocate the Voice "struct" pointer to a register and retain it across same class method calls.  If done correctly (no virtual methods, absolute vs indirect allocation etc) I found no overhead vs C code (if anything it's more efficient).

[tt]

void Voice::setNoteOn(byte key, byte velocity) {

  this->key = key;

  this->note = key;

  this->sustain = ram.sustain;

  this->velocity = velocity;

  this->frame = 0;

  this->updateVoice();

  etc..

[/tt]

Using a single layer board would be nice but I don't know if I'll get away with it.  There's a lot of Address and Data lines and it looks like, lots of cross over.  I'm also sure this thing can be made smaller than a business card.

Anyway, I want to put this "out there" and see what reaction I get.  Once I am happy with a design my biggest hurdle will be getting it into  a router.  I have downloaded about 10 different PCB programs and hit a wall with almost all of them.  I am currently playing with the open-source "PCB" on my mac.. but it seems to have a bug on the mac, stopping me from adding parts (I found both the SID and ATmega8 on www.gedasymbols.org ).  I guess what I need is someone to say "put a capacitor there to protect that chip" or "that route won't work because of blah".

sidrack7_thumb.jpg

sidrack8_thumb.jpg

sidlinkkeys_thumb.jpg

sidthing-schem_thumb.png

1176_sidrack7_jpg33f9f8df5e2f2dc844ba1f3

1178_sidrack8_jpg0ba1783ea9a73e092fec1ae

1180_sidlinkkeys_jpgcb5aa9832ae366782a71

1182_sidthing-schem_pngdfde4fb26203ebeaa

Link to comment
Share on other sites

Um... no, but I'm sure we could add one.  :)

I've attached some REALY old source code that was written for the ATmega32..  I changed it to the ATmega8 and made a lot of advances, but somehow I backed it up, and lost that backup.. Anyway, I'm happy to re-write it anyway. :)  Make it better.

I've never written a synth before.

Once the hardware is done, we can write whatever we want for it. :)

Things I'm going to change right away are:

- MIDI message handling and note allocator

- Frequency calculation rather than lookup table (for accurate note divisions).  In fact my lookup table is not accurate for the exact 1mhz clock that will be used.  This is my java prototype for the replacement function..

[tt]

    private static double noteFrequency(double midiNote) {

        return 440.0d * Math.pow(2.0d, (midiNote - 69.0d)/12.0d);

    }

    private static int sidValue(double freq) {

        return (int)(freq * (16777216.0d / 1000000.0d));

    }

Note Octave MIDI SIDvalue Hz,

C 0 0 89 8hz, C# 0 1 91 8hz, D 0 2 99 9hz, D# 0 3 a3 9hz, E 0 4 ac 10hz, E# 0 5 b7 10hz, F 0 6 c1 11hz, G 0 7 cd 12hz, G# 0 8 d9 12hz, A 0 9 e6 13hz, A# 0 10 f4 14hz, B 0 11 102 15hz, C 1 12 112 16hz, C# 1 13 122 17hz, D 1 14 133 18hz, D# 1 15 146 19hz, E 1 16 159 20hz, E# 1 17 16e 21hz, F 1 18 183 23hz, G 1 19 19b 24hz, G# 1 20 1b3 25hz, A 1 21 1cd 27hz, A# 1 22 1e8 29hz, B 1 23 205 30hz, C 2 24 224 32hz, C# 2 25 245 34hz, D 2 26 267 36hz, D# 2 27 28c 38hz, E 2 28 2b3 41hz, E# 2 29 2dc 43hz, F 2 30 307 46hz, G 2 31 336 48hz, G# 2 32 366 51hz, A 2 33 39a 55hz, A# 2 34 3d1 58hz, B 2 35 40b 61hz, C 3 36 449 65hz, C# 3 37 48a 69hz, D 3 38 4cf 73hz, D# 3 39 518 77hz, E 3 40 566 82hz, E# 3 41 5b8 87hz, F 3 42 60f 92hz, G 3 43 66c 97hz, G# 3 44 6cd 103hz, A 3 45 735 110hz, A# 3 46 7a3 116hz, B 3 47 817 123hz, C 4 48 892 130hz, C# 4 49 915 138hz, D 4 50 99f 146hz, D# 4 51 a31 155hz, E 4 52 acd 164hz, E# 4 53 b71 174hz, F 4 54 c1f 184hz, G 4 55 cd8 195hz, G# 4 56 d9b 207hz, A 4 57 e6a 220hz, A# 4 58 f46 233hz, B 4 59 102e 246hz, C 5 60 1125 261hz, C# 5 61 122a 277hz, D 5 62 133e 293hz, D# 5 63 1463 311hz, E 5 64 159a 329hz, E# 5 65 16e3 349hz, F 5 66 183f 369hz, G 5 67 19b0 391hz, G# 5 68 1b37 415hz, A 5 69 1cd5 440hz, A# 5 70 1e8c 466hz, B 5 71 205d 493hz, C 6 72 224a 523hz, C# 6 73 2454 554hz, D 6 74 267d 587hz, D# 6 75 28c7 622hz, E 6 76 2b34 659hz, E# 6 77 2dc6 698hz, F 6 78 307e 739hz, G 6 79 3361 783hz, G# 6 80 366f 830hz, A 6 81 39ab 880hz, A# 6 82 3d19 932hz, B 6 83 40bb 987hz, C 7 84 4495 1046hz, C# 7 85 48a9 1108hz, D 7 86 4cfb 1174hz, D# 7 87 518f 1244hz, E 7 88 5668 1318hz, E# 7 89 5b8c 1396hz, F 7 90 60fd 1479hz, G 7 91 66c2 1567hz, G# 7 92 6cde 1661hz, A 7 93 7357 1760hz, A# 7 94 7a33 1864hz, B 7 95 8177 1975hz, C 8 96 892a 2093hz, C# 8 97 9152 2217hz, D 8 98 99f7 2349hz, D# 8 99 a31e 2489hz, E 8 100 acd1 2637hz, E# 8 101 b718 2793hz, F 8 102 c1fb 2959hz, G 8 103 cd84 3135hz, G# 8 104 d9bd 3322hz, A 8 105 e6af 3520hz, A# 8 106 f467 3729hz.. overflows SID here

[/tt]

So my priority is to finish the schematic.  I don't want to make any promises, but if anyone can help me with the board route (by either doing it, or helping me get it over the line), I'll get a bunch made and post you one.

That C++ code is here.....

sidpak.c

sidpak.c

Link to comment
Share on other sites

I have done a quick mock up for single layer routing using an ATmega32.  Its not complete, but a start.  By going back to the ATmega32, we get a better microcontroller for a start and we can use a seven segment display (or anything else you want to put on Port B).

Some quick questions:

- Where should I put bypass caps and what value?

- As you can see, i'm routing the address lines up under the end of the SID.  how many lines can you safely route under that DIP?

RESet could be on PD7 and all the address lines can move down - it doesn't really matter.  Just depends where you want the spare lines to end up.

- The SID is quite noisy when idle (you can still hear the oscillators due to some leak).  I was wondering how easy it is to make a simple software controlled gate.  The ADSR times are documented, so it should be easy to predict when the SID should be silent.  My other idea was to set the SID osc / filter to a tone which causes the least noise on the line.

sidthing32-schem_thumb.png

1212_sidthing32-schem_png9966a2646ddb67c

Link to comment
Share on other sites

Looks like an interesting design, could be very useful with my GR-20. I'd planned to use a minimalist MBSID, but this might be a better option. I'm thinking you program patches on a PC, then scroll up and down them using footswitches??

Personally, I don't think you'd be able to fit many traces underneath the SID itself if you want the PCB to be easily home-made. If you're going for manufactured PCB's, there's no real reason not to use a two layer board.  Those are just my thoughts, but so far looks like some good work!

Link to comment
Share on other sites

Great!  Thanks, thats the kind of feedback i'm looking for... as you may notice I'm using this thread as a kind of note pad for my ideas.. publishing this is forcing me to get it done.  Manufacture is probably the way 2 go for the board.  So that puts the mega8 back in the game (those 28 pin DIPs look so good together :) ).  i could share the SID bus with some kind of more capable display... (but again, i complicate)

And if it's small and simple, I will present this challenge:  Add the board to something and send in a photo.  A radio, a guitar amp, a clock radio, an iPod, a toaster. :)

Link to comment
Share on other sites

Yeah i'm down with the small size, but don't forget that humans have quite large feet, so you'll need to make the enclosure pretty big anyway, i'd say at least 6x4" if you want a  pair of footswitches, MIDI and audio jacks and a display.

Keep up the good work though, i'm excited by this thing (even though I don't have the facility to burn ATMEGA stuff :( ). With regards to your challenge, I have a pretty good Idea what i'd like to house one in, but firstly could you explain in more detail the capabilities of this thing? Your initial posts have been a little vague!

Link to comment
Share on other sites

Well, the idea is that it will be MIDI and / or footswitch in ->  SID goodness out.  The capabilities will all be down to software.  I very quickly wrote a MIDI synth controller, so I'm confident I (or anyone else) can wrangle whatever code we want.  Normal synth abilities would be standard.  But I'm thinking noise programs that follow chords and progressions which you can trigger or set tempo on.

There are also super swanky MIDI foot controllers around.  So that's an option if 2 buttons isn't enough, or you don't want it on the floor.  Maybe it could just be 100% MIDI - I just thought it was a shame to not put a few buttons on it.  :)  I have 2 button pedals for the guitar, and your right, they need to be far apart (I actually disconnected one of my foot switches because I kept hitting it by mistake).

As for programming, I'm also looking into firmware update via MIDI.  Either by custom firmware or maybe the normal serial upload method will work.

I know a lot of people post saying "I want to make this thing" and never do.. But I've had it fully operational on the breadboard. :)  Software is easy for me... Hardware a little more of a challenge.

Link to comment
Share on other sites

I'm the other way around mate, well actually, I find it all a nightmare!!

Hehe, but seriously, something that works like a guitar mult-fx thing would be just fine. Have a set number of pre-sets which are editable via JSynthLib on the PC, and scroll through them using up/down and maybe bank buttons on the pedal. I could live without any other controls on the pedal itself, although a CV in to control filter cutoff or pulse width would be nice.

Link to comment
Share on other sites

An even CRAZIER idea is to use 1 button.  Hold it down to advance programs, tap to time etc.  Again, for more control, plug in one of those swanky foot controllers with about 8 buttons and a pedal.  Anyway, my wife is going to have a baby sometime very soon.. so if I disappear, this is the reason.

Link to comment
Share on other sites

Actually, tap tempo would be a great idea for stuff like LFO filter sweeps, or arpeggio speeds.

Maybe you could have a button each for up/down and one for function, ie, hold for filter on/off, tap for tempo etc.

In this instance, I could live with just one LFO controlled via tap. That would be sweet!

Link to comment
Share on other sites

I think the best way to approach this is to publish the "module" with a connector to supply 5, 12, midi, audio out (and in for the SID) and as many spare IO lines as possible.  Maybe have these on the ADC port if you want to connect pots.

Have the software configurable and people can customize it any way they like.

I'm not even going to tackle the power supply as I have regulated 5/12V power packs, and those who want to the 8580 SID will need 9 volts instead of 12.  I think PSUs are pretty specific to how you integrate the module anyway.  ie. This could go straight into a PC case.  Use up that old floppy bay.

Link to comment
Share on other sites

  • 2 weeks later...

> Anyway, my wife is going to have a baby sometime very soon.. so if I disappear, this is the reason.

It's a girl!

..anyway. :)  I'm still keen to find a simple mute circuit which would allow the SID to be silenced when not playing.  The SID is leaky and noisy.  And there's that very load pop when you change volume / reset the SID.  Even the makers of the Sidstation recommended a signal gate.  The difference here is that it wouldn't be a signal driven gate, we would switch it with software.  I've read recommendations to buffer the SID signal before output anyway.  To protect it from nasty voltages.  Makes sense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...