https://www.raspberrypi.org/blog/commodore-64-raspberry-pi-4-synth6581/ * Skip to main content * Skip to footer * Accessbility statement and help * Hardware Low-cost, high-performance Raspberry Pi computers and accessories Buy Raspberry Pi 4 Buy Raspberry Pi 400 + All products + For industry + Documentation + Forums * Software Everything you need to get started with your Raspberry Pi computer Our software + Raspberry Pi OS + Raspberry Pi Desktop + Help + Forums * Books & magazines Books and magazines from Raspberry Pi Press Explore our titles + The MagPi + HackSpace + Wireframe + Custom PC * Learn Free resources for young people to learn to code and become digital makers Learn at home + Guided coding projects + Learn at a Code Club + Learn at a CoderDojo * Teach Free training, resources, and guidance to help you teach computing with confidence Support for teachers + Teach Computing + Start a Code Club + Online training courses * Forums * About us We work to put the power of computing and digital making into the hands of people all over the world About us + Donate + Support us + Our supporters + Blog Raspberry Pi Blog All blog posts * Archive * RSS Commodore 64 + Raspberry Pi 4 = Synth6581 [Simon-] * 18th Jun 2021 * Simon Martin * 6 comments We have a special blog today from one of our own design engineers, Simon Martin. He's the designer of Raspberry Pi 400 and our High Quality Camera and spends his free time tinkering with electronic music. This video is a classic. Settle in... Simon has wanted to make his own electronic musical instrument with Raspberry Pi for some time. He designed a circuit board for the project a year ago, but it lay around in a drawer in his desk while he finished Raspberry Pi 400. Finally, the winter months gave him the incentive to get it working. Simon's electronic musical journey Simon: The Synth6581 device doesn't look much like an electronic musical instrument, but just like circuit boards stacked on top of a Raspberry Pi 4. You have to plug a musical keyboard into a USB port and a pair of speakers into the audio jack on the bottom board to make it work. [qFA1neB8-9]Hefty stack ready to play some electronic music The code is written almost entirely in Python, with a little bit of C to speed up the communications to the chips. I designed and laid out the circuit boards, which were ordered online. The first six boards cost only PS20, but the components were another PS100. I spent more than a day soldering the components on the boards by hand. It took much more time to check every chip and connection worked, a common problem with hand-soldering new boards. Synth6581 -- no ordinary sounding instrument [06vxc010R8]The 1982 Commodore 64 - works like Raspberry Pi 400, only slower And Synth6581 is no ordinary sounding musical instrument. It's based on the music chip inside a vintage computer: the Commodore 64. The microchips are almost forty years old and they have a quirky sound that kids in the 1980s loved and parents hated. By the way, did you know that the Commodore 64 was the inspiration for Raspberry Pi 400? The SID chip sound [j6zm4F4nzR]The MOS6581 SID chip -- just a little smaller than a Raspberry Pi Pico board I was one of many hobby programmers in the 1980s that used to attempt to program Commodore 64s. Much like people today dabble with programming on Raspberry Pi 400s, kids and adults were dabbling with the BASIC programming language on their Commodore 64s back then. Nowadays, Raspberry Pis have video, graphics, and audio readily available, but back in the 1980s, the hardware registers had to be 'poked' one by one into the console window. You had to get quite technical just to get the computer to make a musical sound. Those sounds came from the MOS6581 or 'SID' chip. It had such a famous sound character that it formed the basis of the chiptune music genre, and people are still writing music on Commodore 64s today. [jhS1IcZ5es]Using BASIC POKE commands to control SID chips on a Commodore 64. Not the easiest thing to read. Poking SID chips By borrowing a few chips from broken Commodore 64s, including one or two lying around Raspberry Pi Towers, I made those 1980s ping noises into a polyphonic synthesiser controlled in Python on Raspberry Pi. The registers in the SID chips are simply being 'poked' by Raspberry Pi instead of Commodore 64. I also reverse-engineered the music from old games and made the sound effects and instruments work across the keyboard. Simon with his creationSimon with his electronic music creation One of a kind electronic musical device This device is unique: only one of these will ever be built, so please don't wait for a launch date. There were over 10 million chips manufactured for Commodore 64, but production of the chips ended nearly 30 years ago. The Commodore 64s and spare parts for them are still in high demand, which is pushing up second hand prices. Nonetheless, the code and schematics are available online on GitHub, and I invite other Raspberry Pi users to use them to make musical instruments out of other games consoles. I reckon Sega Megadrive has a lot of potential for a Raspberry Pi port... Simon Martin youtube channelA few of the demos of the electronic instrument on Simon's YouTube channel For more video demos of this instrument, head to my YouTube channel. Share this post * Post to Twitter * Post to Facebook * Commodore 64 * Raspberry Pi 4 * Raspberry Pi 400 Related posts [CTMB-1-100] The Computers That Made Britain on sale now [Raspberry-] Designing Raspberry Pi 400 [commodorep] Build your own Commodore PET model 8032 Previous Post [Screenshot] Pico Pico Synth | HackSpace #44 Share this post * Post to Twitter * Post to Facebook 6 comments Jump to the comment form Avatar Thomas McQuaid 18th June 2021, 11:08 am great project, sounds great! what's the latency on it like? Reply to Thomas McQuaid Avatar Gareth Qually 18th June 2021, 11:42 am That was amazing. I was wondering when this would happen. I have a spare SID that I was going to put into my C64 as a dual sid system. Well this may change things. Very cool. Reply to Gareth Qually Avatar Bruce Mardle 18th June 2021, 1:59 pm Awesome! I've got an old Yamaha FM synth chip and its associated ADC and keep meaning to put that on a Pi, but then I think "why not just use CSound?" :-/ (At least the Yamaha chips only need 5V, not 12. It's a pity the Pi doesn't have an 8-bit port (or does it?), but I guess it's fast enough to treat assorted GPIOs as one.) Reply to Bruce Mardle Avatar Tom Beck 18th June 2021, 3:13 pm I was a hobbyist in the early '80s and started a lifelong fascination with programming with the VIC-20. I taught myself 6502 programming before an assembler was available for the VIC-20 so I had to hand assemble the assembly code, convert from HEX to DEC and then poke those values into memory from a DATA section of a basic program. I was also a professional classical musician at the time and I got a Commodore 64 as soon is it was available. I was intrigued by the sound chip and immediately began to write programs for it. I wanted to be able to input a 3 voice Bach Organ trio and play it through the SID. I wrote a program in Basic that I used to enter notes and duration, but the loop I used to play the notes was too much for the Basic interpreter. I ended up writing an assembly language program that read the note and duration values and performed each "track". The performance was excellent. The Basic program also specified the envelope, etc. for each voice. The performance was controllable in real time for volume and temp. I think I probably wrote what was one of the first sequencer apps. I had never heard of one before and so I wrote what I did out of necessity. In any case, I still have great memories of my old Commodore computers. Reply to Tom Beck Avatar Anders 19th June 2021, 9:17 pm The poke into ram technique for hand assembled code is something that we of that era share. Also, entering the hex codes sequentially into a prom programmer on its keypad was a long old task and frustrating if you made a mistake. Reply to Anders Avatar Neil 18th June 2021, 11:31 pm Love hearing Wizball music. One of my all time favourite games that I still play regularly! Great project! Reply to Neil Leave a Comment Name (Required) [ ] Email address (also required) [ ] Website URL [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] Your comment (required) [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] Submit About Us * About us * Our team * Governance * Safeguarding * Research * Jobs * Contact us Support * Help * Documentation * Projects * Training * Software * Forums * FAQ Sign up to our newsletter [ ] [ ] Subscribe * Like Raspberry Pi on Facebook * Follow Raspberry Pi on Twitter * Join us on Instagram * Subscribe to the Raspberry Pi YouTube channel Raspberry Pi Foundation UK Registered Charity 1129409 Accessibility Privacy Cookies Trademark rules and brand guidelines