Music on hardware in real-time

Wouldn’t it be great if you could hear your music on the real hardware, in real-time?

The answer is yes, and here is a video to prove AT can do it (note: this video was made for AT2, for AT3 works just the same):

You can use AT3 to compose fluently on your PC/Mac, but hear the result on your Amstrad/Msx/Spectrum/etc., in real-time. Because as good as the PSG emulation is, your music may still sound a bit different on the hardware. The speaker, the bulk of the machine itself have consequence on how the sound is played on the hardware, which is almost impossible to emulate.

So it is possible to do such communication, thanks to any serial interface that your hardware is fitted with. Most old-school computers don’t have one by default, but many are now available via an extension port. Of course, it works regardless of your OS (Windows, Linux, Mac).

AT3 itself is compatible with any serial interface, the only thing that needs to be done is adapt the Z80 client on the old-computer-side. As of now, the Z80 client only supports Amstrad CPC interfaces because I don’t have any others! Please contact me if you want a specific hardware to be used, it is easy to do! You can also do it yourself, the Z80 sources are easy to adapt.

The Z80 client currently supports the following serial interfaces:

  • Albireo
  • USIfAC
  • CPC Booster
  • Mini Booster

It supports the following PSG:

  • Normal PSG
  • PlayCity (9 channels!)

Setup

Start AT3, turn your old computer on, with its serial interface. Link both computers with a serial cable according to your hardware, such as a USB cable.

We must tell AT3 on what port to send the music data. Go to File > Setup > Serial communication:

First, select a Port. On Linux, it may be something like “dev/…”, on Windows “COMxx”.

Once this is done, select a hardware profile. Some interfaces are already present (Boosters, Albireo, USIfAC…), but you can also use a “custom” profile if you want to indicate specific values (note that built-in profiles are read-only).

Most recent interfaces accept 115200 bauds, which is more than enough. Most interfaces will have a byte size to 8, stop bits to 1, parity to none and flow control to none. If unsure, simply try these settings and click on the “Test” button: it will try to connect with the hardware. If it works, then the setup is done! Press OK at the bottom. If it does not, please check the specifications of your serial interface.

Run the client

Now that AT3 is ready, we must run a small “client” Z80 program on your old computer that will receive the data sent by AT3, and play them. The only thing that is sent is the PSG frames, for each PSG (so if your computer supports 6, 9 or more channels, this will work!).

Note: if you’re interested in the exchange format, it is available in the package in the players/serial/doc folder.

The client can be assembled via Rasm, but as a convenience, the binaries are already present. For example, on CPC, open the DSK located in players/serial/z80/binary/SerialCPC.DSK.

There are several files in there, each related to specific serial interfaces, but also the PSG hardware (normal, or PlayCity for example). For example, if you’re using the Mini or CPC Booster, run “booster.bin”. The same interface with the PlayCity will be “booplayc.bin”.

This will show an empty screen with a blue border: the computer is waiting for PSG values! If the border becomes red, it means than an error occurred: please check your hardware and cable! And restarts the client…

Start the fun!

Now that AT3 is set-up and the client is running, starts the communication! Simply click on the “serial” icon at the top-right of the screen:

If any error occurs, a pop-up will show. Else, the icon will change to a little arrow, meaning the communication is working! If at any time you want to stop this, click on the icon again.

Now start composing or playing the song!

All the sound that is emulated is now transferred to your old computer. Muted channels are also muted on the computer. So it really allows you to compose on the hardware the way you would if AT3 was on the old computer!

Please note:

  • The sound is NOT muted on your PC/Mac, so both computers emit sound. It is up to you to mute your speakers. Please contact me if you think this is bothersome.
  • Serial communication stops when the setup or song properties panels are open, or when a song is loaded.
  • For now, the client does not do any buffering, but plays the PSG stream as soon as it receives a PSG frame. At 115200 bauds, it allows real-time without any problem. Please contact me if you think a more sophisticated system should be used.
  • Digidrums/samples replay is not supported yet.