Welcome to AYTers! (Eng)

Welcome to AYTers! (Eng)

It had been a while since I last wrote anything on this blog.
The recent release of our work—and of the AYT musical format—felt like the perfect opportunity to get back to it.

Cliquez ici pour la version française: 🇫🇷 https://blog.logonsystem.eu/bienvenue-aux-ayters-fra/

AYT : A New Approach to AY Music Formats

AYT Sound Format by GPA & Logon System
demotool for Linux / Windows / Amstrad CPC / ZX Spectrum / JavaScript / MSX / Amstrad Plus / MacOSX Intel, released in october 2025
Presentation image: Amstrad CPC 464+/6128+ by Ced

What Is the AYT Format?

AYT (AY Turbo) is a music file format designed for the AY-3-8910/2 sound chips from General Instrument and the YM2149 from Yamaha.
It is generated from the YM format, originally created by Léonard using data captured on the Atari ST. YM files store the raw values written to each register of the chip on every frame.

AYT introduces a different kind of “compression”, with one clear goal:
enable extremely fast, deterministic playback on pre-Atari 8-bit platforms with very limited CPU and memory resources.

Many other music formats already exist — so what makes AYT different?
Let’s dive in.


A Short Detour: Data Compression

Data compression emerged from the need to reduce the size of stored or transmitted information in an era of expensive memory, slow media, and limited bandwidth. Early theoretical work — Shannon, Huffman, Lempel & Ziv — laid the foundations of transforming long, redundant sequences into compact representations.

Over time, compression methods evolved: statistical models, adaptive dictionaries, transforms, entropy coding, delta encoding, run-length encoding… each balancing efficiency, speed, universality, and complexity.

But compression always hides a fundamental tension:

💡
the higher the compression ratio, the slower the algorithm — especially during decompression.

Modern hardware masks this trade-off. A few milliseconds of decompression barely register on a contemporary machine.

On retro platforms, however — especially extremely constrained ones like the Amstrad CPC — this dilemma is still very real.
A complex format may cost too many cycles, break fixed-timing code, or compete with the CPU time required to feed the sound chip.

This makes the classic trade-off between size and speed a crucial part of any retro-music workflow.

Presentation image: Amstrad CPC 464/664/6128 by Made

Why YM Isn’t Always Ideal

YM files are simple but large: they store all AY registers for every single frame. Previous approaches took advantage of the fact that YM compresses extremely well with modern general-purpose packers.

But decompression still costs CPU — and on the CPC or ZX Spectrum, free cycles are precious.

Modern memory expansions exist. CPUs… not so much. Attempting to “speed up” a Z80 typically means hardware mods that very few people actually want.

That’s why AYT takes a different approach:
instead of maximizing compression, it preserves the original structure of musical data as created by trackers and sequencers.

AYT tries to recover patterns the way musicians originally arranged them. It applies light compression, but maintains the vectorized logic of patterns, making them directly usable and fast to process.

This is the opposite of traditional YM-based approaches:

  • AYT does not aim for extreme compression
  • AYT aims for deterministic, ultra-fast playback
  • AYT respects the original musical structure

This idea has occurred to many people over the years — the challenge was finding the time and motivation to bring it this far.

Presentation image: MSX by Ced

The Genesis of AYT

Candy had experimented with similar ideas, as had I years ago. But the spark truly came from the improbable collision between Candy’s late-night musings and Tronic’s altruistic drive.

Tronic once “for fun” analyzed millions of lottery draws to see how often certain sequences appeared. After becoming fabulously rich (or so he claims), and in a moment worthy of Emmett Brown discovering the flux capacitor, he had a revelation:

What if we applied this pattern-frequency analysis to something actually useful?
Like… extracting unique AY patterns of length T?

Great Scott! AYT was born.

I won’t describe what the first prototypes looked like — let’s just say the journey had begun.
Then Siko joined in, and he and Tronic embarked on a wild race into pattern vectorization using simulated annealing, genetic algorithms, greedy heuristics, and other beautifully obscure concepts.

Each contributed massively, in completely opposite styles:

Tronic: full interstellar rocket mode

Siko: ultra-measured, ultra-precise mode

For my part, I refined the format’s specifications — header structure, initialization sequences, organization — to ensure maximum simplicity and efficiency.

Ease of use was a priority from day one.
All our work is available openly here:

Logon System
Logon System has 2 repositories available. Follow their code on GitHub.

A Personal Anecdote

Back in 2021, I needed a fixed-time player. None existed, so I adapted Madram and Shap’s excellent AYC player. I documented it thoroughly and shared it widely, but it saw limited adoption — perhaps due to AYC file complexity or distribution issues.

Until June 2025, it remained the fastest public fixed-time player on CPC.
But I never advertised it on Pouet.

That experience reinforced my belief that AYT needed:

  • clearer visibility
  • a simpler workflow
  • a player that was easy to integrate

This led to a major design pivot: instead of distributing a static routine and arcane initialization code, we built a player generator, which I called the builder. It produces the entire player on demand — like a micro-compiler.

Developers working in cross-dev can even imagine a C version generating player source code directly.

Tools grew rapidly from there, with powerful web-based utilities for conversion, listening, sequencing, and frequency adaptation.

Presentation image: ZX Spectrum by Ced

AYT File Size in Practice

AYT is not the smallest possible format — but raw size depends heavily on the source data. Trackers vary widely, and music from different platforms compresses very differently.

On the ZX Spectrum, which has the world’s largest AY music library:

83% of all AYT files converted from PT3 are under 17 KB.

More than 100,000 AYT tracks have already been generated from numerous formats and sound chips, offering solid statistical insight.

But remember: evaluating size alone is misleading.

The AYT player:

  • needs no decompression buffers
  • requires no special initialization to loop
  • is far smaller than most other players

Data size is only one part of the equation.


When Choose AYT Over More Compressed Formats?

There are many reasons to choose AYT beyond raw compression ratio.

Some advantages are impossible to achieve with heavily-compressed formats:

✔ Smaller after external packing

Compressed formats often can’t be recompressed efficiently.
AYT, once passed through a modern packer, is frequently smaller than other “already-compressed” formats.

This is huge for 4 KB intros or disk-size-constrained demos.

✔ Guaranteed fixed-time playback

AYT players run in strictly constant CPU time — every frame, including loops and end-of-track mute.
On CPC, even the first-frame initialization is included transparently.

This is crucial for demo timing.

✔ Fastest AY player on CPC

The standard CPC AYT player is currently the fastest AY player available.
The CPC+ optimized player is twice as fast.

✔ Very low initialization cost

AYT initializes only unused registers, and does so extremely cheaply.
On CPC it is fully automatic — no init routine required.

✔ Arbitrary loop points

AYT can loop anywhere in the song, always at fixed time.
Most compressed formats can only loop at the beginning.

✔ Deterministic ending / clean mute

AYT guarantees a consistent end point.
YM files are often poorly terminated or contain redundant frames.

✔ No musical alteration

Some converters approximate data.
AYT keeps the musical content exactly as intended.

✔ No strong size or addressing limits

AYT can handle large files; not all compressed formats can.

✔ Address-independent

AYT players are robust to memory alignment — no decompression buffers to worry about.

✔ Builder provides CPU timing

On CPC, the builder reports player CPU usage, invaluable for fixed-time productions.

✔ Multiplatform-ready

AYT is designed for portability.
CPC players often work on CPC+ as well, and a dedicated CPC+ player exists.

✔ ROM-compatible version available

Useful for cartridge-based or firmware-style productions.

✔ A practical ecosystem

Online tools, converters, simplicity of integration — all designed for usability.

Future ideas include reusing the same player for multiple tracks — ideal for games with music plus sound effects.


Closing Thoughts

There is still a vast amount to explore in the world of retro music formats and AY players.
Several aspects of this project sparked new ideas that look very promising — but that’s a story for another time, …

For now, I’ll stop this long post and warmly thank all the AYTers who supported us throughout this fascinating journey.
And special thanks to Ced, Made, and Med, whose immense talent gave this project some well-deserved visibility.

And apologies to everyone who had to endure “Le petit pont de bois”, accidentally left on a composition disk…😋

Longshot / Logon System