Can the Arduboy use two sound chips at the same time?

I am trying to make an arcade-like game for the Arduboy, where the player’s task is to push boxes off ledges to destroy enemies with those boxes as the player travels through a series of monster-infested levels.
I also want to make more game for this miniature device.
So I’ve been wondering if we can use the beeper (sounds effects, tom-tom drums) and Team ARG’s ATM library (music) simultaneously.

There will be a mobile version of the mentioned arcade game.

If simple one or two channel square wave tone music is good enough for you, you can use the ArduboyPlaytune library. (When sounding “beeps” one of the music channels is muted.)

The PlayTune example sketch in the Arduboy2 library is a good example of this.
File > Examples > Arduboy2 > PlayTune

Okay. I was talking about whether we are able to use the ATM library and the beeper at the same time.

The ATM library should be capable of what you want, as well, but it may be a bit more complicated to implement.

You wouldn’t use the “beeper”. You would generate both the music and the sound effects using ATMlib.

I would like this arcade game I’m making to be the Super Mario Bros. of the Arduboy in a sense that it does a lot with little.
The music would be tricky to compose for this without the music getting boring over time. There will be a PC, iOS and Android remake of this game. Might add a classic mode (conversion of the Arduboy version) there.
And I want the sound effects to be played without being corrupted by the effects (tremolo, volume bend, frequency bend, vibrato) that are applied to the music.

The game will have a female antagonist, but you play as a male protagonist…
Saving a damsel in distress…

My lazy method is to run 2 instances of playtune, one for the music, and one for the sound effects. It’s a memory hog but it’s easy hacky way to implement.

I think I had to go and hard code the timers each instance would use, but its been a few years.

4 channel music is what’s going to make the project special.
I’ve actually been making chiptunes for over two years.

Then ATMlib is extremely good, but the developers have abandoned it unfortunately.

And I’m not going to be one of them.
Is this because the tracker was too hard for them?

I’m not sure what state it’s in (there’s been no updates for nearly 2 years) but you could look at using ATMlib2. If it works, it should be able to do all you want.


What kind of “special effects” do you want. If all you want are simple square wave tones, another alternative is to use either ATMlib or ATMlib2 for the music and play the simple sound effect tones using an Arduboy2 library “BeepPin” class. You would have to modify the ATM library to use only one pin. Currently the ATM libraries use both pins but only to produce higher volume output. Changing either one to use only one pin should be fairly simple.

I started making chiptunes on BeepBox. I didn’t really upload those at first, but after years of practice and experience, BeepBox mods and BeepBox updates, I can now make video game music.
I even started making FL Studio music. The feel of the tunes I made on FL Studio recently is basically the same as it would on BeepBox, possibly due to various things that influenced my creativity and me getting the hang of how to compose music.
And hasn’t been updates for 2 years? That’s because I knew nothing about the Arduboy back then and I wasn’t even in this community.

Like I already mentioned, there’s effects like tremolo, glissando, arpeggio, frequency slide, volume slide, vibrato and note cut off. There’s a tracker for Team ARG’s ATMlib.

Presumably the two libraries would be trying to control the same hardware,
so they’d end up conflicting with each other and the result would probably be somewhere between barely audible squeaks and an ear-rupturing cacophony of noise.

Theoretically it ought to be possible to do beeps on one sound pin and music on another,
or to mix the two (which is what I believe modern video games do),
but I’m not sure if there are any ready-made solutions capable of doing either of those.

If there is, it’ll probably be ATMLib or ATMLib2.

If there isn’t you’ll either have to write something yourself or make do without.

Looking at it I’m not sure how you’d get the music onto the Arduboy.
I can see that it’s possible to get the song data as a base64 encoded string,
but I’m not sure what format the raw bytes are in.

If they’re in PCM then you might be in luck, otherwise it might be somewhat difficult.


But fortunately it’s open source so anyone can pick it up and continue from where they left off.

Yes, I understand that your music has this.

What I’m asking is what kind of sounds do you want for your sound effects, like when a character jumps, shoots, runs into something, etc.
Are simple square wave tones good enough?
Do you want the background music to continue to play while an effect is sounding or can the music be muted during an effect?

I would pioneer this technique on the Arduboy then. But the problem is, I don’t have an Arduboy so I use an emulator, but when I play a game with ATMlib, I can’t hear anything.

Actually, I hear nothing during this. Absolutely nothing.

For the type of sounds you want, you’re almost certainly going to need real hardware. The emulator can’t handle the type of PWM sounds that ATMlib produces.

Although I can hear the tracker clear and well. Do I get someone to program the audio in for me if I can’t have an Arduboy. I live in Ukraine.

The beeper works just fine on the emulator.

What exactly do you mean by “the beeper”?

The thing that makes square wave noises when there’s no sound card or sound library.