Skip to content

Commit

Permalink
update 2015-05-11-20:23
Browse files Browse the repository at this point in the history
  • Loading branch information
sensorium committed May 11, 2015
1 parent dde0fa0 commit e9bfb71
Show file tree
Hide file tree
Showing 516 changed files with 4,587 additions and 10,382 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


Tim Barrass
version 2014-08-09-14:15
version 2015-05-11-20:23

Currently your Arduino can only beep like a microwave oven. Mozzi brings
your Arduino to life by allowing it to produce much more complex and interesting
Expand Down
2 changes: 1 addition & 1 deletion examples/05.Control_Filters/Thermistor_OverSample/Thermistor_OverSample.ino
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aEnvelope(SIN2048_DATA);

Line <float> freqLine;

OverSample <3> overSampler; // will give 10+3=13 bits resolution, 0->8191, using 128 bytes
OverSample <unsigned int, 3> overSampler; // will give 10+3=13 bits resolution, 0->8191, using 128 bytes

const byte INPUT_PIN = 1;

Expand Down
14 changes: 12 additions & 2 deletions examples/06.Synthesis/PDresonant/PDresonant.ino
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@
This version can only play a single voice at a time, it might
be possible to optimise it enough for more simultaneous voices.
Circuit:
MIDI input circuit as per http://arduino.cc/en/Tutorial/Midi
(midi has to be disconnected from rx for sketch to upload)
Audio output on digital pin 9 on a Uno or similar.
Mozzi help/discussion/announcements:
https://groups.google.com/forum/#!forum/mozzi-users
Tim Barrass 2013-14, CC by-nc-sa.
*/



//#include <MIDI.h>

#include <MIDI.h>
//#include <ADC.h> // Teensy 3.1 uncomment this line and install http://github.com/pedvide/ADC
#include <MozziGuts.h>

Expand All @@ -32,6 +41,7 @@
// wavetable for oscillator:
#include <tables/sin2048_int8.h>

// MIDI_CREATE_DEFAULT_INSTANCE(); // if really using midi

// analog joystick for controlling speed of modulation: assigned to attack, decay times and sustain level
#define X A0
Expand Down
13 changes: 7 additions & 6 deletions extras/NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ NEWS
get the latest version from https://sensorium.github.io/Mozzi/


version 2014-08-09-14:15
version 2015-05-11-20:23

aka v1.0.2

First (slightly edited) versioned release using GitHub release process.

Tweaks and fixes, a couple of new simple demos, fixed/updated python script for converting wavetables, updated MIDI examples for newer MIDI library.

Removed library.properties file until the library folder stucture is updated to match the new Arduino library form, as it stopped it installing in new IDEs.

Warning: This release and all previous versions of Mozzi run slow when using Arduino IDE versions greater than 1.0.5, at least on OSX, causing glitches on many of the included examples. Simple examples run OK, but until this is resolved, Arduino 1.0.5 is recommended.

- Tweaks and fixes, a couple of new simple demos..
- Fixed/updated python script for converting wavetables
- Updated MIDI examples for newer MIDI library.
- updated OverSample.h to take an additional termplate parameter to allow different numeric types.
- Removed library.properties file until the library folder stucture is updated to match the new Arduino library form, as it stopped it installing in new IDEs.



version_2014-08-09-14:15
Expand Down
2 changes: 1 addition & 1 deletion extras/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version 2014-08-09-14:15
version 2015-05-11-20:23
82 changes: 40 additions & 42 deletions extras/doc/html/01_8_basics_2_vibrato_2_vibrato_8ino-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@
<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.9.1"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<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);
$(window).load(resizeHeight);
</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(); });
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="custom_stylesheet.css" rel="stylesheet" type="text/css"/>
Expand All @@ -34,7 +32,7 @@
<td id="projectlogo"><img alt="Logo" src="mozzi-circle.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Mozzi
&#160;<span id="projectnumber">version 2014-08-09-14:15</span>
&#160;<span id="projectnumber">version 2015-05-11-20:23</span>
</div>
<div id="projectbrief">sound synthesis library for Arduino</div>
</td>
Expand All @@ -58,7 +56,7 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
Expand All @@ -82,7 +80,7 @@
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
Expand All @@ -97,62 +95,62 @@
</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="fragment"><div class="line"><span class="comment">/* Example playing a sinewave with vibrato,</span></div>
<div class="line"><span class="comment"> using Mozzi sonification library.</span></div>
<div class="line"><span class="comment"> </span></div>
<div class="line"><span class="comment"> Demonstrates simple FM using phase modulation.</span></div>
<div class="line"><span class="comment"> </span></div>
<div class="line"><span class="comment"> Circuit: Audio output on digital pin 9 on a Uno or similar, or</span></div>
<div class="line"><span class="comment"> DAC/A14 on Teensy 3.1, or </span></div>
<div class="line"><span class="comment"> check the README or http://sensorium.github.com/Mozzi/</span></div>
<div class="line"><span class="comment"> </span></div>
<div class="line"><span class="comment"> Mozzi help/discussion/announcements:</span></div>
<div class="line"><span class="comment"> https://groups.google.com/forum/#!forum/mozzi-users</span></div>
<div class="line"><span class="comment"> </span></div>
<div class="line"><span class="comment"> Tim Barrass 2012, CC by-nc-sa.</span></div>
<div class="line"><span class="comment">*/</span></div>
<div class="line"></div>
<div class="line">//#include &lt;ADC.h&gt; // Teensy 3.1 uncomment this line and install http://github.com/pedvide/ADC</div>
<div class="line">#include &lt;MozziGuts.h&gt;</div>
<div class="line">#include &lt;Oscil.h&gt;</div>
<div class="line">#include &lt;tables/cos2048_int8.h&gt; // table for Oscils to play</div>
<div class="line">#include &lt;mozzi_midi.h&gt; // for mtof</div>
<div class="line">#include &lt;mozzi_fixmath.h&gt;</div>
<div class="line"><span class="comment">//#include &lt;ADC.h&gt; // Teensy 3.1 uncomment this line and install http://github.com/pedvide/ADC</span></div>
<div class="line"><span class="preprocessor">#include &lt;MozziGuts.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;Oscil.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;tables/cos2048_int8.h&gt;</span> <span class="comment">// table for Oscils to play</span></div>
<div class="line"><span class="preprocessor">#include &lt;mozzi_midi.h&gt;</span> <span class="comment">// for mtof</span></div>
<div class="line"><span class="preprocessor">#include &lt;mozzi_fixmath.h&gt;</span></div>
<div class="line"></div>
<div class="line">#define CONTROL_RATE 64 // powers of 2 please</div>
<div class="line"><span class="preprocessor">#define CONTROL_RATE 64 // powers of 2 please</span></div>
<div class="line"></div>
<div class="line">Oscil&lt;COS2048_NUM_CELLS, AUDIO_RATE&gt; aCos(COS2048_DATA);</div>
<div class="line">Oscil&lt;COS2048_NUM_CELLS, AUDIO_RATE&gt; aVibrato(COS2048_DATA);</div>
<div class="line"><a name="_a0"></a><a class="code" href="class_oscil.html">Oscil&lt;COS2048_NUM_CELLS, AUDIO_RATE&gt;</a> aCos(COS2048_DATA);</div>
<div class="line"><a class="code" href="class_oscil.html">Oscil&lt;COS2048_NUM_CELLS, AUDIO_RATE&gt;</a> aVibrato(COS2048_DATA);</div>
<div class="line"></div>
<div class="line">const byte intensity = 255;</div>
<div class="line"><span class="keyword">const</span> 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"><span class="keywordtype">void</span> setup(){</div>
<div class="line"> <a name="a1"></a><a class="code" href="group__core.html#ga75aa9f4a501f4b167343b8caac8c6837">startMozzi</a>(<a name="a2"></a><a class="code" href="group__core.html#gae5d737db8bc97ecf08d2ea3121782d26">CONTROL_RATE</a>);</div>
<div class="line"> aCos.setFreq(<a name="a3"></a><a class="code" href="group__midi.html#gafacb8849f96270644ea79184fde7db37">mtof</a>(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"><span class="keywordtype">void</span> <a name="a4"></a><a class="code" href="group__core.html#ga59d187b915b2e366c88489e52801951a">updateControl</a>(){</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"><span class="keywordtype">int</span> <a name="a5"></a><a class="code" href="group__core.html#gaab0d2c840c1aac4bb5f9b8ef5df30f6a">updateAudio</a>(){</div>
<div class="line"> <a class="code" href="group__fixmath.html#ga3e1cab88474edfa08535402573125cae">Q15n16</a> vibrato = (<a name="a6"></a><a class="code" href="group__fixmath.html#ga3e1cab88474edfa08535402573125cae">Q15n16</a>) intensity * aVibrato.next();</div>
<div class="line"> <span class="keywordflow">return</span> aCos.phMod(vibrato); <span class="comment">// phase modulation to modulate frequency</span></div>
<div class="line">}</div>
<div class="line"></div>
<div class="line">void loop(){</div>
<div class="line"> audioHook();</div>
<div class="line"><span class="keywordtype">void</span> loop(){</div>
<div class="line"> <a name="a7"></a><a class="code" href="group__core.html#ga2fca37b988ab369e2f3c3108c683e59d">audioHook</a>();</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 Apr 11 2015 22:45:52 for Mozzi by
<li class="footer">Generated on Mon May 11 2015 20:24:02 for Mozzi by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
</ul>
</div>
</body>
Expand Down
Loading

0 comments on commit e9bfb71

Please sign in to comment.