ATMLib State 2020

So I have decided to start an old project back up on the Arduboy and I was up to adding Audio to the project. I can see that Team ARG have kind of disappeared and taken down their Github repos, so I’m wondering if there is a new ‘official’ place for ATMLib/ATMLib2? Also interested in the tools to prepare audio for the libraries if anyone knows about those too.

And if these aren’t really available any more, what are people using for audio?

1 Like

The ATMlib library can still be installed through the Arduino IDE as it’s cached by Arduino download server.

I’ve got a forked version with some additional optimisations here

Until there is a better solution you can find the tracker here


Can someone who is really smart just be the sound person for arduboy, nobody except STG can pilot this ship and he was only available through joeri

1 Like

There should be @dxb who seemed quite interested in this.
Currently I am working on a python script to convert .mod files to ATM2lib files. However I am not smart enough to take over responsibility but I am interested to support anybody on that topic.


Thanks for all the replies.

@MLXXXp I had found that thread but had struggled a bit to find the information I was looking for. I’ll take another look through it.

@Mr.Blinky Thanks for those links. I think I’ll try to utilise those for my current build.

During my research I’ve been able to find pretty good information on just about everything except Audio. Keen to help out any way I can to bring the Audio tools and libraries up to the standard of the rest of the systems.

What kind of information is missing? For Arduboy audio there’s:

  • The BeepPin classes included in the Arduboy2 library. These classes are described in the library’s documentation.

  • The ArduboyTones library. Full documentation is included in the file in the GitHub repository.

  • The ArduboyPlaytune library. Full documentation is included in the file in the GitHub repository.

  • The ArdVoice library. The documentation provided in the repository’s file isn’t too detailed but there are example sketches included.

  • The ATMlib and ATMlib2 libraries. These are currently in a state of limbo due to Team A.R.G. removing the GitHub repositories and their web site.

1 Like

is somewhere the desktop music editor for atm2lib?

Actually I never saw a desktop editor for atm2lib. What I have in mind is to use standard trackers to create .mod files and convert these to the format for ATM2lib. Currently I am using Milkytracker to create music and convert the files to ATM2lib format. So once I finish the conversion script you can create your effects and music using a standard tracker.

1 Like

There was a tool that joeri and stg had between each other, I don’t know if it was ever a compiled binary and I think it still required you to go in by hand and tweak it after. From what I understood it was it’s own sequencer, I have no idea about what it looked like… but I do know he used an alpha version of it to compose the music for arduventure.

That sounds reasonable. If we could get hands on it that would make life much easier. For now I am taking the opportunity to understand the library and all the tracker stuff while writing the script for conversion. I am still a noob but going through all the effects and converting them from traditional .mod files to ATM2lib gives a lot on insight.
I already recognized that the ATM2lib commands offer some features that would allow to compress the resulting score in a way that would be difficult with a .mod. E.g. you can define the ticks between each note for Arpeggio at ATM2lib whereas Milkytracker always defines 1 tick between each note. To achieve the same effect in Milkytracker you would need to put several notes one after another (and maybe change tempo if required).
For now I make the conversion simple and maybe not taking advantage of all the neat features of ATM2lib just to be able to use a tracker like Milkytracker to compose music for the Arduboy. After that step there is time to optimize. Also my current goal is to put the music in flash so saving bytes here is not at upmost priority for now.

as an alternate way

there are famouse chiptune trackers used for zx spectrum 1-bit music, like

these trackers are supports a wide range of 1-bit engines and it’s possible to add plugins for ATMlib and ATM2lib. I’ll check the details.

Great. The more trackers we support the better. I will try to have a look at them as well.
Are you familiar with creating tacker music? Maybe you can create a demo song using square and noise waves?
Yesterday I recognized that ATM2lib only supports square and noise waves. Don’t know about ATMlib. Do you know it by luck?
I think at least triangle and maybe pulse should be added or better even any wave defined as lookup table. I am still new to DDS systems but looking at the code of ATM2lib it might be “simple” to add these features.

If we are going to dedicate this much effort into an audio engine for the 32u4 I think we need new hardware to take advantage of it with an audio output jack.

I’ve actually had an idea for a long time to make a 1 octave piano keyboard in the arduboy industrial design style…


I’d love to see that. Speaking for myself I am not the fastest one as my spare time is very limited but I will do my best to contribute. I think using trackers on the PC to compose music for the Arduboy is kind of a must because most users, if not all, do not want to fiddle with #defines or binary data.
Having that said, I think supporting trackers should be the first goal. When that is in place we can do all kind of cool stuff (extending the library to support e.g. new waves etc.) and an audio jack will make the hardware more appealing for 1bit music enthusiasts.

Any tracker that can produce MIDI file output can be used with the midi2tones converter to produce output compatible with either ArduboyTones or ArduboyPlaytune.

Under Linux, I’ve used Rosegarden to do it.

1 Like

Just to throw the idea out there, it ought to be possible to get the compiler to generate the actual binary data from a more human-readable description embedded in the code.

E.g. tone<note::csharp, 4_beats>() & tone<note::dflat, 2_beats>()
(I’m making the details up - I know nothing about sound, but plenty about what’s possible with template metaprogramming.)

Probably not as good as a tracker but might be an interesting experiment for describing simpler sound data.

1 Like

ATMlib has fixed sounds per channel:

  • channel 0: Pulse wave (75/25 on/off duty cycle)
  • channel 1: Square wave (50/50 on/off duty cycle)
  • channel 2:Triangle
  • channel 3: Noise

Yep that’s what I understand too. but the square wave duty cycle can be varied generating pulse wave (no triangle though).

ModusCreate used a version of Atmlib2 by @dxxb for their game Evade2
They also have an adapted tracker online here and available on github here
You can read more about it on their Making of Evade2 webpage


Might be interesting for sound effects for weapons and the like. I don’t know much about metaprogramming but it would be interesting to see if it works out for some cases.

You are correct. The pulse we can create by setting the duty cycle. I think adding triangle shouldn’t be a big thing as well I think. Maybe even Saw or table based waves will be easy. The oscillator code is quite cleaned up.

That is a nice hint. Did not know this. I will definitely have a look at this.