genuinequality

Download free music MP3s on genuine quality, the world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, The world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, stats, charts, biographies and concerts. stats, charts, biographies and concerts.

Monday, June 23, 2025

Arduino MIDI Atari Paddles

Finally, I get to the point where I can do something vaguely musical with my Atari 2600 Controller Shield PCB. This turns it into a simple MIDI CC controller using the Atari paddles. https://makertube.net/w/dgK7y73KfC1SWc5z2wsJ6x Warning! I str…
Read on blog or Reader
Site logo image Simple DIY Electronic Music Projects Read on blog or Reader

Arduino MIDI Atari Paddles

By Kevin on June 23, 2025

Finally, I get to the point where I can do something vaguely musical with my Atari 2600 Controller Shield PCB. This turns it into a simple MIDI CC controller using the Atari paddles.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

  • Atari 2600 Controller Shield PCB Revisited – Part 3
  • Atari 2600 Controller Shield PCB Design
  • Arduino MIDI Library

If you are new to Arduino, see the Getting Started pages.

Parts list

  • Arduino Uno
  • Atari 2600 Controller Shield PCB
  • Arduino MIDI interface, (Ready-Made MIDI Modules, DIY MIDI Interfaces, etc)
  • Atari paddle controllers

The Circuit

I'm using my Arduino MIDI Proto Shield which makes connecting everything up pretty straight forward.

Particularly using the TRS version, which means the boards will stack quite neatly.

The Code

This is using the code from Atari 2600 Controller Shield PCB Revisited – Part 3 and combining it with the Arduino MIDI Library to send out a MIDI CC message when the potentiometer values change.

I've re-implemented my pot averaging code as a reusable object again but this time I've split it out into its own header file implementation. I've recreated the complete code below. This can be saved in a header file for simple reuse in other code.

#define AVGEREADINGS 32

class AvgePot {
public:
AvgePot(int pot) {
potpin = pot;
for (int i=0; i<AVGEREADINGS; i++) {
avgepotvals[i] = 0;
}
avgepotidx = 0;
avgepottotal = 0;
}

int getPin () {
return potpin;
}

unsigned avgeAnalogRead () {
unsigned reading = 10*avgeReader(potpin);
avgepottotal = avgepottotal - avgepotvals[avgepotidx];
avgepotvals[avgepotidx] = reading;
avgepottotal = avgepottotal + reading;
avgepotidx++;
if (avgepotidx >= AVGEREADINGS) avgepotidx = 0;
return (((avgepottotal / AVGEREADINGS) + 5) / 10);
}

unsigned avgeAnalogRead (int pot) {
if (pot == potpin) {
return avgeAnalogRead();
}
return 0;
}

virtual unsigned avgeReader (int potpin) {
return analogRead(potpin);
}

private:
int potpin;
unsigned avgepotvals[AVGEREADINGS];
unsigned avgepotidx;
unsigned long avgepottotal;
};

One trick I've used (or at least, believe I've used - I'm not really a C++ person) is the use of a virtual function avgeReader(). By default this implementation calls straight out to the standard Arduino analogRead() function, but by being virtual means that it is possible to create a new class based on this one that can override that function with a bespoke routine.

This is what I've done to link this to the atariAnalogRead() function from my previous code as shown below. Note that, as I understand things, constructors aren't inherited, so a new constructor is required to link back to the base class's original.

class AtariPot : public AvgePot {
public:
AtariPot (int potpin) : AvgePot (potpin) {}

unsigned avgeReader(int potpin) override {
return atariAnalogRead(potpin);
}
};

I can then set up four instances of this new AtariPot class for each of the paddle controls.

AtariPot *atariPot[NUMPADS];

void setup() {
for (int i=0; i<NUMPADS; i++) {
atariPot[i] = new AtariPot(pad_pins[i]);
}
}

Reading each atari pot is then just a case of calling the correct function for each instance.

void loop() {
for (int i=0; i<NUMPADS; i++) {
val = atariPot[i]->avgeAnalogRead() >> 3;
}
}

I'm shifting the result >> 3 to reduce the 10 bit value to a 7 bit value for use as a MIDI CC. This takes the range 0..1023 down to 0..127.

There is a table at the start that defines which MIDI CC message corresponds to which paddle controller. By default, I've used the following:

int midiCC[4] = {
0x01, // Modulation wheel
0x07, // Channel volume
0x0B, // Expression control
0x10, // General purpose control 1
};

Find it on GitHub here.

Closing Thoughts

I'm not sure quite how practical using Atari paddles for a MIDI controller really is, but that hasn't stopped me before and it hasn't stopped me now.

The video shows two paddles controller modulation and volume for a MiniDexed. So it does appear to work.

I've still a few other odds and ends I want to try:

  • It would be interesting to see how this contrasts with the simpler step of using a resistor to create a potential divider from the paddle as described in the original Atari 2600 Controller Shield PCB Build Guide. It would probably work fine too and would be a lot simpler in code terms.
  • I still want to do something with the Atari keypads!

I must admit there is also a part of me thinking that if I could find some paddle controllers that were perhaps no longer fully functional, I would be able to take them apart and stick a small microcontroller in the paddle housing itself...

Kevin

Comment
Like
You can also reply to this email to leave a comment.

Simple DIY Electronic Music Projects © 2025.
Unsubscribe or manage your email subscriptions.

WordPress.com and Jetpack Logos

Get the Jetpack app

Subscribe, bookmark, and get real‑time notifications - all from one app!

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com Logo and Wordmark title=

Automattic, Inc.
60 29th St. #343, San Francisco, CA 94110

Posted by BigPalaceNews at 11:17 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

About Me

BigPalaceNews
View my complete profile

Blog Archive

  • June (85)
  • May (105)
  • April (95)
  • March (131)
  • February (111)
  • January (104)
  • December (98)
  • November (87)
  • October (126)
  • September (104)
  • August (97)
  • July (112)
  • June (113)
  • May (132)
  • April (162)
  • March (150)
  • February (342)
  • January (232)
  • December (260)
  • November (149)
  • October (179)
  • September (371)
  • August (379)
  • July (360)
  • June (385)
  • May (391)
  • April (395)
  • March (419)
  • February (356)
  • January (437)
  • December (438)
  • November (400)
  • October (472)
  • September (460)
  • August (461)
  • July (469)
  • June (451)
  • May (464)
  • April (506)
  • March (483)
  • February (420)
  • January (258)
  • December (197)
  • November (145)
  • October (117)
  • September (150)
  • August (132)
  • July (133)
  • June (117)
  • May (190)
  • January (48)
Powered by Blogger.