Music on hardware in real-time

This is available since a8.

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 AT2 can do it:

You can still use AT2 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).

AT2 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 version a8, 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 AT2, 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 AT2 on what port to send the music data. Go to File > Setup > Serial tab:

Serial set-up

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 AT2 is ready, we must run a small "client" Z80 program on your old computer that will receive the data sent by AT2, 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 AT2 is set-up and the client is running, starts the communication! Simply click on the "serial" icon at the top-right of the screen:

Start or stop Serial communication

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 AT2 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.