Digidrum player

AT3 allows you to play digidrums, that is, usually small samples, tune-less (it is not possible to change the note). The only player that can play them is the multi-PSG variant of the AKY player (in the package alongside the AKY player).

Digidrums are available for Amstrad CPC, MSX and Spectrum out of the box (it you need more platforms, contact me. It also should work on the first PSG of multi-PSG hardware). Testers are available for you to try out (PlayerAkyDigidrumsTester_CPC.asm, for example).

The digidrums are triggered via the event tracks. They are NOT triggered from sample notes (there is another player for that). Also, please read about the cost of samples here before integrating blindly to your song :).

Playing digidrums is a 3-step process, provided that you have a song with digidrums triggered via the event tracks:

  • Export the song to AKY.
  • Export the events themselves, exported via Events Export.
  • Export the samples, exported via Sample Export.

Do not worry, each of these steps are simple exports from AT, with just simple checks, and are explained below. You can also make the export via the command-line tools, automatising the process once and for all (more on this below).

Export via the software

A simple example is already provided with AT3: it is the Digitest song in songs/ArkosTracker3/digidrums/Digitest (you can also use the Sarkboteur song in the ArkosTracker2 folder). It is a simple song with two digidrums (Bassdrum (02) and Snare (03)).

Both samples are 8 kHz, and triggered via the event tracks:

Following the three steps mentioned above:

Export to AKY

This is simple and there is nothing to configure, except export as source without encoding an address. Also tick the “generate a configuration file”, though this is optional:

Export events

Use the “export events” option, with these values:

The “export only sample-related events” is important because events can also be used to synchronize events to your productions. You don’t want these in your digidrum player! By keeping only the “sample-related events”, only events which has the same number as a sample will be taken in account.

Export samples

Finally, export the samples:

Besides the usual “export as” at the bottom, the top section is important. You must follow the values stated in this screenshot:

  • Ignored unused samples: ticked, to remove the useless data (why waste memory?).
  • Generate index table: so that the player knows all the sample addresses.
  • Amplitude: 16, because the samples are on all 4 bits (0-15), maximizing their quality.
  • Offset: 128, the player relies on an optimization when addressing the PSG. By setting the bit 7 to 1, we save a few cycles.
  • Padding length: as explained in the digidrum source, extra-bytes must be added, because the player does not stop the sound accurately (checking it would be too slow), so we add a padding at the end to make sure that no “crappy” values are sent to the PSG. The value 160 depends on how fast the player reads the bytes.
  • Fade-out length: 20, to prevent “clicks” at the end of sample.
  • Padding/fade to min value: ticked, so that the “zero” is the same zero as the PSG, once again to prevent clicks and various volume problems.
  • Export only used length: ticked, as an optimization.

Listening to the result

You should have 4 files (or 3 if you didn’t export the “player configuration” in the AKY export). Feed them to the digidrum tester, replacing the currently used files:

Compile it with Rasm, and enjoy the result!

Export via command-line tools

More streamlined than clicking on various buttons in AT3, the CLI tools are powerful and allow you to create a build chain, reusable at will. They are in the “tools” folder.

For explanations about the parameters, check the sections above.

Export to AKY

SongToAky --exportPlayerConfig <input song> <output AKY file>

Export events

SongToEvents --eventType sample <input song> <output events file>

Export samples

SongToSamples -sma 16 -smo 128 -smfo 20 -smpl 160 -smmin -smonly <input song> <output samples file>

Listening to the result

Please refer to the section above :).