Music Arduboy 2020

Hi,
What is the best way to do music with for the arduboy today ?
I would like to use a tracker, or convert a midi.
I had no luck with ardutones.
I found squawk but was unable to compil a sketch
I have succesfully played the atmlib example song but I want find a converter or a tracker to use…
well I guess I need a hand :slight_smile:

I have successfully used ArduboyTones. I also have had success converting midi to ArduboyTones using the converter that comes with it. The trick is to have one and one only track in your midi file before converting.

What problems are you facing with ArduboyTones?

There was a tracker for ATMLib, you can find it here >. https://github.com/Team-ARG-Museum?page=2

1 Like

You can also examine the array that midi2tones creates for your code, to help “tweak” your MIDI score. The frequency/duration format is simple and quite readable.

Make sure you’re using the -o2 option with midi2tones.

Look at the messages that midi2tones outputs. If you see a
“X notes were skipped because there is only 1 tone generator.”
message, your ArduboyTones score may not sound as you intended because you have more than one note playing at the same time some place(s) and ArduboyTones can only play one note at a time.

@aboy, if you would like to provide the MIDI file that you’re trying to convert, we could examine it and offer suggestions.

Hi dudes,
thank you very much for the quick answer.
my problem was some weird data in the midi file I have converted.

I have successfuly converted the mid and it’s playing perfectly (without the o2 option) as I have used the example snippet (Playtune) to play it.

Now I’m trying to change the music tempo without success, I tried to add at the begining of the datas
“0x9D, 26” but doesn’t change anything

and also I noticed that there’s a pause at the end of the converted datas, the music doesn’t loop properly.

thanks again.

1 Like

I hope that by this you actually mean the ArduboyTones library.

You have to change the tempo in the MIDI file itself before converting it using midi2tones

Ok scott, I suceed: Some advanced sequencers doesn’t save the tempo of the midi file when you export it. So I have used a free software called MidiEditor to set the tempo and it worked :slight_smile:

May I ask you wich tools you are using please ?

I haven’t done any real composing for the Arduboy myself but for experimentation and cleaning up MIDI files I use Rosegarden under Ubuntu Linux (then convert for Arduboy using midi2tones, of course).

Thank you very much.

Errr… I have another (stupid?) question:

sound.tones(score); is able to play (2 voices) music like tunes.playScore(score); from (ArduboyPlaytune) ?

Is not, it is possible to include both ArduboyTones.h and ArduboyPlaytune.h in the same program ?

No, only one tone at a time. Each tone can be normal or high volume.

No, they both need to use the same timer and interrupt.

What, exactly, are you wanting to do?

As example, playing a music (2 voices) for a tittle screen and then using tones only during the game.

Why not continue to use ArduboyPlaytune for the tones during the game?

because I’m beginner and I have started to use sound.tones, then I wanted to play a music, I thought I could use both (separately) :slight_smile: