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
--- Din sync 24 ppqn | |
-- input[1]: clock | |
-- input[2]: reset | |
-- output[1]: beats | |
-- output[2]: 16-th notes | |
-- output[3]: 4/3 kind of stuff for and|or|xor with output[2] | |
-- output[4]: five step sequence which advances on beat | |
function init() | |
local count = 0 | |
local sequence = { 0.0, 3.7, 2.2, 0.8, 1.3 } |
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
import Fx | |
import UIKit | |
public struct RGBA { | |
var r: UInt8 | |
var g: UInt8 | |
var b: UInt8 | |
var a: UInt8 | |
} |
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
infix operator ?= : AssignmentPrecedence | |
func ?= <A>(lhs: inout A, rhs: A?) { | |
if let value = rhs { | |
lhs = value | |
} | |
} | |
func ?= <A>(lhs: inout A?, rhs: A?) { | |
if let value = rhs { |
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
import Foundation | |
public protocol JSONDecodable { | |
init(json: JSON) throws | |
} | |
public protocol JSONContainer { | |
func get() throws -> JSON | |
} |