View Single Post
Old 07-13-2012, 11:30 AM   #10
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
x086

Quote:
Originally Posted by geekmaster View Post
While you were typing that, I moved that "Theory" block (intact) to the top post, where it really belongs. It is now "mirrored" in you quote too.

I had to copy the freshly built alsa files into my toolchain directories before I could compile sound apps.

Sadly, WHERE to put the alsa header file varies in various examples. Some use the default /include folder (like I used in the "noisy" demo), and others prefix it with alsa/ inside the #include (like you did in the "tones" demo). Perhaps it would be good to copy that header to BOTH places in the toolchain folders, so both demos can compile as-is...

EDIT: Regarding coding style and documentation: As you can see, it took 1542 characters of comments to precisely describe the operational theory of the "(random()&3)*i*350" logical expression used to stuff values into the sound buffer. Describing my much larger dithering expressions would take MUCH more effort (and words). I think that injecting those comments (and more) into my condensed code may somewhat interfere with how much REAL code fits "above the fold" (i.e. no vertical scrolling). It would also spread related code segments so far apart that relational perception would be severely degraded while "absorbing" the code. Remember, all of the BEST programmers are "trance coders", and need to absorb the structure and nuances of the code IN PARALLEL. Just read some biographies of famous software programmers and you will see what I mean.

For a great little introduction to trance coding, read this: http://www.wintermute.me.uk/writing/coding-trance.html
Yeah I agree. But helpful to have those notes adjacent to the code.

I recall programming a tarot program a zillion moons ago for an x086 series, it was a requirement back then to have a decent structure in your head given the limited resources before you started. Times really haven't changed that much all in.

The notes were helpful. : )
twobob is offline   Reply With Quote