// So I made this source code inspiration from a VST "CEDR" which its an arp vst :)
#include <iostream>
#include <windows.h>
#include <string>
#include <time.h>
using namespace std;
int main()
{
int c1, c2, c3, c4, c5, c6, c7, c8, c9, c10;
///This row gets the interger to load a beep sample
// cell 1
cout << "Enter 1st Key number: ";
cin >> c1 ;
cout << "\n";
// cell 2
cout << "Enter 2nd Key number: ";
cin >> c2;
cout << "\n";
//cell 3
cout << "Enter 3rd Key number: ";
cin >> c3;
cout << "\n";
//cell 4
cout << "Enter 4th Key number: ";
cin >> c4;
cout << "\n";
//cell 5
cout << "Enter 5th Key number: ";
cin >> c5;
cout << "\n";
//cell 6
cout << "Enter 6th Key number: ";
cin >> c6;
cout << "\n";
//cell 7
cout << "Enter 7th Key number: ";
cin >> c7;
cout << "\n";
//cell 8
cout << "Enter 8th Key number: ";
cin >> c8;
cout << "\n";
//cell 9
cout << "Enter 9th Key number: ";
cin >> c9;
cout << "\n";
//cell 10
cout << "Enter 10th Key number: ";
cin >> c10;
cout << "\n";
///aanddd this row is the couts of keys you entered.
cout << "Arp1 chord: "<< c1 << endl;
cout << "Arp2 chord: "<< c2 << endl;
cout << "Arp3 chord: "<< c3 << endl;
cout << "Arp4 chord: "<< c4 << endl;
cout << "Arp5 chord: "<< c5 << endl;
cout << "Arp6 chord: "<< c6 << endl;
cout << "Arp7 chord: "<< c7 << endl;
cout << "Arp8 chord: "<< c8 << endl;
cout << "Arp9 chord: "<< c9 << endl;
cout << "Arp10 chord: "<< c10 << endl;
///This row is the key selection, it finds the specific key pitch for the number you typed
{ // c1
if (c1 == 1)
{ // C
c1 = Beep(261,300);
}
if (c1 == 2)
{ // D
c1 = Beep(293,300);
}
if (c1 ==3)
{ // E
c1 = Beep(329,300);
}
if (c1 == 4)
{ // F
c1 = Beep(349,300);
}
if (c1 == 5)
{ // G
c1 = Beep(392,300);
}
if (c1 == 6)
{ // A
c1 = Beep(440,300);
}
if (c1 == 7)
{ // B
c1 = Beep(493,300);
}
}
{ // c2
if (c2 == 1)
{ // C
c2 = Beep(261,300);
}
if (c2 == 2)
{ // D
c2 = Beep(293,300);
}
if (c2 ==3)
{ // E
c2 = Beep(329,300);
}
if (c2 == 4)
{ // F
c2 = Beep(349,300);
}
if (c2 == 5)
{ // G
c2 = Beep(392,300);
}
if (c2 == 6)
{ // A
c2 = Beep(440,300);
}
if (c2 == 7)
{ // B
c2 = Beep(493,300);
}
}
{ // c3
if (c3 == 1)
{ // C
c3 = Beep(261,300);
}
if (c3 == 2)
{ // D
c3 = Beep(293,300);
}
if (c3 ==3)
{ // E
c3 = Beep(329,300);
}
if (c3 == 4)
{ // F
c3 = Beep(349,300);
}
if (c3 == 5)
{ // G
c3 = Beep(392,300);
}
if (c3 == 6)
{ // A
c3 = Beep(440,300);
}
if (c3 == 7)
{ // B
c3 = Beep(493,300);
}
}
{ // c4
if (c4 == 1)
{ // C
c4 = Beep(261,300);
}
if (c4 == 2)
{ // D
c4 = Beep(293,300);
}
if(c4 ==3)
{ // E
c4 = Beep(329,300);
}
if (c4 == 4)
{ // F
c4 = Beep(349,300);
}
if (c4 == 5)
{ // G
c4 = Beep(392,300);
}
if (c4 == 6)
{ // A
c4 = Beep(440,300);
}
if (c4 == 7)
{ // B
c4 = Beep(493,300);
}
}
{ // c5
if (c5 == 1)
{ // C
c5 = Beep(261,300);
}
if (c5 == 2)
{ // D
c5 = Beep(293,300);
}
if (c5 ==3)
{ // E
c5 = Beep(329,300);
}
if (c5 == 4)
{ // F
c5 = Beep(349,300);
}
if (c5 == 5)
{ // G
c5 = Beep(392,300);
}
if (c5 == 6)
{ // A
c5 = Beep(440,300);
}
if (c5 == 7)
{ // B
c5 = Beep(493,300);
}
}
{ // c6
if (c6 == 1)
{ // C
c6 = Beep(261,300);
}
if (c6 == 2)
{ // D
c6 = Beep(293,300);
}
if (c6 ==3)
{ // E
c6 = Beep(329,300);
}
if (c6 == 4)
{ // F
c6 = Beep(349,300);
}
if (c6 == 5)
{ // G
c6 = Beep(392,300);
}
if (c6 == 6)
{ // A
c6 = Beep(440,300);
}
if (c6 == 7)
{ // B
c6 = Beep(493,300);
}
}
{ // c7
if (c7 == 1)
{ // C
c7 = Beep(261,300);
}
if (c7 == 2)
{ // D
c7 = Beep(293,300);
}
if (c7 ==3)
{ // E
c7 = Beep(329,300);
}
if (c7 == 4)
{ // F
c7 = Beep(349,300);
}
if (c7 == 5)
{ // G
c7 = Beep(392,300);
}
if (c7 == 6)
{ // A
c7 = Beep(440,300);
}
if (c7 == 7)
{ // B
c7 = Beep(493,300);
}
}
{ // c8
if (c8 == 1)
{ // C
c8 = Beep(261,300);
}
if (c8 == 2)
{ // D
c8 = Beep(293,300);
}
if (c8 ==3)
{ // E
c8 = Beep(329,300);
}
if (c8 == 4)
{ // F
c8 = Beep(349,300);
}
if (c8 == 5)
{ // G
c8 = Beep(392,300);
}
if (c8 == 6)
{ // A
c8 = Beep(440,300);
}
if (c8 == 7)
{ // B
c8 = Beep(493,300);
}
}
{ // c9
if (c9 == 1)
{ // C
c9 = Beep(261,300);
}
if (c9 == 2)
{ // D
c9 = Beep(293,300);
}
if (c9 ==3)
{ // E
c9 = Beep(329,300);
}
if (c9 == 4)
{ // F
c9 = Beep(349,300);
}
if (c9 == 5)
{ // G
c9 = Beep(392,300);
}
if (c9 == 6)
{ // A
c9 = Beep(440,300);
}
if (c9 == 7)
{ // B
c9 = Beep(493,300);
}
}
{ // c10
if (c10 == 1)
{ // C
c10 = Beep(261,300);
}
if (c10 == 2)
{ // D
c10 = Beep(293,300);
}
if (c10 ==3)
{ // E
c10 = Beep(329,300);
}
if (c10 == 4)
{ // F
c10 = Beep(349,300);
}
if (c10 == 5)
{ // G
c10 = Beep(392,300);
}
if (c10 == 6)
{ // A
c10 = Beep(440,300);
}
if (c10 == 7)
{ // B
c10 = Beep(493,300);
}
}
/// Octave +1
{ // C1 + oct
if (c1 == 11)
{ // C
c1 = Beep(522,300);
}
if (c1 == 12)
{ // D
c1 = Beep(586,300);
}
if (c1 ==13)
{ // E
c1 = Beep(658,300);
}
if (c1 == 14)
{ // F
c1 = Beep(698,300);
}
if (c1 == 15)
{ // G
c1 = Beep(784,300);
}
if (c1 == 16)
{ // A
c1 = Beep(880,300);
}
if (c1 == 17)
{ // B
c1 = Beep(586,300);
}
}
{ // C2 + oct
if (c2 == 11)
{ // C
c2 = Beep(522,300);
}
if (c2 == 12)
{ // D
c2 = Beep(586,300);
}
if (c2 ==13)
{ // E
c2 = Beep(658,300);
}
if (c2 == 14)
{ // F
c2 = Beep(698,300);
}
if (c2 == 15)
{ // G
c2 = Beep(784,300);
}
if (c2 == 16)
{ // A
c2 = Beep(880,300);
}
if (c2 == 17)
{ // B
c2 = Beep(586,300);
}
}
{ // C3 + oct
if (c3 == 11)
{ // C
c3 = Beep(522,300);
}
if (c3 == 12)
{ // D
c3 = Beep(586,300);
}
if (c3 ==13)
{ // E
c3 = Beep(658,300);
}
if (c3 == 14)
{ // F
c3 = Beep(698,300);
}
if (c3 == 15)
{ // G
c3 = Beep(784,300);
}
if (c3 == 16)
{ // A
c3 = Beep(880,300);
}
if (c3 == 17)
{ // B
c3 = Beep(586,300);
}
}
{ // C4 + oct
if (c4 == 11)
{ // C
c4 = Beep(522,300);
}
if (c4 == 12)
{ // D
c4 = Beep(586,300);
}
if (c4 ==13)
{ // E
c4 = Beep(658,300);
}
if (c4 == 14)
{ // F
c4 = Beep(698,300);
}
if (c4 == 15)
{ // G
c4 = Beep(784,300);
}
if (c4 == 16)
{ // A
c4 = Beep(880,300);
}
if (c4 == 17)
{ // B
c4 = Beep(586,300);
}
}
{ // C5 + oct
if (c5 == 11)
{ // C
c5 = Beep(522,300);
}
if (c5 == 12)
{ // D
c5 = Beep(586,300);
}
if (c5 ==13)
{ // E
c5 = Beep(658,300);
}
if (c5 == 14)
{ // F
c5 = Beep(698,300);
}
if (c5 == 15)
{ // G
c5 = Beep(784,300);
}
if (c5 == 16)
{ // A
c5 = Beep(880,300);
}
if (c5 == 17)
{ // B
c5 = Beep(586,300);
}
}
{ // C6 + oct
if (c6 == 11)
{ // C
c6 = Beep(522,300);
}
if (c6 == 12)
{ // D
c6 = Beep(586,300);
}
if (c6 ==13)
{ // E
c6 = Beep(658,300);
}
if (c6 == 14)
{ // F
c6 = Beep(698,300);
}
if (c6 == 15)
{ // G
c6 = Beep(784,300);
}
if (c6 == 16)
{ // A
c6 = Beep(880,300);
}
if (c6 == 17)
{ // B
c6 = Beep(586,300);
}
}
{ // C7 + oct
if (c7 == 11)
{ // C
c7 = Beep(522,300);
}
if (c7 == 12)
{ // D
c7 = Beep(586,300);
}
if (c7 ==13)
{ // E
c7 = Beep(658,300);
}
if (c7 == 14)
{ // F
c7 = Beep(698,300);
}
if (c7 == 15)
{ // G
c7 = Beep(784,300);
}
if (c7 == 16)
{ // A
c7 = Beep(880,300);
}
if (c7 == 17)
{ // B
c7 = Beep(586,300);
}
}
{ // C8 + oct
if (c8 == 11)
{ // C
c8 = Beep(522,300);
}
if (c8 == 12)
{ // D
c8 = Beep(586,300);
}
if (c8 ==13)
{ // E
c8 = Beep(658,300);
}
if (c8 == 14)
{ // F
c8 = Beep(698,300);
}
if (c8 == 15)
{ // G
c8 = Beep(784,300);
}
if (c8 == 16)
{ // A
c8 = Beep(880,300);
}
if (c8 == 17)
{ // B
c8 = Beep(586,300);
}
}
{ // C9 + oct
if (c9 == 11)
{ // C
c9 = Beep(522,300);
}
if (c9 == 12)
{ // D
c9 = Beep(586,300);
}
if (c9 ==13)
{ // E
c9 = Beep(658,300);
}
if (c9 == 14)
{ // F
c9 = Beep(698,300);
}
if (c9 == 15)
{ // G
c9 = Beep(784,300);
}
if (c9 == 16)
{ // A
c9 = Beep(880,300);
}
if (c9 == 17)
{ // B
c9 = Beep(586,300);
}
}
{ // C10 + oct
if (c10 == 11)
{ // C
c10 = Beep(522,300);
}
if (c10 == 12)
{ // D
c10 = Beep(586,300);
}
if (c10 ==13)
{ // E
c10 = Beep(658,300);
}
if (c10 == 14)
{ // F
c10 = Beep(698,300);
}
if (c10 == 15)
{ // G
c10 = Beep(784,300);
}
if (c10 == 16)
{ // A
c10 = Beep(880,300);
}
if (c10 == 17)
{ // B
c10 = Beep(586,300);
}
}
cin.get();
return 0;
}