{"id":20995300,"url":"https://github.com/todbot/mozzi_experiments","last_synced_at":"2025-09-04T09:34:12.585Z","repository":{"id":63887475,"uuid":"442600873","full_name":"todbot/mozzi_experiments","owner":"todbot","description":"Experiments with Mozzi, mostly on SAMD21 \u0026 RP2040 chips","archived":false,"fork":false,"pushed_at":"2024-07-01T00:35:23.000Z","size":376,"stargazers_count":100,"open_issues_count":0,"forks_count":11,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-08-28T16:51:15.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/todbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-28T22:39:48.000Z","updated_at":"2025-08-25T17:02:41.000Z","dependencies_parsed_at":"2024-04-17T02:29:08.760Z","dependency_job_id":"5bbbe8b5-ff69-49e4-bf91-b47090609ca3","html_url":"https://github.com/todbot/mozzi_experiments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/todbot/mozzi_experiments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fmozzi_experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fmozzi_experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fmozzi_experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fmozzi_experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/todbot","download_url":"https://codeload.github.com/todbot/mozzi_experiments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fmozzi_experiments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273583671,"owners_count":25131887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T07:22:54.315Z","updated_at":"2025-09-04T09:34:11.898Z","avatar_url":"https://github.com/todbot.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mozzi_experiments\n\nExperiments with Mozzi, mostly on SAMD21- and RP2040-based boards\n\n## Sketches\n\n\n* [eighties_dystopia](eighties_dystopia/eighties_dystopia.ino) - A swirling ominous wub that evolves over time\n\n* [eighties_dystopia_rp2040](eighties_dystopia_rp2040/eighties_dystopia_rp2040.ino) - Same thing, but on a Raspberry Pi Pico w/ PWM audio\n\n* [eighties_dystopia_rp2040_i2s](eighties_dystopia_rp2040_i2s/eighties_dystopia_rp2040_i2s.ino) - Same thing, but on a Raspberry Pi Pico w/ I2S DAC\n\n* [eighties_arp](eighties_arp/eighties_arp.ino) - An arpeggio explorer for non-musicians and test bed for my \"Arpy\" arpeggio library\n\n* [eighties_drums](eighties_drums/eighties_drums.ino) - simple 4-channel drum machine w/ sequencer\n\n* [derpnote2](derpnote2/derpnote2.ino) - Tries to recreate THX \"Deep Note\" sound\n\n* and others in the repo\n\n\n## Demos\n\n* \"derpnote2\" - [demo on youtube](https://www.youtube.com/watch?v=7fX8cBwbOmU)\n\n* \"eighties_drums\" - [demo on youtube](https://www.youtube.com/watch?v=Jtr5wm48R7A)\n\n* \"eighties_dystopia\" - See [this Twitter thread](https://twitter.com/todbot/status/1475970495400923137) or\n  [this blog post on Adafruit](https://blog.adafruit.com/2021/12/29/make-your-own-80s-dystopian-music-soundtrack-qtpy-arduino-todbot/)\n  or this video below\n\n   https://github.com/todbot/mozzi_experiments/assets/274093/b39463fb-55a2-458a-9ce9-b2939a42408d\n\n* \"eighties_arp\" - click for [youtube video](https://www.youtube.com/watch?v=Ql72YoCJ8-8)\n\n  [![youtube link](eighties_arp/eighties_arp_youtube.jpg) ](https://www.youtube.com/watch?v=Ql72YoCJ8-8)\n\n  \u003ca href=\"eighties_arp/eighties_arp_wiring.jpg\"\u003e\u003cimg src=\"eighties_arp/eighties_arp_wiring.jpg\" alt=\"wiring\" width=\"700\"/\u003e\u003c/a\u003e\n\n\n## How to install Mozzi\n\nMozzi 2 is now in the Arduino Library Manager! And it's much easier to configure. \nTo install Mozzi, find it in the Arduino Library Manager and install it and its\ndependencies. \n\n## Configuring Mozzi\n\nYou can now configure Mozzi in your sketch intead of editing Mozzi library files.\n\nThe [hardware configuration section](https://sensorium.github.io/Mozzi/doc/html/hardware.html)\nof the Mozzi docs is very helpful.\n\nThe pattern is that you put this at the top of your sketch:\n\n```c++\n#include \"MozziConfigValues.h\"  // for named option values\n// your system-specific configuration defines, including MOZZI_CONTROL_RATE\n#include \"Mozzi.h\"\n```\n\nThe configs I've used so far. Some of these configs are the defaults but I like \nto be explicit. \n\n- SAMD21 boards using DAC on A0 as output:\n\n    ```c++\n    #include \"MozziConfigValues.h\"  // for named option values\n    #define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_NONE\n    #define MOZZI_CONTROL_RATE 128 // mozzi rate for updateControl()\n    #include \"Mozzi.h\"\n    ```\n\n- RP2040 boards (including Raspberry Pi Pico) using PWM audio out:\n\n    ```c++\n    #include \"MozziConfigValues.h\"  // for named option values\n    #define MOZZI_OUTPUT_MODE MOZZI_OUTPUT_PWM\n    #define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_NONE\n    #define MOZZI_AUDIO_PIN_1 0  // GPIO pin number, can be any pin\n    #define MOZZI_AUDIO_RATE 32768\n    #define MOZZI_CONTROL_RATE 128 // mozzi rate for updateControl()\n    #include \"Mozzi.h\"\n    ```\n\n- RP2040 boards using I2S DAC audio out:\n\n    ```c++\n    #include \"MozziConfigValues.h\"  // for named option values\n    #define MOZZI_AUDIO_MODE MOZZI_OUTPUT_I2S_DAC\n    #define MOZZI_AUDIO_CHANNELS MOZZI_STEREO \n    #define MOZZI_AUDIO_BITS 16\n    #define MOZZI_AUDIO_RATE 32768\n    #define MOZZI_I2S_PIN_BCK 20\n    #define MOZZI_I2S_PIN_WS (MOZZI_I2S_PIN_BCK+1) // HAS TO BE NEXT TO pBCLK, i.e. default is 21\n    #define MOZZI_I2S_PIN_DATA 22\n    #define MOZZI_CONTROL_RATE 128 // mozzi rate for updateControl()\n    #include \"Mozzi.h\"\n    ```\n\n## Using Mozzi\n\n- Mozzi is very particular about what is in `loop()`. Do not put anything else in there.\n  Instead put it in the `void updateControl()` function. See the sketches for examples.\n\n\n\n## Any questions?\n\nOpen up an issue on this repo or contact me on [@todbot@mastodon.social](https://mastodon.social/@todbot/)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fmozzi_experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftodbot%2Fmozzi_experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fmozzi_experiments/lists"}