View Single Post
Old 07-13-2012, 09:14 AM   #6
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
For my part I would like to see it documented to indicate why you used certain values or number types to constrain number ranges.

unsigned char buf[1024]; // play buffer (Matches output blah blah)

That type of information is vital - like -
"chose u-chars for my buffer so the output value of 0 - 255 would exactly match my sample types u8 maximum range." at least in a note somewhere.

"Type equivalences for the 16 bit sample range would be BLAH"

It's these type of implementation details that give a newbie developer insight into making what is "already there" work for better for them. Plus it documents them for everyone. including you.

I am all for the condensed style for demo code - with notes available. or the longer more documented style for walkthroughs. There is a middle ground of course and that is where most of us live.

I am fiddling with swapping in a known length of 0's at a known rate to give perceptual tempo.
Good fun!
twobob is offline   Reply With Quote