Sound & MIDI - what's a DWORD?
I just cludged this together today
Code:
#include <windows.h>
#include <cmath>
#include <iostream>
#include <iomanip>
using namespace std;
double Semitone = pow(2.0,(1.0/12.0));
double Pitch = 16.3516;
int main()
{
cout<<left;
cout<<"Chromatic Scale: Eight Octaves with frequencies";
for (int n = 12; n<109; n++) // Corresponding to MIDI note numbers
{if (!(n%6))
{cout<<endl;
if (!(n%12))
{cout<<endl;}}
cout<<setw(12)<<Pitch;
Beep(Pitch, 75);
Pitch = Pitch*Semitone;
}
cout<<"Done!";
cin.get();
return 0;
}
but I'd like to MIDI it, and then move on to truly useful stuff. I've got the simple "C-E-G" MIDI code working, but what the heck is a DWORD and how do I insert my desired note # into the 5th and 6th hex digits??
Thanks -
JM
(lots of books but no time or patience!)