View jupiter-6_omni_off.rb
require 'unimidi' | |
UniMIDI::Output.open(1) do |output| | |
output.puts(0xB0, 0x7C, 0) | |
output.puts(0xB0, 0x7F, 0) | |
end |
View midi.yml
controller: | |
Bank Select: 0 | |
Modulation Wheel: 1 | |
Breath Controller: 2 | |
Foot Controller: 4 | |
Portamento Time: 5 | |
Data Entry MSB: 6 | |
Channel Volume: 7 | |
Balance: 8 |
View midi_notes_to_yaml.rb
# generate MIDI note names/numbers in YAML format | |
octaves = (0..10) | |
range = (0..127) | |
naturals = [ | |
{ :name => "C", :val => 0 }, | |
{ :name => "D", :val => 2 }, | |
{ :name => "E", :val => 4 }, | |
{ :name => "F", :val => 5 }, |
View img_convert.rb
#!/usr/bin/env ruby | |
require "nokogiri" | |
# opens every file in the given dir tree and converts any html img tags to rails image_tag calls | |
# | |
# example usage: | |
# ruby convert.rb ~/my_rails_app/app/views | |
# | |
# ***be careful and backup before using this*** | |
# |
View postgresql.conf
# ----------------------------- | |
# PostgreSQL configuration file | |
# ----------------------------- | |
# | |
# This file consists of lines of the form: | |
# | |
# name = value | |
# | |
# (The "=" is optional.) Whitespace may be used. Comments are introduced with | |
# "#" anywhere on a line. The complete list of parameter names and allowed |
View sysctl.conf
kern.sysv.shmmax=1938751488 | |
kern.sysv.shmmin=1 | |
kern.sysv.shmmni=256 | |
kern.sysv.shmseg=64 | |
kern.sysv.shmall=1938751488 |
View video-example.rb
#!/usr/bin/env ruby | |
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) with the video library | |
# use "rp5 unpack library" at a command line to install the video library, among others | |
# tested with Ruby 1.9.2 | |
# video file: http://bit.ly/H5yBjK | |
class VideoTest < Processing::App |
View video-capture-example.rb
#!/usr/bin/env ruby | |
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) with video capture | |
# use "rp5 unpack library" at a command line to install the video library, among others | |
# tested with Ruby 1.9.2 on OSX with built in web cam | |
class VideoCaptureTest < Processing::App |
View saturation1.rb
#!/usr/bin/env ruby | |
# only show pixels that pass a certain threshold of color saturation | |
class SaturationFilter < Processing::App | |
load_library :video | |
include_package "processing.video" | |
def setup |
View capture-to-file.rb
#!/usr/bin/env ruby | |
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) where | |
# captured video is written to a QuickTime file | |
# use "rp5 unpack library" at a command line to install the video library if you haven't | |
# tested with Ruby 1.9.2 on OSX with built in web cam | |
class VideoCaptureToFileTest < Processing::App |
OlderNewer