Begun output synthesis python script. Added Max full restart script for convenience.
This commit is contained in:
Executable
+4
@@ -0,0 +1,4 @@
|
||||
osascript -e 'quit app "Max"'
|
||||
while pgrep -u sam Max > /dev/null; do sleep 1; done
|
||||
open -a /Applications/Max.app "/Users/sam/Documents/Projects/SP_FYP_MAX7/SP_FYP.maxproj"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import scipy.signal as signal
|
||||
|
||||
try:
|
||||
import pyext
|
||||
except:
|
||||
print "ERROR: This script must be loaded by the PD/Max py/pyext external"
|
||||
|
||||
|
||||
class SynthGrains(pyext._class):
|
||||
_inlets = 1
|
||||
_outlets = 1
|
||||
|
||||
#def add_grain(targetBuffer, sourceBuffer, start, end):
|
||||
def add_grain_1(self, buf1, buf2, src_start, src_end, tar_start, tar_end):
|
||||
"""
|
||||
Windows a grain of audio and adds to target buffer.
|
||||
"""
|
||||
window = signal.hann(end - start)
|
||||
|
||||
targetBuffer = pyext.Buffer(buf1)
|
||||
sourceBuffer = pyext.Buffer(buf2)
|
||||
print "done"
|
||||
|
||||
Binary file not shown.
+1079
-270
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user