Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
######################################### | |
## Sonic Pi Drum Machine | |
## coded by Darin Wilson | |
## | |
use_bpm 95 | |
in_thread(name: :drum_machine) do | |
# choose your kit here (can be :acoustic, :acoustic_soft, :electro, :toy) |
format = "there are %d samples" % all_sample_names.size | |
puts format | |
for voicenumber in 0..all_sample_names.size-1 do | |
puts voicenumber | |
voice = all_sample_names[voicenumber] | |
sample voice | |
sleep sample_duration voice | |
end |
var gitKataBestCommiter = { | |
/** | |
* @type {string} | |
* @private | |
*/ | |
searchOnBitBucket_: 'https://api.bitbucket.org/1.0/repositories/wojtassj/git-kata-registration/changesets', | |
/** | |
* @param {ProgressEvent} e The XHR ProgressEvent. |
for i in {1..9} | |
do | |
wget "https://raspberrypi.org/magpi-issues/MagPi0$i.pdf" | |
done | |
for i in {10..42} | |
do | |
wget "https://raspberrypi.org/magpi-issues/MagPi$i.pdf" | |
done | |
# http://www.cyberciti.biz/faq/bash-for-loop/ |
# calculates maximum heart rate for woman | |
# formula by sally edwards | |
def hr_max_woman(age, weight) | |
return 210 - 0.5 * age - 0.022 * weight | |
end | |
# calculates maximum heart rate for man | |
# formula by sally edwards | |
def hr_max_man(age, weight) | |
return 210 - 0.5 * age - 0.022 * weight + 4 |
# coding=UTF-8 | |
import os, shutil | |
# needs python2.7 | |
# works only with albums that are NOT marked as compilations | |
# -------------------------------------------------------------- | |
# usage: | |
# cd %itunes_library%\Music # cd $itunes_library/Music | |
# python _convert_mp3_filenames_imported_with_itunes.py |
# play it with Sonic Pi v.2.9 (http://sonic-pi.net) | |
notes = { dd: 74, c: 72, bbbbbbb: 83, ffff: 77, aaaaaa: 81, cccccccc: 84, eee: 76, ggggg: 79 } | |
notes.keys.map { | key | key.to_sym }.sort_by(&:length).each { |key| | |
play_pattern [notes[key]] | |
} |
# ------------------------------------------- | |
# CRASH INTO SONIC PI! | |
# Learn to code music in less than 30 minutes | |
# ------------------------------------------- | |
# - download Sonic Pi from sonic-pi.net | |
# - copy and paste these code snippets | |
# - change and experiment with the snippets | |
# - go! | |
# ------------------------------------------- | |
# These snippets were made for a workshop to |
# Ambient experiment for Sonic Pi (http://sonic-pi.net/) | |
# | |
# The piece consists of three long loops, each of which plays one of | |
# two randomly selected pitches. Each note has different attack, | |
# release and sleep values, so that they move in and out of phase | |
# with each other. This can play for quite awhile without | |
# repeating itself :) | |
live_loop :note1 do | |
use_synth :hollow |