Giter VIP home page Giter VIP logo

pi-pico-expressionpedal2midi's Introduction

Pi-Pico-ExpressionPedal2Midi now with added USB

This is a Raspberry Pi Pico CircuitPython project that takes an expression pedal input via a TRS 1/4" jack connected to ADC pins on the Pico, and outputs respective Midi CC messages simultaneously to UART and USB.

Midi channel, CC number, and maximum and minimum values are customisable. Your choice of logarithmic or linear expression pedal feel.

The expression pedal is automatically calibrated. At startup, simply move your pedal from minimum to maximum. The values are determined accordingly, and CC messages will start being sent.

Recipe

Ingredients

  • Raspberry Pi Pico (loaded with MicroPython)
  • ¼” jack TRS socket
  • 5 pin DIN midi socket1
  • 10Ω resistor1
  • 33Ω resistor1

1 Required only if using midi port (non-usb)

Optional: breadboard, 40 pin male headers, pin cables, scotch whisky

Power source: Either USB or 3xAA battery holder

Method

  1. Download CircuitPython and install on your Pico.
  2. Download CircuitPython Libraries and copy adafruit_midi folder to lib folder on your Pico.
  3. Customise the midi settings in code.py. Season to taste
  4. Copy code.py to your Pico.

Now for the stuffing:

Expression Pedal Jack

The expression pedal is connected to ADC0 on the Pico.

  1. Connect the jack sleeve to Pico ground pin (any of 3, 8, 13, 18, 23, 28, or 33)
  2. Connect the jack ring to Pico pin 31 (ADC0)
  3. Connect the jack tip to Pico pin 36 (3V3 OUT)

If you're only using USB, you're done!

Otherwise...

Midi Port

Midi messages are sent simultaneously to USB and UART1. If you wish to connect your Pico to a Midi port, proeceed with the following.

  1. Connect a 10Ω resistor to pin 6 on the Pico (UART1 TX). T’other end of the resistor to pin 4 of your midi socket
  2. Connect a 33Ω resistor to pin 36 on the Pico (3V3 OUT). T’other end of the resistor to pin 5 of your midi socket
  3. Connect a Pico ground pin (any of 3, 8, 13, 18, 23, 28, or 33) to pin 2 of your midi socket

Jubilations, you’re done.

Ashley Strahle

https://github.com/ashstrahle

pi-pico-expressionpedal2midi's People

Contributors

ashstrahle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pi-pico-expressionpedal2midi's Issues

Question - Pico to function as real USB MIDI device

If I understand correctly, the code will not send MIDI over USB to computer but to an actual hardware MIDI port.

Is it possible for you to estimate how difficult it would be to get this device to be a real MIDI device and function by simply plugging it into USB?

I'm trying to gauge if this would be something to look into but I'm a composer foremost and coding is only something I do on the side, so I'm limited in my capability...

EDIT: I just found this:
https://blog.4dcu.be/diy/2021/05/20/MIDIpad.html

and it looks like just importing these two libraries will turn a Pico into an actual MIDI device:
import usb_midi
import adafruit_midi

Hmm... maybe I will risk the jump...

Kind regards
Hans

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.