Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
robstave committed Jun 29, 2023
1 parent 58537ed commit 2001000
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
7 changes: 3 additions & 4 deletions midisynth/dds_01/dds_01.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@


//dds01

#include "avr/pgmspace.h"

Expand Down Expand Up @@ -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);
Expand Down
17 changes: 17 additions & 0 deletions midisynth/dds_01/readme.md
Original file line number Diff line number Diff line change
@@ -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.

3 changes: 3 additions & 0 deletions midisynth/dds_02/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# dds02

add random notes via the slower timer
3 changes: 3 additions & 0 deletions midisynth/dds_03/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# dds03

add second note and envelope
3 changes: 3 additions & 0 deletions midisynth/dds_04/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# dds04

roll back some sound stuff, but add midi

0 comments on commit 2001000

Please sign in to comment.