diff examples/scope_basic/render.cpp @ 375:768acdeea362 prerelease

Merge
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 10 Jun 2016 00:35:18 +0100
parents db2fe4e1b88e
children
line wrap: on
line diff
--- a/examples/scope_basic/render.cpp	Fri Jun 10 00:02:48 2016 +0100
+++ b/examples/scope_basic/render.cpp	Fri Jun 10 00:35:18 2016 +0100
@@ -1,3 +1,35 @@
+/*
+ ____  _____ _        _    
+| __ )| ____| |      / \   
+|  _ \|  _| | |     / _ \  
+| |_) | |___| |___ / ___ \ 
+|____/|_____|_____/_/   \_\.io
+
+ */
+
+/**
+\example 1_scope_basic
+
+Oscilloscope in-browser
+-----------------------
+
+This example demonstrates the scope feature of the IDE.
+
+The scope is instantiated at the top of the file via `Scope scope;`
+
+In `setup()` we define how many channels the scope should have and the sample 
+rate that it should run at via `scope.setup(3, context->audioSampleRate)`.
+
+In `render()` we choose what the scope log via `scope.log(out, out2, out3)`. 
+In this example the scope is logging three sine waves with different phases. To see
+the output click on the <b>Open Scope</b> button.
+
+An additional option is to set the trigger of the oscilloscope from within `render()`.
+In this example we are triggering the scope when oscillator 1 becomes less than 
+oscillator 2 via `scope.trigger()`. Note that this functionality only takes effect
+when the triggering mode is set to custom in the scope UI.
+*/
+
 #include <Bela.h>
 #include <Scope.h>
 #include <cmath>