A handsfree creative coding platform. Build apps, make art, create bots, & more
npm install pixelfelt-blockly
bash
1) Setup
git clone https://github.com/midiblocks/midiblocks-web
cd midiblocks-web
npm install
2a) Web based mode (native browser events)
npm start
2b) Desktop mode (native desktop events)
npm run desktop
3) Point your browser to http://localhost:8080
`
> ### Troubleshooting
> ---
> 🐞 Windows - If you run into errors after npm install it's probably due to Robot.js dependencies (most likely you need Python and node-gyp). If you don't need desktop mode then remove the line in package.json for "robotjs" and try running npm install again. If you do want desktop mode, then check out this README for a troubleshooting guide.
>
> This will be fixed soon!
-------------------------------------------------------------------------
Contents
- About
- The Studio
- The Factory
- The Library
- Motivation
- Keyboard shortcuts
- Setup
- Prereqs
- Installing
- Browser support
- Dev
- Command line scripts
- window.app
- localStorage
- License
-------------------------------------------------------------------------
About
Midiblocks is a visual, all-in-one gesture mapping and handsfree desktop automation platform designed to help you use devices handsfree! Some use cases include:
- Playing commercial video games handsfree with face gestures
- Controlling robots handsfree with head movements
- Handsfree and voice-free typing
- Using a mobile device as a handsfree secondary display
Midiblocks is centered around blocks of code that are literally represented visually by blocks. Midiblocks is broken up into several views:
- The Studio is where you actually snap the blocks together to map gestures to things. All of the blocks in a Studio workspace are collectively referred to as midiblocks
- Each individual block represents JavaScript code and The Factory is where you design the shape of these blocks and write its code
- The Library is where your Factory Blocks and Studio Midiblocks are stored. You can edit, remix, and delete them there
$3

> 🚧 More info coming soon
$3

> 🚧 More info coming soon
$3

> 🚧 More info coming soon
-------------------------------------------------------------------------
Setup
Prereqs
- Git
- NodeJS LTS (eg 12.x.x)
Installing
- Open terminal and clone this repository with: git clone https://github.com/midiblocks/midiblocks
- Change into directory with: cd midiblocks
- Run npm install from the project root to install dependencies (> 250Mb)
- Run npm start from the project's root to start the app at localhost:8080
Browser Support
This project works in all browsers that natively support the Web MIDI API. Currently, the following browsers have built-in support:
- Chrome (macOS, GNU/Linux, Android & Windows)
- Opera (macOS, GNU/Linux, Windows)
- Android WebView component (KitKat and above)
- Edge (Windows)
For more info, including on how to support Firefox, Internet Explorer, and Safari see the WebMidi docs
> Starting with version 77, Chrome deprecates Web MIDI usage on insecure origins. This means that, going forward, the page will need to be hosted on a secure origin (e.g. https://, localhost: or file:///) and the user will need to authorize usage (no matter if sysex is used or not). Firebase, Netflify, Github, and others provide free hosting.
-------------------------------------------------------------------------
Dev
Command line scripts
`bash
DEVELOPMENT
-----------
Start the app in development mode with localStorage
npm start
HANDSFREE DESKTOP
-----------
Same as
npm start but it controls the desktop pointer instead of a virtual one
Adds a "Desktop Mode" toggle
npm run desktop
PRODUCTION
----------
Build the app for production with localStorage
npm run build
DEPLOY
----------
Push the app to firebase. Must have:
- Firebase Tools: npm i -g firebase-tools
- Initialized with: firebase init
npm run deploy
`
window.app
The following is available through your browser's dev console:
`js
window.app = {
$, // Main Vue instance
$studio, // The Studio component (only present when on that route)
$factory // The Factory component (only present when on that route)
}
`
> 🚧 More info coming soon
localStorage
The following is available inside localStorage:
`js
{
blocks: [], // All loaded Factory Blocks
midiblocks: [], // All loaded Studio Midiblocks
currentFactory: {}, // The Factory's last state (autosave)
currentStudio: {}, // The Studio's last state (autosave)
splitter: 50
}
``
| Location | Shortcut | Action |
|---|---|---|
| Anywhere | s | Navigate to the Studio |
| Anywhere | f | Navigate to the Factory |
| Factory | ctrl + s | Save the current block |