This file contains hidden or 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
| [ | |
| { | |
| ciphers: " CM M Cmaj", | |
| set: [0,4,7] | |
| }, | |
| { | |
| ciphers: "Cm C- Cmin", | |
| set: [0,3,7] | |
| }, | |
| { |
This file contains hidden or 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
| service = | |
| Login: (appIdentifier, user) -> | |
| $q (resolve, reject) -> | |
| success = (response) -> | |
| console.log $http.defaults.headers | |
| resolve response | |
| error = (e) -> | |
| console.log $http.defaults.headers | |
| reject e | |
| headers = $http.defaults.headers.common |
This file contains hidden or 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
| # A global variable | |
| sound = {} | |
| # Like processing | |
| # we can setup the things | |
| @setup = -> | |
| sound.freq = [Math.random() * 22, 22+Math.random() * 220] | |
| sound.offset = [Math.random(), Math.random()] | |
| # tau ant t are preloaded variables, |
This file contains hidden or 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
| max = 880 | |
| min = 16 | |
| senos = [] | |
| @setup = -> | |
| senos.push({c:min+(Math.random()*max),a:Math.random(),m: Math.random()*1000}) for i in [0..3] | |
| @dsp = -> | |
| modL = sin senos[1].m, senos[1].a | |
| modR = sin senos[3].m, senos[3].a |
This file contains hidden or 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
| class Mbezier | |
| constructor: -> | |
| this['points'] = {x:{val:[]},y:{val:[]}} | |
| this['colors'] = {r:{val:0},g:{val:0},b:{val:0},a:{val:0}} | |
| n = 100; | |
| o = []; | |
| @setup = -> | |
| @createCanvas 480, 360 |
This file contains hidden or 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
| _pos = [] | |
| @setup = -> | |
| @createCanvas 480, 360 | |
| @frameRate 0.5 | |
| _pos = if i is 0 then @random 480 else @random 255 for i in [0,1] | |
| @draw = -> | |
| for i in [0..19] | |
| colors = @random 255 for i in [0..3] |
This file contains hidden or 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
| n = 19 | |
| a = {x:[],y:[]} for i in [0..n-1] | |
| update = (a, fn) -> | |
| for _n in [0..a.length-1] | |
| for key,val of a[_n] | |
| fn(_n,key,val) | |
| @text a[_n], 10, (_n+1)*(n/@width) | |
| callback = (n, k, v) -> |
This file contains hidden or 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
| class Mbezier | |
| constructor: -> | |
| update: (fn) -> | |
| for param in ['points', 'colors'] | |
| if not this[param] then this[param] = {} | |
| if param is 'points' then k = 'xy' | |
| if param is 'colors' then k = 'rgba' | |
| for c in k.split('') | |
| this[param][c] = fn(param, c) |