Skip to content

Instantly share code, notes, and snippets.

Jose Vazquez josevazquez

Block or report user

Report or block josevazquez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@josevazquez
josevazquez / gist:8c664186cd920f8b319532a03f3f78ee
Created Mar 1, 2018
Linking error against AudioKit (484157dc007e3c5e4dc960dc63ef8f985acf7c41)
View gist:8c664186cd920f8b319532a03f3f78ee
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
@josevazquez
josevazquez / plainCG.swift
Created Oct 13, 2016
Plain CoreGraphics calls in Swift
View plainCG.swift
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()
View triggergreppy
#!/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)
View What is wrong with this picture?
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
View Tone generation in Octave
function tone = toneGen(Fs=8192, freq=1, samples=8192)
tone = sin(freq*2*pi*(1:samples)/Fs);
end
View Note descriptions from TRSNote
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
You can’t perform that action at this time.