Giter Site home page Giter Site logo

windfisch / midikraken Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 2.0 11.77 MB

A open source, open hardware up-to-16x USB-MIDI-interface for around 15 bucks in its smallest configuration.

Makefile 0.97% Rust 67.29% RPC 0.18% Shell 30.09% Python 0.70% C 0.25% Gnuplot 0.52%
open-hardware open-source midi usb firmware pcb hardware diy

midikraken's Introduction

Midikraken

build doc-links binary_size

An open-source, open-hardware MIDI-USB-interface supporting up to 16 (and maybe beyond?) MIDI ports. The hardware is based on a STM32F103 "blue pill" board which can be cheaply sourced from your favourite chinese seller (note about quality differences), plus other garden variety components such as HC2630 opto couplers (that's just two 6N137 in one package), shift registers, some LEDs and resistors.

Apart from being a MIDI-USB-interface, Midikraken is a feature-packed MIDI router supporting separate clock and note event routing, clock division. Future features may include split-keyboard routing, clock generation or even a hardware arpeggiator.

Example of a Midikraken configuration

Below you will find a technical overview. A user manual is available here.

Releases

Find the latest firmware upgrade packages on the releases page. You only need an USB cable, instructions for Linux and Windows are included.

The schematics and board layout files are on a separate page. Hardware and firmware are versioned separately, their numbers do not match.

Hardware

Midikraken consists of two different PCBs that can be stacked (almost) arbitrarily: The DIN board has four traditional MIDI in/out port pairs, and can house the master microcontroller.

The TRS board gives you eight TRS MIDI pairs that support both TRS-A and TRS-B. (Inputs are automatic, outputs need to be configured in software). It can not house the microcontroller and thus cannot be used without a DIN board.

The boards can be chained using their master/slave connectors and are stackable using M3 screws / spacers. Currently, the firmware must be adapted and recompiled according to the stack configuration. Currently, a maximum of 16 port pairs is supported.

For information on the hardware, the revision history and errata, see the hardware documentation. A build guide for rev01 and rev02 is available.

Firmware

The firmware is written in Rust and is released under the GPLv3 license.

Since the STM32F103 only offers 3 hardware UARTs, we need to emulate the UART protocol in software. For this, a timer interrupt oversamples the UART input pins with thrice the baudrate in order to always read a stable bit at a non-edge. (Guaranteed 1/3 * bit time distance from any edge, so the signal should be quite stable until then.)

Benchmarks show that this can be done fast enough for up to 16 software UARTs (and likely even more), while leaving plenty of cpu cycles (25% for 16 UARTs) free for other work.

Further information about the firmware itself can be found in the firmware documentation.

License

The software in the firmware directory can be redistributed and/or modified under the terms of the GNU General Public License Version 3. Note this does not apply to the bootloader which is under its own license.

The hardware designs in the hardware directory, excluding hardware/lib/3d to which own conditions apply, can be licensed under the terms of the CERN OHL Version 2 license. This specifically includes (but is not limited to) schematics, PCB designs and gerber files.

Contributing

I am happy about contributions, just open a pull request!

Note: Even though Midikraken is licensed under GPLv3 and OHL-S-v2 (the exact versions), any contributions / pull requests must be licensed under the "GPLv3 or any later version" or "OHL-S-v2 or any later version", respectively. This is because on the one hand, I want to be able to update the project to new versions of these licenses, but on the other hand, I don't like licensing my work under a license (e.g. the hypothetical GPLv4) that I haven't even read yet. If such a license is released, I will likely adopt it after revising it.

midikraken's People

Contributors

romsom avatar windfisch avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

midikraken's Issues

layout PCB

note:

  • ensure black pill compatibility (one GND must be n/c, RST must be jumperable, one side is pin-shifted by one :/)
  • allow for a secondary power plug so the USB can be used as host
  • (maybe battery support?)
  • stackability (ideally stacking or chaining)
  • small display and some buttons
  • DIN5 and TRS variants

Garbage output on powerup

The shift registers have their output always enabled; however, before the first data is transmitted, their outputs are in an undefined state.

output-enable should slow-start.

Add benchmarking feature

global "stress test" flag that enables all senders and receivers in phase i and then writes out the execution time.

(The input pins may need to be overridden)

Add shift register support

  • Use shift registers to address the output lines
  • Rearrange bits for half-used shift registers
  • Mask high/low nibble

USB-Bootloader

add a usb bootloader and allow launching it with either a i/o pin or upon reception of a magic sysex.

evaluate Din5 midi pcb options

  • Add traces from GPIO pins directly to the inputs/outputs (via the buffer) to enable a shift-register-less build (without the possibility to chain).
  • Add solder bridges to skip the buffer and to select 3.3V instead of 5V for 3.3V MIDI operation
  • Figure out whether display and rotary encoder can fit on the board.
  • HCPL2630 or 6N137?

Port remapping

Port numbers are weird due to boards being rotated. Fix that in software.

clock generator

Select bpm or tap bpm.
Maybe treat as if coming from input 0?

DIN5 board should skip shift registers

For a master-only-configuration without actual DIN ports, the DIN5 board should allow skipping the shift registers completely.

Currently, this can be achieved by not equipping the shift registers and running wires from 74HC595's SER to QH', and from 74HC165's Q7 to DS.

Solder bridges would be nicer.

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.