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
// Instructions: | |
// (1) Highlight file of interest. | |
// (2) Run code in Zotero's JavaScript console (found under Tools > Developer > Run Javascript) in sync mode. | |
function collections_output() { | |
zp = Zotero.getActiveZoteroPane() | |
items = zp.getSelectedItems() | |
collection_ids = items[0]["_collections"] | |
collections_cache = Zotero.Collections._objectCache |
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
const maxApi = require("max-api"); | |
let x = 0; | |
let y = 0; | |
maxApi.addHandler("input", (dir) => { | |
switch (dir) { | |
case "UP": | |
y += 1; |
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
Midi Note | Note | Name | |
---|---|---|---|
85 | C#5 | Bongo Low - palm | |
84 | C5 | Bongo Low - closed slap | |
82 | A#4 | Shaker | |
75 | D#4 | Clave | |
59 | B2 | Splash2 | |
57 | A2 | Hand Crash 2 | |
56 | G#2 | Cowbell | |
55 | G2 | Splash 1 | |
54 | F#2 | Tambourine |
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
//Explaination: | |
// start with the empty set | |
// extract the head element | |
// copy each element in the set with the current head element appended | |
// recurse | |
var combinations = function(set) { | |
return (function acc(xs, set) { | |
var x = xs[0]; | |
if(typeof x === "undefined") |
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
/* | |
An implementation of the Bjorklund algorithm in JavaScript | |
Inspired by the paper 'The Euclidean Algorithm Generates Traditional Musical Rhythms' | |
by Godfried Toussaint | |
This is a port of the original algorithm by E. Bjorklund which I | |
found in the paper 'The Theory of Rep-Rate Pattern Generation in the SNS Timing Systems' by | |
E. Bjorklund. |
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
/* | |
Copyright (c) 2011 Andrei Mackenzie | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |