Mercurial > hg > beaglert
diff projects/basic/render.cpp @ 269:ac8eb07afcf5
Oxygen text added to each render.cpp file for the default projects. Text includes project explanation from Wiki, edited in places.
Empty project added as a default project.
Doxyfile updated. Each of the project locations added to INPUT configuration option. Consider just watching the whole project file so all new projects are automatically pulled through.
author | Robert Jack <robert.h.jack@gmail.com> |
---|---|
date | Tue, 17 May 2016 15:40:16 +0100 |
parents | 07cfd337ad18 |
children | 5433c83ce04e |
line wrap: on
line diff
--- a/projects/basic/render.cpp Wed May 11 10:29:23 2016 +0100 +++ b/projects/basic/render.cpp Tue May 17 15:40:16 2016 +0100 @@ -1,3 +1,12 @@ +/* + ____ _____ _ _ +| __ )| ____| | / \ +| _ \| _| | | / _ \ +| |_) | |___| |___ / ___ \ +|____/|_____|_____/_/ \_\.io + + */ + /* * render.cpp * @@ -5,6 +14,26 @@ * Author: parallels */ +/** +\example 1_basic_helloworld + +Producing your first bleep! +--------------------------- + +This sketch is the hello world of embedded interactive audio. Better known as bleep, it +produces a sine tone. + +The frequency of the sine tone is determined by a global variable, `gFrequency` +(line 12). The sine tone is produced by incrementing the phase of a sin function +on every audio frame. + +The important thing to notice is the nested `for` loop structure. You will see +this in all Bela projects and in most digital audio applications. The first `for` +loop cycles through the audio frames, the second through each of the audio +channels (in this case left 0 and right 1). It is good to familiarise yourself +with this structure as it is fundamental to producing sound with the system. +*/ + #include <BeagleRT.h> #include <cmath> @@ -22,7 +51,6 @@ // in from the call to initAudio(). // // Return true on success; returning false halts the program. - bool setup(BeagleRTContext *context, void *userData) { // Retrieve a parameter passed in from the initAudio() call