-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
442 changed files
with
47,298 additions
and
3 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
version 2016-11-26-23:07 | ||
version 2016-11-26-23:16 |
111 changes: 111 additions & 0 deletions
111
extras/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,111 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.12"/> | ||
<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> | ||
<script type="text/javascript"> | ||
$(document).ready(initResizable); | ||
</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"> | ||
$(document).ready(function() { init_search(); }); | ||
</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 2016-11-26-23:16</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.png" | ||
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.png" alt=""/></a> | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end header part --> | ||
<!-- Generated by Doxygen 1.8.12 --> | ||
<script type="text/javascript"> | ||
var searchBox = new SearchBox("searchBox", "search",false,'Search'); | ||
</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"> | ||
$(document).ready(function(){initNavTree('01_8_basics_2_vibrato_2_vibrato_8ino-example.html','');}); | ||
</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.com/Mozzi/</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"> Tim Barrass 2012, CC by-nc-sa.</div><div class="line">*/</div><div class="line"></div><div class="line">//#include <ADC.h> // Teensy 3.1 uncomment this line and install http://github.com/pedvide/ADC</div><div class="line">#include <MozziGuts.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"></div><div class="line">#define CONTROL_RATE 64 // powers of 2 please</div><div class="line"></div><div class="line">Oscil<COS2048_NUM_CELLS, AUDIO_RATE> aCos(COS2048_DATA);</div><div class="line">Oscil<COS2048_NUM_CELLS, AUDIO_RATE> aVibrato(COS2048_DATA);</div><div class="line"></div><div class="line">const byte intensity = 255;</div><div class="line"></div><div class="line">void setup(){</div><div class="line"> startMozzi(CONTROL_RATE);</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"></div><div class="line">int updateAudio(){</div><div class="line"> Q15n16 vibrato = (Q15n16) intensity * aVibrato.next();</div><div class="line"> return 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 --> | ||
<!-- start footer part --> | ||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> | ||
<ul> | ||
<li class="footer">Generated on Sat Nov 26 2016 23:16:21 for Mozzi by | ||
<a href="http://www.doxygen.org/index.html"> | ||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
111 changes: 111 additions & 0 deletions
111
...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,111 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.12"/> | ||
<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> | ||
<script type="text/javascript"> | ||
$(document).ready(initResizable); | ||
</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"> | ||
$(document).ready(function() { init_search(); }); | ||
</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 2016-11-26-23:16</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.png" | ||
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.png" alt=""/></a> | ||
</span> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end header part --> | ||
<!-- Generated by Doxygen 1.8.12 --> | ||
<script type="text/javascript"> | ||
var searchBox = new SearchBox("searchBox", "search",false,'Search'); | ||
</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"> | ||
$(document).ready(function(){initNavTree('02_8_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html','');}); | ||
</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.com/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 help/discussion/announcements:</div><div class="line"> https://groups.google.com/forum/#!forum/mozzi-users</div><div class="line"> </div><div class="line"> Tim Barrass 2013, CC by-nc-sa.</div><div class="line">*/</div><div class="line"></div><div class="line">//#include <ADC.h> // Teensy 3.1 uncomment this line and install http://github.com/pedvide/ADC</div><div class="line">#include <MozziGuts.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">#define CONTROL_RATE 64</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, AUDIO_RATE> aSin0(SIN2048_DATA);</div><div class="line">Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aSin1(SIN2048_DATA);</div><div class="line">Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aSin2(SIN2048_DATA);</div><div class="line">Oscil <SIN2048_NUM_CELLS, 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(INPUT_PIN);</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">int updateAudio(){</div><div class="line"> return 3*((int)aSin0.next()+aSin1.next()+(aSin2.next()>>1)</div><div class="line"> +(aSin3.next()>>2)) >>3;</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 class="line"></div><div class="line"></div></div><!-- fragment --> </div><!-- contents --> | ||
</div><!-- doc-content --> | ||
<!-- start footer part --> | ||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> | ||
<ul> | ||
<li class="footer">Generated on Sat Nov 26 2016 23:16:21 for Mozzi by | ||
<a href="http://www.doxygen.org/index.html"> | ||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.