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
#!/bin/bash | |
version=1.0.1 | |
versionDate="2014-02-14" | |
function showHelp() { | |
echo "watchfile - monitor file(s)/command and perform action when changed | |
Possible ways of usage | |
---------------------------------------- |
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
# place in ~/.sonic-pi/init.rb to autoload | |
def live_sample(name=nil, *args) | |
raise ArgumentError, "live_sample needs to have a unique name. For example: live_sample :foo" unless name | |
raise ArgumentError, "live_sample's name needs to be a string or symbol, got: #{name.inspect}. Example usage: live_sample :foo" unless (name.is_a?(Symbol) || name.is_a?(String)) | |
ls_name = "live_sample_#{name}".to_sym | |
args_h = resolve_synth_opts_hash_or_array(args) | |
click = args_h[:click] || 4 | |
dur = args_h[:dur] |
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
# ❤️ Brighton Ruby | |
# This code uses some features from the pre-release of Sonic Pi, | |
# due out later this month (touch wood!). | |
# If you just can't wait for the release but want to try it yourself | |
# you can either build the Sonic Pi master branch from source (pros: free, cons: hard) | |
# or share some love and contribute to the Patreon page to support Sonic Pi's development | |
# https://www.patreon.com/samaaron | |
# That will give to access to the latest pre-release versions |