Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Problems With Coding My First Teensy 4.0 Sawtooth Synth

  1. #1
    Junior Member
    Join Date
    Jun 2020
    Posts
    3

    Problems With Coding My First Teensy 4.0 Sawtooth Synth

    Hey guys,

    first of all I'm sorry if I'm posting this thread into the wrong forum section!



    I got a problem with my Arduino code as you can see below in the pictures (here again I'm sorry if making a screenshot was inappropriate, not sure how to show you the whole thing otherwise).

    I started off with one of the Teensy example audio projects inside Arduino and tried to implement my own code, but failed so far

    My idea was to start with a simple sawtooth oscillator and to try to create a modulo counter which should write the incremented values into my audio block pointer as you can see below.

    Does anyone know what my mistake is so far? I tried to debug with serial.print() (you can see the serial monitor in the last picture). Why is the wrap around coming between 18000 and 19000 - and not 32767 like i wanted it to?

    At the moment I'm just hearing a flimsy roar at a high frequency on my speakers (much higher than the wanted 100 Hz) so my code is clearly not working at all


    Click image for larger version. 

Name:	unnamed.png 
Views:	12 
Size:	81.6 KB 
ID:	21146


    Click image for larger version. 

Name:	unnamed-1.png 
Views:	10 
Size:	85.2 KB 
ID:	21147


    Click image for larger version. 

Name:	unnamed-2.png 
Views:	4 
Size:	81.4 KB 
ID:	21148


    Click image for larger version. 

Name:	unnamed-3.png 
Views:	6 
Size:	83.1 KB 
ID:	21149


    Click image for larger version. 

Name:	unnamed-4.png 
Views:	6 
Size:	101.5 KB 
ID:	21150



    Hope you guys can help me!

    with best wishes,
    MarkV

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    128
    Post code as code using the # button, not as images please.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •