{"id":2501,"date":"2020-11-13T06:43:10","date_gmt":"2020-11-13T14:43:10","guid":{"rendered":"http:\/\/www.donluc.com\/?p=2501"},"modified":"2020-11-13T06:43:10","modified_gmt":"2020-11-13T14:43:10","slug":"project-16-sound-mozzi-mk09","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=2501","title":{"rendered":"Project #16: Sound &#8211; Mozzi &#8211; Mk09"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2501-1\" width=\"720\" height=\"406\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03M.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03M.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03M.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#donluc #sound #simplekeyboard #synthesizer #mozzi #programming #arduino #fritzing #electronics #microcontrollers #consultant #vlog<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03a.png\" alt=\"Mozzi\" width=\"720\" height=\"460\" class=\"alignnone size-full wp-image-2503\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03a-300x192.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03b.png\" alt=\"Mozzi\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2504\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03b-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03c.png\" alt=\"Mozzi\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2505\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03c-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03d.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03d.png\" alt=\"Mozzi\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2506\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03d.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2020\/11\/DL2011Mk03d-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Mozzi<\/strong><\/p>\n<p>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 growls, sweeps and chorusing atmospherics. These sounds can be quickly and easily constructed from familiar synthesis units like oscillators, delays, filters and envelopes. You can use Mozzi to generate algorithmic music for an installation or performance, or make interactive sonifications of sensors, on a small, modular and super cheap Arduino, without the need for additional shields, message passing or external synths.<\/p>\n<p><strong>Wavepacket Synthesis Arduino<\/strong><\/p>\n<p>Wavepacket synthesis, with two overlapping streams of wave packets. Each packet is an enveloped grain of a sin (or cos) wave. The frequency of the wave, the width of the envelopes and the rate of release of envelopes are the parameters which can be changed. Potentiometer A0 Fundamental, the rate at which packets are produced. Potentiometer A1 Bandwidth, the width of each packet. A lower value allows more of the centre frequency to be audible, a rounder sound. A higher value produces narrower packets, a more buzzing sound. Potentiometer A2 Centrefreq, the oscillation frequency within each packet.<\/p>\n<p><strong>DL2011Mk03<\/strong><\/p>\n<p>1 x Arduino Uno<br \/>\n3 x Potentiometer<br \/>\n3 x Knob<br \/>\n1 x Audio Jack 3.5mm<br \/>\n1 x SparkFun Audio Jack Breakout<br \/>\n1 x Speaker<br \/>\n7 x Jumper Wires 3in M\/M<br \/>\n6 x Jumper Wires 6in M\/M<br \/>\n1 x Half-Size Breadboard<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>Arduino Uno<\/strong><\/p>\n<p>SPK &#8211; Digital 9<br \/>\nPO0 &#8211; Analog A0<br \/>\nPO1 &#8211; Analog A1<br \/>\nPO2 &#8211; Analog A2<br \/>\nVIN &#8211; +5V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2011Mk03p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n\/\/ ***** Don Luc Electronics \u00a9 *****\r\n\/\/ Software Version Information\r\n\/\/ Project #16: Sound - Mozzi - Mk09\r\n\/\/ 11-03\r\n\/\/ DL2011Mk03p.ino 16-09\r\n\/\/ 1 x Arduino Uno\r\n\/\/ 3 x Potentiometer\r\n\/\/ 3 x Knob\r\n\/\/ 1 x Audio Jack 3.5mm\r\n\/\/ 1 x SparkFun Audio Jack Breakout\r\n\/\/ 1 x Speaker\r\n\/\/ 7 x Jumper Wires 3in M\/M\r\n\/\/ 6 x Jumper Wires 6in M\/M\r\n\/\/ 1 x Half-Size Breadboard\r\n\/\/ 1 x SparkFun Cerberus USB Cable\r\n\r\n\/\/ Include the Library Code\r\n#include <WavePacket.h>\r\n#include <RollingAverage.h>\r\n#include <AutoMap.h>\r\n#include <IntMap.h>\r\n\r\n\/\/ Set the input for the potentiometer fundamental to analog pin 0\r\nconst int PotFun = A0;\r\n\/\/ Set the input for the potentiometer for bandwidth to analog pin 1\r\nconst int PotBan = A1;\r\n\/\/ Set the input for the potentiometer for centre_freq to analog pin 2\r\nconst int PotFre = A2;\r\n\r\n\/\/ Min and Max values of synth parameters\r\n\/\/ to map AutoRanged analog inputs to\r\n\/\/ Fundamental\r\nconst int MIN_F = 20;\r\nconst int MAX_F = 150;\r\n\/\/ Bandwidth\r\nconst int MIN_BW = 20;\r\nconst int MAX_BW = 150;\r\n\/\/Centre Frequency\r\nconst int MIN_CF = 20;\r\nconst int MAX_CF = 150;\r\n\r\n\/\/ For smoothing the control signals\r\n\/\/ RollingAverage <number_type, how_many_to_average> myThing\r\n\/\/ Fundamental\r\nRollingAverage <int, 16> kAverageF;\r\n\/\/ Bandwidth\r\nRollingAverage <int, 16> kAverageBw;\r\n\/\/Centre Frequency\r\nRollingAverage <int, 16> kAverageCf;\r\n\r\n\/\/ Intmap is a pre-calculated faster version of Arduino's map\r\nIntMap kMapF(0,1023,MIN_F,MAX_F);\r\n\/\/ AutoMap adapts to range of input as it arrives\r\nAutoMap kMapBw(0,1023,MIN_BW,MAX_BW);\r\nAutoMap kMapCf(0,1023,MIN_CF,MAX_CF);\r\n\r\n\/\/ DOUBLE selects 2 overlapping streams\r\nWavePacket <DOUBLE> wavey;\r\n\r\n\/\/ Software Version Information\r\nString sver = \"16-09\";\r\n\r\nvoid loop() {\r\n\r\n  \/\/ Audio Hook\r\n  audioHook();\r\n\r\n}\r\n<\/pre>\n<p><strong>getMozzi.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n\/\/ Mozzi\r\n\/\/ Update Control\r\nvoid updateControl(){\r\n\r\n  \/\/ Fundamental\r\n  int fundamental = mozziAnalogRead( PotFun )+1;\r\n  fundamental = kMapF(fundamental);\r\n  \r\n  \/\/ Bandwidth\r\n  int bandwidth = mozziAnalogRead( PotBan );\r\n  bandwidth = kMapBw(bandwidth);\r\n\r\n  \/\/Centre Frequency\r\n  int centre_freq = mozziAnalogRead( PotFre );\r\n  centre_freq = kMapCf(centre_freq);\r\n  \r\n  \/\/ Wavey\r\n  wavey.set(fundamental, bandwidth, centre_freq);\r\n  \r\n}\r\n\/\/ Update Audio \r\nint updateAudio(){\r\n\r\n  \/\/ >>8 for AUDIO_MODE STANDARD\r\n  return wavey.next()>>8;\r\n  \r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n\/\/ Setup\r\nvoid setup() {\r\n\r\n  \/\/ Wait before starting Mozzi to receive analog reads,\r\n  \/\/ so AutoRange will not get 0\r\n  delay(200);\r\n  startMozzi();\r\n  \r\n}\r\n<\/pre>\n<p><strong>Technology Experience<\/strong><\/p>\n<ul>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc&#8230;)<\/li>\n<li>Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc&#8230;)<\/li>\n<li>Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc&#8230;)<\/li>\n<li>Social Media Programming &#038; Integration (Facebook, Twitter, YouTube, Pinterest, etc&#8230;)<\/li>\n<li>Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc&#8230;)<\/li>\n<li>Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc&#8230;)<\/li>\n<li>eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc&#8230;)<\/li>\n<\/ul>\n<p><strong>Instructor<\/strong><\/p>\n<ul>\n<li>Arduino<\/li>\n<li>Raspberry Pi<\/li>\n<li>Espressif<\/li>\n<li>Robotics<\/li>\n<li>DOS, Windows, OSX, Linux, iOS, Android, Multi-OS<\/li>\n<li>Linux-Apache-PHP-MySQL<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>J. Luc Paquin \u2013 Curriculum Vitae<\/strong><br \/>\nhttps:\/\/www.donluc.com\/DLHackster\/LucPaquinCVEngMk2020a.pdf<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> http:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.donluc.com\/DLHackster\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.hackster.io\/neosteam-labs<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/channel\/UC5eRjrGn1CqkkGfZy0jxEdA<br \/>\n<strong>Twitter:<\/strong> https:\/\/twitter.com\/labs_steam<br \/>\n<strong>Pinterest:<\/strong> https:\/\/www.pinterest.com\/NeoSteamLabs\/<br \/>\n<strong>Instagram:<\/strong> https:\/\/www.instagram.com\/luc.paquin\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #donluc #sound #simplekeyboard #synthesizer #mozzi #programming #arduino #fritzing #electronics #microcontrollers #consultant #vlog &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Mozzi 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 growls, sweeps and chorusing atmospherics. These sounds can be quickly &#8230; <a title=\"Project #16: Sound &#8211; Mozzi &#8211; Mk09\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=2501\" aria-label=\"Read more about Project #16: Sound &#8211; Mozzi &#8211; Mk09\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[119,50,38,74,59,5,7,58,10,43,51],"tags":[6,102,19,85,24,128,25,9,27,120,109,8,33,34,108],"class_list":["post-2501","post","type-post","status-publish","format-standard","hentry","category-sound","category-arduino","category-digitalelectronics","category-electronic-goldmine","category-fritzing","category-microcontrollers","category-musical-instruments","category-arduino-programming","category-projects","category-sparkfun","category-synth","tag-arduino","tag-components","tag-electronics","tag-fritzing","tag-microcontroller","tag-mozzi","tag-musical-instruments-2","tag-programming","tag-projects-2","tag-sound","tag-sparkfun","tag-synth","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2501"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2501\/revisions"}],"predecessor-version":[{"id":2507,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2501\/revisions\/2507"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}