Skip to content

Instantly share code, notes, and snippets.

View Synth_test_parallel.py
# generate wav file containing sine waves
import os, math, wave, array
import sound
import ui
import photos
import console
from scene import *
import time
import numpy as np
View Synth_test_serialized.py
import os, math, wave, array
import sound
import ui
import photos
import console
from scene import *
import time
View Synthonista_Saw_Vibrato_Chord_Unison_Filter_Delay.py
from objc_util import *
from ctypes import *
from coreaudioconstants import *
import numpy as np
''' Adapted from https://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
'''
AudioUnitRenderActionFlags=c_uint32
View Synthonista_Antialiased_Saw.py
from objc_util import *
from ctypes import *
from coreaudioconstants import *
import numpy as np
''' Adapted from https://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
'''
AudioUnitRenderActionFlags=c_uint32
@medericmotte
medericmotte / Synthonista_Realtime_antialiased_sawtooth_and_filter.py
Last active Oct 25, 2018
Slight modification of the code of jsbain (@JonB on Pythonista) to have a sawtooth instead of a sine, and a filter.
View Synthonista_Realtime_antialiased_sawtooth_and_filter.py
from objc_util import *
from ctypes import *
from coreaudioconstants import *
import numpy as np
#In the render method of the AudioRenderer, change 110 to f if you want to control the frequency
''' Adapted from https://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
'''
@medericmotte
medericmotte / PythoniSmudgeFast.py
Last active Oct 25, 2018
Very fast implementation of the smudge tool in Pythonista using an IOSurfaceWrapper by @JonB (copied in the file). Apple Pencil sensitive by setting applePencil=True
View PythoniSmudgeFast.py
import ui
import math
import numpy as np
from PIL import Image
import Image
import ImageOps
import ImageChops
import io
import scene
import time
@medericmotte
medericmotte / PythoniSmudge.py
Last active Oct 25, 2018
Implementation of a Smudge tool in Pythonista, tutorial-ish, and sensitive to the Apple Pencil force by setting applePencil=True
View PythoniSmudge.py
import ui
import math
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
import Image
import ImageOps
import ImageChops
import io
import scene