From 5a99ccdffc64d09de692c9ab77dc7a21a8fae552 Mon Sep 17 00:00:00 2001 From: mick grierson Date: Fri, 12 Feb 2016 17:42:02 +0000 Subject: adding OF 0.92 granular eexample --- main.cpp | 92 +- .../UserInterfaceState.xcuserstate | Bin 68141 -> 73214 bytes .../OSX/granular0_92/Makefile | 13 + .../OSX/granular0_92/Project.xcconfig | 17 + .../OSX/granular0_92/addons.make | 2 + .../OSX/granular0_92/bin/data/.gitkeep | 0 .../data/24620__anamorphosis__GMB_Kantilan_1.wav | Bin 0 -> 441868 bytes ...04_electrified_analog_kit_variation_16_mono.wav | Bin 0 -> 1273454 bytes .../bin/data/26393__brfindla__Calango1berimbau.wav | Bin 0 -> 1548688 bytes ..._abstract_electrofunkbreakbeats_124bpm_mono.wav | Bin 0 -> 682882 bytes .../68373__juskiddink__Cello_open_string_bowed.wav | Bin 0 -> 1771694 bytes ...15__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav | Bin 0 -> 1657058 bytes .../OSX/granular0_92/bin/data/beat2.wav | Bin 0 -> 211140 bytes .../OSX/granular0_92/config.make | 142 ++ .../granular0_92.xcodeproj/project.pbxproj | 1904 ++++++++++++++++++++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 12500 bytes .../xcschemes/granular0_92 Debug.xcscheme | 86 + .../xcschemes/granular0_92 Release.xcscheme | 86 + .../xcschemes/xcschememanagement.plist | 27 + .../OSX/granular0_92/openFrameworks-Info.plist | 22 + .../OSX/granular0_92/src/main.cpp | 13 + .../OSX/granular0_92/src/ofApp.cpp | 269 +++ .../OSX/granular0_92/src/ofApp.h | 79 + 24 files changed, 2719 insertions(+), 40 deletions(-) create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/Makefile create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/Project.xcconfig create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/addons.make create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/.gitkeep create mode 100755 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/24620__anamorphosis__GMB_Kantilan_1.wav create mode 100755 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav create mode 100755 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/26393__brfindla__Calango1berimbau.wav create mode 100755 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/59210__suonho__abstract_electrofunkbreakbeats_124bpm_mono.wav create mode 100755 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/68373__juskiddink__Cello_open_string_bowed.wav create mode 100755 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav create mode 100755 openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/beat2.wav create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/config.make create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.pbxproj create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Debug.xcscheme create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Release.xcscheme create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcuserdata/michaelgrierson.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/openFrameworks-Info.plist create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/src/main.cpp create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.cpp create mode 100644 openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.h diff --git a/main.cpp b/main.cpp index dbce5bf..7684902 100755 --- a/main.cpp +++ b/main.cpp @@ -1,49 +1,61 @@ -//Using BPF equation from http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt - #include "maximilian.h" -float xs[3], ys[3]; -float a0, a1, a2, b0, b1, b2; -float f0 = 400; //THE FREQUENCY -float Q = 1.0; +//Bizarelly, this sounds a little bit like Kraftwerk's 'Metropolis', although it isn't. Funny that. + +maxiOsc sound,bass,timer,mod,lead,lead2,leadmod;//here are the synth bits +maxiEnv envelope, leadenvelope;//some envelopes +maxiFilter filter, filter2;//some filters +maxiDelayline delay;//a delay +convert mtof;//a method for converting midi notes to frequency +double bassout,leadout, delayout;//some variables to hold the data and pass it around +int trigger, trigger2, newnote;//some control variables +int currentCount,lastCount,playHead=0, currentChord=0;//some other control variables +int pitch[8]={57,57,59,60};//the bassline for the arpeggio +int chord[8]={0,0,7,2,5,5,0,0};//the root chords for the arpeggio +float currentPitch,leadPitch;//the final pitch variables + +//here's the lead line trigger array, followed by the pitches +int leadLineTrigger[256]={1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +int leadLinePitch[15]={69,67,65,64,67,66,64,62,65,64,62,57,55,60,57}; + -maxiOsc mySwitchableOsc; void setup() {//some inits - double w0 = 2*PI*f0/44100; - double alpha = sin(w0)/(2*Q); - //Band-pass reson: -// b0 = alpha; -// b1 = 0; -// b2 = -1 * alpha; -// a0 = 1 + alpha; -// a1 = -2*cos(w0); -// a2 = 1 - alpha; - - //Notch: - b0 = 1; - b1 = -2*cos(w0); - b2 = 1; - a0 = 1 + alpha; - a1 = -2*cos(w0); - a2 = 1 - alpha; - - //LPF: -// b0 = (1 - cos(w0))/2; -// b1 = 1 - cos(w0); -// b2 = (1 - cos(w0))/2; -// a0 = 1 + alpha; -// a1 = -2*cos(w0); -// a2 = 1 - alpha; + } -void play(double *output) { - xs[0] = mySwitchableOsc.sawn(400); - ys[0] = (b0/a0)*xs[0] + (b1/a0)*xs[1] + (b2/a0)*xs[2] - - (a1/a0)*ys[1] - (a2/a0)*ys[2]; +void play(double *output) {//this is where the magic happens. Very slow magic. - *output = ys[0]; + currentCount=(int)timer.phasor(9);//this sets up a metronome that ticks every so often - ys[2] = ys[1]; ys[1] = ys[0]; - xs[2] = xs[1]; xs[1] = xs[0]; -} + if (lastCount!=currentCount) {//if we have a new timer int this sample, play the sound + trigger=1;//play the arpeggiator line + trigger2=leadLineTrigger[playHead%256];//play the lead line + if (trigger2==1) {//if we are going to play a note + leadPitch=mtof.mtof(leadLinePitch[newnote]);//get the next pitch val + newnote++;//and iterate + if (newnote>14) { + newnote=0;//make sure we don't go over the edge of the array + } + } + currentPitch=mtof.mtof(pitch[(playHead%4)]+chord[currentChord%8]);//write the frequency val into currentPitch + playHead++;//iterate the playhead + if (playHead%32==0) {//wrap every 4 bars + currentChord++;//change the chord + } + //cout << "tick\n";//the clock ticks + lastCount=0;//set lastCount to 0 + } + + bassout=filter2.lores(envelope.adsr(bass.saw(currentPitch*0.5)+sound.pulse(currentPitch*0.5,mod.phasor(1)),1,0.9995, 0.25, 0.9995, 1, trigger),9250,2);//new, simple ADSR. + leadout=filter.lores(leadenvelope.ar(lead2.saw(leadPitch*4)+lead.pulse(leadPitch+(leadmod.sinebuf(1.9)*1.5), 0.6), 0.00005, 0.999975, 50000, trigger2),5900,10);//leadline + + delayout=(leadout+(delay.dl(leadout, 14000, 0.8)*0.5))/2;//add some delay + + if(trigger!=0)trigger=0;//set the trigger to off if you want it to trigger immediately next time. + + + output[0]=(bassout)/2;//sum output + output[1]=(bassout)/2; + +} \ No newline at end of file diff --git a/maximilianTest.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate b/maximilianTest.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate index 4816e94..43a9a26 100644 Binary files a/maximilianTest.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate and b/maximilianTest.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/Makefile b/openFrameworks/openFrameworksExamples/OSX/granular0_92/Makefile new file mode 100644 index 0000000..8d8e4c0 --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/Project.xcconfig b/openFrameworks/openFrameworksExamples/OSX/granular0_92/Project.xcconfig new file mode 100644 index 0000000..e570b15 --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/Project.xcconfig @@ -0,0 +1,17 @@ +//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. +//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED +OF_PATH = ../../.. + +//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE +#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" + +//ICONS - NEW IN 0072 +ICON_NAME_DEBUG = icon-debug.icns +ICON_NAME_RELEASE = icon.icns +ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ + +//IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: +//ICON_FILE_PATH = bin/data/ + +OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) +HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/addons.make b/openFrameworks/openFrameworksExamples/OSX/granular0_92/addons.make new file mode 100644 index 0000000..328952e --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/addons.make @@ -0,0 +1,2 @@ +ofxMaxim +ofxOsc diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/.gitkeep b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/24620__anamorphosis__GMB_Kantilan_1.wav b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/24620__anamorphosis__GMB_Kantilan_1.wav new file mode 100755 index 0000000..81666d1 Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/24620__anamorphosis__GMB_Kantilan_1.wav differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav new file mode 100755 index 0000000..490d9ea Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/26393__brfindla__Calango1berimbau.wav b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/26393__brfindla__Calango1berimbau.wav new file mode 100755 index 0000000..a9c93a4 Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/26393__brfindla__Calango1berimbau.wav differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/59210__suonho__abstract_electrofunkbreakbeats_124bpm_mono.wav b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/59210__suonho__abstract_electrofunkbreakbeats_124bpm_mono.wav new file mode 100755 index 0000000..b23c5f0 Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/59210__suonho__abstract_electrofunkbreakbeats_124bpm_mono.wav differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/68373__juskiddink__Cello_open_string_bowed.wav b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/68373__juskiddink__Cello_open_string_bowed.wav new file mode 100755 index 0000000..19064f2 Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/68373__juskiddink__Cello_open_string_bowed.wav differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav new file mode 100755 index 0000000..98860be Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/beat2.wav b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/beat2.wav new file mode 100755 index 0000000..c71cee6 Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/bin/data/beat2.wav differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/config.make b/openFrameworks/openFrameworksExamples/OSX/granular0_92/config.make new file mode 100644 index 0000000..df10f64 --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/config.make @@ -0,0 +1,142 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ +# OF_ROOT = ../../.. + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +# TODO: should this be a default setting? +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.pbxproj b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.pbxproj new file mode 100644 index 0000000..755dcd2 --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.pbxproj @@ -0,0 +1,1904 @@ + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + C6937888E126BADC8777423B + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + OscTypes.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscTypes.h + sourceTree + SOURCE_ROOT + + 879A251454401BC0B6E4F238 + + fileRef + D9BFFBBF4CC43DEE890B3C3E + isa + PBXBuildFile + + D9BFFBBF4CC43DEE890B3C3E + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + OscTypes.cpp + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscTypes.cpp + sourceTree + SOURCE_ROOT + + 20F35AFADAF0068B067E713F + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + OscReceivedElements.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscReceivedElements.h + sourceTree + SOURCE_ROOT + + 0546D1A38E13BD319CC9755B + + fileRef + 9BF3AA0D4FAA89D0F8A0E545 + isa + PBXBuildFile + + 9BF3AA0D4FAA89D0F8A0E545 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + OscReceivedElements.cpp + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscReceivedElements.cpp + sourceTree + SOURCE_ROOT + + 4E95FB446A9C9C6F0DE12D75 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + OscPrintReceivedElements.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscPrintReceivedElements.h + sourceTree + SOURCE_ROOT + + C4782ECC372420ACE0615B74 + + fileRef + BC8881B3C8C0A1C45F042E7A + isa + PBXBuildFile + + BC8881B3C8C0A1C45F042E7A + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + OscPrintReceivedElements.cpp + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscPrintReceivedElements.cpp + sourceTree + SOURCE_ROOT + + 6B65E6930994CC4B2D2B8B33 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + OscPacketListener.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscPacketListener.h + sourceTree + SOURCE_ROOT + + 029684CF678F70F6D3537A29 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + OscOutboundPacketStream.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscOutboundPacketStream.h + sourceTree + SOURCE_ROOT + + 62545D179C94265CA1389D4A + + fileRef + 63A47AC60FFAFC3BF093EC0F + isa + PBXBuildFile + + 63A47AC60FFAFC3BF093EC0F + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + OscOutboundPacketStream.cpp + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscOutboundPacketStream.cpp + sourceTree + SOURCE_ROOT + + A2AAA8CA403479E6FCDF920E + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + OscHostEndianness.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscHostEndianness.h + sourceTree + SOURCE_ROOT + + F4F5B6B8BA2BD52C646ED908 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + OscException.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/OscException.h + sourceTree + SOURCE_ROOT + + 30CB364908817057B430D528 + + children + + AE335EB4709BFD4671EEAC84 + F4F5B6B8BA2BD52C646ED908 + A2AAA8CA403479E6FCDF920E + 63A47AC60FFAFC3BF093EC0F + 029684CF678F70F6D3537A29 + 6B65E6930994CC4B2D2B8B33 + BC8881B3C8C0A1C45F042E7A + 4E95FB446A9C9C6F0DE12D75 + 9BF3AA0D4FAA89D0F8A0E545 + 20F35AFADAF0068B067E713F + D9BFFBBF4CC43DEE890B3C3E + C6937888E126BADC8777423B + + isa + PBXGroup + name + osc + sourceTree + <group> + + AE335EB4709BFD4671EEAC84 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + MessageMappingOscPacketListener.h + path + ../../../addons/ofxOsc/libs/oscpack/src/osc/MessageMappingOscPacketListener.h + sourceTree + SOURCE_ROOT + + 2FD4B0329909D3527F003494 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + UdpSocket.h + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/UdpSocket.h + sourceTree + SOURCE_ROOT + + 444657A12E59D0ED86981498 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + TimerListener.h + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/TimerListener.h + sourceTree + SOURCE_ROOT + + 510CAFE035E576A4E1502D52 + + fileRef + E6DEF695B88BA5FAACEAA937 + isa + PBXBuildFile + + E6DEF695B88BA5FAACEAA937 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + UdpSocket.cpp + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp + sourceTree + SOURCE_ROOT + + 641362CA659FAFEE4E81001B + + children + + 3B361208CD4107E479F04E7B + E6DEF695B88BA5FAACEAA937 + + isa + PBXGroup + name + posix + sourceTree + <group> + + 67FE4C7B15C2F0478C8126C2 + + fileRef + 3B361208CD4107E479F04E7B + isa + PBXBuildFile + + 3B361208CD4107E479F04E7B + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + NetworkingUtils.cpp + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix/NetworkingUtils.cpp + sourceTree + SOURCE_ROOT + + 23640F57DF6C4BB6BFC5DA4C + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + PacketListener.h + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/PacketListener.h + sourceTree + SOURCE_ROOT + + F7FBC56859535E597B24BB91 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + NetworkingUtils.h + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/NetworkingUtils.h + sourceTree + SOURCE_ROOT + + 48974F980F51769171D0B2F5 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + IpEndpointName.h + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/IpEndpointName.h + sourceTree + SOURCE_ROOT + + FF8CDF57858E9B94E3237115 + + children + + ADD194746185E2DA11468377 + 48974F980F51769171D0B2F5 + F7FBC56859535E597B24BB91 + 23640F57DF6C4BB6BFC5DA4C + 641362CA659FAFEE4E81001B + 444657A12E59D0ED86981498 + 2FD4B0329909D3527F003494 + + isa + PBXGroup + name + ip + sourceTree + <group> + + D27B2221A225CA523C019676 + + children + + FF8CDF57858E9B94E3237115 + 30CB364908817057B430D528 + + isa + PBXGroup + name + src + sourceTree + <group> + + 86D2677079A3AF4A5A88E29A + + children + + D27B2221A225CA523C019676 + + isa + PBXGroup + name + oscpack + sourceTree + <group> + + 38871A5825686AE018EC2BF0 + + children + + 86D2677079A3AF4A5A88E29A + + isa + PBXGroup + name + libs + sourceTree + <group> + + ADE367465D2A8EBAD4C7A8D9 + + fileRef + ADD194746185E2DA11468377 + isa + PBXBuildFile + + ADD194746185E2DA11468377 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + IpEndpointName.cpp + path + ../../../addons/ofxOsc/libs/oscpack/src/ip/IpEndpointName.cpp + sourceTree + SOURCE_ROOT + + 9F7986DC4EB05E75FCE2C777 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscSender.h + path + ../../../addons/ofxOsc/src/ofxOscSender.h + sourceTree + SOURCE_ROOT + + 8F5205AEF8861EF234F0651A + + fileRef + 81967292BFC87A0144BD32C6 + isa + PBXBuildFile + + 81967292BFC87A0144BD32C6 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscSender.cpp + path + ../../../addons/ofxOsc/src/ofxOscSender.cpp + sourceTree + SOURCE_ROOT + + 8C75AFC8774A62495DD53464 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscReceiver.h + path + ../../../addons/ofxOsc/src/ofxOscReceiver.h + sourceTree + SOURCE_ROOT + + 640279EE111671BD026CB013 + + fileRef + C2FAC65C491D4231379F3298 + isa + PBXBuildFile + + C2FAC65C491D4231379F3298 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscReceiver.cpp + path + ../../../addons/ofxOsc/src/ofxOscReceiver.cpp + sourceTree + SOURCE_ROOT + + B31C608870ECEB2490A93736 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscParameterSync.h + path + ../../../addons/ofxOsc/src/ofxOscParameterSync.h + sourceTree + SOURCE_ROOT + + 4ADB88E2FB52E76A471065DE + + fileRef + 0AED834CE4DEC5260AF302A2 + isa + PBXBuildFile + + 0AED834CE4DEC5260AF302A2 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscParameterSync.cpp + path + ../../../addons/ofxOsc/src/ofxOscParameterSync.cpp + sourceTree + SOURCE_ROOT + + C58862C6D212C8E8A83810F4 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscMessage.h + path + ../../../addons/ofxOsc/src/ofxOscMessage.h + sourceTree + SOURCE_ROOT + + 5864AD82E20F15536D054EA3 + + fileRef + DF49D76C45D5DB505A234880 + isa + PBXBuildFile + + DF49D76C45D5DB505A234880 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscMessage.cpp + path + ../../../addons/ofxOsc/src/ofxOscMessage.cpp + sourceTree + SOURCE_ROOT + + 8B30E93FD3D3475EED522A0E + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscBundle.h + path + ../../../addons/ofxOsc/src/ofxOscBundle.h + sourceTree + SOURCE_ROOT + + 72A929D3561B8232A182ABFC + + fileRef + 65EEFA3DA3526E9CDD9C21F9 + isa + PBXBuildFile + + 65EEFA3DA3526E9CDD9C21F9 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscBundle.cpp + path + ../../../addons/ofxOsc/src/ofxOscBundle.cpp + sourceTree + SOURCE_ROOT + + 7689F8A0F3D0B7635A8C3104 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxOscArg.h + path + ../../../addons/ofxOsc/src/ofxOscArg.h + sourceTree + SOURCE_ROOT + + BD2F1A9F8D0C05EDB29122D0 + + children + + 00D6D32B84B099226431108C + 7689F8A0F3D0B7635A8C3104 + 65EEFA3DA3526E9CDD9C21F9 + 8B30E93FD3D3475EED522A0E + DF49D76C45D5DB505A234880 + C58862C6D212C8E8A83810F4 + 0AED834CE4DEC5260AF302A2 + B31C608870ECEB2490A93736 + C2FAC65C491D4231379F3298 + 8C75AFC8774A62495DD53464 + 81967292BFC87A0144BD32C6 + 9F7986DC4EB05E75FCE2C777 + + isa + PBXGroup + name + src + sourceTree + <group> + + E6053AB7FEC63D5F83825B88 + + children + + BD2F1A9F8D0C05EDB29122D0 + 38871A5825686AE018EC2BF0 + + isa + PBXGroup + name + ofxOsc + sourceTree + <group> + + 00D6D32B84B099226431108C + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxOsc.h + path + ../../../addons/ofxOsc/src/ofxOsc.h + sourceTree + SOURCE_ROOT + + B2F326FA07783558EF3CDD2A + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + stb_vorbis.h + path + ../../../addons/ofxMaxim/libs/stb_vorbis.h + sourceTree + SOURCE_ROOT + + 9514C2D90467055B1447D074 + + fileRef + 80CD68E0DDF2C60D2715CC78 + isa + PBXBuildFile + + 80CD68E0DDF2C60D2715CC78 + + explicitFileType + sourcecode.c.c + fileEncoding + 30 + isa + PBXFileReference + name + stb_vorbis.c + path + ../../../addons/ofxMaxim/libs/stb_vorbis.c + sourceTree + SOURCE_ROOT + + B34D3539DB6F889A78540F7C + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + sineTable.h + path + ../../../addons/ofxMaxim/libs/sineTable.h + sourceTree + SOURCE_ROOT + + 95C3AC11BE0AC7EC464D2A36 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + maximilian.h + path + ../../../addons/ofxMaxim/libs/maximilian.h + sourceTree + SOURCE_ROOT + + 22F21CE3B902225374BA1CA2 + + fileRef + 87D3A0051CCB2C0F0ECA139E + isa + PBXBuildFile + + 87D3A0051CCB2C0F0ECA139E + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + maximilian.cpp + path + ../../../addons/ofxMaxim/libs/maximilian.cpp + sourceTree + SOURCE_ROOT + + D1C864AE2FE539BE7FD1F628 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + maxiMFCC.h + path + ../../../addons/ofxMaxim/libs/maxiMFCC.h + sourceTree + SOURCE_ROOT + + 083FB2094A4DE99F5A60397A + + fileRef + 440B2B891BD019685EF360B8 + isa + PBXBuildFile + + 440B2B891BD019685EF360B8 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + maxiMFCC.cpp + path + ../../../addons/ofxMaxim/libs/maxiMFCC.cpp + sourceTree + SOURCE_ROOT + + 4CFB659E40D3D3DC5A3E9478 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + maxiGrains.h + path + ../../../addons/ofxMaxim/libs/maxiGrains.h + sourceTree + SOURCE_ROOT + + AF0580829426DC6BCA135A5C + + fileRef + 9D2FB19B70632A6F86622D94 + isa + PBXBuildFile + + 9D2FB19B70632A6F86622D94 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + maxiGrains.cpp + path + ../../../addons/ofxMaxim/libs/maxiGrains.cpp + sourceTree + SOURCE_ROOT + + EFA729F2F65D97F65DB52E44 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + maxiFFT.h + path + ../../../addons/ofxMaxim/libs/maxiFFT.h + sourceTree + SOURCE_ROOT + + 96084990AF216648B8B98E00 + + fileRef + 6A4EE0E35ED739A31CD0153E + isa + PBXBuildFile + + 6A4EE0E35ED739A31CD0153E + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + maxiFFT.cpp + path + ../../../addons/ofxMaxim/libs/maxiFFT.cpp + sourceTree + SOURCE_ROOT + + A67372B9CAED43269F8D42D3 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + maxiBark.h + path + ../../../addons/ofxMaxim/libs/maxiBark.h + sourceTree + SOURCE_ROOT + + ABA8875AF0C06690CC0B92B1 + + fileRef + 9B9936002B519C1290F25FEC + isa + PBXBuildFile + + 9B9936002B519C1290F25FEC + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + maxiBark.cpp + path + ../../../addons/ofxMaxim/libs/maxiBark.cpp + sourceTree + SOURCE_ROOT + + 7D2CBAA6529BCE46CA661E02 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + maxiAtoms.h + path + ../../../addons/ofxMaxim/libs/maxiAtoms.h + sourceTree + SOURCE_ROOT + + 5C4A4AA5D4784DF23EA43038 + + fileRef + 1EFA3ACBB8D16CC0DA1E79C6 + isa + PBXBuildFile + + 1EFA3ACBB8D16CC0DA1E79C6 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + maxiAtoms.cpp + path + ../../../addons/ofxMaxim/libs/maxiAtoms.cpp + sourceTree + SOURCE_ROOT + + BA5114869056DFF1A50CFA4A + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + fft.h + path + ../../../addons/ofxMaxim/libs/fft.h + sourceTree + SOURCE_ROOT + + 4ACC32F17B7623DA048865D1 + + children + + F3C78E7AB53E01022E9374A3 + BA5114869056DFF1A50CFA4A + 1EFA3ACBB8D16CC0DA1E79C6 + 7D2CBAA6529BCE46CA661E02 + 9B9936002B519C1290F25FEC + A67372B9CAED43269F8D42D3 + 6A4EE0E35ED739A31CD0153E + EFA729F2F65D97F65DB52E44 + 9D2FB19B70632A6F86622D94 + 4CFB659E40D3D3DC5A3E9478 + 440B2B891BD019685EF360B8 + D1C864AE2FE539BE7FD1F628 + 87D3A0051CCB2C0F0ECA139E + 95C3AC11BE0AC7EC464D2A36 + B34D3539DB6F889A78540F7C + 80CD68E0DDF2C60D2715CC78 + B2F326FA07783558EF3CDD2A + + isa + PBXGroup + name + libs + sourceTree + <group> + + 0FCED26D40D46CF89A58E54C + + fileRef + F3C78E7AB53E01022E9374A3 + isa + PBXBuildFile + + F3C78E7AB53E01022E9374A3 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + fft.cpp + path + ../../../addons/ofxMaxim/libs/fft.cpp + sourceTree + SOURCE_ROOT + + 8F6BFB59AB6D0A458C2F3C53 + + children + + 9312F3864ED05FC3E847FF69 + + isa + PBXGroup + name + src + sourceTree + <group> + + 6234D3BCE87D1C3BA2230F19 + + children + + 8F6BFB59AB6D0A458C2F3C53 + 4ACC32F17B7623DA048865D1 + + isa + PBXGroup + name + ofxMaxim + sourceTree + <group> + + 9312F3864ED05FC3E847FF69 + + explicitFileType + sourcecode.c.h + fileEncoding + 30 + isa + PBXFileReference + name + ofxMaxim.h + path + ../../../addons/ofxMaxim/src/ofxMaxim.h + sourceTree + SOURCE_ROOT + + 6948EE371B920CB800B5AC1A + + children + + isa + PBXGroup + name + local_addons + sourceTree + <group> + + 8466F1851C04CA0E00918B1C + + buildActionMask + 12 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + # ---- Code Sign App Package ---- + +# WARNING: You may have to run Clean in Xcode after changing CODE_SIGN_IDENTITY! + +# Verify that $CODE_SIGN_IDENTITY is set +if [ -z "${CODE_SIGN_IDENTITY}" ] ; then +echo "CODE_SIGN_IDENTITY needs to be set for framework code-signing" +exit 0 +fi + +if [ -z "${CODE_SIGN_ENTITLEMENTS}" ] ; then +echo "CODE_SIGN_ENTITLEMENTS needs to be set for framework code-signing!" + +if [ "${CONFIGURATION}" = "Release" ] ; then +exit 1 +else +# Code-signing is optional for non-release builds. +exit 0 +fi +fi + +ITEMS="" + +FRAMEWORKS_DIR="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +echo "$FRAMEWORKS_DIR" +if [ -d "$FRAMEWORKS_DIR" ] ; then +FRAMEWORKS=$(find "${FRAMEWORKS_DIR}" -depth -type d -name "*.framework" -or -name "*.dylib" -or -name "*.bundle" | sed -e "s/\(.*framework\)/\1\/Versions\/A\//") +RESULT=$? +if [[ $RESULT != 0 ]] ; then +exit 1 +fi + +ITEMS="${FRAMEWORKS}" +fi + +LOGINITEMS_DIR="${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Library/LoginItems/" +if [ -d "$LOGINITEMS_DIR" ] ; then +LOGINITEMS=$(find "${LOGINITEMS_DIR}" -depth -type d -name "*.app") +RESULT=$? +if [[ $RESULT != 0 ]] ; then +exit 1 +fi + +ITEMS="${ITEMS}"$'\n'"${LOGINITEMS}" +fi + +# Prefer the expanded name, if available. +CODE_SIGN_IDENTITY_FOR_ITEMS="${EXPANDED_CODE_SIGN_IDENTITY_NAME}" +if [ "${CODE_SIGN_IDENTITY_FOR_ITEMS}" = "" ] ; then +# Fall back to old behavior. +CODE_SIGN_IDENTITY_FOR_ITEMS="${CODE_SIGN_IDENTITY}" +fi + +echo "Identity:" +echo "${CODE_SIGN_IDENTITY_FOR_ITEMS}" + +echo "Entitlements:" +echo "${CODE_SIGN_ENTITLEMENTS}" + +echo "Found:" +echo "${ITEMS}" + +# Change the Internal Field Separator (IFS) so that spaces in paths will not cause problems below. +SAVED_IFS=$IFS +IFS=$(echo -en "\n\b") + +# Loop through all items. +for ITEM in $ITEMS; +do +echo "Signing '${ITEM}'" +codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" --entitlements "${CODE_SIGN_ENTITLEMENTS}" "${ITEM}" +RESULT=$? +if [[ $RESULT != 0 ]] ; then +echo "Failed to sign '${ITEM}'." +IFS=$SAVED_IFS +exit 1 +fi +done + +# Restore $IFS. +IFS=$SAVED_IFS + + + BB4B014C10F69532006C3DED + + children + + 6234D3BCE87D1C3BA2230F19 + E6053AB7FEC63D5F83825B88 + + isa + PBXGroup + name + addons + sourceTree + <group> + + E4328143138ABC890047C5CB + + isa + PBXFileReference + lastKnownFileType + wrapper.pb-project + name + openFrameworksLib.xcodeproj + path + ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj + sourceTree + SOURCE_ROOT + + E4328144138ABC890047C5CB + + children + + E4328148138ABC890047C5CB + + isa + PBXGroup + name + Products + sourceTree + <group> + + E4328147138ABC890047C5CB + + containerPortal + E4328143138ABC890047C5CB + isa + PBXContainerItemProxy + proxyType + 2 + remoteGlobalIDString + E4B27C1510CBEB8E00536013 + remoteInfo + openFrameworks + + E4328148138ABC890047C5CB + + fileType + archive.ar + isa + PBXReferenceProxy + path + openFrameworksDebug.a + remoteRef + E4328147138ABC890047C5CB + sourceTree + BUILT_PRODUCTS_DIR + + E4328149138ABC9F0047C5CB + + fileRef + E4328148138ABC890047C5CB + isa + PBXBuildFile + + E4B69B4A0A3A1720003C02F2 + + children + + E4B6FCAD0C3E899E008CF71C + E4EB6923138AFD0F00A09F29 + E4B69E1C0A3A1BDC003C02F2 + E4EEC9E9138DF44700A80321 + BB4B014C10F69532006C3DED + 6948EE371B920CB800B5AC1A + E4B69B5B0A3A1756003C02F2 + + isa + PBXGroup + sourceTree + <group> + + E4B69B4C0A3A1720003C02F2 + + attributes + + LastUpgradeCheck + 0600 + + buildConfigurationList + E4B69B4D0A3A1720003C02F2 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + English + Japanese + French + German + + mainGroup + E4B69B4A0A3A1720003C02F2 + productRefGroup + E4B69B4A0A3A1720003C02F2 + projectDirPath + + projectReferences + + + ProductGroup + E4328144138ABC890047C5CB + ProjectRef + E4328143138ABC890047C5CB + + + projectRoot + + targets + + E4B69B5A0A3A1756003C02F2 + + + E4B69B4D0A3A1720003C02F2 + + buildConfigurations + + E4B69B4E0A3A1720003C02F2 + E4B69B4F0A3A1720003C02F2 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + E4B69B4E0A3A1720003C02F2 + + baseConfigurationReference + E4EB6923138AFD0F00A09F29 + buildSettings + + HEADER_SEARCH_PATHS + + $(OF_CORE_HEADERS) + ../../../addons/ofxMaxim/libs + ../../../addons/ofxMaxim/src + ../../../addons/ofxOsc/libs + ../../../addons/ofxOsc/libs/oscpack + ../../../addons/ofxOsc/libs/oscpack/src + ../../../addons/ofxOsc/libs/oscpack/src/ip + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix + ../../../addons/ofxOsc/libs/oscpack/src/ip/win32 + ../../../addons/ofxOsc/libs/oscpack/src/osc + ../../../addons/ofxOsc/src + + CONFIGURATION_BUILD_DIR + $(SRCROOT)/bin/ + COPY_PHASE_STRIP + NO + DEAD_CODE_STRIPPING + YES + GCC_AUTO_VECTORIZATION + YES + GCC_ENABLE_SSE3_EXTENSIONS + YES + GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS + YES + GCC_INLINES_ARE_PRIVATE_EXTERN + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS + YES + GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO + NO + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL + NO + GCC_WARN_UNINITIALIZED_AUTOS + NO + GCC_WARN_UNUSED_VALUE + NO + GCC_WARN_UNUSED_VARIABLE + NO + MACOSX_DEPLOYMENT_TARGET + 10.8 + ONLY_ACTIVE_ARCH + YES + OTHER_CPLUSPLUSFLAGS + + -D__MACOSX_CORE__ + -mtune=native + + SDKROOT + macosx + + isa + XCBuildConfiguration + name + Debug + + E4B69B4F0A3A1720003C02F2 + + baseConfigurationReference + E4EB6923138AFD0F00A09F29 + buildSettings + + HEADER_SEARCH_PATHS + + $(OF_CORE_HEADERS) + ../../../addons/ofxMaxim/libs + ../../../addons/ofxMaxim/src + ../../../addons/ofxOsc/libs + ../../../addons/ofxOsc/libs/oscpack + ../../../addons/ofxOsc/libs/oscpack/src + ../../../addons/ofxOsc/libs/oscpack/src/ip + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix + ../../../addons/ofxOsc/libs/oscpack/src/ip/win32 + ../../../addons/ofxOsc/libs/oscpack/src/osc + ../../../addons/ofxOsc/src + + CONFIGURATION_BUILD_DIR + $(SRCROOT)/bin/ + COPY_PHASE_STRIP + YES + DEAD_CODE_STRIPPING + YES + GCC_AUTO_VECTORIZATION + YES + GCC_ENABLE_SSE3_EXTENSIONS + YES + GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS + YES + GCC_INLINES_ARE_PRIVATE_EXTERN + NO + GCC_OPTIMIZATION_LEVEL + 3 + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_UNROLL_LOOPS + YES + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS + YES + GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO + NO + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL + NO + GCC_WARN_UNINITIALIZED_AUTOS + NO + GCC_WARN_UNUSED_VALUE + NO + GCC_WARN_UNUSED_VARIABLE + NO + MACOSX_DEPLOYMENT_TARGET + 10.8 + OTHER_CPLUSPLUSFLAGS + + -D__MACOSX_CORE__ + -mtune=native + + SDKROOT + macosx + + isa + XCBuildConfiguration + name + Release + + E4B69B580A3A1756003C02F2 + + buildActionMask + 2147483647 + files + + E4B69E200A3A1BDC003C02F2 + E4B69E210A3A1BDC003C02F2 + 0FCED26D40D46CF89A58E54C + 5C4A4AA5D4784DF23EA43038 + ABA8875AF0C06690CC0B92B1 + 96084990AF216648B8B98E00 + AF0580829426DC6BCA135A5C + 083FB2094A4DE99F5A60397A + 22F21CE3B902225374BA1CA2 + 9514C2D90467055B1447D074 + 72A929D3561B8232A182ABFC + 5864AD82E20F15536D054EA3 + 4ADB88E2FB52E76A471065DE + 640279EE111671BD026CB013 + 8F5205AEF8861EF234F0651A + ADE367465D2A8EBAD4C7A8D9 + 67FE4C7B15C2F0478C8126C2 + 510CAFE035E576A4E1502D52 + 62545D179C94265CA1389D4A + C4782ECC372420ACE0615B74 + 0546D1A38E13BD319CC9755B + 879A251454401BC0B6E4F238 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + E4B69B590A3A1756003C02F2 + + buildActionMask + 2147483647 + files + + E4328149138ABC9F0047C5CB + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + E4B69B5A0A3A1756003C02F2 + + buildConfigurationList + E4B69B5F0A3A1757003C02F2 + buildPhases + + E4B69B580A3A1756003C02F2 + E4B69B590A3A1756003C02F2 + E4B6FFFD0C3F9AB9008CF71C + E4C2427710CC5ABF004149E2 + 8466F1851C04CA0E00918B1C + + buildRules + + dependencies + + E4EEB9AC138B136A00A80321 + + isa + PBXNativeTarget + name + granular0_92 + productName + myOFApp + productReference + E4B69B5B0A3A1756003C02F2 + productType + com.apple.product-type.application + + E4B69B5B0A3A1756003C02F2 + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + granular0_92Debug.app + sourceTree + BUILT_PRODUCTS_DIR + + E4B69B5F0A3A1757003C02F2 + + buildConfigurations + + E4B69B600A3A1757003C02F2 + E4B69B610A3A1757003C02F2 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + E4B69B600A3A1757003C02F2 + + baseConfigurationReference + E4EB6923138AFD0F00A09F29 + buildSettings + + HEADER_SEARCH_PATHS + + $(OF_CORE_HEADERS) + ../../../addons/ofxMaxim/libs + ../../../addons/ofxMaxim/src + ../../../addons/ofxOsc/libs + ../../../addons/ofxOsc/libs/oscpack + ../../../addons/ofxOsc/libs/oscpack/src + ../../../addons/ofxOsc/libs/oscpack/src/ip + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix + ../../../addons/ofxOsc/libs/oscpack/src/ip/win32 + ../../../addons/ofxOsc/libs/oscpack/src/osc + ../../../addons/ofxOsc/src + + COMBINE_HIDPI_IMAGES + YES + COPY_PHASE_STRIP + NO + FRAMEWORK_SEARCH_PATHS + + $(inherited) + $(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1) + + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 + "$(SRCROOT)/../../../libs/glut/lib/osx" + GCC_DYNAMIC_NO_PIC + NO + GCC_GENERATE_DEBUGGING_SYMBOLS + YES + GCC_MODEL_TUNING + NONE + ICON + $(ICON_NAME_DEBUG) + ICON_FILE + $(ICON_FILE_PATH)$(ICON) + INFOPLIST_FILE + openFrameworks-Info.plist + INSTALL_PATH + /Applications + LIBRARY_SEARCH_PATHS + $(inherited) + PRODUCT_NAME + $(TARGET_NAME)Debug + WRAPPER_EXTENSION + app + + isa + XCBuildConfiguration + name + Debug + + E4B69B610A3A1757003C02F2 + + baseConfigurationReference + E4EB6923138AFD0F00A09F29 + buildSettings + + HEADER_SEARCH_PATHS + + $(OF_CORE_HEADERS) + ../../../addons/ofxMaxim/libs + ../../../addons/ofxMaxim/src + ../../../addons/ofxOsc/libs + ../../../addons/ofxOsc/libs/oscpack + ../../../addons/ofxOsc/libs/oscpack/src + ../../../addons/ofxOsc/libs/oscpack/src/ip + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix + ../../../addons/ofxOsc/libs/oscpack/src/ip/win32 + ../../../addons/ofxOsc/libs/oscpack/src/osc + ../../../addons/ofxOsc/src + + COMBINE_HIDPI_IMAGES + YES + COPY_PHASE_STRIP + YES + FRAMEWORK_SEARCH_PATHS + + $(inherited) + $(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1) + + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 + "$(SRCROOT)/../../../libs/glut/lib/osx" + GCC_GENERATE_DEBUGGING_SYMBOLS + YES + GCC_MODEL_TUNING + NONE + ICON + $(ICON_NAME_RELEASE) + ICON_FILE + $(ICON_FILE_PATH)$(ICON) + INFOPLIST_FILE + openFrameworks-Info.plist + INSTALL_PATH + /Applications + LIBRARY_SEARCH_PATHS + $(inherited) + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + app + baseConfigurationReference + E4EB6923138AFD0F00A09F29 + + isa + XCBuildConfiguration + name + Release + + E4B69E1C0A3A1BDC003C02F2 + + children + + E4B69E1D0A3A1BDC003C02F2 + E4B69E1E0A3A1BDC003C02F2 + E4B69E1F0A3A1BDC003C02F2 + + isa + PBXGroup + path + src + sourceTree + SOURCE_ROOT + + E4B69E1D0A3A1BDC003C02F2 + + fileEncoding + 30 + isa + PBXFileReference + lastKnownFileType + sourcecode.cpp.cpp + name + main.cpp + path + src/main.cpp + sourceTree + SOURCE_ROOT + + E4B69E1E0A3A1BDC003C02F2 + + explicitFileType + sourcecode.cpp.cpp + fileEncoding + 30 + isa + PBXFileReference + name + ofApp.cpp + path + src/ofApp.cpp + sourceTree + SOURCE_ROOT + + E4B69E1F0A3A1BDC003C02F2 + + fileEncoding + 30 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + ofApp.h + path + src/ofApp.h + sourceTree + SOURCE_ROOT + + E4B69E200A3A1BDC003C02F2 + + fileRef + E4B69E1D0A3A1BDC003C02F2 + isa + PBXBuildFile + + E4B69E210A3A1BDC003C02F2 + + fileRef + E4B69E1E0A3A1BDC003C02F2 + isa + PBXBuildFile + + E4B6FCAD0C3E899E008CF71C + + fileEncoding + 30 + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + openFrameworks-Info.plist + sourceTree + <group> + + E4B6FFFD0C3F9AB9008CF71C + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + mkdir -p "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/" +# Copy default icon file into App/Resources +rsync -aved "$ICON_FILE" "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/" +# Copy bin/data into App/Resources +rsync -avz --exclude='.DS_Store' "${SRCROOT}/bin/data/" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/data/" +# Copy libfmod and change install directory for fmod to run +rsync -aved ../../../libs/fmodex/lib/osx/libfmodex.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/"; +install_name_tool -change @executable_path/libfmodex.dylib @executable_path/../Frameworks/libfmodex.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME"; +# Copy GLUT framework (must remove for AppStore submissions) +rsync -aved ../../../libs/glut/lib/osx/GLUT.framework "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/" + + + E4C2427710CC5ABF004149E2 + + buildActionMask + 2147483647 + dstPath + + dstSubfolderSpec + 10 + files + + isa + PBXCopyFilesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + E4EB691F138AFCF100A09F29 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + CoreOF.xcconfig + path + ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig + sourceTree + SOURCE_ROOT + + E4EB6923138AFD0F00A09F29 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Project.xcconfig + sourceTree + <group> + + E4EEB9AB138B136A00A80321 + + containerPortal + E4328143138ABC890047C5CB + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + E4B27C1410CBEB8E00536013 + remoteInfo + openFrameworks + + E4EEB9AC138B136A00A80321 + + isa + PBXTargetDependency + name + openFrameworks + targetProxy + E4EEB9AB138B136A00A80321 + + E4EEC9E9138DF44700A80321 + + children + + E4EB691F138AFCF100A09F29 + E4328143138ABC890047C5CB + + isa + PBXGroup + name + openFrameworks + sourceTree + <group> + + + rootObject + E4B69B4C0A3A1720003C02F2 + + diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..023c379 Binary files /dev/null and b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/project.xcworkspace/xcuserdata/michaelgrierson.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Debug.xcscheme b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Debug.xcscheme new file mode 100644 index 0000000..6f7c747 --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Debug.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Release.xcscheme b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Release.xcscheme new file mode 100644 index 0000000..19fd904 --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcshareddata/xcschemes/granular0_92 Release.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcuserdata/michaelgrierson.xcuserdatad/xcschemes/xcschememanagement.plist b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcuserdata/michaelgrierson.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..f1ba9be --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/granular0_92.xcodeproj/xcuserdata/michaelgrierson.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + granular0_92 Debug.xcscheme_^#shared#^_ + + orderHint + 0 + + granular0_92 Release.xcscheme_^#shared#^_ + + orderHint + 1 + + + SuppressBuildableAutocreation + + E4B69B5A0A3A1756003C02F2 + + primary + + + + + diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/openFrameworks-Info.plist b/openFrameworks/openFrameworksExamples/OSX/granular0_92/openFrameworks-Info.plist new file mode 100644 index 0000000..8d64d2b --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/openFrameworks-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + cc.openFrameworks.ofapp + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + CFBundleIconFile + ${ICON} + + diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/main.cpp b/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/main.cpp new file mode 100644 index 0000000..e57370b --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/main.cpp @@ -0,0 +1,13 @@ +#include "ofMain.h" +#include "ofApp.h" + +//======================================================================== +int main( ){ + ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context + + // this kicks off the running of my app + // can be OF_WINDOW or OF_FULLSCREEN + // pass in width and height too: + ofRunApp(new ofApp()); + +} diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.cpp b/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.cpp new file mode 100644 index 0000000..7e9bfdf --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.cpp @@ -0,0 +1,269 @@ +/* This is an example of how to integrate maximilain into openFrameworks, + including using audio received for input and audio requested for output. + + + You can copy and paste this and use it as a starting example. + + */ + +#include "ofApp.h" +//#include "maximilian.h"/* include the lib */ +#include "time.h" + + +//-------------------------------------------------------------- +void ofApp::setup(){ + + /* This is stuff you always need.*/ + + sender.setup(HOST, SENDPORT); + receiver.setup(RECEIVEPORT); + + + //samples from http://freesound.org + samp.load(ofToDataPath("2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav")); + samp2.load(ofToDataPath("24620__anamorphosis__GMB_Kantilan_1.wav")); + samp3.load(ofToDataPath("26393__brfindla__Calango1berimbau.wav")); + samp4.load(ofToDataPath("68373__juskiddink__Cello_open_string_bowed.wav")); + samp5.load(ofToDataPath("71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav")); + // samp5.load(ofToDataPath("sine1sec.wav")); + + + ofEnableAlphaBlending(); + ofSetupScreen(); + ofBackground(0, 0, 0); + ofSetFrameRate(60); + + sampleRate = 44100; /* Sampling Rate */ + bufferSize = 512; /* Buffer Size. you have to fill this buffer with sound using the for loop in the audioOut method */ + + + + ts = new maxiTimestretch(&samp); + ts2 = new maxiTimestretch(&samp2); + ts3 = new maxiTimestretch(&samp3); + ts4 = new maxiTimestretch(&samp4); + ts5 = new maxiTimestretch(&samp5); + stretches.push_back(ts); + stretches.push_back(ts2); + stretches.push_back(ts3); + stretches.push_back(ts4); + stretches.push_back(ts5); + speed = 1; + grainLength = 0.05; + current=0; + + fft.setup(1024, 512, 256); + oct.setup(44100, 1024, 10); + + int current = 0; + ofxMaxiSettings::setup(sampleRate, 2, initialBufferSize); + + ofSetVerticalSync(true); + ofEnableAlphaBlending(); + ofEnableSmoothing(); + + /* Anything that you would normally find/put in maximilian's setup() method needs to go here. For example, Sample loading. + + */ + + ofSetSphereResolution(5); + + isTraining=true; + + ofBackground(0,0,0); + + ofSoundStreamSetup(2,2,this, sampleRate, bufferSize, 4); /* this has to happen at the end of setup - it switches on the DAC */ + + +} + +//-------------------------------------------------------------- +void ofApp::update(){ + + //WEKINATOR + if (!isTraining) { + + + while(receiver.hasWaitingMessages()){ + // get the next message + ofxOscMessage m; + receiver.getNextMessage(&m); + + // check for mouse moved message + if(m.getAddress() == "/wek/outputs"){ + + cout << m.getArgAsFloat(0); + speed = ((double ) m.getArgAsFloat(0) * 4.0) - 2.0; + grainLength = (m.getArgAsFloat(1) * 0.1) + 0.001; + pos = ((double) m.getArgAsFloat(0) * 2.0); + + } + } + + } + + +} + +//-------------------------------------------------------------- +void ofApp::draw(){ + + /* You can use any of the data from audio received and audiorequested to draw stuff here. + Importantly, most people just use the input and output arrays defined above. + Clever people don't do this. This bit of code shows that by default, each signal is going to flip + between -1 and 1. You need to account for this somehow. Get the absolute value for example. + */ + + ofSetColor(160,32,240, 150); + ofDrawBitmapString(":: ofxMaxim Granular Timestretching Example ::", 10,20); + ofDrawBitmapString("Move the mouse left to right to change playback speed and direction.", 10,40); + ofDrawBitmapString("Move the mouse up and down to change the grain length.", 10,60); + ofDrawBitmapString("Click to cycle through samples.", 10,80); + + stringstream s; + s << "Speed: " << speed; + ofDrawBitmapString(s.str(), 10,750); + s.str(""); + s << "Grain length: " << round(grainLength*1000.0) << " ms"; + ofDrawBitmapString(s.str(), 180,750); + + ofNoFill(); + for(int i=0; i < oct.nAverages; i++) { + ofSetColor(200 + ((int)(ofGetFrameNum() * 0.8) % 255), + 100 + ((int)(ofGetFrameNum() * 1.4) % 255), + ofGetFrameNum() % 255, + oct.averages[i] / 20.0 * 255.0); + // ofCircle(ofGetWidth() / 2, ofGetHeight()/2, i * 5); + glPushMatrix(); + glTranslatef(ofGetWidth()/2,ofGetHeight()/2, 0); + glRotatef(0.01 * ofGetFrameNum() * speed * i, 0.01 * ofGetFrameNum() * speed * i,0.01 * ofGetFrameNum() * speed * i, 0); + // glutWireSphere(i * 5, 2 + (10 - (fabs(speed) * 10)), 2 + (fabs(speed) * 10)); + ofDrawSphere(0, 0, i * 5); + glPopMatrix(); + } + + + + +} + +//-------------------------------------------------------------- +void ofApp::audioOut(float * output, int bufferSize, int nChannels) { + + + for (int i = 0; i < bufferSize; i++){ + + /* Stick your maximilian 'play()' code in here ! Declare your objects in testApp.h. + + For information on how maximilian works, take a look at the example code at + + http://www.maximilian.strangeloop.co.uk + + under 'Tutorials'. + + */ + + + // wave = stretches[current]->play(speed, grainLength, 5, 0); + wave = stretches[current]->play(speed, 0.1, 4, 0); + // wave = stretches[current]->play2(pos, 0.1, 4); + if (fft.process(wave)) { + oct.calculate(fft.magnitudes); + } + + //play result + mymix.stereo(wave, outputs, 0.5); + output[i*nChannels ] = outputs[0]; /* You may end up with lots of outputs. add them here */ + output[i*nChannels + 1] = outputs[1]; + + + + /* You may end up with lots of outputs. add them here */ + + + } + +} + +//-------------------------------------------------------------- +void ofApp::audioIn(float * input, int bufferSize, int nChannels){ + + // samples are "interleaved" + for(int i = 0; i < bufferSize; i++){ + /* you can also grab the data out of the arrays*/ + + } + +} + + +//-------------------------------------------------------------- +void ofApp::keyPressed(int key){ + + isTraining=!isTraining; + + cout << isTraining; + +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseMoved(int x, int y){ + + float x1 = myFilter.lopass(x,0.25); + float y1 = myFilter2.lopass(y,0.25); + + if (isTraining) { + + speed = ((double ) x1 / ofGetWidth() * 4.0) - 2.0; + grainLength = ((double) y1 / ofGetHeight() * 0.1) + 0.001; + pos = ((double) x1 / ofGetWidth() * 2.0); + // cout << pos << endl; + + ofxOscMessage m; + m.setAddress("/wekinator/control/outputs"); + m.addFloatArg((float)x/ofGetWidth()); + m.addFloatArg((float)y/ofGetHeight()); + m.addFloatArg((float)current/stretches.size()-1); + sender.sendMessage(m); + cout << "messageSent" << "\n"; + } + + +} + +//-------------------------------------------------------------- +void ofApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mousePressed(int x, int y, int button){ + if (++current > stretches.size()-1) current = 0; + +} + +//-------------------------------------------------------------- +void ofApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void ofApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void ofApp::dragEvent(ofDragInfo dragInfo){ + +} diff --git a/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.h b/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.h new file mode 100644 index 0000000..3f8e034 --- /dev/null +++ b/openFrameworks/openFrameworksExamples/OSX/granular0_92/src/ofApp.h @@ -0,0 +1,79 @@ +#pragma once + +#include "ofMain.h" +#include "ofxMaxim.h" +#include "ofxMaxim.h" +#include "maxiGrains.h" +#include "ofxOsc.h" +#include + +#define HOST "localhost" +#define RECEIVEPORT 12000 +#define SENDPORT 6448 + +typedef hannWinFunctor grainPlayerWin; + + +class ofApp : public ofBaseApp{ + +public: + void setup(); + void update(); + void draw(); + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + + + void audioOut(float * output, int bufferSize, int nChannels); + void audioIn(float * input, int bufferSize, int nChannels); + + int bufferSize; + + /* stick you maximilian declarations below + + For information on how maximilian works, take a look at the example code at + + http://www.maximilian.strangeloop.co.uk + + under 'Tutorials'. + + + */ + + + int initialBufferSize; /* buffer size */ + int sampleRate; + + + /* stick your maximilian stuff below */ + + double wave,sample,outputs[2]; + maxiSample samp, samp2, samp3, samp4, samp5; + vector*> stretches; + maxiMix mymix; + maxiTimestretch *ts, *ts2, *ts3, *ts4, *ts5; + double speed, grainLength; + + ofxMaxiFFT fft; + ofxMaxiFFTOctaveAnalyzer oct; + int current; + double pos; + + //osc + ofxOscSender sender; + ofxOscReceiver receiver; + + ofxMaxiFilter myFilter, myFilter2; + + bool isTraining; + +}; + + -- cgit v1.3