Skip to content

Instantly share code, notes, and snippets.

@Factoid
Factoid / code.py
Created May 21, 2021 04:27
Funhouse Circuit Python to compare temperature inside vs. outside
from adafruit_funhouse import FunHouse
import alarm
import board
import re
import adafruit_requests
import wifi
import socketpool
import ssl
from secrets import secrets
@Factoid
Factoid / microphone_zoom_fft.py
Created October 1, 2019 05:23
Zoom FFT with realtime audio source
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
from scipy import signal
import math
import random
import cmath
import pyaudio
signalData = []
@Factoid
Factoid / zoom_fft.py
Created September 28, 2019 00:45
Example Zoom FFT Implementation
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
from scipy import signal
import math
import random
import cmath
def gen_tone_data( sampleRate, seconds ):
samples = int(sampleRate * seconds)
@Factoid
Factoid / windows_install.txt
Created September 14, 2016 17:47
Windows install instructions
Ok, so if you have ruby23 installed, and in your path you can use 'gem install' to install each of the gems that are normally built by compile-extensions.rb
You should install the mingw dev toolchain that Qt provides in their installer. The 32 bit one, since that's what SuperCollider for windows is built with.
The critical thing is making sure that the SP gui is built with the same toolchain as the SC application, otherwise the scope stuff explodes. I have some ideas for how SC might harden that, but that IPC system was never intended for use outside of scsynth and scide.
When building libaubio, you can follow their instructions, just when you do the configure step do this instead.
`./waf --check-c-compiler=gcc configure`
This will prevent it from building with MSVC, and use the Qt's mingw install instead.
Copy all of ruby23, app\server\native\windows\ruby directory. That'll ensure the gems and libraries are available.
Copy the libaubio-5.dll to app\server\native\windows\ruby\bin\aubio1.dll
At this point you
@Factoid
Factoid / SonicPi.pro
Created May 2, 2016 20:12
Patched pro file.
#--
# This file is part of Sonic Pi: http://sonic-pi.net
# Full project source: https://github.com/samaaron/sonic-pi
# License: https://github.com/samaaron/sonic-pi/blob/master/LICENSE.md
#
# Copyright 2013, 2014, 2015, 2016 by Sam Aaron (http://sam.aaron.name).
# All rights reserved.
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as this
@Factoid
Factoid / Install_OSX.txt
Last active May 2, 2016 20:07
Beta install instructions
Sonic Pi 2.11 Installation Instructions – OSX 10.10
You need the sonic pi source
```git clone git@github.com:samaaron/sonic-pi.git```
You need to download supercollider 3.7.1, these instructions assume you installed it to:
/usr/SuperCollider
You need the latest qt from homebrew
```brew install qt5```
I ended up with qt 5.6.0
You need boost
@Factoid
Factoid / Sonic Pi
Created May 2, 2016 17:11
otool output
qwt.framework/Versions/6/qwt (compatibility version 6.1.0, current version 6.1.3)
libqscintilla2_debug.12.dylib (compatibility version 12.0.0, current version 12.0.1)
/usr/local/opt/qt5/lib/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.5.0, current version 5.5.1)
/usr/local/opt/qt5/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.5.0, current version 5.5.1)
/usr/local/opt/qt5/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0, current version 5.5.1)
/usr/local/opt/qt5/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.5.0, current version 5.5.1)
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/usr/local/opt/qt5/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.5.0, current version 5.5.1)
/usr/local/opt/qt5/lib/QtM
@Factoid
Factoid / libboost.pc
Last active May 2, 2016 20:08
Example .pc files for Sonic Pi dependencies
### SAMPLE libboost.pc for OSX homebrew install
prefix=/usr/local/Cellar/boost/1.60.0_2/
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libboost
Description: Boost Library
Version: 1.60.0
Libs: -L${libdir}