Git Product home page Git Product logo

open-cleverpad's Introduction

open-cleverpad

An open firmware for MIDIPLUS SmartPAD (being a pretty cheap launchpad-like MIDI-controller)

This project is developed and maintained by DerFetzer. Feature and pull requests are very welcome!

Features

  • All pads, encoders and the buttons at the bottom generate standard MIDI messages when used.
  • Pads support 64 colors instead of only 8 with the stock firmware.
  • All LEDs can be fully controlled via MIDI messages.
  • Left buttons set the channel for encoder messages.
  • Right buttons set the channel for the pads.
  • Switch the channels via MIDI messages.

MIDI Messages

Have a look at the included Ardour MIDI map to get an idea of how it could be used.

  • Pads: note_on/note_off channel=m note=0-64 velocity=127/0 where m can be set with the buttons on the right
  • Buttons at the bottom: note_on/note_off channel=8/9 note=0-3 velocity=127/0
  • Encoders: control_change channel=n control=1-8 value=v time=0 where n can be set with the buttons on the left and v works according to enc-l here by default
  • Set encoder parameters:
    • send control_change channel=n control=112, value=0-4 to change the behavior of encoders of channel n to 0=enc-r, 1=enc-l, 2=enc-2, 3=enc-b as described here. When the value is 4 encoders send absolute values. The current internal value can be set with the corresponding encoder message.
    • send control_change channel=n control=113, value=1-33 to change the value multiplier of encoders of channel n when they are moved fast (the default is 10)
  • Set encoder channel: send control_change, control=110, value=0-7
  • Set pad channel: send control_change, control=111, value=0-7
  • Set LED color: send note_on with the same channel and note as the pad/button generates, note_off disables the LED with any values
    • Buttons at the bottom: any value greater 0 enables the LED
    • Pads: value is interpreted as 0b0bbggrr

Installation

  • [Only once] This firmware is designed to be used with the HID-bootloader.
    • Download the repository.
    • Compile the bootloader by executing make smartpad inside ./bootloader/F1 folder or use the precompiled binary from the bin folder.
    • Important: The original firmware will be lost after this step and cannot be restored!
    • Flash the resulting binary via SWD as described here or with any other method you are comfortable with.
  • In order to enter bootloader mode you have to push and hold the first pad in the third row during power up for about 1 second.
  • Use the precompiled binary from the bin folder or run cargo objcopy --release -- --bin open-cleverpad -O binary open-cleverpad.bin to generate the binary from source.
  • Flash the .bin file using hid-flash tool from ./cli folder with something like the following: hid-flash open-cleverpad.bin tty0. Just use any serial device and ignore messages like error, counldn't open [/dev/tty0].

Developer Documentation

  • The used STM32F103RBT6 unfortunately has flash read protection activated and there is a function that resets the microcontroller when there is activity on the SWD interface.

  • There is an update mechanism in the original firmware but I did not look at it for long. Current updater can be downloaded at MIDIPLUS homepage.

  • s0len0id assembled a great documentation of stock firmware function here.

  • In order to remove read protection you have to mass erase the device, so the original firmware will be lost. You have to try during startup with something like the following:

$ openocd -f /usr/share/openocd/scripts/interface/stlink-v1.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg  -c init -c "reset halt" -c "flash banks" -c "stm32f1x mass_erase 0" -c "stm32f1x unlock 0"
  • For reverse engineered information about the used hardware see hardware folder.

Dependencies

  • rust-std components (pre-compiled core crate) for the ARM Cortex-M3 targets. Run:
$ rustup target add thumbv7m-none-eabi

License

This crate is licensed under either of

at your option.

Credits

This crate is based on the cortex-m-quickstart template.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Code of Conduct

Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, DerFetzer, promises to intervene to uphold that code of conduct.

open-cleverpad's People

Contributors

derfetzer avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-cleverpad's Issues

How to recompile the firmware

Is this source code support for stm32f103c8t6? Can you give more detail of compile the source code after upload bootloader?

Schematic Error

Pin 4 on CN2 does not connect to +3V, it connects to NRST. So it's on the STM32 side of R4. Also I count more test pads than I see in your schematic, though I assume the extra are on the lines for the led drivers.

Precompiled Bootloader

Is there a possibility to add a precompiled binary of the hid_smartpad.bin? hard times compiling on win here.

How do I use this?

Do I flash it with the USB port on the smartpad or do I need an adapter?

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.