Giter VIP home page Giter VIP logo

bluemo's Introduction

BlueMO

BlueMO image BlueMO allows you to receive data from Adafruit's Bluefruit boards or RFDuino and translate it into MIDI or OSC.

This project satisfies some very specific personal needs, but might be useful for similar applications. I augmented an electric guitar with some sensors, and then I needed to transmit theit output wirelessly to my Mac without the need of additional hardware. I opted for using an Adafruit's Feather 32u4 Bluefruit LE (https://www.adafruit.com/products/2829) to collect sensor data and send it via Bluetooth LE. (It should also work with an RFDuino microcontroller (http://www.rfduino.com/).) BlueMO is written mostly in swift (my first try at OSX development). It uses some external libraries:

  • nRF8001 (https://github.com/MichMich/nRF8001-Swift): Originally intended for interfacing the Adafruit nRF8001 breakout with OSX (and iOS). After some hacking, I made it work with either Adafruit's Feather 32u4 (and possibly other Bluefruits boards as well) and RFDuino.

I am also using Cocoapods to install and manage these libraries:

How to set it up:

BlueMO expects packets of values separated by commas and delimited by the "|" character, so set your microcontroller accordingly. On the Mac side:

  • Install Cocoapods (Instructions here:https://guides.cocoapods.org/using/getting-started.html)
  • Clone the repository or download the source and unzip
  • In Terminal, go to the source directory and run "pod install"
  • Instead of opening the project directly with Xcode, also in the terminal run "open BlueMO.xcworkspace"
  • Compile, install, run, enjoy.

How to use:

  • Select the name of your Bluefruit/RFDuino, so BlueMO connect to it and not to any device around. BlueMO is meant to be ready to work as soon as it is launched, so it will try to connect as soon as you open the software. Additionally, it will remember all your settings from the previous launch without having to press any save button'. No need to reconfigure anything, just launch and play!

  • Configure your Bluetooth module to send data over Bluetooth using string packages with this format:

    AAA,BBB,CCC,DDD,EEE

Where each character group is a different sensor value (or whatever value you want to send) encoded as 3 HEX digits. This enough to represent the full 10-bit sensor value resolution used by most Arduino-based microcontrollers. A Bluetooth package can be no longer than 20 chars, so currently it might only be possible to send 5 distinct values. I used HEX as it would require character less than representing 10 bits in decimal (it would require 4 chars for values over 1000). I am planning in improving this implementation in the future, maybe by serializing the data stream in a MIDI-like fashion.

  • BlueMO can translate these values into OSC or MIDI.
  • For MIDI: BlueMO will create a virtual MIDI port. Select that port in your software and you'll receive data through it. However you can connect BueMO directly to any MIDI port, for instance, to send control data directly to an external instrument. (If BlueMO fails to recognize your MIDI port, please let me know about it.) Pick a MIDI channel an a continuous controller (MIDI CC) number for each of your sensor values

  • For OSC: By default, BlueMO will send OSC data to the IP 127.0.0.1, port 6666. You can change these, of course. You can also edit the routing addresses for each incoming sensor value. Again, every change you make will be saved for you to use at a later time.

If you find this project useful, consider buying Spacebarman's music from iTunes here: https://itunes.apple.com/us/album/si-algun-dia-todo-falla/id585191546

(Spacebarman is my band, of course ;)

JP

bluemo's People

Contributors

jpcarrascal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.