Tone function multitasking

Hey, I'm sort of new to Arduino and the language, and I am attempting to transpose a song onto a piezo buzzer using the tone function as well as delay. Currently my problem is that I can't overlay the left hand onto what I have on the right hand. I could divvy up each rest and notes that are there, but it wouldn't end up working very well, and be time consuming. My hopes are that I am able to write both the right and left hands independently and then have them both just running at the same time. Could anybody please tell me how it's possible to do that? I can't seem to find a solution. Thanks!

Note - I have 2 buzzers, one for the right hand, and one for the left.

// This #include statement was automatically added by the Particle IDE.
#include "Tone.h"
int buzzer = D2;
int button = D7;
int buz2 = TX;
int lastButtonState = HIGH;
//Note and rests lengths
int sixteen = 83;
int eight = 166;
int deight = 249;
int quarter = 333;
int dquarter = 499;
int half = 666;
int whole = 999;
int reight = 171;
int rquarter = 335;
int rhalf = 671;
int rwhole = 1004;
int rdeight = 254;
int rdquarter = 504;

//NOTES
int b0 = 31;
int c1 = 33;
int cs1 = 35;
int d1 = 37;
int ds1 = 39;
int e1 = 41;
int f1 = 44;
int fs1 = 46;
int g1 = 49;
int gs1 = 52;
int a1 = 55;
int as1 = 58;
int b1 = 62;
int c2 = 65;
int cs2 = 69;
int d2 = 73;
int ds2 = 78;
int e2 = 82;
int f2 = 87;
int fs2 = 93;
int g2 = 98;
int gs2 = 104;
int a2 = 110;
int as2 = 117;
int b2 = 123;
int c3 = 131;
int cs3 = 139;
int d3 = 147;
int ds3 = 156;
int e3 = 165;
int f3 = 175;
int fs3 = 185;
int g3 = 196;
int gs3 = 208;
int a3 = 220;
int as3 = 233;
int b3 = 247;
int c4 = 262;
int cs4 = 277;
int d4 = 294;
int ds4 = 311;
int e4 = 330;
int f4 = 349;
int fs4 = 370;
int g4 = 392;
int gs4 = 415;
int a4 = 440;
int as4 = 466;
int b4 = 494;
int c5 = 523;
int cs5 = 554;
int d5 = 587;
int ds5 = 622;
int e5 = 659;
int f5 = 698;
int fs5 = 740;
int g5 = 784;
int gs5 = 831;
int a5 = 880;
int as5 = 932;
int b5 = 988;

void setup() {
    pinMode(D7, INPUT_PULLUP);
    pinMode(D2, OUTPUT);
    pinMode(TX, OUTPUT);
}

void loop() {
    int state = digitalRead(button);
    
    if(state == LOW){
        //Intro
        tone(buzzer, b3, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, b3, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(rquarter);
        tone(buzzer, b3,  eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, b3, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(rquarter);
        tone(buzzer, b3,  eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, b3, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(rquarter);
        tone(buzzer, b3, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, b3, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(rquarter);
        tone(buzzer, b3,  eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, b3, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        tone(buz2, b2, eight);
        delay(rquarter);
        tone(buzzer, d4);
        tone(buz2, g2, quarter);
        delay(rquarter);
        tone(buzzer, d4, quarter);
        tone(buz2, g2, quarter);
        delay(rquarter);
        //End of measure 5
        tone(buzzer, b3, eight);
        delay(reight);
        tone(buzzer, b3, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(rquarter);
        tone(buzzer, b3,  eight);
        delay(reight);
        tone(buzzer, b3, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(rquarter);
        tone(buzzer, b3,  eight);
        delay(reight);
        tone(buzzer, b3, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(rquarter);
        tone(buzzer, b3, eight);
        delay(reight);
        tone(buzzer, b3, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(rquarter);
        tone(buzzer, b3,  eight);
        delay(reight);
        tone(buzzer, b3, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(reight);
        tone(buzzer, cs4, eight);
        delay(rquarter);
        tone(buzzer, a4, quarter);
        delay(rquarter);
        tone(buzzer, a4, quarter);
        delay(rquarter);
        tone(buzzer, fs4, eight);
        delay(reight);
        tone(buzzer, fs4, eight);
        delay(reight);
        tone(buzzer, fs4, eight);
        delay(reight);
        tone(buzzer, fs4, eight);
        delay(reight);
        tone(buzzer, fs4, eight);
        delay(reight);
        tone(buzzer, fs4, eight);
        delay(rquarter);
        tone(buzzer, fs4, eight);
        delay(reight);
        tone(buzzer, d4, dquarter);
        delay(reight);
        tone(buzzer, e4, 2497);
        delay(rwhole);
        tone(buzzer, fs4, dquarter);
        delay(rdquarter);
        tone(buzzer, e4, eight);
        delay(reight);
        tone(buzzer, e4, dquarter);
        delay(675);
        tone(buzzer, fs4, deight);
        delay(rdeight);
        tone(buzzer, fs4, deight);
        delay(rdeight);
        tone(buzzer, e4, eight);
        delay(reight);
        tone(buzzer, e4, half);
        delay(rhalf);
        tone(buzzer, e4, dquarter);
        delay(rdquarter);
        tone(buzzer, d4, eight);
        delay(reight);
        tone(buzzer, d4, quarter);
        delay(rquarter);
        tone(buzzer, a3, eight);
        delay(reight);
        tone(buzzer, cs4, quarter);
        delay(rquarter);
        tone(buzzer, d4, eight);
        delay(reight);
        tone(buzzer, e4, quarter);
        delay(rquarter);
        tone(buzzer, d4, half);
        delay(rhalf);
        tone(buzzer, fs4, dquarter);
        delay(rdquarter);
        tone(buzzer, e4, eight);
        delay(reight);
        tone(buzzer, e4, dquarter);
        delay(rdquarter);
        tone(buzzer, fs4, quarter);
        delay(rquarter);
        tone(buzzer, fs4, quarter);
        delay(rquarter);
        tone(buzzer, e4, eight);
        delay(reight);
        tone(buzzer, e4, quarter);
        delay(rdquarter);
        tone(buzzer, d4, eight);
        delay(reight);
        tone(buzzer, e4, quarter);
        delay(rquarter);
        tone(buzzer, d4, eight);
        delay(reight);
        tone(buzzer, e4, quarter);
        delay(rquarter);
        tone(buzzer, d4, eight);
        delay(reight);
        tone(buzzer, fs4, 1332);
        delay(1342);
        tone(buzzer, fs4, dquarter);
        delay(rdquarter);
        tone(buzzer, e4, eight);
        delay(reight);
        tone(buzzer, e4, dquarter);
        delay(rdquarter);
        tone(buzzer, fs4, quarter);
        delay(rquarter);
        tone(buzzer, fs4, quarter);
        delay(rquarter);
        tone(buzzer, e4, eight);
        delay(reight);
        tone(buzzer, e4, half);
        delay(rhalf);
       //End of measure 20
        tone(buzzer, e4, dquarter);
        delay(rdquarter);        
    }
}

Do you mean that you want to play two tones at a time? If so, that's not possible.
From the "Tone" reference:-

Only one tone can be generated at a time. If a tone is already playing on a different pin, the call to tone() will have no effect. If the tone is playing on the same pin, the call will set its frequency.

Of course, you can use blink without delay and make lots of tones.
Here's 8 for example:

I just did exactly that. But I didn't use the tone() function. I just had two timer variables and switched the outputs on and off based on the times. I did use a Teensy at 72MHz clock speed, so I don't know if the same method will work on a slower Arduino.

This is non blocking tone library - play() is non-blocking. Once called, play() will return immediately. If duration is given, the tone will play for that amount of time, and then stop automatically.

https://code.google.com/archive/p/rogue-code/wikis/ToneLibraryDocumentation.wiki

// Duelling Tones - Simultaneous tone generation.
// To mix the output of the signals to output to a small speaker (i.e. 8 Ohms or higher),
// simply use 1K Ohm resistors from each output pin and tie them together at the speaker.
// Don't forget to connect the other side of the speaker to ground!

// This example plays notes 'a' through 'g' sent over the Serial Monitor.
// 's' stops the current playing tone.  Use uppercase letters for the second.

#include <Tone.h>

int notes[] = { NOTE_A3,
                NOTE_B3,
                NOTE_C4,
                NOTE_D4,
                NOTE_E4,
                NOTE_F4,
                NOTE_G4 };

// You can declare the tones as an array
Tone notePlayer[2];

void setup(void)
{
  Serial.begin(9600);
  notePlayer[0].begin(11);
  notePlayer[1].begin(12);
}

void loop(void)
{
  char c;

  if(Serial.available())
  {
    c = Serial.read();
    
    switch(c)
    {
      case 'a'...'g':
        notePlayer[0].play(notes[c - 'a']);
        Serial.println(notes[c - 'a']);
        break;
      case 's':
        notePlayer[0].stop();
        break;

      case 'A'...'G':
        notePlayer[1].play(notes[c - 'A']);
        Serial.println(notes[c - 'A']);
        break;
      case 'S':
        notePlayer[1].stop();
        break;

      default:
        notePlayer[1].stop();
        notePlayer[0].play(NOTE_B2);
        delay(300);
        notePlayer[0].stop();
        delay(100);
        notePlayer[1].play(NOTE_B2);
        delay(300);
        notePlayer[1].stop();
        break;
    }
  }
}

Bearbot:
Hey, I'm sort of new to Arduino and the language, and I am attempting to transpose a song onto a piezo buzzer using the tone function as well as delay. Currently my problem is that I can't overlay the left hand onto what I have on the right hand. I could divvy up each rest and notes that are there, but it wouldn't end up working very well, and be time consuming. My hopes are that I am able to write both the right and left hands independently and then have them both just running at the same time. Could anybody please tell me how it's possible to do that?

At first you need to have enough unused hardware timer ressources
One hardware timer for one tone at a time.

The Atmega328 has 3 hardware timers
The Atmega2560 has 6 hardware timers
One of the hardware timers (TIMER0) is already used by the Arduino core libraries for providing functions like millis(), micros(),delay() and such.

So with the Atmega328 controller you have two timers available for two tones playing simultanously,
and with Atmega2560 controller you have five timers available for five tones playing simultanously.
But if you cannot program the timers yourself in a suitable way, you need a library for that. The Arduino tone(() function in the core library can only play one tone at a time (monophonic).

I think the NewTone library can do polyphonic tone generation:

But unfortunately the library doe NOT come with a two-voice polyphonic tone example.
So you need to do some research, inspect the library code to find out how it works.

And be aware:Each tone played makes one hardware timer unusable for differeent control. So if you want to use Servo, infrared control or RF libraries, please make sure which hardware timers they need before playing tones, or your servo, IR, RF libraries might not work at the same time when tones are playing.