Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Announcing BMC, a MIDI Controller library with companion Desktop Editor!

  1. #1

    Announcing BMC, a MIDI Controller library with companion Desktop Editor!

    Hi all, I'm really excited to announce the Badass MIDI Controller (BMC), a scalable MIDI controller library with a companion Desktop Editor!

    It's a bit difficult to fully explain BMC but I will try my best here.

    BMC is a library specifically designed for the Teensy platform, it allows you to build MIDI controllers using the least amount of external parts and without you having to worry about writing the code for the hardware and MIDI communication. Additionally BMC comes with a fully featured Adaptive Desktop/Web Browser App giving you an interface to edit the behaviour of all the BMC hardware. The app also has a Configuration tool that allows you to create the required CONFIG file that BMC uses to compile the features you want to use.

    Here are some of the features of BMC:

    *Controls

    - Up to 32 Buttons using the Teensy's pins
    - Up to 32 Expansion buttons using the MCP23017/MCP23018 (no coding required) or any other chip to read GPIOs for buttons tho you would have to code the reading of those GPIOs and tell BMC the state of each
    - Up to 32 Leds using the Teensy's pins
    - Up to 32 Pixels using NeoPixels (tested only with 5mm neopixels from Adafruit)
    - Up to 16 Global Leds using the Teensy's pins (more about it below)
    - Up to 8 PWM Leds using the Teensy's pins
    - Up to 10 Potentiometers
    - Up to 8 Encoders
    - Up to 16 Relays (latching and/or non-latching)

    *MIDI IO

    - MIDI with built-in USB Port (always available)
    - MIDI with USB Host (teensy 3.6/4.0)
    - Up to 4 Serial MIDI ports using built in Hardware Serial ports
    - BLE MIDI using nRF8001 using SPI


    With BMC you can have any combination of buttons, leds, encoders, pots, relays and MIDI IO ports that you want, BMC has predefined events for all the hardware plus you can set up custom events that you can program thru your sketch, for example you can setup a button to send a control change to the USB Host or to the USB client port or to BLE or to any of the Serial ports or any combination or all MIDI ports at once!

    BMC is meant to be as easy to get up and running as possible, the library handles all the hardware for you, you tell the editor what you want a button to do and it does it! setting up a button is as easy as wiring a momentary button to a pin and ground and BMC will read it for you.

    Buttons are powerfull as they can have up to 8 events (compiled based on the CONFIG file), each event can have it's own trigger, triggers include Press, Release, Hold, Continous, 2nd Press and Double Press.
    A button can send one message on press, another on release and another when held for a specified time, you can also have any of the events respond to the same trigger or any combination of triggers.

    Because BMC is specifically written for the Teensy platform it takes advantage of all the work that PJRC has put into teensy and the incredible horse power of their boards, this allows BMC to keep track of Program and Control Change messages sent and received and that allows Leds to light up based on the specified Control/Program that was sent or received and to Toggle Control Changes easily.

    For the Hardware BMC has "Pages" each page has a unique set of events for all the hardware (except for global leds hence the name, they get 1 event thought BMC perfect for leds used for MIDI IO or to notify if a MIDI device was connected to the USB Host, or if BLE is connected, etc.) with this you can have a build that has say 6 buttons, and maybe 4 pages, you can assign a button to scroll thru pages and then all buttons will have a unique event based on the page, so a build with 6 buttons and 4 pages will give you a total or 24 differnt button events! (or 20 since 1 would always be for page scroll)

    Leds, Encoders and Pots only have 1 event per page but buttons and expansion buttons can have up to 8 events each.

    The number of Buttons, Leds, etc is all prefedined on compilation and the limits are set based on the number of pins on the board and EEPROM.

    Speaking of EEPROM, BMC will also handle all that for you! as mentioned BMC is scalable and it handles the structure of EEPROM based on your needs, It creates a "Store" struct based on your CONFIG and the entire library adapts to that struct. BMC can use the built in EEPROM on the Teensy boards or the 24LC256 i2c EEPROM chip or on the teensy 3.5/3.6 it can use the built in SD card as EEPROM (plus the ability to have 32 EEPROMS when using the SD card allowing you to switch between them!)

    BMC also features:

    - Pages for hardware
    - MIDI Clock Master/Slave
    - MIDI Active Sense Master/Slave
    - MIDI Library (a library of Control/Program/Note/SysEx messages that can be assigned to buttons etc.)
    - Presets (a set of Library messages that can be sent simultaneosly)
    - Triggers (BMC will do something when a specified MIDI message is received)
    - Tempo to Tap (send a set of 4 MIDI CC messages when the Clock BPM changes to other devices in intervals based on the BPM basically simulating you doing a Tap Tempo)
    - Custom System Exclusive Messages
    - Sketch Bytes (an array of bytes where you can store data for your sketch and can be updated via the editor app, great to store the brightness of a display or or any other custom settings)
    - MIDI routing and filtering (route any or specific message types from one input to a different output(s), example: a message received by the USB Host can be sent to the Serial MIDI A port but only if it's a Voice message on channel 4)
    - Click Track (for Teensy 3.2/3.5/3.6) using the DAC output and synced to the MIDI Clock
    - Time keeping
    - Stopwatch (great if you have a display to know how long your set has been on for)
    - Basic Sync with Beatbuddy
    - Debug Mode (optional) using the Serial Monitor
    - Real Time MIDI input/output enable/disable
    - Adaptive backup/restore with the editor
    - Tons more features that I can't think of right now lol

    BMC has an API (still growing) giving you access to many parts of the library, read and/or write to any midi port, etc.

    Additionally the editor app adapts to your build, when you generate the config file you have a GUI that allows you to drag and drop buttons and leds, then when you upload the sketch and connect to the app, the app will show you that same layout you specified, change the color of the leds on the GUI so the editor matches the colors of your leds and real time feedback showing you when you pressed a button, an led has turned on/off, etc.

    The editor communicates with the Teensy using MIDI System exclusive, each device can have a unique ID and you can chain devices allowing the editor to communicate with each one without affecting the other one thru the same midi port on you computer.

    I've been using BMC live already for the last year and while it's ready for prime use it won't be available for a few more months, this is mainly because i need to document it more, the code needs more comments and want to clean up some things before i release it to the public, once released it will be open source so anybody can use it and customize it.

    I have a few more ideas I want to try before it's release that will change the EEPROM structure and in order to do that i have to first implement a good way to check the EEPROM struct version, BMC will automatically wipe the EEPROM if the CRC for the build is different than the one uploaded so all these things need to be handled first.

    For those of you who have a teensy laying around and are willing to give it a try i'll be happy to send you a binary of a basic BMC build that you can upload to your Teensy to try it out. The binary will be compiled for the Teensy 3.2 and the Teensy 3.6 and will come with instructions on what to wire, just PM me.

    Currently BMC should support the Teensy LC 3.2, 3.5, 3.6 and 4.0, HOWEVER it's only been tested on the Teensy 3.2 and Teensy 3.6, I told the gf to get me a couple of Teensy 4.0s for my birthday so hopefully on friday i'll get to start testing BMC with the 4.0, i'll try to get my hands on an LC and 3.5 in the next 2 weeks to fully test it with them as well (another reason the library is not released yet)

    For those who want to try BMC and the curious ones you can already access the BMC editor app on my website at https://www.roxxxtar.com/bmc

    Obviously without having the firmware uploaded to your teensy you can't connect and use the editor but you can at least try the config file maker (on the connection window click the "More" button and then "Config File Generator") the online editor requires Google Chrome but a desktop app will be released along with the library, the desktop app is already fully functional so that won't delay anything.

    My goal is to have a library that allows you to build your own MIDI Controller that can rival any commercial device without spending a ton of time dealing with the basic code and writing an editor app plus having open source code so you can add your own features if you want.

    This is it for now, you can go to https://www.roxxxtar.com/bmc to see some more images, you can post questions about the features, suggestions and thoughts here.

    The pictures below show you the devices i've been using live, one is an old Rocktron MIDI Mate enclousure that i gutten and put a Teensy 3.6 with 12 buttons, 15 Leds (3 are 3mm below the display), two 8x8 led matrices and two seven segment alphanumeric displays from adafruit using i2c, BLE MIDI with the nRF8001, 2 serial MIDI IOs (one has a parallel mini DIN that connects directly to my BeatBuddy), USB Host and the SD card for the Store and is powered by either a standard 9v power supply for guitar effects or via the USB port. The Helix Stomp is connected to Serial MIDI B and the Beatbuddy to Serial MIDI A, the Helix has an ipad connected to it running Quantiloop and Setlist maker and then routes MIDI to the Helix and then to BMC, BMC then takes only Voice messages on channel 15 and routes them to the beatbuddy port to change presets, the MIDI clock from the beatbuddy is routed to the the helix which then sends it to the ipad, and so on, BMC is setup to use the beatbuddy midi port as the Clock Source.

    The small box next to it is also a BMC build with a teensy 3.2 its connected to the USB host and USB Powered (it's not powered unless the 9V power supply is used on the larger build) it has 4 phisical buttons and a 1/4" jack that allows me to plug in an external footcontroller to add 2 more buttons to it.

    I'm aiming to release BMC by early 2020 and with the communitity make it the easiest way to build your own midi controller! a last note: I have no intention to port the library to other Arduino compatible boards, the Teensy platform is just the best and has many features that other boards lack and will allow me to keep the editor and the library in perfect sync.

    Click image for larger version. 

Name:	BMC build.jpg 
Views:	15 
Size:	180.7 KB 
ID:	18139
    Click image for larger version. 

Name:	BMC running on teensy 36 with ble.jpg 
Views:	7 
Size:	175.8 KB 
ID:	18137
    Click image for larger version. 

Name:	e3cc996aa165fad3b6b2010c940ec750.jpg 
Views:	18 
Size:	87.6 KB 
ID:	18138

  2. #2
    Junior Member
    Join Date
    Dec 2016
    Posts
    3
    Oh this is excellent! I've been building a midi controller that is (for now) based on Teensy 3.6 but I'm working on a version using Teensy 4.0 of which I intend to make the PCB open-source. My software is (although functional) a bit of a mess so I was thinking of starting over. Now I'll probably integrate your project if the firmware becomes available. Will it be on github so I can contribute (I might need some changes for my project specifically ofc.) The pedal I built also uses MCP23017 for the buttons and also for the (HD44780) screen. It acts as the brain between a Beatbuddy and a Pigtronix Infinity and some rack equipment (does simple patch switching, and sends expression pedal as midi).

    Click image for larger version. 

Name:	IMG_20191107_190523.jpg 
Views:	14 
Size:	367.7 KB 
ID:	18140

    I also have a version in a 19" rack that has 4 midi I/O to do switching and controlling equipment in a rack (Marshall JMP-1 and TC G-major). With the new version on Teensy 4.0 I will also include an audio codec (PCM3060 that I have functioning with Teensy4) to do some recording or effects; particularly running impulse response convolution to do cabsim, this I have also working on T3.6 but in Mono and I'm aiming for stereo on T4.0.
    Last edited by Chris0611; 11-07-2019 at 06:36 PM.

  3. #3
    That's awesome! yes it will be on github so people can contribute.

    How do you use your build to control the beatbuddy and infinity? just with Control and Program changes? I wrote syncing for my beatbuddy into BMC, there are predefined commands for the beatbuddy like transitions, set tempo and all that, BMC keeps track of those changes, the current part etc as the messages are returned from the beatbuddy.

    I'm curious on how others use their teensy builds to control guitar effects to improve BMC further

  4. #4
    Junior Member
    Join Date
    Dec 2016
    Posts
    3
    Right now I just use it to send CC's (undo button for Infinity, 'hit' button for the beatbuddy) and it sends the tempo/bpm from the Beatbuddy to my rack (DAW and TC G-Major) to sync up effects like delay to the beat. And of course it sends the beat from the Beatbuddy to the Infinity to sync the looper. Pretty basic functionality until now, but just what I need.

  5. #5
    oh ok, BMC can handle all that, i actually do it the same way, i route the BB clock to all my other devices, that's where routing becomes really easy, that way i don't have to chaing one device after the other one with midi but i can have one midi port for each device and route them however i want

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •