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
import XCTest | |
extension Decodable { | |
init(_ json: String) throws { | |
self = try JSONDecoder().decode(Self.self, from: json.data(using: .utf8)!) | |
} | |
} | |
final class DecodableExtensions: XCTestCase { |
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
CompileSwift normal x86_64 /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/MIDIManager.swift | |
cd /Users/jose/src/experiments/MIDIviaAudioKit | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/ViewController.swift /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/LaunchPadPro/LaunchPadProFeature.swift /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/LaunchPadPro/LaunchPadPro+Tx.swift /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/AppDelegate.swift /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/LaunchPadPro/LaunchPadProConstants.swift /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/LaunchPadPro/LaunchPadPro.swift -primary-file /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/MIDIManager.swift /Users/jose/src/experiments/MIDIviaAudioKit/MIDIviaAudioKit/LaunchPadPro/LaunchPadPro+SysEx.swift /Users/jose/src/experi |
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
guard let ctxt = UIGraphicsGetCurrentContext() else { | |
print("BAILING OUT WITHOUT A GRAPHICS CONTEXT !!") | |
return | |
} | |
ctxt.setStrokeColor(gray:0, alpha:kKnobOpacity) | |
ctxt.setLineWidth(knobThickness) | |
ctxt.addEllipse(in:rect) | |
ctxt.strokePath() |
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
#!/usr/bin/python | |
import re | |
import sys | |
import fileinput | |
if len(sys.argv) < 4: | |
sys.stderr.write("usage: %s <trigger regex> <begin regex> <end regex>\n" % sys.argv[0]) | |
sys.exit(1) |
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
Processes: 105 total, 3 running, 12 stuck, 90 sleeping, 509 threads 01:19:43 | |
Load Avg: 0.21, 0.36, 0.43 CPU usage: 8.96% user, 6.72% sys, 84.30% idle | |
SharedLibs: 5912K resident, 5028K data, 0B linkedit. | |
MemRegions: 31522 total, 1778M resident, 29M private, 720M shared. | |
PhysMem: 876M wired, 2136M active, 1005M inactive, 4017M used, 81M free. | |
VM: 240G vsize, 1041M framework vsize, 1571682(0) pageins, 1966240(0) pageouts. | |
Networks: packets: 4293708/4913M in, 3330437/1009M out. Disks: 3348112/62G read, 1985458/99G written. | |
PID COMMAND %CPU TIME #TH #WQ #PORTS #MREG RPRVT RSHRD RSIZE VPRVT VSIZE PGRP PPID STATE UID | |
17687 top 10.3 00:45.72 1/1 0 24 33 2188K 264K 2764K 17M 2378M 17687 17653 running 0 |
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
function tone = toneGen(Fs=8192, freq=1, samples=8192) | |
tone = sin(freq*2*pi*(1:samples)/Fs); | |
end |
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
Domino:~ jose$ macirb | |
irb(main):001:0> framework "TRS" | |
=> true | |
irb(main):002:0> TRSNote.noteWithMidiNote(36).description | |
=> "C2:36.0 65.406387Hz" | |
irb(main):003:0> TRSNote.noteWithMidiNote(84).description | |
=> "C6:84.0 1046.502197Hz" | |
irb(main):004:0> TRSNote.noteWithMidiNote(12).description | |
=> "C0:12.0 16.351597Hz" | |
irb(main):005:0> TRSNote.noteWithMidiNote(108).description |