{"id":15142095,"url":"https://github.com/todbot/picostepseq","last_synced_at":"2025-04-09T13:04:55.008Z","repository":{"id":54012364,"uuid":"521769562","full_name":"todbot/picostepseq","owner":"todbot","description":"MIDI sequencer using Raspberry Pi Pico in Arduino \u0026 CircuitPython","archived":false,"fork":false,"pushed_at":"2023-08-16T20:37:49.000Z","size":9166,"stargazers_count":282,"open_issues_count":1,"forks_count":18,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-02T07:57:44.751Z","etag":null,"topics":["circuitpython","midi","midi-controller","raspberrypipico","rotary-encoder","rp2040","sequencer","ssd1306","usb-midi"],"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":"2022-08-05T20:35:32.000Z","updated_at":"2025-03-30T14:17:48.000Z","dependencies_parsed_at":"2025-01-15T22:14:42.811Z","dependency_job_id":"c41c6c5a-fa93-49e4-b5ee-a730239d44c9","html_url":"https://github.com/todbot/picostepseq","commit_stats":{"total_commits":118,"total_committers":2,"mean_commits":59.0,"dds":"0.016949152542372836","last_synced_commit":"1dd4e8f9bf26a4e42e25cc4d55d806cd80b6176c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fpicostepseq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fpicostepseq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fpicostepseq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2Fpicostepseq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/todbot","download_url":"https://codeload.github.com/todbot/picostepseq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045230,"owners_count":21038553,"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","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":["circuitpython","midi","midi-controller","raspberrypipico","rotary-encoder","rp2040","sequencer","ssd1306","usb-midi"],"created_at":"2024-09-26T09:22:38.744Z","updated_at":"2025-04-09T13:04:54.986Z","avatar_url":"https://github.com/todbot.png","language":"C","funding_links":[],"categories":["[WEB VERSION](https://diy-synths.snnkv.com/)  /  [SUBMIT DESIGN](https://github.com/Atarity/diy-synths/discussions)  /  [DISCUSSION](https://github.com/Atarity/diy-synths/discussions)"],"sub_categories":[],"readme":"# PicoStepSeq\n\nPicoStepSeq is an 8-step MIDI sequencer using a Raspberry Pi Pico, an I2C SSD1306 OLED display, a rotary encoder. and 8 \"Step Switches\".  It outputs via USB MIDI and Serial MIDI via TRS-A 3.5mm.\n\nIt is designed as a potential DIY kit for people with beginner-level soldering skills\nPart count is minimal, with all parts are through-hole, except for the two MIDI jacks,\nwhich are easily solderable by hand.\n\n\u003ca href=\"./docs/picostepseq_photo1.jpg\"\u003e\u003cimg width=400 src=\"./docs/picostepseq_photo1.jpg\"/\u003e\u003c/a\u003e\n\u003ca href=\"./docs/picostepseq_render2.jpg\"\u003e\u003cimg width=400 src=\"./docs/picostepseq_render2.jpg\"/\u003e\u003c/a\u003e\n\n## Demo videos\n\nhttps://user-images.githubusercontent.com/274093/185005269-afb4c3f7-0ca1-40c8-a17d-6e4756943d87.mov\n\nhttps://user-images.githubusercontent.com/274093/196536711-abd25514-53b9-4710-8ff6-1fa3559f0028.mp4\n\nAlso featured in [MagPi Magazine #123](https://magpi.raspberrypi.com/articles/picostepseq-rp2040-music-maker), and [in print too](https://magpi.raspberrypi.com/issues/123)!\n\n\n## How to use\n\nIn use, PicoStepSeq has two states: Play and Pause.\nIt is designed so you never have to stop playing to edit and save/load a sequence.\nIt has 8 sequence slots that can be edited and are persistently saved to flash.\n\nWhile Playing, the actions are:\n\n- **Pause** -- Tap encoder button\n- **Transpose sequence up/down** -- Turn encoder knob\n- **Change tempo BPM** -- Push + turn encoder knob\n- **Mute / Unmute steps** -- Tap corresponding step key\n- **Change step's pitch** -- Hold step key, turn encoder knob\n- **Change step's gate** -- Hold step key, push + turn encoder knob\n- **Load sequence** -- Push encoder, tap step key 1-8, release encoder\n- **Save sequence** -- Push encoder, hold step key 1-8 for 2 secs, release encoder\n\nWhen Paused, the actions are:\n- **Play** -- Tap encoder button\n- **Play notes** -- tap corresponding step key to play its pitch\n- **Change step's pitch** -- Hold step key, turn encoder knob\n\nSequence Save \u0026 Load:\n- On startup, `saved_sequences.json` is read from disk and loaded into the 8 sequence slots\n- Upon transitioning from Play to Pause, all 8 sequences will be written to disk as `saved_sequences.json`\n\n### Step Keys\n\nThe 8 \"step keys\" have an LED that indicate current mute/unmute status and which step is currently being played.\nTap on a step key to mute/unmute it. Hold a key and turn the encoder knob to change the pitch of that step.\n\n### Rotary Encoder\n\nTurning the encoder adjusts the transpose amount of the playing sequence.  Push + turning adjusts the tempo.\n\n### Display\n\nPicoStepSeq can be used without really looking at the display (which is good because the display is very small).\nThe display is hopefully clear. It's divided into the top section showing 8 notes with gate info and the bottom section showing which sequence, current BPM \u0026 transpose, and if the sequencer is in play/pause mode.\n\n\u003ca href=\"./docs/picostepseq_display1.jpg\"\u003e\u003cimg width=700 src=\"./docs/picostepseq_display1.jpg\"/\u003e\u003c/a\u003e\n\n### MIDI\n\nPicoStepSeq outputs both USB MIDI and Serial MIDI.\n\nThere is preliminary support for syncing to MIDI Clock.\n\n\n\n## Building\n\nThe schematic and PCB design is in the `hardware` directory.\n\nAn [OSHPark project](https://oshpark.com/shared_projects/vPWjBrmO) of the PCBs is ready to go.\n\n[Build guide to come!]\n\n\n### Enclosure\n\nA 3d-printable enclosure is [available on Printables](https://www.printables.com/model/260860-picostepseq-midi-step-sequencer-w-raspberry-pi-pic)\n\nThe current enclosure is designed for the case where sockets are used for both the Pico and the OLED display.\nThis is so either can be removed for other uses, so you don't have to sacrifice a Pico if you want to try this out.\n\n\n### Installing Firmware (CircuitPython)\n\n#### Arduino version:\n\nProbalby the easiest way to get PicoStepSeq running is to install the precompiled Arduino UF2\nversion in the [Releases](https://github.com/todbot/picostepseq/releases) section.\n\nThe Arduino firmware lives in `arduino/picostepseq`.\nTo compile the Arduino firmware, see the top of the `picostepseq.ino` file.\n\n\n#### CircuitPython version:\n\nTo install the CircuitPython version:\n\nThe firmware lives in the `circuitpython/picostepseq` directory.\n\n1. Copy all files in the `circuitpython/picostepseq` directory to the CIRCUITPY disk.\n\n   If using a Mac terminal, you can do:\n   ```sh\n   cd picostepseq/circuitpython/picostepseq\n   cp -rX * /Volumes/CIRUITPY\n   ```\n\n2. Install the CircuitPython libraries `adafruit_displayio_ssd1306` and `adafruit_display_text`\n\n   You can use the `circup` tool in Terminal for this:\n\n   ```sh\n   circup install adafruit_displayio_ssd1306 adafruit_display_text\n   ```\n\n   If you do not have `circup`, then you will need to copy the following files/dirs from the\n   [Adafruit_CircuitPython_Bundle 8.x](https://circuitpython.org/libraries):\n   ```\n   adafruit_bitmap_font/\n   adafruit_display_text/\n   adafruit_displayio_ssd1306.mpy\n   ```\n\n3. Reset the board and the sequencer should come up!\n\n   (The reset is important so that `boot.py` is run, which allows you to save sequences)\n\n\n### Installing the Firmware (Arduino)\n\nThe Arduino version is a bit more tricky to get going. See the top of the `picostepseq.ino` file for details.\n\n\n\n## Bill of Materials\n\nHere is a [Digikey cart with most parts](https://www.digikey.com/short/8qh7p87z).\n\nLinks also included below for major parts\n\nFor basic USB MIDI functionality:\n\n- 1 - \"picostepseq\" PCB ([OSHpark](https://oshpark.com/shared_projects/vPWjBrmO), also see \"hardware\" directory for gerbers)\n- 1 - Raspberry Pi Pico ([Adafruit](https://www.adafruit.com/product/4864), [Digikey](https://www.digikey.com/en/products/detail/raspberry-pi/SC0915/13624793))\n- 1 - 0.96\" I2C OLED SSD1306 128x64 display ([Amazon](https://amzn.to/3K1ZAoo))\n  - w/ pins in order GND, VCC, SCL, SDA; some have GND \u0026 VCC swapped\n- 1 - EC11 style rotary encoder w/ switch ([Digikey](https://www.digikey.com/en/products/detail/bourns-inc/PEC11R-4215F-S0024/4499665), [Adafruit](https://www.adafruit.com/product/377)]\n- 8 - \"step switch\" w/ built-in LED ([Adafruit](https://www.adafruit.com/product/5519)]\n- 8 - resistor 1k (R1-R8, 500 ohm also works) ([Digikey](https://www.digikey.com/en/products/detail/stackpole-electronics-inc/CF18JT1K00/1741612), [Adafruit](https://www.adafruit.com/product/4294)]\n- 1 - encoder knob (\"Davies 1900\" style works well, [Adafruit](https://www.adafruit.com/product/5541))\n\nFor both USB + Serial MIDI, add:\n\n- 2 - 3.5mm TRS jack, SJ-3523-SMT-TR (J1,J2)\n([Digikey](https://www.digikey.com/en/products/detail/cui-devices/SJ-3523-SMT-TR/281297))\n- 1 - 6N138 optoisolator (U2) ([Digikey](https://www.digikey.com/en/products/detail/liteon/6N138/1969179))\n- 1 - 100n capacitor (C1) ([Digikey](https://www.digikey.com/en/products/detail/vishay-beyschlag-draloric-bc-components/K104K15X7RF5TL2/286538), [Adafruit](https://www.adafruit.com/product/753))\n- 1 - resistor 10 ohm (R1)\n- 1 - resistor 30 ohm (R2) (47 ohm also works)\n- 1 - resistor 220 ohm (R3)\n- 1 - resistor 4.7k ohm (R4)\n\nAnd if you've not used [\"TRS MIDI\"](https://minimidi.world/#types) and have normal 5-pin DIN MIDI jacks\non your gear, you'll need a few:\n- Type A\" MIDI adapter ([PerfectCircuit](https://www.perfectcircuit.com/make-noise-0-coast-midi-cable.html) or [Amazon](https://amzn.to/3Tb6DiU))\n\n\nYou can attach the Pico \u0026 the OLED display how you like, but if using the 3d-printable \"picostepseq_headers\" case, you will also need:\n\n- 2 - 20-pin header socket ([Digikey](https://www.digikey.com/en/products/detail/sullins-connector-solutions/PPPC201LFBN-RC/810192), [Adafruit](https://www.adafruit.com/product/5583))\n- 2 - 20-pin header pins ([Digikey](https://www.digikey.com/en/products/detail/adam-tech/PH1-20-UA/9830398), [Adafruit ](https://www.adafruit.com/product/392))\n- 1 - 4-pin female (same as above, break off 4-pin chunk)\n\n\n## Firmware Design (CircuitPython)\n\nTiming in CircuitPython is all over the place and there's no periodic timer support (like `Timer` in MicroPython).\nSo, in order to minimize timing jitter due to I2C `displayio` transactions, the UI \u0026 display update code\nis designed so only the minimal amount of information is changed on the display in one iteration of the main\nUI loop. This is most noticable when loading a new sequence: the entire sequence is revealed only after a full\nloop.\n\nThe sequencer \"beat scheduler\" also tries to account for the variation in CircuitPython timing by\nmeasuring an \"error\" on the delta_t between beats and applies that to the next beat\n\n[More to come!]\n\n\nThanks to [Winterbloom](https://github.com/wntrblm) and [@theacodes](https://github.com/theacodes) for the awesome\n[SmolMIDI library](https://github.com/wntrblm/Winterbloom_SmolMIDI) for efficient MIDI parsing.\n(and for [really cool Eurorack synthesizer devices](https://winterbloom.com/shop))\n\n**Note:** If you have an [Adafruit MacroPad RP2040](https://www.adafruit.com/product/5128),\nyou can experiment with the sequencer without building any hardware! The code will auto-detect\nif it's running on a MacroPad. Rotate the MacroPad so the display is on the left,\nthen the sequencer keys are arranged as two rows of four.\n\nHere's a demo video of an early dev version of the sequencer running on the MacroPad:\n\nhttps://user-images.githubusercontent.com/274093/196534059-c9460560-1983-42a2-818f-853e90acd9bf.mp4\n\n\n\n## PCB layout\n\nThis is the original version that has a typo on the MIDI jacks.\n\n\u003cimg width=700 src=\"./docs/picostepseq_pcbtop.png\"/\u003e\n\n\u003cimg width=700 src=\"./docs/picostepseq_pcbbot.png\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fpicostepseq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftodbot%2Fpicostepseq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fpicostepseq/lists"}