声もだしてみた。
ドレミファソラシと歌ってくれる。
伴奏は、ピアノ、ベース。

参考にしたページ
https://github.com/YuuichiAkagawa/USBH_MIDI
 exampleのeVY1_samploeを変更している

参考にした本
コンプリートMIDIブック 高橋信之著 株式会社リットーミュージック
歌うキーボード ポケット・ミク公式ブック 株式会社学研教育出版

#include <usbh_midi.h>
#include <usbhub.h>

// Satisfy the IDE, which needs to see the include statment in the ino too.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#include <SPI.h>
#endif

USB  Usb;
USBH_MIDI  Midi(&Usb);

void noteOn0(uint8_t note);
void noteOn1(uint8_t note);
void noteOn2(uint8_t note);
void noteOff0(uint8_t note);
void noteOff2(uint8_t note);

uint8_t key1;

void setup()
{
  key1=0;

  Serial.begin(115200);
 
  if (Usb.Init() == -1) {
    while(1); //halt
  }
  delay( 200 );
}

void loop()
{
   uint8_t buf[2];
   uint8_t buf1[15];

  if(key1 == 0)
  {
    Usb.Task();
    if( Usb.getUsbTaskState() == USB_STATE_RUNNING )
    {
      buf1[0] = 0xf0;
      buf1[1] = 0x43;
      buf1[2] = 0x79;
      buf1[3] = 0x09;
      buf1[4] = 0x11;
      buf1[5] = 0x0a; //input song
      buf1[6] = 0x01; // song slot
      buf1[7] = 0x32; //ド
      buf1[8] = 0x72; //レ
      buf1[9] = 0x65; //ミ
      buf1[10] = 0x5f; //ファ
      buf1[11] = 0x19; //ソ
      buf1[12] = 0x6f; //ラ
      buf1[13] = 0x20; //シ
      buf1[14] = 0xf7;
      Midi.SendData(buf1);    

      buf[0] = 0xc2;  //program change ch2
      buf[1] = 33;    //accustic bass
      Midi.SendData(buf);    

      buf[0] = 0xc1;  //program change ch1
      buf[1] = 1;    //accustic piano
      Midi.SendData(buf);    

      delay(2000);

      noteOn0(0x3c); //c4
      noteOn1(64); //e4
      noteOn2(52); //g3
      delay(500);
      noteOff0(0x3c);
      noteOff2(52);
      delay(100);
     
      noteOn0(0x3e); //d4
      noteOn1(65); //f4
      noteOn2(53); //a3
      delay(500);
      noteOff0(0x3e);
      noteOff2(53);
      delay(100);

      noteOn0(0x40); //e4
      noteOn1(67); //g4
      noteOn2(55); //b3
      delay(500);
      noteOff0(0x40);
      noteOff2(55);
      delay(100);

      noteOn0(0x41); //f4
      noteOn1(69); //a4
      noteOn2(57); //c3
      delay(500);
      noteOff0(0x41);
      noteOff2(57);
      delay(100);

      noteOn0(0x43); //g4
      noteOn1(71); //b4
      noteOn2(59); //d3
      delay(500);
      noteOff0(0x43);
      noteOff2(59);
      delay(100);

      noteOn0(0x45); //a4
      noteOn1(72); //c5
      noteOn2(60); //e3
      delay(500);
      noteOff0(0x45);
      noteOff2(60);
      delay(100);

      noteOn0(0x47); //b4
      noteOn1(74); //d5
      noteOn2(62); //f3
      delay(500);
      noteOff0(0x47);
      noteOff2(62);
      delay(100);

      key1=1;
    }
  }
}

//note On/off ch0,1,2
void noteOn0(uint8_t note)
{
  uint8_t buf[3];
  buf[0] = 0x90;
  buf[1] = note;
  buf[2] = 0x4f;
  Midi.SendData(buf);
}

void noteOff0(uint8_t note)
{
  uint8_t buf[3];
  buf[0] = 0x80;
  buf[1] = note;
  buf[2] = 0x6f;
  Midi.SendData(buf);
}

void noteOn1(uint8_t note)
{
  uint8_t buf[3];
  buf[0] = 0x91;
  buf[1] = note;
  buf[2] = 0x7f;
  Midi.SendData(buf);
}

void noteOn2(uint8_t note)
{
  uint8_t buf[3];
  buf[0] = 0x92;
  buf[1] = note;
  buf[2] = 0x7f;
  Midi.SendData(buf);
}
void noteOff2(uint8_t note)
{
  uint8_t buf[3];
  buf[0] = 0x82;
  buf[1] = note;
  buf[2] = 0x7f;
  Midi.SendData(buf);
}