MIDI Computer Blues - Setting up the Hardware
850 rs232 arduino midi music
Within the Atari 800 computer manual is a program called Computer Blues. "This program generates random musical notes to "write" some very interesting melodies for the programmed bass." Maybe the first program I typed in . That same program is in the 1030 XE manual. It was while listening to this program and trying to figure out what to do with an Arduino MIDI shield that I thought, "What would Computer Blues sound like if played through a synthesizer?"
Gone is my MIDI Mate, CZ-101 and Roland keyboard controller. The TG-33 and DH-100 have been in storage for quite some time along with the ST and the USB to MIDI cord for the Windows computer. A Casio CTK-481 was acquired in a trade and has been neglected until now because now is the time to find out what Computer Blues would sound like on a synthesizer.
I don't remember there ever being an easy way to output midi commands to a MIDIMAX (or MIDIMATE) using Atari BASIC. The more I learn about the MIDI controllers and the MIDI standard the easier it is to imagine experimenting using BASIC. Speed and timing may be a disadvantage for BASIC but a quick and easy way to implement ideas may be an advantage.
The plan is to convert the SOUND commands to MIDI command data and send it out to the "R2:" port on the 850. "R2:" will be attached to a RS-232 to TTL converter shield attached to an Arduino Uno. The Arduino will read and retransmit the data through a MIDI shield to the sound synthesizer. The serial port baud rate limit of the 850 is 9600 and the MIDI port will be 31250. Shouldn't be a problem for the Arduino to keep up with the Atari.
The RS232 Shield
Link sprite Store
LinkSprite RS232 Shield V2 for Arduino is being used to read the RS232 signal from the 850. This board has the option of setting jumpers to use D0 to D7 for the TD and RD lines.
D5 and D6 are the first available pins and will require the SoftwareSerial library for communications. To test the shield, the "hello world" program from the RTC project was used with Bobterm. I had problems receiving the data until I switched the jumpers around. Someday I hope to be able to make the connections between RS232 devices and have it work the first time, but not today.
The MIDI Shield
New version https://www.sparkfun.../products/12898
This SparkFun MIDI shield has been in my shield collection long enough to have been replaced by another version. The old version requires you to use the Hardware serial lines where as the new version allows you to cut some traces and make the new connections. The shield has a PROG/RUN switch that needs to be set to PROGram the Arduino or RUN the program. It is an experimenters board and has 3 push button switches and 2 analog resistors that can be used as programmable controllers. Pins D0 and D1 are used for serial communications and D2-4 are used by the push button switches.
The shield can be tested using the program in the Arduino MIDI Tutorial (It’s a quick read). Connect a MIDI cable from the MIDI OUT on the shield to the MIDI IN of the synth.
Stacking the shields makes all the necessary connections. There are no wires.
If you don't use the shields a RS232 to MIDI OUT can be constructed for less then $25. A Uno knockoff and ultra compact TTL to RS232 converter can be had for less then $10 each. A 5Pin-DIN socket and 2-220 ohm resistors should be less then $5. Your biggest expense will be the 850 or PR: connection.
Wrap it up
All the parts seem to work. Next step will be to sit down and write the Arduino program to read the NoteOn data from the Atari and output it to the MIDI device. Then an Atari BASIC program to send the midi commands to turn on and off a note. When that happens the hard part will be over.
You may find some of these interesting and informative.
MIDI Reference Tables
MIDI Message Chart-
MIDI Control Change Messages
MIDI note number chart
How to read MIDI implementation chart(wish I had this 30 years ago)
Tutorial on midi data and file structures. Program examples for QuickBasic.
MIDI Programming Part 1: MIDI File Basics - MystikShadows
MIDI Programming Part 2: Data Structures And Timing Formulas - MystikShadows
Atari's Sound System by Bob Cockroft - ROM Magazine #10
Gives Atari values for specific Notes and more
Notes and Volts - Electronics, Guitars and Geekery