Coder Social home page Coder Social logo

midi2cv's Introduction

midi2cv

midi2cv midi2cv

This repository contains the code and schematic for a DIY MIDI to CV converter. I installed this converter into a home-built analog synthesizer, allowing me to play the synthesizer with my Yamaha CP50 keyboard over MIDI.

The MIDI to CV converter includes the following outputs:

  • Note CV output (88 keys, 1V/octave) using a 12-bit DAC
  • Note priority (highest note, lowest note, or last note) selectable with jumper or 3-way switch
  • Pitch bend CV output (0.5 +/-0.5V)
  • Velocity CV output (0 to 4V)
  • Control Change CV outout (0 to 4V)
  • Trigger output (5V, 20 msec pulse for each new key played)
  • Gate output (5V when any key depressed)
  • Clock output (1 clock per quarter note, 20 msec 5V pulses)

Parts

  • Arduino Nano
  • Optocoupler (I used a Vishay SFH618A, but there are plenty of alternatives out there)
  • 2x MCP4822 12-bit DACs
  • LM324N Quad Op Amp
  • Diode (e.g., 1N917)
  • 220, 500, 3x1K, 7.7K (3K+4.7K), 10K Ohm resistors
  • 3x 0.1 uF ceramic capacitors
  • 5 pin MIDI jack
  • 7x 4mm banana plug jacks
  • 3-pin header and jumper or 3-way switch

The Arduino code uses the standard MIDI and SPI libraries, which can be found in the Arduino Library Manager.

The schematic is illustrated at the bottom of this page (Eagle file included). Input power (VIN) is 9-12V. This is required for the Note CV op amp, used for the 0-7.3V note output. 1% metal film resistors are recommended for the 7.7K and 10K resistors, for a constant op-amp gain that does not change with temperature. Note that 7.7K is not a standard resistor value. I used a 3K and a 4.7K resistor in series, which are much more common values. If precise tuning is desired, a trim pot can be added or the constant NOTE_SF can be adjusted in the code. I opted for the latter.

Note priority is selected using a jumper attached to the three-pin header labelled NP_SEL in the schematic. This header connects to the Arduino pins A0 and A2, with the center pin attached to ground. Alternatively, a 3-way switch can be attached to this header.

The note priority options and jumper configuration are as follows:

  • Highest Note: When multiple notes are sounded simultaneously, the highest note being held will be sounded. When the highest note is released, the next highest note will be played, and so on. Remove the NP_SEL jumper to select this configuration.
  • Lowest Note: Analagous to highest note, except the lowest note being held will be sounded. Connect the NP_SEL jumper to the A0 pin and center pin (ground) to select this configuration.
  • Last Note: The most recent note played will be sounded. When that note is released, the next most recent note still being held will be sounded. Connect the NP_SEL jumper to the A2 pin and center pin (ground) to select this configuration. The illustration below shows the jumper configuration for the Last Note setting.

jumper

schematic

midi2cv's People

Contributors

elkayem avatar

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.