Last active
December 14, 2015 20:16
-
-
Save lwrubel/5a621aa316741ad8d315 to your computer and use it in GitHub Desktop.
Sonic Pi code for reading Github commits to GW Libraries Launchpad repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# files changed in github launchpad repo (https://github.com/gwu-libraries/launchpad) | |
# full sonic pi code at https://gist.github.com/lwrubel/5a621aa316741ad8d315 | |
require 'csv' | |
data = CSV.parse(File.read("/Users/lwrubel/projects/stg-sound/launchpad-noDmrc.csv"), {:headers => false}) | |
use_synth :subpulse | |
separator = 0.15 | |
count = 0 | |
data.each do |line| | |
if line[2] == "A" | |
puts "File ADDED: " + line[3] | |
elsif line[2] == "M" | |
puts "File EDITED: " + line[3] | |
end | |
"File edited: " + line[3] | |
person = line[1] | |
if (["Joshua Gomez", "Joshua"].include? person) | |
puts "Joshua Gomez" | |
play :G3 | |
sleep separator | |
elsif (["Daniel Chudnov","Dan Chudnov"].include? person) | |
puts "Daniel Chudnov" | |
play :C3 | |
sleep separator | |
elsif (person == "Raza Gilani") | |
puts "Raza Gilani" | |
play :E4 | |
sleep separator | |
elsif (person == "Ed Summers") | |
puts "Ed Summers" | |
play :F4 | |
sleep separator | |
elsif (["studiozut","Christian Aldridge"].include? person) | |
puts "Christian Aldridge" | |
play :D5 | |
sleep separator | |
elsif (["cummingsm","Michael Cummings"].include? person) | |
puts "Michael Cummings" | |
play :C5 | |
sleep separator | |
elsif (person == "Darshan Pandhi") | |
puts "Darshan Pandhi" | |
play :F5 | |
sleep separator | |
elsif (person == "Laura Wrubel") | |
puts "Laura Wrubel" | |
play :G2 | |
sleep separator | |
elsif (person == "MustafaDasorwala") | |
puts "Mustafa Dasorwala" | |
play :B5 | |
sleep separator | |
elsif (person == "ihardy") | |
puts "Ian Hardy" | |
play :G5 | |
sleep separator | |
elsif (person == "kerchner") | |
puts "Dan Kerchner" | |
play :D3 | |
sleep separator | |
elsif (person == "kurtnordstrom") | |
puts "Kurt Nordstrom" | |
play :D6 | |
sleep separator | |
end | |
date = line[0] | |
# approximate soft launch of item pages | |
if date == "1341241405" | |
puts "RELEASE! Web page for each item in the catalog" | |
sample :ambi_lunar_land | |
end | |
# approximate launch of search /catalog | |
if date == "1409238682" | |
puts "RELEASE! Searching and results list pages" | |
sample :ambi_lunar_land | |
end | |
if count % 4 == 0 | |
sample :bd_zum | |
end | |
if count % 16 == 0 | |
sample :bass_woodsy_c | |
end | |
count += 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment