Four music song with 4 FSRs and 1 button
#include "minute_g.h"
#include "harrypotter.h"
#include "greensleeves.h"
#include "starwars.h"
//#include "pulodagaita.h"
#include
#include
#ifdef __AVR__
#include // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the Neostrip?
#define PIN 5
// How many Neostrip are attached to the Arduino?
#define NUMstrip 121
const int buzzer = 11; //buzzer to arduino pin 11
// When setting up the NeoPixel library, we tell it how many strip,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest examplbe for more information on possible values.
Adafruit_NeoPixel strip(NUMstrip, PIN, NEO_GRB + NEO_KHZ800);
void myTone(int pin, int frequency, int duration) {
int startTime = millis();
int period = 1000000 / frequency;
while ((millis() - startTime) < duration) {
digitalWrite(pin, HIGH);
delayMicroseconds(period / 2);
digitalWrite(pin, LOW);
delayMicroseconds(period / 2);
}
}
int notes_mg = sizeof(melody_mg) / sizeof(melody_mg[0]) / 2;
// sizeof gives the number of bytes, each int value is composed of two bytes (16 bits)
// there are two values per note (pitch and duration), so for each note there are four bytes
int notes_hp = sizeof(melody_hp) / sizeof(melody_hp[0]) / 2;
//
int notes_sw = sizeof(melody_sw) / sizeof(melody_sw[0]) / 2;
int notes_gs = sizeof(melody_gs) / sizeof(melody_gs[0]) / 2;
//
//int notes_pd = sizeof(melody_pd) / sizeof(melody_pd[0]) / 2;
//// change this to make the song slower or faster
//int tempo_gs = 70;
//
//int tempo_mg = 140;
//
//int tempo_hp = 144;
//
//// change this to make the song slower or faster
//int tempo_sw = 108;
//
//int tempo_pd = 100;
int divider = 0, noteDuration = 0;
// this calculates the duration of a whole note in ms (60s/tempo)*4 beats
//int wholenote = (60000 * 4) / 144;
void setColor() {
for (int i = 0; i < NUMstrip; i++) {
if (i % 5 == 0)
{
strip.setPixelColor(i, strip.Color(255, 0, 107));
}
else if (i % 5 == 1)
{
strip.setPixelColor(i, strip.Color(255, 153, 0));
}
else if (i % 5 == 2)
{
strip.setPixelColor(i, strip.Color(0, 71, 255));
}
else if (i % 5 == 3)
{
strip.setPixelColor(i, strip.Color(5, 245, 0));
}
else if (i % 5 == 4)
{
strip.setPixelColor(i, strip.Color(255, 255, 255));
}
}
strip.show(); // Send the updated pixel colors to the hardware.
}
class FSR
{
// Class Member Variables
int FSRPin;
int FSRReading;
int LEDbrightness;
int LEDR;
int LEDG;
int LEDB;
int Brightness;
// constructor - create a FSR and initialize the member variables and state
public:
FSR (int pin, int ledr, int ledg, int ledb, int brightness)
{
FSRPin = pin;
pinMode(FSRPin, OUTPUT);
LEDR = ledr;
LEDG = ledg;
LEDB = ledb;
Brightness = brightness;
}
void Update()
{
FSRReading = analogRead(FSRPin);
LEDbrightness = map(FSRReading, 0, 1023, 0, 255);
// Serial.print("Analog reading0 = ");
// Serial.println(FSRReading);
if (FSRReading > 200) {
for (int i = 0; i < NUMstrip; i++) {
// first one: LEDbrightness, 0, 107
strip.setPixelColor(i, strip.Color(LEDbrightness, LEDG, LEDB));
//second one: LEDbrightness, 153, 0
}
strip.setBrightness(Brightness);
strip.show(); // This sends the updated pixel color to the hardware.
}
else {
setColor();
strip.setBrightness(10);
}
}
};
class MinuetG
{
int FSRPin;
int FSRReading;
int Buzzerpin;
int frequency;
int noteDuration;
int startTime;
int period;
int wholenote = 60000 * 4 / 140;
public:
MinuetG(int fsrpin, int buzzerpin, int frequency, int duration)
{
FSRPin = fsrpin;
Buzzerpin = buzzerpin;
pinMode(FSRPin, OUTPUT);
noteDuration = duration;
startTime = millis();
period = 1000000 / frequency;
}
void Update()
{
FSRReading = analogRead(FSRPin);
if (FSRReading > 200) {
Serial.println("starting loop");
for (int thisNote = 0; thisNote < notes_mg * 2; thisNote = thisNote + 2) {
// calculates the duration of each note
divider = melody_mg[thisNote + 1];
if (divider > 0) {
// regular note, just proceed
noteDuration = (wholenote) / divider;
} else if (divider < 0) {
// dotted notes are represented with negative durations!!
noteDuration = (wholenote) / abs(divider);
noteDuration *= 1.5; // increases the duration in half for dotted notes
}
// we only play the note for 90% of the duration, leaving 10% as a pause
tone(buzzer, melody_mg[thisNote], noteDuration * 0.9);
// Wait for the specief duration before playing the next note.
delay(noteDuration);
// stop the waveform generation before the next note.
noTone(buzzer);
}
Serial.println("loop done");
}
else {
// stop the waveform generation before the next note.
noTone(buzzer);
}
}
};
class HarryPotter
{
int FSRPin;
int FSRReading;
int Buzzerpin;
int frequency;
int noteDuration;
int startTime;
int period;
int wholenote = 60000 * 4 / 144;
public:
HarryPotter(int fsrpin, int buzzerpin, int frequency, int duration)
{
FSRPin = fsrpin;
Buzzerpin = buzzerpin;
pinMode(FSRPin, OUTPUT);
noteDuration = duration;
startTime = millis();
period = 1000000 / frequency;
}
void Update()
{
FSRReading = analogRead(FSRPin);
if (FSRReading > 200) {
Serial.println("starting loop");
for (int thisNote = 0; thisNote < notes_hp * 2; thisNote = thisNote + 2) {
// calculates the duration of each note
divider = melody_hp[thisNote + 1];
if (divider > 0) {
// regular note, just proceed
noteDuration = (wholenote) / divider;
} else if (divider < 0) {
// dotted notes are represented with negative durations!!
noteDuration = (wholenote) / abs(divider);
noteDuration *= 1.5; // increases the duration in half for dotted notes
}
// we only play the note for 90% of the duration, leaving 10% as a pause
tone(buzzer, melody_hp[thisNote], noteDuration*0.9);
// Wait for the specief duration before playing the next note.
delay(noteDuration);
// stop the waveform generation before the next note.
noTone(buzzer);
Serial.println("loop done");
}
}
else {
// stop the waveform generation before the next note.
noTone(buzzer);
}
}
};
class StarWars
{
int FSRPin;
int FSRReading;
int Buzzerpin;
int frequency;
int noteDuration;
int startTime;
int period;
int wholenote = 60000 * 4 / 108;
public:
StarWars(int fsrpin, int buzzerpin, int frequency, int duration)
{
FSRPin = fsrpin;
Buzzerpin = buzzerpin;
pinMode(FSRPin, OUTPUT);
noteDuration = duration;
startTime = millis();
period = 1000000 / frequency;
}
void Update()
{
FSRReading = analogRead(FSRPin);
if (FSRReading > 200) {
Serial.println("starting loop");
for (int thisNote = 0; thisNote < notes_sw * 2; thisNote = thisNote + 2) {
// calculates the duration of each note
divider = melody_sw[thisNote + 1];
if (divider > 0) {
// regular note, just proceed
noteDuration = (wholenote) / divider;
} else if (divider < 0) {
// dotted notes are represented with negative durations!!
noteDuration = (wholenote) / abs(divider);
noteDuration *= 1.5; // increases the duration in half for dotted notes
}
// we only play the note for 90% of the duration, leaving 10% as a pause
tone(buzzer, melody_sw[thisNote], noteDuration*0.9);
// Wait for the specief duration before playing the next note.
delay(noteDuration);
// stop the waveform generation before the next note.
noTone(buzzer);
}
}
else {
// stop the waveform generation before the next note.
noTone(buzzer);
}
}
};
class GreenSleeves
{
int FSRPin;
int FSRReading;
int Buzzerpin;
int frequency;
int noteDuration;
int startTime;
int period;
int wholenote = 60000 * 4 / 70;
public:
GreenSleeves(int fsrpin, int buzzerpin, int frequency, int duration)
{
FSRPin = fsrpin;
Buzzerpin = buzzerpin;
pinMode(FSRPin, OUTPUT);
noteDuration = duration;
startTime = millis();
period = 1000000 / frequency;
}
void Update()
{
FSRReading = analogRead(FSRPin);
if (FSRReading > 200) {
Serial.println("starting loop");
for (int thisNote = 0; thisNote < notes_gs * 2; thisNote = thisNote + 2) {
// calculates the duration of each note
divider = melody_gs[thisNote + 1];
if (divider > 0) {
// regular note, just proceed
noteDuration = (wholenote) / divider;
} else if (divider < 0) {
// dotted notes are represented with negative durations!!
noteDuration = (wholenote) / abs(divider);
noteDuration *= 1.5; // increases the duration in half for dotted notes
}
// we only play the note for 90% of the duration, leaving 10% as a pause
tone(buzzer, melody_gs[thisNote], noteDuration*0.9);
// Wait for the specief duration before playing the next note.
delay(noteDuration);
// stop the waveform generation before the next note.
noTone(buzzer);
}
}
else {
// stop the waveform generation before the next note.
noTone(buzzer);
}
}
};
FSR fsr1(0, 0, 0, 107, 50);
FSR fsr2(1, 0, 153, 0, 30);
FSR fsr3(1, 0, 71, 255, 80);
FSR fsr4(3, 200, 245, 0, 100);
FSR fsr5(4, 255, 255, 255, 150);
MinuetG music1(0, 11, 140, 10);
HarryPotter music2(1, 11, 392, 10);
//
//
//Pulodagaita music3(2, 11, 107, 10);
StarWars music4(3, 11, 140, 10);
GreenSleeves music5(4, 11, 107, 10);
void noplay(){
noTone(buzzer);
delay(1000);
}
void setup() {
Serial.begin(9600);
strip.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip.setBrightness(10); // Set BRIGHTNESS to about 1/5 (max = 255)
pinMode(buzzer, OUTPUT); // Set buzzer - pin 11 as an output
// MinuetG.Update();
}
void loop() {
// strip.clear();
// start idle animation
//check for if sensors are pressed
//if pressed, update
fsr1.Update();
music1.Update();
fsr2.Update();
music2.Update();
fsr3.Update();
// music3.Update();
fsr4.Update();
music4.Update();
fsr5.Update();
music5.Update();
// MinuetG.Update();
}
Green Sleeves
//https://github.com/robsoncouto/arduino-songs/blob/master/greensleeves/greensleeves.ino
int melody_gs[] = {
// Greensleeves
// Score available at https://musescore.com/user/168402/scores/1396946
// Alexander Trompoukis
NOTE_G4,8,//1
NOTE_AS4,4, NOTE_C5,8, NOTE_D5,-8, NOTE_DS5,16, NOTE_D5,8,
NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,
NOTE_AS4,4, NOTE_G4,8, NOTE_G4,-8, NOTE_FS4,16, NOTE_G4,8,
NOTE_A4,4, NOTE_FS4,8, NOTE_D4,4, NOTE_G4,8,
NOTE_AS4,4, NOTE_C5,8, NOTE_D5,-8, NOTE_DS5,16, NOTE_D5,8,//6
NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,
NOTE_AS4,-8, NOTE_A4,16, NOTE_G4,8, NOTE_FS4,-8, NOTE_E4,16, NOTE_FS4,8,
NOTE_G4,-2,
NOTE_F5,2, NOTE_E5,16, NOTE_D5,8,
// NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,//11
// NOTE_AS4,4, NOTE_G4,8, NOTE_G4,-8, NOTE_FS4,16, NOTE_G4,8,
// NOTE_A4,4, NOTE_FS4,8, NOTE_D4,04,
// NOTE_F5,2, NOTE_E5,16, NOTE_D5,8,
// NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,
//
// NOTE_AS4,-8, NOTE_A4,16, NOTE_G4,8, NOTE_FS4,-8, NOTE_E4,16, NOTE_FS4,8,//16
// NOTE_G4,-2,
//
// //repeats from the beginning
//
// NOTE_G4,8,//1
// NOTE_AS4,4, NOTE_C5,8, NOTE_D5,-8, NOTE_DS5,16, NOTE_D5,8,
// NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,
// NOTE_AS4,4, NOTE_G4,8, NOTE_G4,-8, NOTE_FS4,16, NOTE_G4,8,
// NOTE_A4,4, NOTE_FS4,8, NOTE_D4,4, NOTE_G4,8,
//
// NOTE_AS4,4, NOTE_C5,8, NOTE_D5,-8, NOTE_DS5,16, NOTE_D5,8,//6
// NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,
// NOTE_AS4,-8, NOTE_A4,16, NOTE_G4,8, NOTE_FS4,-8, NOTE_E4,16, NOTE_FS4,8,
// NOTE_G4,-2,
// NOTE_F5,2, NOTE_E5,16, NOTE_D5,8,
//
// NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,//11
// NOTE_AS4,4, NOTE_G4,8, NOTE_G4,-8, NOTE_FS4,16, NOTE_G4,8,
// NOTE_A4,4, NOTE_FS4,8, NOTE_D4,04,
// NOTE_F5,2, NOTE_E5,16, NOTE_D5,8,
// NOTE_C5,4, NOTE_A4,8, NOTE_F4,-8, NOTE_G4,16, NOTE_A4,8,
//
// NOTE_AS4,-8, NOTE_A4,16, NOTE_G4,8, NOTE_FS4,-8, NOTE_E4,16, NOTE_FS4,8,//16
// NOTE_G4,-2
};
Harry Potter
//https://github.com/robsoncouto/arduino-songs/blob/master/harrypotter/harrypotter.ino
int melody_hp[] = {
// Hedwig's theme fromn the Harry Potter Movies
// Socre from https://musescore.com/user/3811306/scores/4906610
REST, 2, NOTE_D4, 4,
NOTE_G4, -4, NOTE_AS4, 8, NOTE_A4, 4,
NOTE_G4, 2, NOTE_D5, 4,
NOTE_C5, -2,
NOTE_A4, -2,
NOTE_G4, -4, NOTE_AS4, 8, NOTE_A4, 4,
NOTE_F4, 2, NOTE_GS4, 4,
NOTE_D4, -1,
NOTE_D4, 4,
NOTE_G4, -4, NOTE_AS4, 8, NOTE_A4, 4, //10
NOTE_G4, 2, NOTE_D5, 4,
NOTE_F5, 2, NOTE_E5, 4,
NOTE_DS5, 2, NOTE_B4, 4,
NOTE_DS5, -4, NOTE_D5, 8, NOTE_CS5, 4,
NOTE_CS4, 2, NOTE_B4, 4,
NOTE_G4, -1,
NOTE_AS4, 4,
//
// NOTE_D5, 2, NOTE_AS4, 4,//18
// NOTE_D5, 2, NOTE_AS4, 4,
// NOTE_DS5, 2, NOTE_D5, 4,
// NOTE_CS5, 2, NOTE_A4, 4,
// NOTE_AS4, -4, NOTE_D5, 8, NOTE_CS5, 4,
// NOTE_CS4, 2, NOTE_D4, 4,
// NOTE_D5, -1,
// REST,4, NOTE_AS4,4,
//
// NOTE_D5, 2, NOTE_AS4, 4,//26
// NOTE_D5, 2, NOTE_AS4, 4,
// NOTE_F5, 2, NOTE_E5, 4,
// NOTE_DS5, 2, NOTE_B4, 4,
// NOTE_DS5, -4, NOTE_D5, 8, NOTE_CS5, 4,
// NOTE_CS4, 2, NOTE_AS4, 4,
// NOTE_G4, -1,
};
Minuet G
//https://github.com/robsoncouto/arduino-songs/blob/master/minuetg/minuetg.ino
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
#define NOTE_A1 55
#define NOTE_AS1 58
#define NOTE_B1 62
#define NOTE_C2 65
#define NOTE_CS2 69
#define NOTE_D2 73
#define NOTE_DS2 78
#define NOTE_E2 82
#define NOTE_F2 87
#define NOTE_FS2 93
#define NOTE_G2 98
#define NOTE_GS2 104
#define NOTE_A2 110
#define NOTE_AS2 117
#define NOTE_B2 123
#define NOTE_C3 131
#define NOTE_CS3 139
#define NOTE_D3 147
#define NOTE_DS3 156
#define NOTE_E3 165
#define NOTE_F3 175
#define NOTE_FS3 185
#define NOTE_G3 196
#define NOTE_GS3 208
#define NOTE_A3 220
#define NOTE_AS3 233
#define NOTE_B3 247
#define NOTE_C4 262
#define NOTE_CS4 277
#define NOTE_D4 294
#define NOTE_DS4 311
#define NOTE_E4 330
#define NOTE_F4 349
#define NOTE_FS4 370
#define NOTE_G4 392
#define NOTE_GS4 415
#define NOTE_A4 440
#define NOTE_AS4 466
#define NOTE_B4 494
#define NOTE_C5 523
#define NOTE_CS5 554
#define NOTE_D5 587
#define NOTE_DS5 622
#define NOTE_E5 659
#define NOTE_F5 698
#define NOTE_FS5 740
#define NOTE_G5 784
#define NOTE_GS5 831
#define NOTE_A5 880
#define NOTE_AS5 932
#define NOTE_B5 988
#define NOTE_C6 1047
#define NOTE_CS6 1109
#define NOTE_D6 1175
#define NOTE_DS6 1245
#define NOTE_E6 1319
#define NOTE_F6 1397
#define NOTE_FS6 1480
#define NOTE_G6 1568
#define NOTE_GS6 1661
#define NOTE_A6 1760
#define NOTE_AS6 1865
#define NOTE_B6 1976
#define NOTE_C7 2093
#define NOTE_CS7 2217
#define NOTE_D7 2349
#define NOTE_DS7 2489
#define NOTE_E7 2637
#define NOTE_F7 2794
#define NOTE_FS7 2960
#define NOTE_G7 3136
#define NOTE_GS7 3322
#define NOTE_A7 3520
#define NOTE_AS7 3729
#define NOTE_B7 3951
#define NOTE_C8 4186
#define NOTE_CS8 4435
#define NOTE_D8 4699
#define NOTE_DS8 4978
#define REST 0
int melody_mg[] = {
// Minuet in G - Petzold
// Score available at https://musescore.com/user/3402766/scores/1456391
NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8, //1
NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8,
NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,//6
NOTE_FS4,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_G4,8,
NOTE_A4,-2,
NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8,
NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, //12
NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,
NOTE_A4,4, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8, NOTE_FS4,8,
NOTE_G4,-2,
//repeats from 1
NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8, //1
NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8,
NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,//6
NOTE_FS4,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_G4,8,
NOTE_A4,-2,
NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8,
NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, //12
NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,
NOTE_A4,4, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8, NOTE_FS4,8,
NOTE_G4,-2,
//
// //continues from 17
//
// NOTE_B5,4, NOTE_G5,8, NOTE_A5,8, NOTE_B5,8, NOTE_G5,8,//17
// NOTE_A5,4, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8, NOTE_D5,8,
// NOTE_G5,4, NOTE_E5,8, NOTE_FS5,8, NOTE_G5,8, NOTE_D5,8,
// NOTE_CS5,4, NOTE_B4,8, NOTE_CS5,8, NOTE_A4,4,
// NOTE_A4,8, NOTE_B4,8, NOTE_CS5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
//
// NOTE_G5,4, NOTE_FS5,4, NOTE_E5,4, //22
// NOTE_FS5,4, NOTE_A4,4, NOTE_CS5,4,
// NOTE_D5,-2,
// NOTE_D5,4, NOTE_G4,8, NOTE_FS5,8, NOTE_G4,4,
// NOTE_E5,4, NOTE_G4,8, NOTE_FS4,8, NOTE_G4,4,
// NOTE_D5,4, NOTE_C5,4, NOTE_B4,4,
//
// NOTE_A4,8, NOTE_G4,8, NOTE_FS4,8, NOTE_G4,8, NOTE_A4,4, //28
// NOTE_D4,8, NOTE_E4,8, NOTE_FS4,8, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8,
// NOTE_C5,4, NOTE_B4,4, NOTE_A4,4,
// NOTE_B4,8, NOTE_D5,8, NOTE_G4,4, NOTE_FS4,4,
// NOTE_G4,-2,
//
//
};
Star Wars
//https://github.com/robsoncouto/arduino-songs/blob/master/starwars/starwars.ino
int melody_sw[] = {
// Dart Vader theme (Imperial March) - Star wars
// Score available at https://musescore.com/user/202909/scores/1141521
// The tenor saxophone part was used
NOTE_AS4,8, NOTE_AS4,8, NOTE_AS4,8,//1
NOTE_F5,2, NOTE_C6,2,
NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4,
NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4,
NOTE_AS5,8, NOTE_A5,8, NOTE_AS5,8, NOTE_G5,2, NOTE_C5,8, NOTE_C5,8, NOTE_C5,8,
NOTE_F5,2, NOTE_C6,2,
NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4,
NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4, //8
NOTE_AS5,8, NOTE_A5,8, NOTE_AS5,8, NOTE_G5,2, NOTE_C5,-8, NOTE_C5,16,
NOTE_D5,-4, NOTE_D5,8, NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F5,8,
NOTE_F5,8, NOTE_G5,8, NOTE_A5,8, NOTE_G5,4, NOTE_D5,8, NOTE_E5,4,NOTE_C5,-8, NOTE_C5,16,
NOTE_D5,-4, NOTE_D5,8, NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F5,8,
//
// NOTE_C6,-8, NOTE_G5,16, NOTE_G5,2, REST,8, NOTE_C5,8,//13
// NOTE_D5,-4, NOTE_D5,8, NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F5,8,
// NOTE_F5,8, NOTE_G5,8, NOTE_A5,8, NOTE_G5,4, NOTE_D5,8, NOTE_E5,4,NOTE_C6,-8, NOTE_C6,16,
// NOTE_F6,4, NOTE_DS6,8, NOTE_CS6,4, NOTE_C6,8, NOTE_AS5,4, NOTE_GS5,8, NOTE_G5,4, NOTE_F5,8,
// NOTE_C6,1
};
Resources
-
Green Sleeves
-
Harry Potter
-
Minuet G
-
Star Wars