Reading notes is pretty simple =P Can you show a picture or something? I could tell you what the notes are.
| Changing all the 4's to 3's in that major chord sounds kind of awkward |
The octave shouldn't matter. That only only make the chord higher or lower, but it should sound more or less the same.
| Or maybe it is OK and my speakers just suck. |
Not likely. If your speakers couldn't play simple tones you would have noticed long before this.
My money is on either your Note::C_3 etc constants being wrong, or your chord being wrong, or both.
EDIT:
OK... here's how you calc tones. Check this against what you have to make sure your constants are right.
Concert A is 440 Hz (almost exactly, it's kind of freaky)
Moving up one octave is 2x Hz (so one octave up from concert A is 880, another octave up is 1760, etc)
Moving down one octave is 0.5 Hz (so 220, 110, etc)
Calculating other tones would be Tone * 2^(X/12) where 'X' is 1-11 depending on how many notes you want to go up. So:
A# = 1
B = 2
C = 3
C# = 4
... etc
So for example, to get middle C, we take A 220 and multiply it by 2^(3/12) = 261.626 Hz
Once you have the frequency in Hz... when generating the tone you do this:
1 2 3 4
|
for(i = 0; i < whatever; ++i)
{
sample = volume * sin( 2 * PI * Freq_In_Hz * i / samplerate );
}
|
ANOTHER EDIT:
Your C_3 etc constants are floating point, right? They'll be all wrong if they're integers.
Seems like an obvious thing, but I figured I might as well check.