Some improvements on pitch accuracy

A project log for Christmas Orchestra

Taking stepper music to absurd levels, with a dash of Christmas cheer

jeremy-weatherfordJeremy Weatherford 12/04/2014 at 06:480 Comments

Took a look at Moppy (the floppy music program for Arduino) and identified some improvements that could be made. Rewriting everything to count 40usec cycles instead of comparing micros() improved efficiency, as did being careful about data types -- changing unsigned ints to bytes where possible, and getting rid of the unsigned longs that I used when everything was measured in microseconds. I'd love to get an even faster cycle time, but 40usec is decent, and it seems to crash at 35 when things get busy, so that may be the working solution for now.