In the general implementation without special attributes such as const and PROGMEM, it will locate on SRAM.
There are some ways of supporting chords with MML.
First of all, you should understand there are many schemes to support chords with this library.
As I wrote elsewhere, this library allows you only to parse MML text string, and it doesn't provide 'how to make a sound'.
For example, one of the ways is using 'C0E0G4' for C chord in C major.
The zero length notes are indicating the part of the chord.
Please see also my Super Mario example with Arduino!
static int get_note_frequency(const int note)
{
static const double BASEFREQ = 55.0;
return (int)(BASEFREQ * pow((double)2.0, (double)((double)(note - 9) / 12.0)));
}
static int get_note_length_ms(const int bpm, const int bticks, const int note_ticks)
{
return (60 * 1000) * note_ticks / bpm / bticks;
}