Thursday, July 17, 2014

Pitchfork API for Node

Tired of reading Pitchfork in your browser?  Try reading it on the command-line (or processing its review data as json).  If you have, Node installed, you can now:

npm install pitchfork

The package is inspired by a Python package that scrapes review data from Pitchfork.  The goal was to make something Node-friendly that was Eventable and/or Thennable and easily plugged into an Node project.  Take a normal normal Pitchfork Review:

And now display the command-line version:

pitchfork -a "wilco" -t "yankee hotel foxtrot"

The output can also be formatted into valid JSON (and piped to a pretty-printer):

pitchfork -a "wilco" -t "yankee hotel foxtrot" --json | json

You can also read the review entirely as plain-text and pipe it to less:

pitchfork -a "wilco" -t "yankee hotel foxtrot" --text | less

The npm can also be required in any (node) .js file and used programmatically with either...

var p = require('pitchfork')
  , s = new p.Search('wilco')

s.on('ready', function(results){
  results.forEach(function(review, idx){
    console.log("review #%d: ",idx, review.truncated());

var p = require('pitchfork')
var s = new p.Search('wilco')

      console.log("review", review.truncated())

For more information or to contribute, visit the project on github:

or NPM:

Wednesday, February 5, 2014

Arduino Adventures #2 - 3 Essential Links for 8x8 LED Matrix Projects

In the process of building an Arduino, MIDI step sequencer, I've stumbled upon some useful info about 8x8 LED Matrixes that helped me get a little bit closer to my goal.  However, I couldn't've done with without these essential links when dealing with one of these Sparkfun, dual-color, 8x8 matrices:
 buy an led matrix from amazon

1. Ana Debroy's homemade spec PDF

This is a great supplement to the manufacturer's datasheet that will help you make more sense to how pins map to the light patterns.

2. Tronixstuff's 8x8 LED for Arduino Tutorial

A very thorough tutorial on how to write Arduino Sketch code that activates individual LEDs.  His drawings are also very helpful:

3. Arduino's RowColumnScanning Tutorial

Although this is written for a mono-color 8x8 matrix with far less pins, some of the diagrams and information on this tutorial is essential.

So far, I've only started on the pattern timing side of things and made brief, adjustable-speed, two-color visual-metronome-kinda thing.

I've also posted my Arduino Sketch code for this on Github.  If you have any ideas or resources, send them my way or send me a pull request.

Monday, February 3, 2014

Arduino Knobby Blinky Thingy

So I finally go around to buying an Arduino Uno R3 from Adafruit

Eventually, I want to build a more useful Arduino-powered, MIDI step-sequencer than what I've seen on the web and use it to drive some of my MIDI stuff. In the meantime, I made an LED knobby blinky thingy:

It has a knob that adjusts blink tempo on a red LED.  Better yet, here's a video demo:

Yes, I used a YouTube-recommended audio-track and it's AWESOME.

But I digress...

The project is based on the Arduino Blink Tutorial, but I added the knob and a few modifications to the code. You can see this Arduino Sketch code on Github, where I'll be posting more Arduino Sketches to come.