How to convert 8-bit information containing MIDI note, to square wave signal using basic chips and components?
The MIDI note number (0 to 127) denotes a note on a 12-tone scale, with note #69 representing the A above middle C at 440 Hz.

Therefore, the exact fundamental frequency of any note number N is

$$F_{note} = 440\text{ Hz} \cdot 2^{\frac{N-69}{12}}$$

Manipulating the resistance and/or capacitance around a 555 timer to get these frequencies is probably not the right way to go about this. I suppose you could build a big decoder and drive a long string of adjustable resistors to get the different notes. Tuning such a beast would be an exercise in frustration!

In the analog synthesizer world, you would feed the note number to a digital-to-analog converter to create a (linear) control voltage (usually in the range of 0 to 10 V), and then feed that voltage to a VCO that has been designed to produce the correct (exponential) frequency for the given voltage. The design of such VCOs is far from trivial, but you can purchase them from several sources.



A much more practical approach, especially if you have a "basic computer" (whatever that means) at your disposal is to use "direct digital synthesis" to produce aribtrary frequencies.

Let's suppose your computer can process interrupts at a rate of 10,000 per second. On each interrupt, you add a "delta" value to a 24-bit accumulator, and output the MSB of the accumulator as your signal.

If the "delta" value is 1, the accumulator will require 224 interrupts to overflow, and the output signal will cycle at a rate of \$\frac{10000}{2^{24}} = 0.000596\text{ Hz}\$. If the "delta" value is 2, the output signal will cycle at twice that rate, or 0.001192 Hz, and so on.

If you use a delta of \$440\cdot\frac{2^{24}}{10000} = 738198\$, you'll get an output frequency of 440.000296 Hz, which is close enough for most purposes. The point is, if you plug the frequencies from the first equation into this last expression, you can directly synthesize the square waves you're looking for. If you don't want to do the math on the fly, just use a lookup table to produce the correct "delta" value for each MIDI note number.



I only just now saw your final edit. Ben Eater's CPU only runs at a few hundred Hz, so you can't do the DDS in software. But you certainly can build a dedicated circuit using some adders and registers to perform the calculation described above.

I once built such a synthesizer myself back in high school (1970s). I used a diode matrix to store the "delta" values for the various notes.