diff --git a/midisynth/dds_01/dds_01.ino b/midisynth/dds_01/dds_01.ino index 3f609f8..0f3ee2e 100644 --- a/midisynth/dds_01/dds_01.ino +++ b/midisynth/dds_01/dds_01.ino @@ -1,5 +1,5 @@ - + //dds01 #include "avr/pgmspace.h" @@ -76,13 +76,12 @@ void TC5_Handler() // Interrupt Service // read value fron ROM sine table and send to PWM DAC uint32_t value = pgm_read_byte_near(sine256 + icnt); - - // value = value << 1; - + analogWrite(A0, value); + // toggle a bit too...just to measure things. counter++; if (counter % 2 == 0) { digitalWrite(A2, true); diff --git a/midisynth/dds_01/readme.md b/midisynth/dds_01/readme.md new file mode 100644 index 0000000..2f6e99a --- /dev/null +++ b/midisynth/dds_01/readme.md @@ -0,0 +1,17 @@ +# DDS 01 + +Simple tones + +We are going to work our way to something that works incrementally. +Mostly, because this is how I learn and I find that if I have to go back to relearn things....its just easier that way. + +Start out with a simple sketch that works with TWO timers. T4 and T5. + +One is going pretty fast, and is our DDS ( Direct Digital Synthesis) timer. +Its a 32 bit counter that you shift by 24 bits and use the last 8 bits as an index into your wave table. + +The other timer does nothing. + +If successful, you should be hearing a tone on the dac pin and a squarewave +on the other outside of audio, but enough to verify the timing of the interrupt. + diff --git a/midisynth/dds_02/readme.md b/midisynth/dds_02/readme.md new file mode 100644 index 0000000..82e87f5 --- /dev/null +++ b/midisynth/dds_02/readme.md @@ -0,0 +1,3 @@ +# dds02 + +add random notes via the slower timer \ No newline at end of file diff --git a/midisynth/dds_03/readme.md b/midisynth/dds_03/readme.md new file mode 100644 index 0000000..42025fb --- /dev/null +++ b/midisynth/dds_03/readme.md @@ -0,0 +1,3 @@ +# dds03 + +add second note and envelope \ No newline at end of file diff --git a/midisynth/dds_04/readme.md b/midisynth/dds_04/readme.md new file mode 100644 index 0000000..72fa6cd --- /dev/null +++ b/midisynth/dds_04/readme.md @@ -0,0 +1,3 @@ +# dds04 + +roll back some sound stuff, but add midi \ No newline at end of file