forked from sensorium/Mozzi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Removed doxygen output from sources"
This reverts commit 84355b5.
- Loading branch information
1 parent
84355b5
commit 0378a81
Showing
608 changed files
with
85,018 additions
and
0 deletions.
There are no files selected for viewing
164 changes: 164 additions & 0 deletions
164
gh-pages/doc/html/01_8_basics_2_vibrato_2_vibrato_8ino-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=9"/> | ||
<meta name="generator" content="Doxygen 1.9.1"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<title>Mozzi: 01.Basics/Vibrato/Vibrato.ino</title> | ||
<link href="tabs.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="jquery.js"></script> | ||
<script type="text/javascript" src="dynsections.js"></script> | ||
<link href="navtree.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="resize.js"></script> | ||
<script type="text/javascript" src="navtreedata.js"></script> | ||
<script type="text/javascript" src="navtree.js"></script> | ||
<link href="search/search.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="search/searchdata.js"></script> | ||
<script type="text/javascript" src="search/search.js"></script> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
$(document).ready(function() { init_search(); }); | ||
/* @license-end */ | ||
</script> | ||
<link href="doxygen.css" rel="stylesheet" type="text/css" /> | ||
<link href="custom_stylesheet.css" rel="stylesheet" type="text/css"/> | ||
</head> | ||
<body> | ||
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> | ||
<div id="titlearea"> | ||
<table cellspacing="0" cellpadding="0"> | ||
<tbody> | ||
<tr style="height: 56px;"> | ||
<td id="projectlogo"><img alt="Logo" src="mozzi-circle.png"/></td> | ||
<td id="projectalign" style="padding-left: 0.5em;"> | ||
<div id="projectname">Mozzi | ||
 <span id="projectnumber">version v2.0</span> | ||
</div> | ||
<div id="projectbrief">sound synthesis library for Arduino</div> | ||
</td> | ||
<td> <div id="MSearchBox" class="MSearchBoxInactive"> | ||
<span class="left"> | ||
<img id="MSearchSelect" src="search/mag_sel.svg" | ||
onmouseover="return searchBox.OnSearchSelectShow()" | ||
onmouseout="return searchBox.OnSearchSelectHide()" | ||
alt=""/> | ||
<input type="text" id="MSearchField" value="Search" accesskey="S" | ||
onfocus="searchBox.OnSearchFieldFocus(true)" | ||
onblur="searchBox.OnSearchFieldFocus(false)" | ||
onkeyup="searchBox.OnSearchFieldChange(event)"/> | ||
</span><span class="right"> | ||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a> | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end header part --> | ||
<!-- Generated by Doxygen 1.9.1 --> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); | ||
/* @license-end */ | ||
</script> | ||
</div><!-- top --> | ||
<div id="side-nav" class="ui-resizable side-nav-resizable"> | ||
<div id="nav-tree"> | ||
<div id="nav-tree-contents"> | ||
<div id="nav-sync" class="sync"></div> | ||
</div> | ||
</div> | ||
<div id="splitbar" style="-moz-user-select:none;" | ||
class="ui-resizable-handle"> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
$(document).ready(function(){initNavTree('01_8_basics_2_vibrato_2_vibrato_8ino-example.html',''); initResizable(); }); | ||
/* @license-end */ | ||
</script> | ||
<div id="doc-content"> | ||
<!-- window showing the filter options --> | ||
<div id="MSearchSelectWindow" | ||
onmouseover="return searchBox.OnSearchSelectShow()" | ||
onmouseout="return searchBox.OnSearchSelectHide()" | ||
onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
</div> | ||
|
||
<!-- iframe showing the search results (closed by default) --> | ||
<div id="MSearchResultsWindow"> | ||
<iframe src="javascript:void(0)" frameborder="0" | ||
name="MSearchResults" id="MSearchResults"> | ||
</iframe> | ||
</div> | ||
|
||
<div class="header"> | ||
<div class="headertitle"> | ||
<div class="title">01.Basics/Vibrato/Vibrato.ino</div> </div> | ||
</div><!--header--> | ||
<div class="contents"> | ||
<p>This is an example using <a class="el" href="class_oscil.html#a4c6de90bc2d4183a5146eb2ae5e3dd2c" title="Returns the next sample given a phase modulation value.">Oscil::phMod</a> to produce vibrato using phase modulation.</p> | ||
<div class="fragment"><div class="line">/* Example playing a sinewave with vibrato,</div> | ||
<div class="line"> using Mozzi sonification library.</div> | ||
<div class="line"> </div> | ||
<div class="line"> Demonstrates simple FM using phase modulation.</div> | ||
<div class="line"> </div> | ||
<div class="line"> Circuit: Audio output on digital pin 9 on a Uno or similar, or</div> | ||
<div class="line"> DAC/A14 on Teensy 3.1, or</div> | ||
<div class="line"> check the README or http://sensorium.github.io/Mozzi/</div> | ||
<div class="line"> </div> | ||
<div class="line"> Mozzi documentation/API</div> | ||
<div class="line"> https://sensorium.github.io/Mozzi/doc/html/index.html</div> | ||
<div class="line"> </div> | ||
<div class="line"> Mozzi help/discussion/announcements:</div> | ||
<div class="line"> https://groups.google.com/forum/#!forum/mozzi-users</div> | ||
<div class="line"> </div> | ||
<div class="line"> Copyright 2012-2024 Tim Barrass and the Mozzi Team</div> | ||
<div class="line"> </div> | ||
<div class="line"> Mozzi is licensed under the GNU Lesser General Public Licence (LGPL) Version 2.1 or later.</div> | ||
<div class="line">*/</div> | ||
<div class="line"> </div> | ||
<div class="line">#define MOZZI_CONTROL_RATE 64 // Hz, powers of 2 are most reliable</div> | ||
<div class="line">#include <Mozzi.h></div> | ||
<div class="line">#include <Oscil.h></div> | ||
<div class="line">#include <tables/cos2048_int8.h> // table for Oscils to play</div> | ||
<div class="line">#include <mozzi_midi.h> // for mtof</div> | ||
<div class="line">//#include <mozzi_fixmath.h></div> | ||
<div class="line">#include <FixMath.h> // Fixed point arithmetics</div> | ||
<div class="line"> </div> | ||
<div class="line">Oscil<COS2048_NUM_CELLS, MOZZI_AUDIO_RATE> aCos(COS2048_DATA);</div> | ||
<div class="line">Oscil<COS2048_NUM_CELLS, MOZZI_AUDIO_RATE> aVibrato(COS2048_DATA);</div> | ||
<div class="line"> </div> | ||
<div class="line">//const byte intensity = 255;</div> | ||
<div class="line">const UFix<0,8> intensity = 0.5; // amplitude of the phase modulation</div> | ||
<div class="line"> // 0.5 leads to a modulation of half the</div> | ||
<div class="line"> // wavetable</div> | ||
<div class="line"> </div> | ||
<div class="line">void setup(){</div> | ||
<div class="line"> startMozzi();</div> | ||
<div class="line"> aCos.setFreq(mtof(84.f));</div> | ||
<div class="line"> aVibrato.setFreq(15.f);</div> | ||
<div class="line">}</div> | ||
<div class="line"> </div> | ||
<div class="line"> </div> | ||
<div class="line">void updateControl(){</div> | ||
<div class="line">}</div> | ||
<div class="line"> </div> | ||
<div class="line">AudioOutput updateAudio(){</div> | ||
<div class="line"> //Q15n16 vibrato = (Q15n16) intensity * aVibrato.next();</div> | ||
<div class="line"> auto vibrato = intensity * toSFraction(aVibrato.next()); // Oscils in Mozzi are 8bits: 7bits of signal plus one bit of sign, so what they fit into a SFixMath<0,7> which is a signed fixMath type with 7 bits of value. </div> | ||
<div class="line"> return MonoOutput::from8Bit(aCos.phMod(vibrato)); // phase modulation to modulate frequency</div> | ||
<div class="line">}</div> | ||
<div class="line"> </div> | ||
<div class="line">void loop(){</div> | ||
<div class="line"> audioHook();</div> | ||
<div class="line">}</div> | ||
</div><!-- fragment --> </div><!-- contents --> | ||
</div><!-- doc-content --> | ||
<div id="nav-path" class="navpath"> | ||
<ul><li class="footer">Generated automatically using Doxygen. If info on this page is outdated, incomplete, or wrong, please open an issue at https://github.com/sensorium/Mozzi/issues</li></ul> | ||
</div> | ||
</body> | ||
</html> |
190 changes: 190 additions & 0 deletions
190
...c/html/02_8_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=9"/> | ||
<meta name="generator" content="Doxygen 1.9.1"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<title>Mozzi: 02.Control/Control_Echo_Theremin/Control_Echo_Theremin.ino</title> | ||
<link href="tabs.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="jquery.js"></script> | ||
<script type="text/javascript" src="dynsections.js"></script> | ||
<link href="navtree.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="resize.js"></script> | ||
<script type="text/javascript" src="navtreedata.js"></script> | ||
<script type="text/javascript" src="navtree.js"></script> | ||
<link href="search/search.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="search/searchdata.js"></script> | ||
<script type="text/javascript" src="search/search.js"></script> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
$(document).ready(function() { init_search(); }); | ||
/* @license-end */ | ||
</script> | ||
<link href="doxygen.css" rel="stylesheet" type="text/css" /> | ||
<link href="custom_stylesheet.css" rel="stylesheet" type="text/css"/> | ||
</head> | ||
<body> | ||
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> | ||
<div id="titlearea"> | ||
<table cellspacing="0" cellpadding="0"> | ||
<tbody> | ||
<tr style="height: 56px;"> | ||
<td id="projectlogo"><img alt="Logo" src="mozzi-circle.png"/></td> | ||
<td id="projectalign" style="padding-left: 0.5em;"> | ||
<div id="projectname">Mozzi | ||
 <span id="projectnumber">version v2.0</span> | ||
</div> | ||
<div id="projectbrief">sound synthesis library for Arduino</div> | ||
</td> | ||
<td> <div id="MSearchBox" class="MSearchBoxInactive"> | ||
<span class="left"> | ||
<img id="MSearchSelect" src="search/mag_sel.svg" | ||
onmouseover="return searchBox.OnSearchSelectShow()" | ||
onmouseout="return searchBox.OnSearchSelectHide()" | ||
alt=""/> | ||
<input type="text" id="MSearchField" value="Search" accesskey="S" | ||
onfocus="searchBox.OnSearchFieldFocus(true)" | ||
onblur="searchBox.OnSearchFieldFocus(false)" | ||
onkeyup="searchBox.OnSearchFieldChange(event)"/> | ||
</span><span class="right"> | ||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a> | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end header part --> | ||
<!-- Generated by Doxygen 1.9.1 --> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); | ||
/* @license-end */ | ||
</script> | ||
</div><!-- top --> | ||
<div id="side-nav" class="ui-resizable side-nav-resizable"> | ||
<div id="nav-tree"> | ||
<div id="nav-tree-contents"> | ||
<div id="nav-sync" class="sync"></div> | ||
</div> | ||
</div> | ||
<div id="splitbar" style="-moz-user-select:none;" | ||
class="ui-resizable-handle"> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
$(document).ready(function(){initNavTree('02_8_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html',''); initResizable(); }); | ||
/* @license-end */ | ||
</script> | ||
<div id="doc-content"> | ||
<!-- window showing the filter options --> | ||
<div id="MSearchSelectWindow" | ||
onmouseover="return searchBox.OnSearchSelectShow()" | ||
onmouseout="return searchBox.OnSearchSelectHide()" | ||
onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
</div> | ||
|
||
<!-- iframe showing the search results (closed by default) --> | ||
<div id="MSearchResultsWindow"> | ||
<iframe src="javascript:void(0)" frameborder="0" | ||
name="MSearchResults" id="MSearchResults"> | ||
</iframe> | ||
</div> | ||
|
||
<div class="header"> | ||
<div class="headertitle"> | ||
<div class="title">02.Control/Control_Echo_Theremin/Control_Echo_Theremin.ino</div> </div> | ||
</div><!--header--> | ||
<div class="contents"> | ||
<p>This is an example of how to use the <a class="el" href="class_control_delay.html" title="Control-rate delay line for delaying control signals.">ControlDelay</a> class.</p> | ||
<div class="fragment"><div class="line">/* Example of a simple light-sensing theremin-like</div> | ||
<div class="line"> instrument with long echoes,</div> | ||
<div class="line"> using Mozzi sonification library.</div> | ||
<div class="line"> </div> | ||
<div class="line"> Demonstrates ControlDelay() for echoing control values,</div> | ||
<div class="line"> and smoothing an analog input from a sensor</div> | ||
<div class="line"> signal with RollingAverage().</div> | ||
<div class="line"> </div> | ||
<div class="line"> The circuit:</div> | ||
<div class="line"> </div> | ||
<div class="line"> Audio output on digital pin 9 on a Uno or similar, or</div> | ||
<div class="line"> DAC/A14 on Teensy 3.1, or</div> | ||
<div class="line"> check the README or http://sensorium.github.io/Mozzi/</div> | ||
<div class="line"> </div> | ||
<div class="line"> Light dependent resistor (LDR) and 5.1k resistor on analog pin 1:</div> | ||
<div class="line"> LDR from analog pin to +5V (3.3V on Teensy 3.1)</div> | ||
<div class="line"> 5.1k resistor from analog pin to ground</div> | ||
<div class="line"> </div> | ||
<div class="line"> Mozzi documentation/API</div> | ||
<div class="line"> https://sensorium.github.io/Mozzi/doc/html/index.html</div> | ||
<div class="line"> </div> | ||
<div class="line"> Mozzi help/discussion/announcements:</div> | ||
<div class="line"> https://groups.google.com/forum/#!forum/mozzi-users</div> | ||
<div class="line"> </div> | ||
<div class="line"> Copyright 2012-2024 Tim Barrass and the Mozzi Team</div> | ||
<div class="line"> </div> | ||
<div class="line"> Mozzi is licensed under the GNU Lesser General Public Licence (LGPL) Version 2.1 or later.</div> | ||
<div class="line">*/</div> | ||
<div class="line"> </div> | ||
<div class="line">#define MOZZI_CONTROL_RATE 64</div> | ||
<div class="line">#include <Mozzi.h></div> | ||
<div class="line">#include <Oscil.h> // oscillator template</div> | ||
<div class="line">#include <tables/sin2048_int8.h> // sine table for oscillator</div> | ||
<div class="line">#include <RollingAverage.h></div> | ||
<div class="line">#include <ControlDelay.h></div> | ||
<div class="line"> </div> | ||
<div class="line">#define INPUT_PIN 0 // analog control input</div> | ||
<div class="line"> </div> | ||
<div class="line">unsigned int echo_cells_1 = 32;</div> | ||
<div class="line">unsigned int echo_cells_2 = 60;</div> | ||
<div class="line">unsigned int echo_cells_3 = 127;</div> | ||
<div class="line"> </div> | ||
<div class="line">ControlDelay <128, int> kDelay; // 2seconds</div> | ||
<div class="line"> </div> | ||
<div class="line">// oscils to compare bumpy to averaged control input</div> | ||
<div class="line">Oscil <SIN2048_NUM_CELLS, MOZZI_AUDIO_RATE> aSin0(SIN2048_DATA);</div> | ||
<div class="line">Oscil <SIN2048_NUM_CELLS, MOZZI_AUDIO_RATE> aSin1(SIN2048_DATA);</div> | ||
<div class="line">Oscil <SIN2048_NUM_CELLS, MOZZI_AUDIO_RATE> aSin2(SIN2048_DATA);</div> | ||
<div class="line">Oscil <SIN2048_NUM_CELLS, MOZZI_AUDIO_RATE> aSin3(SIN2048_DATA);</div> | ||
<div class="line"> </div> | ||
<div class="line">// use: RollingAverage <number_type, how_many_to_average> myThing</div> | ||
<div class="line">RollingAverage <int, 32> kAverage; // how_many_to_average has to be power of 2</div> | ||
<div class="line">int averaged;</div> | ||
<div class="line"> </div> | ||
<div class="line">void setup(){</div> | ||
<div class="line"> kDelay.set(echo_cells_1);</div> | ||
<div class="line"> startMozzi();</div> | ||
<div class="line">}</div> | ||
<div class="line"> </div> | ||
<div class="line"> </div> | ||
<div class="line">void updateControl(){</div> | ||
<div class="line"> int bumpy_input = mozziAnalogRead<10>(INPUT_PIN); // request reading at 10-bit resolution, i.e. 0-1023</div> | ||
<div class="line"> averaged = kAverage.next(bumpy_input);</div> | ||
<div class="line"> aSin0.setFreq(averaged);</div> | ||
<div class="line"> aSin1.setFreq(kDelay.next(averaged));</div> | ||
<div class="line"> aSin2.setFreq(kDelay.read(echo_cells_2));</div> | ||
<div class="line"> aSin3.setFreq(kDelay.read(echo_cells_3));</div> | ||
<div class="line">}</div> | ||
<div class="line"> </div> | ||
<div class="line"> </div> | ||
<div class="line">AudioOutput updateAudio(){</div> | ||
<div class="line"> return MonoOutput::fromAlmostNBit(12,</div> | ||
<div class="line"> 3*((int)aSin0.next()+aSin1.next()+(aSin2.next()>>1)</div> | ||
<div class="line"> +(aSin3.next()>>2))</div> | ||
<div class="line"> );</div> | ||
<div class="line">}</div> | ||
<div class="line"> </div> | ||
<div class="line"> </div> | ||
<div class="line">void loop(){</div> | ||
<div class="line"> audioHook();</div> | ||
<div class="line">}</div> | ||
</div><!-- fragment --> </div><!-- contents --> | ||
</div><!-- doc-content --> | ||
<div id="nav-path" class="navpath"> | ||
<ul><li class="footer">Generated automatically using Doxygen. If info on this page is outdated, incomplete, or wrong, please open an issue at https://github.com/sensorium/Mozzi/issues</li></ul> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.