Thursday 3 November 2016

Meteor + PhantomJS fix (when npm install on Phusion Passenger server)

When deploying my Meteor app on Phusion Passenger installed on Ubuntu I encountered an issue when installing dependencies for production (as described in PP's tutorial Step 2.3)

Initially I thought it's an issue with node-pre-gyp but after error log inspection it turned out it's PhanomJS causing the problem:

Phantom installation failed { [Error: EACCES: permission denied, open '/var/www/myapp/bundle/programs/server/npm/node_modules/meteor/momentjs_moment/node_modules/phantomjs-prebuilt/lib/location.js']

To fix it simply change permissions:

sudo chmod 0777 /var/www/myapp/bundle/programs/server/npm/node_modules/meteor/momentjs_moment/node_modules/phantomjs-prebuilt/lib/location.js

Now npm install --production should work fine

Wednesday 19 December 2012

Arduino MIDI Controller (Note + Control Change) Tutorial


1. Overview

This is an example project for getting Arduino to work as MIDI device. There is three buttons to trigger notes and one potentiometer to control change. It's been tested on Win 7 x64, however should work on x86 and older system versions.




2. Shopping list

  • Arduino board
  • Breadboard
  • Push buttons (each button for controlling one note)
  • Rotary potentiometer (for CC - Control Change), code on mine says "B50K", but most should work
  • 10k resistors for push buttons connection
  • Some wires, USB cable to connect Arduino, 
  • Optional: some Lego Technics for push buttons & potentiometer base + masking tape to keep things steady 

3. The plan













4. Software

  • Arduino MIDI Library - get v3.2, copy files to Arduino/libraries
  • LoopBe1 - virtual MIDI cable
  • Hairless MIDI<->Serial Bridge - used to read serial data from Arduino and send it to virtual MIDI device
  • DAW or other music software to make some noise:) (on video I'm using new generation tracker - Renoise. Ableton Live, Cubase or any will do)

5. Arduino Code

Get the code

6. Wire it up

  1. Start LoopBe1 (tray icon)
  2. Open music software, go to preferences and select LoopBe1 as MIDI input device
  3. Open Arduino editor, connect board and upload program
  4. Open Hairless MIDI, select Arduino COM port (i.e. COM4), check "Serial<->MIDI Bridge On"
  5. That's it!

7. References