diff options
| author | Mick Grierson <mickgrierson@strangebook.local> | 2011-08-23 18:23:16 +0100 |
|---|---|---|
| committer | Mick Grierson <mickgrierson@strangebook.local> | 2011-08-23 18:23:16 +0100 |
| commit | cade501837381117c7e4f876fe32ce86920f79d3 (patch) | |
| tree | fdf71df7fc39fa27ff26610e6d852e09c797015a | |
| parent | c1e3480c26c5a7c6f2cb6977a0c798f6a54a32f8 (diff) | |
added ofxMaxim
102 files changed, 12769 insertions, 0 deletions
| Binary files differ diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/FreeImage.dll b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/FreeImage.dll Binary files differnew file mode 100755 index 0000000..e5b1afe --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/FreeImage.dll diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/FreeType-6.dll b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/FreeType-6.dll Binary files differnew file mode 100755 index 0000000..c13d534 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/FreeType-6.dll diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/Zlib.dll b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/Zlib.dll Binary files differnew file mode 100755 index 0000000..198f0ec --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/Zlib.dll diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/data/Low.wav b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/data/Low.wav Binary files differnew file mode 100755 index 0000000..e0308f5 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/data/Low.wav diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/data/beat2.wav b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/data/beat2.wav Binary files differnew file mode 100755 index 0000000..c71cee6 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/data/beat2.wav diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug.exe b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug.exe Binary files differnew file mode 100755 index 0000000..1d0bacf --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug.exe diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug.ilk b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug.ilk Binary files differnew file mode 100755 index 0000000..3d9958f --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug.ilk diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug_debugInfo.pdb b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug_debugInfo.pdb Binary files differnew file mode 100755 index 0000000..16d68aa --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/emptyExample_debug_debugInfo.pdb diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/fmodex.dll b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/fmodex.dll Binary files differnew file mode 100755 index 0000000..e8ff8f0 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/fmodex.dll diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/fmodexL.dll b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/fmodexL.dll Binary files differnew file mode 100755 index 0000000..b5c7125 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/fmodexL.dll diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/glut32.dll b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/glut32.dll Binary files differnew file mode 100755 index 0000000..106646f --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/bin/glut32.dll diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.ncb b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.ncb Binary files differnew file mode 100755 index 0000000..3577c98 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.ncb diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.sln b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.sln new file mode 100755 index 0000000..5a9e6e6 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.sln @@ -0,0 +1,28 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "emptyExample", "emptyExample.vcproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}" + ProjectSection(ProjectDependencies) = postProject + {5837595D-ACA9-485C-8E76-729040CE4B0B} = {5837595D-ACA9-485C-8E76-729040CE4B0B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs2008\openframeworksLib.vcproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32 + {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32 + {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32 + {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32 + {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32 + {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32 + {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.suo b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.suo Binary files differnew file mode 100755 index 0000000..73c79ae --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.suo diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj new file mode 100755 index 0000000..a03cbaf --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj @@ -0,0 +1,217 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="emptyExample"
+ ProjectGUID="{7FD42DF7-442E-479A-BA76-D0022F99702A}"
+ RootNamespace="emptyExample"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="bin"
+ IntermediateDirectory="obj\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\libs\openFrameworks;..\..\..\libs\openFrameworks\graphics;..\..\..\libs\openFrameworks\app;..\..\..\libs\openFrameworks\sound;..\..\..\libs\openFrameworks\utils;..\..\..\libs\openFrameworks\communication;..\..\..\libs\openFrameworks\video;..\..\..\libs\openFrameworks\events;..\..\..\libs\glut\include;..\..\..\libs\rtAudio\include;..\..\..\libs\quicktime\include;..\..\..\libs\freetype\include;..\..\..\libs\freetype\include\freetype2;..\..\..\libs\freeImage\include;..\..\..\libs\fmodex\include;..\..\..\libs\videoInput\include;..\..\..\libs\glee\include;..\..\..\libs\glu\include;..\..\..\libs\poco\include;..\..\..\addons"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;POCO_STATIC"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="openframeworksLibDebug.lib OpenGL32.lib GLu32.lib kernel32.lib setupapi.lib glut32.lib rtAudioD.lib videoInput.lib libfreetype.lib FreeImage.lib qtmlClient.lib dsound.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib GLee.lib fmodex_vc.lib glu32.lib PocoFoundationmtd.lib PocoNetmtd.lib PocoUtilmtd.lib PocoXMLmtd.lib"
+ OutputFile="$(OutDir)\$(ProjectName)_debug.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\..\libs\glut\lib\vs2008;..\..\..\libs\rtAudio\lib\vs2008;..\..\..\libs\FreeImage\lib\vs2008;..\..\..\libs\freetype\lib\vs2008;..\..\..\libs\quicktime\lib\vs2008;..\..\..\libs\fmodex\lib\vs2008;..\..\..\libs\videoInput\lib\vs2008;..\..\..\libs\glee\lib\vs2008;..\..\..\libs\glu\lib\vs2008;..\..\..\libs\Poco\lib\vs2008;..\..\..\libs\openFrameworksCompiled\lib\vs2008"
+ GenerateManifest="true"
+ IgnoreDefaultLibraryNames="atlthunk.lib; LIBC.lib; LIBCMT;"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName)_debugInfo.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="adding DLLs and creating data folder"
+ CommandLine="xcopy /e /i /y "$(ProjectDir)..\..\..\export\vs2008\*.dll" "$(ProjectDir)bin"
if not exist "$(ProjectDir)bin\data" mkdir "$(ProjectDir)bin\data"
"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="bin"
+ IntermediateDirectory="obj\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\..\libs\openFrameworks;..\..\..\libs\openFrameworks\graphics;..\..\..\libs\openFrameworks\app;..\..\..\libs\openFrameworks\sound;..\..\..\libs\openFrameworks\utils;..\..\..\libs\openFrameworks\communication;..\..\..\libs\openFrameworks\video;..\..\..\libs\openFrameworks\events;..\..\..\libs\glut\include;..\..\..\libs\rtAudio\include;..\..\..\libs\quicktime\include;..\..\..\libs\freetype\include;..\..\..\libs\freetype\include\freetype2;..\..\..\libs\freeImage\include;..\..\..\libs\fmodex\include;..\..\..\libs\videoInput\include;..\..\..\libs\glee\include;..\..\..\libs\glu\include;..\..\..\libs\poco\include;..\..\..\addons"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;POCO_STATIC"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="openframeworksLib.lib OpenGL32.lib GLu32.lib kernel32.lib setupapi.lib glut32.lib rtAudio.lib videoInput.lib libfreetype.lib FreeImage.lib qtmlClient.lib dsound.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib GLee.lib fmodex_vc.lib glu32.lib PocoFoundationmt.lib PocoNetmt.lib PocoUtilmt.lib PocoXMLmt.lib"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\..\libs\glut\lib\vs2008;..\..\..\libs\rtAudio\lib\vs2008;..\..\..\libs\FreeImage\lib\vs2008;..\..\..\libs\freetype\lib\vs2008;..\..\..\libs\quicktime\lib\vs2008;..\..\..\libs\fmodex\lib\vs2008;..\..\..\libs\videoInput\lib\vs2008;..\..\..\libs\glee\lib\vs2008;..\..\..\libs\glu\lib\vs2008;..\..\..\libs\Poco\lib\vs2008;..\..\..\libs\openFrameworksCompiled\lib\vs2008"
+ IgnoreAllDefaultLibraries="false"
+ IgnoreDefaultLibraryNames="atlthunk.lib; LIBC.lib; LIBCMT;"
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="adding DLLs and creating data folder"
+ CommandLine="xcopy /e /i /y "$(ProjectDir)\..\..\..\export\vs2008\*.dll" "$(ProjectDir)\bin"
if not exist "$(ProjectDir)\bin\data" mkdir "$(ProjectDir)\bin\data"

"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="src"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\src\main.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\maximilian.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\maximilian.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\testApp.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\testApp.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj.GOLDSMIT-282193.Administrator.user b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj.GOLDSMIT-282193.Administrator.user new file mode 100755 index 0000000..4c12e85 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj.GOLDSMIT-282193.Administrator.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="9.00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="$(TargetPath)"
+ WorkingDirectory="bin"
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="GOLDSMIT-282193"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="$(TargetPath)"
+ WorkingDirectory="bin"
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="GOLDSMIT-282193"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj.user b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj.user new file mode 100755 index 0000000..801522b --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/emptyExample.vcproj.user @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioUserFile + ProjectType="Visual C++" + Version="8.00" + ShowAllFiles="false" + > + <Configurations> + <Configuration + Name="Debug|Win32" + > + <DebugSettings + Command="$(TargetPath)" + WorkingDirectory="bin" + /> + </Configuration> + <Configuration + Name="Release|Win32" + > + <DebugSettings + Command="$(TargetPath)" + WorkingDirectory="bin" + /> + </Configuration> + </Configurations> +</VisualStudioUserFile> diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/BuildLog.htm b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/BuildLog.htm Binary files differnew file mode 100755 index 0000000..1c93f6d --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/BuildLog.htm diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.embed.manifest b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.embed.manifest new file mode 100755 index 0000000..4248d28 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.embed.manifest @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+</assembly>
\ No newline at end of file diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.embed.manifest.res b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.embed.manifest.res Binary files differnew file mode 100755 index 0000000..9e54244 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.embed.manifest.res diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.intermediate.manifest b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.intermediate.manifest new file mode 100755 index 0000000..9e781d8 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/emptyExample_debug.exe.intermediate.manifest @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level='asInvoker' uiAccess='false' />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/main.obj b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/main.obj Binary files differnew file mode 100755 index 0000000..789cd65 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/main.obj diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/maximilian.obj b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/maximilian.obj Binary files differnew file mode 100755 index 0000000..00afaf8 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/maximilian.obj diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/mt.dep b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/mt.dep new file mode 100755 index 0000000..d7cef3c --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/mt.dep @@ -0,0 +1 @@ +Manifest resource last updated at 16:20:08.48 on 07/12/2010
diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/testApp.obj b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/testApp.obj Binary files differnew file mode 100755 index 0000000..ead3061 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/testApp.obj diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/vc90.idb b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/vc90.idb Binary files differnew file mode 100755 index 0000000..3e91926 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/vc90.idb diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/vc90.pdb b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/vc90.pdb Binary files differnew file mode 100755 index 0000000..aa7c5ab --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/obj/Debug/vc90.pdb diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/main.cpp b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/main.cpp new file mode 100755 index 0000000..312c54e --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/main.cpp @@ -0,0 +1,16 @@ +#include "ofMain.h" +#include "testApp.h" +#include "ofAppGlutWindow.h" + +//======================================================================== +int main( ){ + + ofAppGlutWindow window; + ofSetupOpenGL(&window, 800,600, 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 testApp()); + +} diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp new file mode 100755 index 0000000..a0ee618 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp @@ -0,0 +1,709 @@ + +/* + * maximilian.cpp + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "maximilian.h" +#include "math.h" + +int channels=2; +int samplerate=44100; +int buffersize=1024; +float chandiv= 1; + +double sineBuffer[514]={0,0.012268,0.024536,0.036804,0.049042,0.06131,0.073547,0.085785,0.097992,0.1102,0.12241,0.13455,0.1467,0.15884,0.17093,0.18301,0.19507,0.20709,0.21909,0.23105,0.24295,0.25485,0.26669,0.2785,0.29025,0.30197,0.31366,0.32529,0.33685,0.34839,0.35986,0.37128,0.38266,0.39395,0.40521,0.41641,0.42752,0.4386,0.44958,0.46051,0.47137,0.48215,0.49286,0.50351,0.51407,0.52457,0.53497,0.54529,0.55554,0.5657,0.57578,0.58575,0.59567,0.60547,0.6152,0.62482,0.63437,0.6438,0.65314,0.66238,0.67151,0.68057,0.68951,0.69833,0.70706,0.7157,0.72421,0.7326,0.74091,0.74908,0.75717,0.76514,0.77298,0.7807,0.7883,0.79581,0.80316,0.81042,0.81754,0.82455,0.83142,0.8382,0.84482,0.85132,0.8577,0.86392,0.87006,0.87604,0.88187,0.8876,0.89319,0.89862,0.90396,0.90912,0.91415,0.91907,0.92383,0.92847,0.93295,0.93729,0.9415,0.94556,0.94949,0.95325,0.95691,0.96039,0.96375,0.96692,0.97,0.9729,0.97565,0.97827,0.98074,0.98306,0.98523,0.98724,0.98914,0.99084,0.99243,0.99387,0.99515,0.99628,0.99725,0.99808,0.99875,0.99927,0.99966,0.99988,0.99997,0.99988,0.99966,0.99927,0.99875,0.99808,0.99725,0.99628,0.99515,0.99387,0.99243,0.99084,0.98914,0.98724,0.98523,0.98306,0.98074,0.97827,0.97565,0.9729,0.97,0.96692,0.96375,0.96039,0.95691,0.95325,0.94949,0.94556,0.9415,0.93729,0.93295,0.92847,0.92383,0.91907,0.91415,0.90912,0.90396,0.89862,0.89319,0.8876,0.88187,0.87604,0.87006,0.86392,0.8577,0.85132,0.84482,0.8382,0.83142,0.82455,0.81754,0.81042,0.80316,0.79581,0.7883,0.7807,0.77298,0.76514,0.75717,0.74908,0.74091,0.7326,0.72421,0.7157,0.70706,0.69833,0.68951,0.68057,0.67151,0.66238,0.65314,0.6438,0.63437,0.62482,0.6152,0.60547,0.59567,0.58575,0.57578,0.5657,0.55554,0.54529,0.53497,0.52457,0.51407,0.50351,0.49286,0.48215,0.47137,0.46051,0.44958,0.4386,0.42752,0.41641,0.40521,0.39395,0.38266,0.37128,0.35986,0.34839,0.33685,0.32529,0.31366,0.30197,0.29025,0.2785,0.26669,0.25485,0.24295,0.23105,0.21909,0.20709,0.19507,0.18301,0.17093,0.15884,0.1467,0.13455,0.12241,0.1102,0.097992,0.085785,0.073547,0.06131,0.049042,0.036804,0.024536,0.012268,0,-0.012268,-0.024536,-0.036804,-0.049042,-0.06131,-0.073547,-0.085785,-0.097992,-0.1102,-0.12241,-0.13455,-0.1467,-0.15884,-0.17093,-0.18301,-0.19507,-0.20709,-0.21909,-0.23105,-0.24295,-0.25485,-0.26669,-0.2785,-0.29025,-0.30197,-0.31366,-0.32529,-0.33685,-0.34839,-0.35986,-0.37128,-0.38266,-0.39395,-0.40521,-0.41641,-0.42752,-0.4386,-0.44958,-0.46051,-0.47137,-0.48215,-0.49286,-0.50351,-0.51407,-0.52457,-0.53497,-0.54529,-0.55554,-0.5657,-0.57578,-0.58575,-0.59567,-0.60547,-0.6152,-0.62482,-0.63437,-0.6438,-0.65314,-0.66238,-0.67151,-0.68057,-0.68951,-0.69833,-0.70706,-0.7157,-0.72421,-0.7326,-0.74091,-0.74908,-0.75717,-0.76514,-0.77298,-0.7807,-0.7883,-0.79581,-0.80316,-0.81042,-0.81754,-0.82455,-0.83142,-0.8382,-0.84482,-0.85132,-0.8577,-0.86392,-0.87006,-0.87604,-0.88187,-0.8876,-0.89319,-0.89862,-0.90396,-0.90912,-0.91415,-0.91907,-0.92383,-0.92847,-0.93295,-0.93729,-0.9415,-0.94556,-0.94949,-0.95325,-0.95691,-0.96039,-0.96375,-0.96692,-0.97,-0.9729,-0.97565,-0.97827,-0.98074,-0.98306,-0.98523,-0.98724,-0.98914,-0.99084,-0.99243,-0.99387,-0.99515,-0.99628,-0.99725,-0.99808,-0.99875,-0.99927,-0.99966,-0.99988,-0.99997,-0.99988,-0.99966,-0.99927,-0.99875,-0.99808,-0.99725,-0.99628,-0.99515,-0.99387,-0.99243,-0.99084,-0.98914,-0.98724,-0.98523,-0.98306,-0.98074,-0.97827,-0.97565,-0.9729,-0.97,-0.96692,-0.96375,-0.96039,-0.95691,-0.95325,-0.94949,-0.94556,-0.9415,-0.93729,-0.93295,-0.92847,-0.92383,-0.91907,-0.91415,-0.90912,-0.90396,-0.89862,-0.89319,-0.8876,-0.88187,-0.87604,-0.87006,-0.86392,-0.8577,-0.85132,-0.84482,-0.8382,-0.83142,-0.82455,-0.81754,-0.81042,-0.80316,-0.79581,-0.7883,-0.7807,-0.77298,-0.76514,-0.75717,-0.74908,-0.74091,-0.7326,-0.72421,-0.7157,-0.70706,-0.69833,-0.68951,-0.68057,-0.67151,-0.66238,-0.65314,-0.6438,-0.63437,-0.62482,-0.6152,-0.60547,-0.59567,-0.58575,-0.57578,-0.5657,-0.55554,-0.54529,-0.53497,-0.52457,-0.51407,-0.50351,-0.49286,-0.48215,-0.47137,-0.46051,-0.44958,-0.4386,-0.42752,-0.41641,-0.40521,-0.39395,-0.38266,-0.37128,-0.35986,-0.34839,-0.33685,-0.32529,-0.31366,-0.30197,-0.29025,-0.2785,-0.26669,-0.25485,-0.24295,-0.23105,-0.21909,-0.20709,-0.19507,-0.18301,-0.17093,-0.15884,-0.1467,-0.13455,-0.12241,-0.1102,-0.097992,-0.085785,-0.073547,-0.06131,-0.049042,-0.036804,-0.024536,-0.012268,0,0.012268 +}; + +void setup();//use this to do any initialisation if you want. + +void play(double *channels);//run dac! + +maxiOsc::maxiOsc(){ + phase = 0.0; +// memset(phases,0,500); +// memset(freqs,0,500); +} + +double maxiOsc::noise() { + //always the same unless you seed it. + float r = rand()/(float)RAND_MAX; + output=r*2-1; + return(output); +} + +double maxiOsc::sinewave(double frequency) { + output=sin (phase*(TWOPI)); + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); + +} + +double maxiOsc::sinebuf4(double frequency) { + double remainder; + double a,b,c,d,a1,a2,a3; + phase += 512./(samplerate/(frequency)); + if ( phase >= 511 ) phase -=512; + remainder = phase - floor(phase); + + if (phase==0) { + a=sineBuffer[(long) 512]; + b=sineBuffer[(long) phase]; + c=sineBuffer[(long) phase+1]; + d=sineBuffer[(long) phase+2]; + + } else { + a=sineBuffer[(long) phase-1]; + b=sineBuffer[(long) phase]; + c=sineBuffer[(long) phase+1]; + d=sineBuffer[(long) phase+2]; + + } + + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = double (((a3 * remainder + a2) * remainder + a1) * remainder + b); + return(output); +} + +double maxiOsc::sinebuf(double frequency) { + double remainder=0.0; + phase += 512./(samplerate/(frequency*chandiv)); + if ( phase >= 511.0 ) phase -=512.0; + remainder = phase - floor(phase); + output = (double) ((1-remainder) * sineBuffer[1+ (long) phase] + remainder * sineBuffer[2+(long) phase]); + return(output); +} + +double maxiOsc::coswave(double frequency) { + output=cos (phase*(TWOPI)); + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); + +} + +double maxiOsc::phasor(double frequency) { + output=phase; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); +} + +double maxiOsc::square(double frequency) { + if (phase<0.5) output=-1; + if (phase>0.5) output=1; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); +} + +double maxiOsc::pulse(double frequency, double duty) { + if (duty<0.) duty=0; + if (duty>1.) duty=1; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + if (phase<duty) output=-1.; + if (phase>duty) output=1.; + return(output); +} + +double maxiOsc::phasor(double frequency, double startphase, double endphase) { + output=phase; + if (phase<startphase) { + phase=startphase; + } + if ( phase >= endphase ) phase = startphase; + phase += ((endphase-startphase)/(samplerate/(frequency))); + return(output); +} + + +double maxiOsc::saw(double frequency) { + + output=phase; + if ( phase >= 1.0 ) phase -= 2.0; + phase += (1./(samplerate/(frequency))); + return(output); + +} + +double maxiOsc::triangle(double frequency, double phase) { + output=tri*2; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency*chandiv))); + if (phase <= 0.5 ) { + tri = phase; + } else { + tri =(1-phase); + } + return(output); + +} + + +//I like this. +double maxiEnvelope::line(int numberofsegments,double segments[1000]) { + period=2./(segments[valindex+1]*0.004); + nextval=segments[valindex+2]; + currentval=segments[valindex]; + if (currentval-amplitude > 0.0000001 && valindex < numberofsegments) { + amplitude += ((currentval-startval)/(samplerate/period)); + } else if (currentval-amplitude < -0.0000001 && valindex < numberofsegments) { + amplitude -= (((currentval-startval)*(-1))/(samplerate/period)); + } else if (valindex >numberofsegments-1) { + valindex=numberofsegments-2; + } else { + valindex=valindex+2; + startval=currentval; + } + output=amplitude; + return(output); +} + +//and this +void maxiEnvelope::trigger(int index,double amp) { + valindex=index; + amplitude=amp; + +} + +//and this +double maxiDelayline::dl(double input, int size, double feedback) { + if ( phase >=size ) phase = 0; + memory[phase]=(memory[phase]*feedback)+(input*feedback)*0.5; + phase+=1; + output=memory[phase+1]; + return(output); + +} + +double maxiDelayline::dl(double input, int size, double feedback, int position) { + if ( phase >=size ) phase = 0; + if ( position >=size ) position = 0; + memory[phase]=(memory[phase]*feedback)+(input*feedback)*chandiv; + phase+=1; + output=memory[position]; + return(output); + +} + +//I particularly like these. cutoff between 0 and 1 +double maxiFilter::lopass(double input, double cutoff) { + output=outputs[0] + cutoff*(input-outputs[0]); + outputs[0]=output; + return(output); +} +//as above +double maxiFilter::hipass(double input, double cutoff) { + output=input-(outputs[0] + cutoff*(input-outputs[0])); + outputs[0]=output; + return(output); +} +//awesome. cuttof is freq in hz. res is between 1 and whatever. Watch out! +double maxiFilter::lores(double input,double cutoff1, double resonance) { + cutoff=cutoff1*0.5; + if (cutoff>(samplerate*0.25)) cutoff=(samplerate*0.25); + if (resonance<1.) resonance = 1.; + z=cos(TWOPI*cutoff/samplerate); + c=2-2*z; + double r=(sqrt(2.0)*sqrt(-pow((z-1),3.0))+resonance*(z-1))/(resonance*(z-1)); + x=x+(input-y)*c; + y=y+x; + x=x*r; + output=y; + return(output); +} + +//this is just stupid. Kindof works. +double maxiFilter::hires(double input,double cutoff1, double resonance) { + cutoff=cutoff1*0.5; + if (cutoff>(samplerate*0.25)) cutoff=(samplerate*0.25); + if (resonance<1.) resonance = 1.; + z=cos(TWOPI*cutoff/samplerate); + c=2-2*z; + double r=(sqrt(2.0)*sqrt(-pow((z-1),3.0))+resonance*(z-1))/(resonance*(z-1)); + x=x+(input-y)*c; + y=y+x; + x=x*r; + output=input-y; + return(output); +} + +//This works a bit. Needs attention. +double maxiFilter::bandpass(double input,double cutoff1, double resonance) { + cutoff=cutoff1; + if (cutoff>(samplerate*0.5)) cutoff=(samplerate*0.5); + if (resonance>=1.) resonance=0.999999; + z=cos(TWOPI*cutoff/samplerate); + inputs[0] = (1-resonance)*(sqrt(resonance*(resonance-4*pow(z,2)+2)+1)); + inputs[1] = 2*z*resonance; + inputs[2] = pow((resonance*-1),2); + + output=inputs[0]*input+inputs[1]*outputs[1]+inputs[2]*outputs[2]; + outputs[2]=outputs[1]; + outputs[1]=output; + return(output); +} + +//stereo bus +double *maxiMix::stereo(double input,double two[2],double x) { + if (x>1) x=1; + if (x<0) x=0; + two[0]=input*sqrt(1-x); + two[1]=input*sqrt(x); + return(two); +} + +//quad bus +double *maxiMix::quad(double input,double four[4],double x,double y) { + if (x>1) x=1; + if (x<0) x=0; + if (y>1) y=1; + if (y<0) y=0; + four[0]=input*sqrt((1-x)*y); + four[1]=input*sqrt((1-x)*(1-y)); + four[2]=input*sqrt(x*y); + four[3]=input*sqrt(x*(1-y)); + return(four); +} + +//ambisonic bus +double *maxiMix::ambisonic(double input,double eight[8],double x,double y,double z) { + if (x>1) x=1; + if (x<0) x=0; + if (y>1) y=1; + if (y<0) y=0; + if (z>1) y=1; + if (z<0) y=0; + eight[0]=input*(sqrt((1-x)*y)*1-z); + eight[1]=input*(sqrt((1-x)*(1-y))*1-z); + eight[2]=input*(sqrt(x*y)*1-z); + eight[3]=input*(sqrt(x*(1-y))*1-z); + eight[4]=input*(sqrt((1-x)*y)*z); + eight[5]=input*(sqrt((1-x)*(1-y))*z); + eight[6]=input*sqrt((x*y)*z); + eight[7]=input*sqrt((x*(1-y))*z); + return(eight); +} + + +bool maxiSample::load(string fileName) { + myPath = ofToDataPath(fileName); + return read(); +} + +double maxiSample::play() { + long length=myDataSize*(1./myChannels); + double remainder; + short* buffer = (short *)myData; + position=(position+1); + remainder = position - (long) position; + if ((long) position>length) position=0; + output = (double) ((1-remainder) * buffer[1+ (long) position] + remainder * buffer[2+(long) position])/32767;//linear interpolation + return(output); +} + +double maxiSample::play(double speed) { + double remainder; + long a,b; +// long length=myDataSize*0.5; + short* buffer = (short *)myData; + position=position+((speed*chandiv*myChannels)/(samplerate/mySampleRate)); + if (speed >=0) { + + if ((long) position>=length-1) position=1; + remainder = position - floor(position); + if (position+1<length) { + a=position+1; + + } + else { + a=length-1; + } + if (position+2<length) + { + b=position+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation +} else { + if ((long) position<0) position=length; + remainder = position - floor(position); + if (position-1>=0) { + a=position-1; + + } + else { + a=0; + } + if (position-2>=0) { + b=position-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } + return(output); +} + +double maxiSample::play(double frequency, double start, double end) { + double remainder; +// long length=myDataSize; + if (end>=length) end=length-1; + long a,b; + short* buffer = (short *)myData; + if (frequency >0.) { + if (position<start) { + position=start; + } + + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos+1<length) { + a=pos+1; + + } + else { + a=pos-1; + } + if (pos+2<length) { + b=pos+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos-1>=0) { + a=pos-1; + } + else { + a=0; + } + if (pos-2>=0) { + b=pos-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + + } + + return(output); +} + +//better cubic inerpolation. Cobbled together from various (pd externals, yehar, other places). +double maxiSample::play4(double frequency, double start, double end) { + double remainder; + double a,b,c,d,a1,a2,a3; + short* buffer = (short*)myData; + if (frequency >0.) { + if (position<start) { + position=start; + } + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>0) { + a=buffer[(int)(floor(position))-1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position<end-2) { + c=buffer[(long) position+1]; + + } else { + c=buffer[0]; + + } + if (position<end-3) { + d=buffer[(long) position+2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * remainder + a1) * remainder + b) / 32767; + + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>start && position < end-1) { + a=buffer[(long) position+1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position>start) { + c=buffer[(long) position-1]; + + } else { + c=buffer[0]; + + } + if (position>start+1) { + d=buffer[(long) position-2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * -remainder + a1) * -remainder + b) / 32767; + + } + + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,long length) { + double remainder; + short* buffer = (short *)bufferin; + position=(position+1); + remainder = position - (long) position; + if ((long) position>length) position=0; + output = (double) ((1-remainder) * buffer[1+ (long) position] + remainder * buffer[2+(long) position])/32767;//linear interpolation + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,double speed,long length) { + double remainder; + long a,b; + short* buffer = (short *)bufferin; + position=position+((speed*chandiv*myChannels)/(samplerate/mySampleRate)); + if (speed >=0) { + + if ((long) position>=length-1) position=1; + remainder = position - floor(position); + if (position+1<length) { + a=position+1; + + } + else { + a=length-1; + } + if (position+2<length) + { + b=position+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } else { + if ((long) position<0) position=length; + remainder = position - floor(position); + if (position-1>=0) { + a=position-1; + + } + else { + a=0; + } + if (position-2>=0) { + b=position-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,double frequency, double start, double end) { + double remainder; + length=end; + long a,b; + short* buffer = (short *)bufferin; + if (frequency >0.) { + if (position<start) { + position=start; + } + + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos+1<length) { + a=pos+1; + + } + else { + a=pos-1; + } + if (pos+2<length) { + b=pos+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos-1>=0) { + a=pos-1; + } + else { + a=0; + } + if (pos-2>=0) { + b=pos-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + + } + + return(output); +} + +//better cubic inerpolation. Cobbled together from various (pd externals, yehar, other places). +double maxiSample::bufferPlay4(unsigned char &bufferin,double frequency, double start, double end) { + double remainder; + double a,b,c,d,a1,a2,a3; + short* buffer = (short*)bufferin; + if (frequency >0.) { + if (position<start) { + position=start; + } + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>0) { + a=buffer[(int)(floor(position))-1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position<end-2) { + c=buffer[(long) position+1]; + + } else { + c=buffer[0]; + + } + if (position<end-3) { + d=buffer[(long) position+2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * remainder + a1) * remainder + b) / 32767; + + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>start && position < end-1) { + a=buffer[(long) position+1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position>start) { + c=buffer[(long) position-1]; + + } else { + c=buffer[0]; + + } + if (position>start+1) { + d=buffer[(long) position-2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * -remainder + a1) * -remainder + b) / 32767; + + } + + return(output); +} + + +void maxiSample::getLength() { + length=myDataSize*0.5; +} + + diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.h b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.h new file mode 100755 index 0000000..e12297e --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.h @@ -0,0 +1,321 @@ +/* + * maximilian.h + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef MAXIMILIAN_H +#define MAXIMILIAN_H + +//#define MAXIMILIAN_PORTAUDIO +#define MAXIMILIAN_RT_AUDIO + +#include "ofMain.h" +#include "ofUtils.h" + + +#include <iostream> +#include <fstream> +#include <string> +#include <cstdlib> + +using namespace std; +#define TWOPI 3.14159*2 + +class maxiOsc { + + double frequency; + double phase; + double startphase; + double endphase; + double output; + double tri; + + +public: + maxiOsc(); + double sinewave(double frequency); + double coswave(double frequency); + double phasor(double frequency); + double phasor(double frequency, double startphase, double endphase); + double saw(double frequency); + double triangle(double frequency,double phase); + double square(double frequency); + double pulse(double frequency, double duty); + double additive(unsigned int waves, double freq1[100]); + double noise(); + double sinebuf(double frequency); + double sinebuf4(double frequency); + +}; + + +class maxiEnvelope { + + double period; + double output; + double startval; + double currentval; + double nextval; + +public: + double line(int numberofsegments,double segments[100]); + void trigger(int index,double amp); + int valindex; + double amplitude; + +}; + + +class maxiDelayline { + double frequency; + int phase; + double startphase; + double endphase; + double output; + double memory[88200]; + +public: + double dl(double input, int size, double feedback); + double dl(double input, int size, double feedback, int position); + + +}; + + +class maxiFilter { + double gain; + double input; + double output; + double inputs[10]; + double outputs[10]; + double cutoff1; + double x;//speed + double y;//pos + double z;//pole + double c;//filter coefficient +public: + double cutoff; + double resonance; + double lores(double input,double cutoff1, double resonance); + double hires(double input,double cutoff1, double resonance); + double bandpass(double input,double cutoff1, double resonance); + double lopass(double input,double cutoff); + double hipass(double input,double cutoff); + +}; + +class maxiMix { + double input; + double two[2]; + double four[4]; + double eight[8]; +public: + double x; + double y; + double z; + double *stereo(double input,double two[2],double x); + double *quad(double input,double four[4], double x,double y); + double *ambisonic(double input,double eight[8],double x,double y, double z); + +}; + + +class maxiSample { + +private: + string myPath; + int myChunkSize; + int mySubChunk1Size; + short myFormat; + short myChannels; + int mySampleRate; + int myByteRate; + short myBlockAlign; + short myBitsPerSample; + int myDataSize; + double position; + double speed; + double output; + +public: + long length; + void getLength(); + + char* myData; + + // get/set for the Path property + + ~maxiSample() + { + delete myData; + myChunkSize = NULL; + mySubChunk1Size = NULL; + myFormat = NULL; + myChannels = NULL; + mySampleRate = NULL; + myByteRate = NULL; + myBlockAlign = NULL; + myBitsPerSample = NULL; + myDataSize = NULL; + } + +// maxiSample(); + + bool load(string fileName); + + // read a wav file into this class + bool read() + { + bool result; + ifstream inFile( myPath.c_str(), ios::in | ios::binary); + result = inFile > 0; + //printf("Reading wav file...\n"); // for debugging only + + inFile.seekg(4, ios::beg); + inFile.read( (char*) &myChunkSize, 4 ); // read the ChunkSize + + inFile.seekg(16, ios::beg); + inFile.read( (char*) &mySubChunk1Size, 4 ); // read the SubChunk1Size + + //inFile.seekg(20, ios::beg); + inFile.read( (char*) &myFormat, sizeof(short) ); // read the file format. This should be 1 for PCM + + //inFile.seekg(22, ios::beg); + inFile.read( (char*) &myChannels, sizeof(short) ); // read the # of channels (1 or 2) + + //inFile.seekg(24, ios::beg); + inFile.read( (char*) &mySampleRate, sizeof(int) ); // read the samplerate + + //inFile.seekg(28, ios::beg); + inFile.read( (char*) &myByteRate, sizeof(int) ); // read the byterate + + //inFile.seekg(32, ios::beg); + inFile.read( (char*) &myBlockAlign, sizeof(short) ); // read the blockalign + + //inFile.seekg(34, ios::beg); + inFile.read( (char*) &myBitsPerSample, sizeof(short) ); // read the bitspersample + + inFile.seekg(40, ios::beg); + inFile.read( (char*) &myDataSize, sizeof(int) ); // read the size of the data + + + // read the data chunk + myData = new char[myDataSize]; + inFile.seekg(44, ios::beg); + inFile.read(myData, myDataSize); + length=myDataSize*(0.5/myChannels); + + inFile.close(); // close the input file + + return result; // this should probably be something more descriptive + } + + + double play(); + + double play(double speed); + + double play(double frequency, double start, double end); + + double play4(double frequency, double start, double end); + + double bufferPlay(unsigned char &bufferin,long length); + + double bufferPlay(unsigned char &bufferin,double speed,long length); + + double bufferPlay(unsigned char &bufferin,double frequency, double start, double end); + + double bufferPlay4(unsigned char &bufferin,double frequency, double start, double end); + + //int open(char *filename) { + // // open the wav file + // char *path = new char[50]; + // strcpy(path, filename); + // sample *myWav = new sample(path); + // return 0; + // } + // // print a summary of the wav file + // int info() { + // char *summary = myWav->getSummary(); + // printf("Summary:\n%s", summary); + // return 0; + // } + // int savefile() { + // // write the summary back out + // strcpy(path, "testout.wav"); + // myWav->setPath(path); + // myWav->save(); + // return 0: + // } + // int close() { + // // collect the garbage + // delete summary; + // delete path; + // delete myWav; + // + // return 0; + // } + // write out the wav file + bool save() + { + fstream myFile (myPath.c_str(), ios::out | ios::binary); + + // write the wav file per the wav file format + myFile.seekp (0, ios::beg); + myFile.write ("RIFF", 4); + myFile.write ((char*) &myChunkSize, 4); + myFile.write ("WAVE", 4); + myFile.write ("fmt ", 4); + myFile.write ((char*) &mySubChunk1Size, 4); + myFile.write ((char*) &myFormat, 2); + myFile.write ((char*) &myChannels, 2); + myFile.write ((char*) &mySampleRate, 4); + myFile.write ((char*) &myByteRate, 4); + myFile.write ((char*) &myBlockAlign, 2); + myFile.write ((char*) &myBitsPerSample, 2); + myFile.write ("data", 4); + myFile.write ((char*) &myDataSize, 4); + myFile.write (myData, myDataSize); + + return true; + } + + // return a printable summary of the wav file + char *getSummary() + { + char *summary = new char[250]; + sprintf(summary, " Format: %d\n Channels: %d\n SampleRate: %d\n ByteRate: %d\n BlockAlign: %d\n BitsPerSample: %d\n DataSize: %d\n", myFormat, myChannels, mySampleRate, myByteRate, myBlockAlign, myBitsPerSample, myDataSize); + std::cout << myDataSize; + return summary; + } +}; + + +#endif diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/testApp.cpp b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/testApp.cpp new file mode 100755 index 0000000..0d02a2f --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/testApp.cpp @@ -0,0 +1,162 @@ +/* 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 "testApp.h" +#include "maximilian.h"/* include the lib */ + + + +//------------------------------------------------------------- +testApp::~testApp() { + + delete beat.myData; /*you should probably delete myData for any sample object + that you've created in testApp.h*/ + +} + + +//-------------------------------------------------------------- +void testApp::setup(){ + /* some standard setup stuff*/ + + ofEnableAlphaBlending(); + ofSetupScreen(); + ofBackground(0, 0, 0); + + /* This is stuff you always need.*/ + + sampleRate = 44100; /* Sampling Rate */ + initialBufferSize = 512; /* Buffer Size. you have to fill this buffer with sound*/ + lAudioOut = new float[initialBufferSize];/* outputs */ + rAudioOut = new float[initialBufferSize]; + lAudioIn = new float[initialBufferSize];/* inputs */ + rAudioIn = new float[initialBufferSize]; + + + /* This is a nice safe piece of code */ + memset(lAudioOut, 0, initialBufferSize * sizeof(float)); + memset(rAudioOut, 0, initialBufferSize * sizeof(float)); + + memset(lAudioIn, 0, initialBufferSize * sizeof(float)); + memset(rAudioIn, 0, initialBufferSize * sizeof(float)); + + /* Now you can put anything you would normally put in maximilian's 'setup' method in here. */ + + + beat.load("beat2.wav"); + beat.getLength(); + + + + ofSoundStreamSetup(2,0,this, sampleRate, initialBufferSize, 4);/* Call this last ! */ +} + +//-------------------------------------------------------------- +void testApp::update(){ + +} + +//-------------------------------------------------------------- +void testApp::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(255, 255, 255,255); + ofRect(600, 300, sample*150, sample*150); /* audio sigs go between -1 and 1. See?*/ + ofCircle(200, 300, wave*150); + + +} + +//-------------------------------------------------------------- +void testApp::audioRequested (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'. + + */ + + sample=beat.play(0.5, 0, beat.length); + wave=sine1.sinebuf(440);/* mouse controls sinewave pitch. we get abs value to stop it dropping + //delow zero and killing the soundcard*/ + + mymix.stereo((wave+sample)/2.0, outputs, 0.5); + + + lAudioOut[i] = output[i*nChannels ] = outputs[0]; /* You may end up with lots of outputs. add them here */ + rAudioOut[i] = output[i*nChannels + 1] = outputs[1]; + } + +} + +//-------------------------------------------------------------- +void testApp::audioReceived (float * input, int bufferSize, int nChannels){ + + + /* You can just grab this input and stick it in a double, then use it above to create output*/ + + for (int i = 0; i < bufferSize; i++){ + + /* you can also grab the data out of the arrays*/ + + lAudioIn[i] = input[i*2]; + rAudioIn[i] = input[i*2+1]; + } + +} + +//-------------------------------------------------------------- +void testApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void testApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void testApp::mouseMoved(int x, int y ){ + + + +} + +//-------------------------------------------------------------- +void testApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::windowResized(int w, int h){ + +} + diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/testApp.h b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/testApp.h new file mode 100755 index 0000000..132a3a1 --- /dev/null +++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/testApp.h @@ -0,0 +1,47 @@ +#ifndef _TEST_APP +#define _TEST_APP + + +#include "ofMain.h" +#include "maximilian.h"/* you need this*/ + + +class testApp : public ofBaseApp{ + + public: + ~testApp();/* deconsructor is very useful */ + 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 audioRequested (float * input, int bufferSize, int nChannels); /* output method */ + void audioReceived (float * input, int bufferSize, int nChannels); /* input method */ + + float * lAudioOut; /* outputs */ + float * rAudioOut; + + float * lAudioIn; /* inputs */ + float * rAudioIn; + + int initialBufferSize; /* buffer size */ + int sampleRate; + + + /* stick you maximilian stuff below */ + + double wave,sample,outputs[2]; + maxiMix mymix; + maxiOsc sine1; + maxiSample beats,beat; + +}; + +#endif diff --git a/ofxMaxim/ofxMaxim/install.xml b/ofxMaxim/ofxMaxim/install.xml new file mode 100644 index 0000000..58923be --- /dev/null +++ b/ofxMaxim/ofxMaxim/install.xml @@ -0,0 +1,35 @@ +<install> + <version>0.1</version> + <author>Goldsmiths Creative Computing</author> + <url>http://www.maximilian.strangeloop.co.uk/</url> + <requires></requires> + + + <add> + <!-- ===================================================================== --> + <!-- ========================== add per project using this addon ========= --> + <!-- ===================================================================== --> + + <src> + + <folder name="addons/ofxMaxim/src"> + <file>../../../addons/ofxMaxim/src/ofxMaxim.h</file> + </folder> + + <folder name="addons/ofxMaxim/libs"> + <file>../../../addons/ofxMaxim/libs/fft.h</file> + <file>../../../addons/ofxMaxim/libs/fft.cpp</file> + <file>../../../addons/ofxMaxim/libs/fftOctaveAnalyzer.h</file> + <file>../../../addons/ofxMaxim/libs/fftOctaveAnalyzer.cpp</file> + <file>../../../addons/ofxMaxim/libs/maximilian.h</file> + <file>../../../addons/ofxMaxim/libs/maximilian.cpp</file> + </folder> + + </src> + + <include> + <path>../../../addons/ofxMaxim/src</path> + <path>../../../addons/ofxMaxim/libs</path> + </include> + </add> +</install>
\ No newline at end of file diff --git a/ofxMaxim/ofxMaxim/libs/fft.cpp b/ofxMaxim/ofxMaxim/libs/fft.cpp new file mode 100644 index 0000000..3f13bd2 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/fft.cpp @@ -0,0 +1,608 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ +/* + + fft.cpp + + Based on K+R Numerical recipes in C and some other stuff hacked about. + + */ + +#include "fft.h" +#include <stdlib.h> +#include <stdio.h> +#include <math.h> +#include <string.h> + +int **gFFTBitTable = NULL; +const int MaxFastBits = 16; + +int IsPowerOfTwo(int x) +{ + if (x < 2) + return false; + + if (x & (x - 1)) + return false; + + return true; +} + +int NumberOfBitsNeeded(int PowerOfTwo) +{ + int i; + + if (PowerOfTwo < 2) { + fprintf(stderr, "Error: FFT called with size %d\n", PowerOfTwo); + exit(1); + } + + for (i = 0;; i++) + if (PowerOfTwo & (1 << i)) + return i; +} + +int ReverseBits(int index, int NumBits) +{ + int i, rev; + + for (i = rev = 0; i < NumBits; i++) { + rev = (rev << 1) | (index & 1); + index >>= 1; + } + + return rev; +} + +void InitFFT() +{ +// gFFTBitTable = new int *[MaxFastBits]; + //use malloc for 16 byte alignment + gFFTBitTable = (int**) malloc(MaxFastBits * sizeof(int*)); + + int len = 2; + for (int b = 1; b <= MaxFastBits; b++) { + +// gFFTBitTable[b - 1] = new int[len]; + gFFTBitTable[b - 1] = (int*) malloc(len * sizeof(int)); + + for (int i = 0; i < len; i++) + gFFTBitTable[b - 1][i] = ReverseBits(i, b); + + len <<= 1; + } +} + +inline int FastReverseBits(int i, int NumBits) +{ + if (NumBits <= MaxFastBits) + return gFFTBitTable[NumBits - 1][i]; + else + return ReverseBits(i, NumBits); +} + +/* + * Complex Fast Fourier Transform + */ + +void FFT(int NumSamples, + bool InverseTransform, + float *RealIn, float *ImagIn, float *RealOut, float *ImagOut) +{ + int NumBits; /* Number of bits needed to store indices */ + int i, j, k, n; + int BlockSize, BlockEnd; + + double angle_numerator = 2.0 * M_PI; + float tr, ti; /* temp real, temp imaginary */ + + if (!IsPowerOfTwo(NumSamples)) { + fprintf(stderr, "%d is not a power of two\n", NumSamples); + exit(1); + } + + if (!gFFTBitTable) + InitFFT(); + + if (InverseTransform) + angle_numerator = -angle_numerator; + + NumBits = NumberOfBitsNeeded(NumSamples); + + /* + ** Do simultaneous data copy and bit-reversal ordering into outputs... + */ + + for (i = 0; i < NumSamples; i++) { + j = FastReverseBits(i, NumBits); + RealOut[j] = RealIn[i]; + ImagOut[j] = (ImagIn == NULL) ? 0.0 : ImagIn[i]; + } + + /* + ** Do the FFT itself... + */ + + BlockEnd = 1; + for (BlockSize = 2; BlockSize <= NumSamples; BlockSize <<= 1) { + + double delta_angle = angle_numerator / (double) BlockSize; + + float sm2 = sin(-2 * delta_angle); + float sm1 = sin(-delta_angle); + float cm2 = cos(-2 * delta_angle); + float cm1 = cos(-delta_angle); + float w = 2 * cm1; + float ar0, ar1, ar2, ai0, ai1, ai2; + + for (i = 0; i < NumSamples; i += BlockSize) { + ar2 = cm2; + ar1 = cm1; + + ai2 = sm2; + ai1 = sm1; + + for (j = i, n = 0; n < BlockEnd; j++, n++) { + ar0 = w * ar1 - ar2; + ar2 = ar1; + ar1 = ar0; + + ai0 = w * ai1 - ai2; + ai2 = ai1; + ai1 = ai0; + + k = j + BlockEnd; + tr = ar0 * RealOut[k] - ai0 * ImagOut[k]; + ti = ar0 * ImagOut[k] + ai0 * RealOut[k]; + + RealOut[k] = RealOut[j] - tr; + ImagOut[k] = ImagOut[j] - ti; + + RealOut[j] += tr; + ImagOut[j] += ti; + } + } + + BlockEnd = BlockSize; + } + + /* + ** Need to normalize if inverse transform... + */ + + if (InverseTransform) { + float denom = (float) NumSamples; + + for (i = 0; i < NumSamples; i++) { + RealOut[i] /= denom; + ImagOut[i] /= denom; + } + } +} + +/* + * Real Fast Fourier Transform + * + * This function was based on the code in Numerical Recipes in C. + * In Num. Rec., the inner loop is based on a single 1-based array + * of interleaved real and imaginary numbers. Because we have two + * separate zero-based arrays, our indices are quite different. + * Here is the correspondence between Num. Rec. indices and our indices: + * + * i1 <-> real[i] + * i2 <-> imag[i] + * i3 <-> real[n/2-i] + * i4 <-> imag[n/2-i] + */ + +void RealFFT(int NumSamples, float *RealIn, float *RealOut, float *ImagOut) +{ + int Half = NumSamples / 2; + int i; + + float theta = M_PI / Half; + + float *tmpReal = (float*) malloc(Half * sizeof(float)); + float *tmpImag = (float*) malloc(Half * sizeof(float)); + + for (i = 0; i < Half; i++) { + tmpReal[i] = RealIn[2 * i]; + tmpImag[i] = RealIn[2 * i + 1]; + } + + FFT(Half, 0, tmpReal, tmpImag, RealOut, ImagOut); + + float wtemp = float (sin(0.5 * theta)); + + float wpr = -2.0 * wtemp * wtemp; + float wpi = float (sin(theta)); + float wr = 1.0 + wpr; + float wi = wpi; + + int i3; + + float h1r, h1i, h2r, h2i; + + for (i = 1; i < Half / 2; i++) { + + i3 = Half - i; + + h1r = 0.5 * (RealOut[i] + RealOut[i3]); + h1i = 0.5 * (ImagOut[i] - ImagOut[i3]); + h2r = 0.5 * (ImagOut[i] + ImagOut[i3]); + h2i = -0.5 * (RealOut[i] - RealOut[i3]); + + RealOut[i] = h1r + wr * h2r - wi * h2i; + ImagOut[i] = h1i + wr * h2i + wi * h2r; + RealOut[i3] = h1r - wr * h2r + wi * h2i; + ImagOut[i3] = -h1i + wr * h2i + wi * h2r; + + wr = (wtemp = wr) * wpr - wi * wpi + wr; + wi = wi * wpr + wtemp * wpi + wi; + } + + RealOut[0] = (h1r = RealOut[0]) + ImagOut[0]; + ImagOut[0] = h1r - ImagOut[0]; + + delete[]tmpReal; + delete[]tmpImag; +} + +/* + * PowerSpectrum + * + * This function computes the same as RealFFT, above, but + * adds the squares of the real and imaginary part of each + * coefficient, extracting the power and throwing away the + * phase. + * + * For speed, it does not call RealFFT, but duplicates some + * of its code. + */ + +void PowerSpectrum(int NumSamples, float *In, float *Out) +{ + int Half = NumSamples / 2; + int i; + + float theta = M_PI / Half; + + float *tmpReal = new float[Half]; + float *tmpImag = new float[Half]; + float *RealOut = new float[Half]; + float *ImagOut = new float[Half]; + + for (i = 0; i < Half; i++) { + tmpReal[i] = In[2 * i]; + tmpImag[i] = In[2 * i + 1]; + } + + FFT(Half, 0, tmpReal, tmpImag, RealOut, ImagOut); + + float wtemp = float (sin(0.5 * theta)); + + float wpr = -2.0 * wtemp * wtemp; + float wpi = float (sin(theta)); + float wr = 1.0 + wpr; + float wi = wpi; + + int i3; + + float h1r, h1i, h2r, h2i, rt, it; + //float total=0; + + for (i = 1; i < Half / 2; i++) { + + i3 = Half - i; + + h1r = 0.5 * (RealOut[i] + RealOut[i3]); + h1i = 0.5 * (ImagOut[i] - ImagOut[i3]); + h2r = 0.5 * (ImagOut[i] + ImagOut[i3]); + h2i = -0.5 * (RealOut[i] - RealOut[i3]); + + rt = h1r + wr * h2r - wi * h2i; //printf("Realout%i = %f",i,rt);total+=fabs(rt); + it = h1i + wr * h2i + wi * h2r; // printf(" Imageout%i = %f\n",i,it); + + Out[i] = rt * rt + it * it; + + rt = h1r - wr * h2r + wi * h2i; + it = -h1i + wr * h2i + wi * h2r; + + Out[i3] = rt * rt + it * it; + + wr = (wtemp = wr) * wpr - wi * wpi + wr; + wi = wi * wpr + wtemp * wpi + wi; + } + //printf("total = %f\n",total); + rt = (h1r = RealOut[0]) + ImagOut[0]; + it = h1r - ImagOut[0]; + Out[0] = rt * rt + it * it; + + rt = RealOut[Half / 2]; + it = ImagOut[Half / 2]; + Out[Half / 2] = rt * rt + it * it; + + delete[]tmpReal; + delete[]tmpImag; + delete[]RealOut; + delete[]ImagOut; +} + +/* + * Windowing Functions + */ + +int NumWindowFuncs() +{ + return 4; +} + +char *WindowFuncName(int whichFunction) +{ + switch (whichFunction) { + default: + case 0: + return "Rectangular"; + case 1: + return "Bartlett"; + case 2: + return "Hamming"; + case 3: + return "Hanning"; + } +} + +void WindowFunc(int whichFunction, int NumSamples, float *in) +{ + int i; + + if (whichFunction == 1) { + // Bartlett (triangular) window + for (i = 0; i < NumSamples / 2; i++) { + in[i] *= (i / (float) (NumSamples / 2)); + in[i + (NumSamples / 2)] *= + (1.0 - (i / (float) (NumSamples / 2))); + } + } + + if (whichFunction == 2) { + // Hamming + for (i = 0; i < NumSamples; i++) + in[i] *= 0.54 - 0.46 * cos(2 * M_PI * i / (NumSamples - 1)); + } + + if (whichFunction == 3) { + // Hanning + for (i = 0; i < NumSamples; i++) + in[i] *= 0.50 - 0.50 * cos(2 * M_PI * i / (NumSamples - 1)); + } +} + +void fft::genWindow(int whichFunction, int NumSamples, float *window) +{ + int i; + + if (whichFunction == 1) { + // Bartlett (triangular) window + for (i = 0; i < NumSamples / 2; i++) { + window[i] = (i / (float) (NumSamples / 2)); + window[i + (NumSamples / 2)] = + (1.0 - (i / (float) (NumSamples / 2))); + } + } + + if (whichFunction == 2) { + // Hamming + for (i = 0; i < NumSamples; i++) + window[i] = 0.54 - 0.46 * cos(2 * M_PI * i / (NumSamples - 1)); + } + + if (whichFunction == 3) { + // Hanning + for (i = 0; i < NumSamples; i++) + window[i] = 0.50 - 0.50 * cos(2 * M_PI * i / (NumSamples - 1)); + } +} + +/* constructor */ +fft::fft(int fftSize) { + n = fftSize; + half = fftSize / 2; + //use malloc for 16 byte alignment + in_real = (float *) malloc(n * sizeof(float)); + in_img = (float *) malloc(n * sizeof(float)); + out_real = (float *) malloc(n * sizeof(float)); + out_img = (float *) malloc(n * sizeof(float)); + +#ifdef __APPLE_CC__ + log2n = log2(n); + A.realp = (float *) malloc(half * sizeof(float)); + A.imagp = (float *) malloc(half * sizeof(float)); + setupReal = vDSP_create_fftsetup(log2n, FFT_RADIX2); + if (setupReal == NULL) { + printf("\nFFT_Setup failed to allocate enough memory for" + "the real FFT.\n"); + } + polar = (float *) malloc(n * sizeof(float)); +#endif +} + +/* destructor */ +fft::~fft() { + delete[] in_real, out_real, in_img, out_img; +#ifdef __APPLE_CC__ + vDSP_destroy_fftsetup(setupReal); + delete[] A.realp; + delete[] A.imagp; + delete[] polar; +#endif + +} + +/* Calculate the power spectrum */ +void fft::powerSpectrum(int start, float *data, float *window, float *magnitude,float *phase) { + int i; + + //windowing + for (i = 0; i < n; i++) { + in_real[i] = data[start + i] * window[i]; + } + + + RealFFT(n, in_real, out_real, out_img); + + for (i = 0; i < half; i++) { + /* compute power */ + float power = out_real[i]*out_real[i] + out_img[i]*out_img[i]; + /* compute magnitude and phase */ + magnitude[i] = sqrt(power); + phase[i] = atan2(out_img[i],out_real[i]); + +// if (magnitude[i] < 0.000001){ // less than 0.1 nV +// magnitude[i] = 0; // out of range +// } else { +// magnitude[i] = 20.0*log10(magnitude[i] + 1); // get to to db scale +// } + } + +} + +void fft::convToDB(float *in, float *out) { + for (int i = 0; i < half; i++) { + if (in[i] < 0.000001){ // less than 0.1 nV + out[i] = 0; // out of range + } else { + out[i] = 20.0*log10(in[i] + 1); // get to to db scale + } + } +} + + +#ifdef __APPLE_CC__ + +/* Calculate the power spectrum */ +void fft::powerSpectrum_vdsp(int start, float *data, float *window, float *magnitude,float *phase) { + + uint32_t i; + + //multiply by window + vDSP_vmul(data, 1, window, 1, in_real, 1, n); + + //convert to split complex format - evens and odds + vDSP_ctoz((COMPLEX *) in_real, 2, &A, 1, half); + + + //calc fft + vDSP_fft_zrip(setupReal, &A, 1, log2n, FFT_FORWARD); + + //scale by 2 (see vDSP docs) + static float scale=0.5 ; + vDSP_vsmul(A.realp, 1, &scale, A.realp, 1, half); + vDSP_vsmul(A.imagp, 1, &scale, A.imagp, 1, half); + + //back to split complex format + vDSP_ztoc(&A, 1, (COMPLEX*) out_real, 2, half); + + //convert to polar + vDSP_polar(out_real, 2, polar, 2, half); + + for (i = 0; i < half; i++) { + magnitude[i]=polar[2*i]+1.0; + phase[i]=polar[2*i + 1]; + } + + + +} + +void fft::convToDB_vdsp(float *in, float *out) { + float ref = 1.0; + vDSP_vdbcon(in, 1, &ref, out, 1, half, 1); + //get rid of any -infs + float vmin=0.0; + float vmax=9999999.0; + vDSP_vclip(out, 1, &vmin, &vmax, out, 1, half); +} + +#endif + +void fft::inversePowerSpectrum(int start, float *finalOut, float *window, float *magnitude,float *phase) { + int i; + + /* get real and imag part */ + for (i = 0; i < half; i++) { +// float mag = pow(10.0, magnitude[i] / 20.0) - 1.0; +// in_real[i] = mag *cos(phase[i]); +// in_img[i] = mag *sin(phase[i]); + in_real[i] = magnitude[i] *cos(phase[i]); + in_img[i] = magnitude[i] *sin(phase[i]); + } + + /* zero negative frequencies */ + memset(in_real+half, half, 0.0); + memset(in_img+half, half, 0.0); + + FFT(n, 1, in_real, in_img, out_real, out_img); // second parameter indicates inverse transform + + for (i = 0; i < n; i++) { + finalOut[start + i] += out_real[i] * window[i] + ; + } + +} + + +#ifdef __APPLE_CC__ +void fft::inversePowerSpectrum_vdsp(int start, float *finalOut, float *window, float *magnitude,float *phase) { + uint32_t i; + + for (i = 0; i < half; i++) { +// polar[2*i] = pow(10.0, magnitude[i] / 20.0) - 1.0; + polar[2*i] = magnitude[i] - 1.0; + polar[2*i + 1] = phase[i]; + } + + vDSP_rect(polar, 2, in_real, 2, half); + + vDSP_ctoz((COMPLEX*) in_real, 2, &A, 1, half); + vDSP_fft_zrip(setupReal, &A, 1, log2n, FFT_INVERSE); + vDSP_ztoc(&A, 1, (COMPLEX*) out_real, 2, half); + + static float scale = 1./n; + vDSP_vsmul(out_real, 1, &scale, out_real, 1, n); + + //multiply by window + vDSP_vmul(out_real, 1, window, 1, finalOut, 1, n); + +} + +#endif diff --git a/ofxMaxim/ofxMaxim/libs/fft.h b/ofxMaxim/ofxMaxim/libs/fft.h new file mode 100644 index 0000000..f7e1947 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/fft.h @@ -0,0 +1,80 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _FFT +#define _FFT + +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + +#ifdef __APPLE_CC__ + #include <Accelerate/Accelerate.h> + #warning Please link against the Accelerate framework +#endif + + + +class fft { + +public: + + fft(int fftSize); + ~fft(); + + int n; //fftSize + int half; //halfFFTSize + + float *in_real, *out_real, *in_img, *out_img; + +#ifdef __APPLE_CC__ + int log2n; //log2(n); + FFTSetup setupReal; + COMPLEX_SPLIT A; + float *polar; + void powerSpectrum_vdsp(int start, float *data, float *window, float *magnitude,float *phase); + void inversePowerSpectrum_vdsp(int start, float *finalOut, float *window, float *magnitude,float *phase); + void convToDB_vdsp(float *in, float *out); +#endif; + + /* Calculate the power spectrum */ + void powerSpectrum(int start, float *data, float *window, float *magnitude, float *phase); + /* ... the inverse */ + void inversePowerSpectrum(int start, float *finalOut, float *window, float *magnitude,float *phase); + void convToDB(float *in, float *out); + + static void genWindow(int whichFunction, int NumSamples, float *window); + +}; + + +#endif diff --git a/ofxMaxim/ofxMaxim/libs/maxiFFT.cpp b/ofxMaxim/ofxMaxim/libs/maxiFFT.cpp new file mode 100644 index 0000000..346b653 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maxiFFT.cpp @@ -0,0 +1,290 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "maxiFFT.h" +#include "maximilian.h" +#include <iostream> +#include "math.h" + +using namespace std; + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//F F T +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void maxiFFT::setup(int _fftSize, int _windowSize, int _hopSize) { + _fft = new fft(_fftSize); + fftSize = _fftSize; + windowSize = _windowSize; + bins = fftSize / 2; + hopSize = _hopSize; + buffer = (float *) malloc(fftSize * sizeof(float)); + magnitudes = (float *) malloc(bins * sizeof(float)); + magnitudesDB = (float *) malloc(bins * sizeof(float)); + phases = (float *) malloc(bins * sizeof(float)); + avgPower = new float; + memset(buffer, 0, fftSize * sizeof(float)); + memset(magnitudes, 0, bins * sizeof(float)); + memset(magnitudesDB, 0, bins * sizeof(float)); + memset(phases, 0, bins * sizeof(float)); + *avgPower = 0; + pos =windowSize - hopSize; + newFFT = 0; + window = (float*) malloc(fftSize * sizeof(float)); + memset(window, 0, fftSize * sizeof(float)); + fft::genWindow(3, windowSize, window); +} + +bool maxiFFT::process(float value) { + //add value to buffer at current pos + buffer[pos++] = value; + //if buffer full, run fft + newFFT = pos == windowSize; + if (newFFT) { +#if defined(__APPLE_CC__) && !defined(_NO_VDSP) + _fft->powerSpectrum_vdsp(0, buffer, window, magnitudes, phases); +#else + _fft->powerSpectrum(0, buffer, window, magnitudes, phases); +#endif + //shift buffer back by one hop size + memcpy(buffer, buffer + hopSize, (windowSize - hopSize) * sizeof(float)); + //set the new data to zero (is this necessary?, it will get overwritten) + memset(buffer + windowSize - hopSize, 0, hopSize * sizeof(float)); + //reset pos to start of hop + pos= windowSize - hopSize; + } + return newFFT; +} + +float* maxiFFT::magsToDB() { +#if defined(__APPLE_CC__) && !defined(_NO_VDSP) + _fft->convToDB_vdsp(magnitudes, magnitudesDB); +#else + _fft->convToDB(magnitudes, magnitudesDB); +#endif + return magnitudesDB; +} + +float maxiFFT::spectralFlatness() { + float geometricMean=0, arithmaticMean=0; + for(int i=0; i < bins; i++) { + if (magnitudes[i] != 0) + geometricMean += log(magnitudes[i]); + arithmaticMean += magnitudes[i]; + } + geometricMean = exp(geometricMean / (float)bins); + arithmaticMean /= (float)bins; + return arithmaticMean !=0 ? geometricMean / arithmaticMean : 0; +} + +float maxiFFT::spectralCentroid() { + float x=0, y=0; + for(int i=0; i < bins; i++) { + x += fabs(magnitudes[i]) * (i+1); + y += fabs(magnitudes[i]); + } + return y != 0 ? x / y * ((float) maxiSettings::sampleRate / fftSize) : 0; +} + + + +maxiFFT::~maxiFFT() { + delete _fft; + delete[] buffer,magnitudes,phases,window; + delete avgPower; +} + + + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//I N V E R S E F F T +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void maxiIFFT::setup(int _fftSize, int _windowSize, int _hopSize) { + _fft = new fft(_fftSize); + fftSize = _fftSize; + windowSize = _windowSize; + bins = fftSize / 2; + hopSize = _hopSize; + buffer = (float *) malloc(fftSize * sizeof(float)); + ifftOut = (float *) malloc(fftSize * sizeof(float)); + memset(buffer, 0, windowSize * sizeof(float)); + pos =0; + window = (float*) malloc(fftSize * sizeof(float)); + memset(window, 0, fftSize * sizeof(float)); + fft::genWindow(3, windowSize, window); +} + +float maxiIFFT::process(float *magnitudes, float *phases) { + if (0==pos) { + //do ifft + memset(ifftOut, 0, fftSize * sizeof(float)); +#if defined(__APPLE_CC__) && !defined(_NO_VDSP) + _fft->inversePowerSpectrum_vdsp(0, ifftOut, window, magnitudes, phases); +#else + _fft->inversePowerSpectrum(0, ifftOut, window, magnitudes, phases); +#endif + //add to output + //shift back by one hop + memcpy(buffer, buffer+hopSize, (fftSize - hopSize) * sizeof(float)); + //clear the end chunk + memset(buffer + (fftSize - hopSize), 0, hopSize * sizeof(float)); + //merge new output + for(int i=0; i < fftSize; i++) { + buffer[i] += ifftOut[i]; + } + } + + nextValue = buffer[pos]; + //limit the values, this alg seems to spike occasionally (and break the audio drivers) + if (nextValue > 0.99999f) nextValue = 0.99999f; + if (nextValue < -0.99999f) nextValue = -0.99999f; + if (hopSize == ++pos ) { + pos=0; + } + + return nextValue; +} + +maxiIFFT::~maxiIFFT() { + delete _fft; + delete[] ifftOut, buffer, window; +}; + + + + + + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//O C T A V E A N A L Y S E R +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +void maxiFFTOctaveAnalyzer::setup(float samplingRate, int nBandsInTheFFT, int nAveragesPerOctave){ + + samplingRate = samplingRate; + nSpectrum = nBandsInTheFFT; + spectrumFrequencySpan = (samplingRate / 2.0f) / (float)(nSpectrum); + nAverages = nBandsInTheFFT; + // fe: 2f for octave bands, sqrt(2) for half-octave bands, cuberoot(2) for third-octave bands, etc + if (nAveragesPerOctave==0) // um, wtf? + nAveragesPerOctave = 1; + nAveragesPerOctave = nAveragesPerOctave; + averageFrequencyIncrement = pow(2.0f, 1.0f/(float)(nAveragesPerOctave)); + // this isn't currently configurable (used once here then no effect), but here's some reasoning: + // 43 is a good value if you want to approximate "computer" octaves: 44100/2/2/2/2/2/2/2/2/2/2 + // 55 is a good value if you'd rather approximate A-440 octaves: 440/2/2/2 + // 65 is a good value if you'd rather approximate "middle-C" octaves: ~262/2/2 + // you could easily double it if you felt the lowest band was just rumble noise (as it probably is) + // but don't go much smaller unless you have a huge fft window size (see below for more why) + // keep in mind, if you change it, that the number of actual bands may change +/-1, and + // for some values, the last averaging band may not be very useful (may extend above nyquist) + firstOctaveFrequency = 55.0f; + // for each spectrum[] bin, calculate the mapping into the appropriate average[] bin. + // this gives us roughly log-sized averaging bins, subject to how "fine" the spectrum bins are. + // with more spectrum bins, you can better map into the averaging bins (especially at low + // frequencies) or use more averaging bins per octave. with an fft window size of 2048, + // sampling rate of 44100, and first octave around 55, that's about enough to do half-octave + // analysis. if you don't have enough spectrum bins to map adequately into averaging bins + // at the requested number per octave then you'll end up with "empty" averaging bins, where + // there is no spectrum available to map into it. (so... if you have "nonreactive" averages, + // either increase fft buffer size, or decrease number of averages per octave, etc) + spe2avg = new int[nSpectrum]; + int avgidx = 0; + float averageFreq = firstOctaveFrequency; // the "top" of the first averaging bin + // we're looking for the "top" of the first spectrum bin, and i'm just sort of + // guessing that this is where it is (or possibly spectrumFrequencySpan/2?) + // ... either way it's probably close enough for these purposes + float spectrumFreq = spectrumFrequencySpan; + for (int speidx=0; speidx < nSpectrum; speidx++) { + while (spectrumFreq > averageFreq) { + avgidx++; + averageFreq *= averageFrequencyIncrement; + } + spe2avg[speidx] = avgidx; + spectrumFreq += spectrumFrequencySpan; + } + nAverages = avgidx; + averages = new float[nAverages]; + peaks = new float[nAverages]; + peakHoldTimes = new int[nAverages]; + peakHoldTime = 0; // arbitrary + peakDecayRate = 0.9f; // arbitrary + linearEQIntercept = 1.0f; // unity -- no eq by default + linearEQSlope = 0.0f; // unity -- no eq by default +} + +void maxiFFTOctaveAnalyzer::calculate(float * fftData){ + + int last_avgidx = 0; // tracks when we've crossed into a new averaging bin, so store current average + float sum = 0.0f; // running total of spectrum data + int count = 0; // count of spectrums accumulated (for averaging) + for (int speidx=0; speidx < nSpectrum; speidx++) { + count++; + sum += fftData[speidx] * (linearEQIntercept + (float)(speidx) * linearEQSlope); + int avgidx = spe2avg[speidx]; + if (avgidx != last_avgidx) { + + for (int j = last_avgidx; j < avgidx; j++){ + averages[j] = sum / (float)(count); + } + count = 0; + sum = 0.0f; + } + last_avgidx = avgidx; + } + // the last average was probably not calculated... + if ((count > 0) && (last_avgidx < nAverages)){ + averages[last_avgidx] = sum / (float)(count); + } + + // update the peaks separately + for (int i=0; i < nAverages; i++) { + if (averages[i] >= peaks[i]) { + // save new peak level, also reset the hold timer + peaks[i] = averages[i]; + peakHoldTimes[i] = peakHoldTime; + } else { + // current average does not exceed peak, so hold or decay the peak + if (peakHoldTimes[i] > 0) { + peakHoldTimes[i]--; + } else { + peaks[i] *= peakDecayRate; + } + } + } +} diff --git a/ofxMaxim/ofxMaxim/libs/maxiFFT.h b/ofxMaxim/ofxMaxim/libs/maxiFFT.h new file mode 100644 index 0000000..6c07089 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maxiFFT.h @@ -0,0 +1,126 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _MAXI_FFT +#define _MAXI_FFT + +//#define _NO_VDSP //set this if you don't want to use apple's vDSP fft functions + + +#include "fft.h" + +class maxiFFT { + +public: + maxiFFT(){ + _fft = 0; + }; + ~maxiFFT(); + void setup(int fftSize, int windowSize, int hopSize); + bool process(float value); + float* magsToDB(); + float *magnitudes, *phases, *magnitudesDB; + float *avgPower; + int windowSize; + int hopSize; + int bins; + + //features + float spectralFlatness(); + float spectralCentroid(); + +private: + float *buffer, *window; + int pos; + float nextValue; + int fftSize; + fft *_fft; + bool newFFT; + +}; + +class maxiIFFT { + +public: + maxiIFFT(){ + _fft=0; + }; + ~maxiIFFT(); + void setup(int fftSize, int windowSize, int hopSize); + float process(float *magnitudes, float *phases); + +private: + float *ifftOut, *buffer, *window; + int windowSize; + int bins; + int hopSize; + int pos; + float nextValue; + int fftSize; + fft *_fft; +}; + + +class maxiFFTOctaveAnalyzer { +/*based on code by David Bollinger, http://www.davebollinger.com/ + */ +public: + + float samplingRate; // sampling rate in Hz (needed to calculate frequency spans) + int nSpectrum; // number of spectrum bins in the fft + int nAverages; // number of averaging bins here + int nAveragesPerOctave; // number of averages per octave as requested by user + float spectrumFrequencySpan; // the "width" of an fft spectrum bin in Hz + float firstOctaveFrequency; // the "top" of the first averaging bin here in Hz + float averageFrequencyIncrement; // the root-of-two multiplier between averaging bin frequencies + float * averages; // the actual averages + float * peaks; // peaks of the averages, aka "maxAverages" in other implementations + int * peakHoldTimes; // how long to hold THIS peak meter? decay if == 0 + int peakHoldTime; // how long do we hold peaks? (in fft frames) + float peakDecayRate; // how quickly the peaks decay: 0f=instantly .. 1f=not at all + int * spe2avg; // the mapping between spectrum[] indices and averages[] indices + // the fft's log equalizer() is no longer of any use (it would be nonsense to log scale + // the spectrum values into log-sized average bins) so here's a quick-and-dirty linear + // equalizer instead: + float linearEQSlope; // the rate of linear eq + float linearEQIntercept; // the base linear scaling used at the first averaging bin + // the formula is: spectrum[i] * (linearEQIntercept + i * linearEQSlope) + // so.. note that clever use of it can also provide a "gain" control of sorts + // (fe: set intercept to 2f and slope to 0f to double gain) + + void setup(float samplingRate, int nBandsInTheFFT, int nAveragesPerOctave); + + void calculate(float * fftData); + +}; + +#endif
\ No newline at end of file diff --git a/ofxMaxim/ofxMaxim/libs/maxiGrains.cpp b/ofxMaxim/ofxMaxim/libs/maxiGrains.cpp new file mode 100644 index 0000000..951f3b5 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maxiGrains.cpp @@ -0,0 +1,6 @@ +#include "maxiGrains.h" + + + + + diff --git a/ofxMaxim/ofxMaxim/libs/maxiGrains.h b/ofxMaxim/ofxMaxim/libs/maxiGrains.h new file mode 100644 index 0000000..d17ffc9 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maxiGrains.h @@ -0,0 +1,443 @@ + + +#ifndef _MAXI_GRAINS_H +#define _MAXI_GRAINS_H +#include "maximilian.h" + +#if defined(__APPLE_CC__) +#include "accelerate/accelerate.h"; +//Mac users can uncommment the line below to use Apple's accelerate framework for calculating grains. This gives ~300% speed improvement and better sound quality, but doesn't work well on all machines. +//#define MAXIGRAINFAST +#endif + +#define PI 3.1415926535897932384626433832795028841968 + +#include <list> + +typedef unsigned long ulong; + +//window functions from http://en.wikipedia.org/wiki/Window_function#High-_and_moderate-resolution_windows + +struct hannWinFunctor { + inline double operator()(ulong windowLength, ulong windowPos) { + return 0.5 * (1.0 - cos((2.0 * PI * windowPos) / (windowLength - 1))); + } +}; + +//this window can produce clicks +struct hammingWinFunctor { + inline double operator()(ulong windowLength, ulong windowPos) { + return 0.54 - (0.46 * cos((2.0 * PI * windowPos) / (windowLength - 1))); + } +}; + + +struct cosineWinFunctor { + inline double operator()(ulong windowLength, ulong windowPos) { + return sin((PI * windowPos) / (windowLength - 1)); + } +}; + +struct rectWinFunctor { + inline double operator()(ulong windowLength, ulong windowPos) { + return 1; + } +}; + +struct triangleWinFunctor { + inline double operator()(ulong windowLength, ulong windowPos) { + return (2.0 / (windowLength-1.0)) * (((windowLength-1.0)/2.0) - fabs(windowPos - ((windowLength-1.0)/2.0))); + } +}; + +struct triangleNZWinFunctor { + //non zero end points + inline double operator()(ulong windowLength, ulong windowPos) { + return (2.0 / windowLength) * ((windowLength/2.0) - fabs(windowPos - ((windowLength-1.0)/2.0))); + } +}; + +struct blackmanHarrisWinFunctor { + inline double operator()(ulong windowLength, ulong windowPos) { + return 0.35875 - + (0.48829 * cos((2 * PI * windowPos) / (windowLength-1))) + + (0.14128 * cos((4 * PI * windowPos) / (windowLength-1))) + + (0.01168 * cos((6 * PI * windowPos) / (windowLength-1))); + } +}; + +struct blackmanNutallWinFunctor { + inline double operator()(ulong windowLength, ulong windowPos) { + return 0.3635819 - + (0.4891775 * cos((2 * PI * windowPos) / (windowLength-1))) + + (0.1365995 * cos((4 * PI * windowPos) / (windowLength-1))) + + (0.0106411 * cos((6 * PI * windowPos) / (windowLength-1))); + } +}; + +template<typename F> +class maxiGrainWindowCache { +public: + unsigned int cacheSize; + + maxiGrainWindowCache() { + cacheSize = maxiSettings::sampleRate / 2.0; //allocate mem for up to 500ms grains + cache = (double**)malloc(cacheSize * sizeof(double*)); + for(int i=0; i < cacheSize; i++) { + cache[i] = NULL; + } + } + + ~maxiGrainWindowCache() { + for(int i=0; i < cacheSize; i++) { + if(NULL != cache[i]) { + delete[] cache[i]; + } + } + } + + double* getWindow(const unsigned int length) { + if (NULL == cache[length]) { + cache[length] = (double*)malloc(length * sizeof(double)); + for(int i=0; i < length; i++) { + cache[length][i] = F()(length, i); + } + } + return cache[length]; + } + +private: + double** cache; + +}; + +class maxiGrainBase { +public: + virtual double play() = 0; + bool finished; +}; + +template<typename F> +class maxiGrain : public maxiGrainBase { +public: + maxiSample *sample; + double pos; + double dur; + ulong sampleStartPos; + ulong sampleIdx; + ulong sampleDur; + ulong sampleEndPos; + double freq; + double speed; + // F winFunc; + double inc; + double frequency; + double* window; +#if defined(__APPLE_CC__) && defined(MAXIGRAINFAST) + double* grainSamples; +#endif + /* + position between 0.0 and 1.0 + duration in seconds + */ + maxiGrain(maxiSample *sample, const double position, const double duration, const double speed, maxiGrainWindowCache<F> *windowCache) :sample(sample), pos(position), dur(duration), speed(speed) + { + sampleStartPos = sample->length * pos; + sampleDur = dur * (double)sample->mySampleRate; + sampleDurMinusOne = sampleDur - 1; + sampleIdx = 0; + finished = 0; + freq = 1.0 / dur; + sampleEndPos = sampleStartPos + sampleDur; + frequency = freq * speed; + if (frequency > 0) { + pos = sampleStartPos; + }else{ + pos = sampleEndPos; + } + inc = sampleDur/(maxiSettings::sampleRate/frequency); + window = windowCache->getWindow(sampleDur); + +#if defined(__APPLE_CC__) && defined(MAXIGRAINFAST) + //premake the grain using fast vector functions, and quadratic interpolation + double *sourceData = (double*)malloc(sampleDur * sizeof(double)); + short* buffer = (short *)sample->myData; + //convert sample to double data + vDSP_vflt16D(buffer + sampleStartPos, 1, sourceData, 1, min(sampleDur, sample->length - sampleStartPos)); + //todo: wraping code + + grainSamples = (double*)malloc(sampleDur * sizeof(double)); + //make list of interpolation indexes + double* interpIndexes = (double*)malloc(sampleDur * sizeof(double)); + double interpPos = sampleStartPos; + for(int i=0; i < sampleDur; i++) { + interpIndexes[i] = interpPos - sampleStartPos; + interpPos += fabs(inc); + } + vDSP_vqintD(sourceData, interpIndexes, 1, grainSamples, 1, sampleDur, sampleDur); + if (frequency < 0) { + vDSP_vrvrsD(grainSamples,1, sampleDur); + } + static double divFactor = 32767.0; + vDSP_vsdivD(grainSamples, 1, &divFactor, grainSamples, 1, sampleDur); + vDSP_vmulD(grainSamples, 1, window, 1, grainSamples, 1, sampleDur); + delete sourceData, interpIndexes; +#endif + } + + ~maxiGrain() { +#if defined(__APPLE_CC__) && defined(MAXIGRAINFAST) + delete[] grainSamples; +#endif + } + + double play() { + double output = 0.0; + if (!finished) { +#if defined(__APPLE_CC__) && defined(MAXIGRAINFAST) + output = grainSamples[sampleIdx]; +#else + envValue = window[sampleIdx]; + double remainder; + long a,b; + short* buffer = (short *)sample->myData; + if (frequency >0.) { + pos += inc; + long posl = static_cast<long>(pos); + remainder = pos - posl; + a=posl++; + if (a>=sample->length) { + a=posl-1; + } + b = posl+2; + if (b>=sample->length) { + b=sample->length-1; + } + output = (double) ((1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } else { + frequency=frequency-(frequency+frequency); + pos += inc; + long posl = static_cast<long>(pos); + remainder = pos - posl; + if (posl-1>=0) { + a=posl-1; + } + else { + a=0; + } + if (posl-2>=0) { + b=posl-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } + output *= envValue; +#endif + } + sampleIdx++; + if (sampleIdx >= sampleDur) finished = 1; + return output; + } + +private: + maxiGrain(); + double envValue; + ulong sampleDurMinusOne; +}; + + +typedef list<maxiGrainBase*> grainList; + +class maxiGrainPlayer { +public: + grainList grains; + maxiSample *sample; + + maxiGrainPlayer(maxiSample *sample) : sample(sample) { + } + + void addGrain(maxiGrainBase *g) { + grains.push_back(g); + } + + double play() { + double total = 0.0; + for(grainList::iterator it = grains.begin(); it != grains.end(); ++it) { + total += (*it)->play(); + if ((*it)->finished) { + delete(*it); + grains.erase(it); + } + } + return total; + } +}; + +template<typename F> +class maxiTimestretch { +public: + double position; + long cycles; + maxiSample *sample; + maxiGrainPlayer *grainPlayer; + maxiGrainWindowCache<F> windowCache; + double randomOffset; + + maxiTimestretch(maxiSample *sample) : sample(sample) { + position=0; + cycles=0; + grainPlayer = new maxiGrainPlayer(sample); + randomOffset=0; + } + + ~maxiTimestretch() { + delete grainPlayer; + } + + double play(double speed, double grainLength, int overlaps, double posMod=0.0) { + position = position + (1 * speed); + cycles++; + if (position > sample->length) position=0; + if (position < 0) position = sample->length; + double cycleLength = grainLength * maxiSettings::sampleRate / overlaps; + double cycleMod = fmod(cycles, cycleLength + randomOffset); + if (0 == floor(cycleMod)) { + // cout << cycleMod << endl; + speed = (speed > 0 ? 1 : -1); + // speed = speed - ((cycleMod / cycleLength) * 0.1); + maxiGrain<F> *g = new maxiGrain<F>(sample, max(min(1.0,(position / sample->length) + posMod),0.0), grainLength, speed, &windowCache); + grainPlayer->addGrain(g); + // cout << grainPlayer->grains.size() << endl; + // randomOffset = rand() % 10; + // randomOffset = rand() % 10; + } + return grainPlayer->play(); + } + + double play2(double pos, double grainLength, int overlaps) { + cycles++; + pos *= sample->length; + if (0 == floor(fmod(cycles, grainLength * maxiSettings::sampleRate / overlaps))) { + maxiGrain<F> *g = new maxiGrain<F>(sample, max(min(1.0,(pos / sample->length)),0.0), grainLength, 1, &windowCache); + grainPlayer->addGrain(g); + } + return grainPlayer->play(); + } +}; + +//in maxiTimeStretch, the speed is either 1 or -1, and the actual speed value only affects the grain position +//in maxiPitchShift, speed is uncoupled from position and allowed to set it's value incrementally, resulting in pitchshift. +//with both high speed values and negative speed values there are some terrific artefacts! + +template<typename F> +class maxiPitchShift { +public: + double position; + long cycles; + maxiSample *sample; + maxiGrainPlayer *grainPlayer; + maxiGrainWindowCache<F> windowCache; + double randomOffset; + + maxiPitchShift(maxiSample *sample) : sample(sample) { + position=0; + cycles=0; + grainPlayer = new maxiGrainPlayer(sample); + randomOffset=0; + } + + ~maxiPitchShift() { + delete grainPlayer; + } + + double play(double speed, double grainLength, int overlaps, double posMod=0.0) { + position = position + 1; + cycles++; + if (position > sample->length) position=0; + if (position < 0) position = sample->length; + double cycleLength = grainLength * maxiSettings::sampleRate / overlaps; + double cycleMod = fmod(cycles, cycleLength + randomOffset); + if (0 == floor(cycleMod)) { + // cout << cycleMod << endl; + //speed = (speed > 0 ? 1 : -1); + speed = speed - ((cycleMod / cycleLength) * 0.1); + maxiGrain<F> *g = new maxiGrain<F>(sample, max(min(1.0,(position / sample->length) + posMod),0.0), grainLength, speed, &windowCache); + grainPlayer->addGrain(g); + // cout << grainPlayer->grains.size() << endl; + // randomOffset = rand() % 10; + // randomOffset = rand() % 10; + } + return grainPlayer->play(); + } + + double play2(double pos, double grainLength, int overlaps) { + cycles++; + pos *= sample->length; + if (0 == floor(fmod(cycles, grainLength * maxiSettings::sampleRate / overlaps))) { + maxiGrain<F> *g = new maxiGrain<F>(sample, max(min(1.0,(pos / sample->length)),0.0), grainLength, 1, &windowCache); + grainPlayer->addGrain(g); + } + return grainPlayer->play(); + } +}; + +//and here's maxiPitchStretch. Args to the play function are basically speed for 'pitch' and rate for playback rate. +//the rest is the same. + +template<typename F> +class maxiPitchStretch { +public: + double position; + long cycles; + maxiSample *sample; + maxiGrainPlayer *grainPlayer; + maxiGrainWindowCache<F> windowCache; + double randomOffset; + + maxiPitchStretch(maxiSample *sample) : sample(sample) { + position=0; + cycles=0; + grainPlayer = new maxiGrainPlayer(sample); + randomOffset=0; + } + + ~maxiPitchStretch() { + delete grainPlayer; + } + + double play(double speed, double rate, double grainLength, int overlaps, double posMod=0.0) { + position = position + (1 * rate); + cycles++; + if (position > sample->length) position=0; + if (position < 0) position = sample->length; + double cycleLength = grainLength * maxiSettings::sampleRate / overlaps; + double cycleMod = fmod(cycles, cycleLength + randomOffset); + if (0 == floor(cycleMod)) { + // cout << cycleMod << endl; + //speed = (speed > 0 ? 1 : -1); + speed = speed - ((cycleMod / cycleLength) * 0.1); + maxiGrain<F> *g = new maxiGrain<F>(sample, max(min(1.0,(position / sample->length) + posMod),0.0), grainLength, speed, &windowCache); + grainPlayer->addGrain(g); + // cout << grainPlayer->grains.size() << endl; + // randomOffset = rand() % 10; + // randomOffset = rand() % 10; + } + return grainPlayer->play(); + } + + double play2(double pos, double grainLength, int overlaps) { + cycles++; + pos *= sample->length; + if (0 == floor(fmod(cycles, grainLength * maxiSettings::sampleRate / overlaps))) { + maxiGrain<F> *g = new maxiGrain<F>(sample, max(min(1.0,(pos / sample->length)),0.0), grainLength, 1, &windowCache); + grainPlayer->addGrain(g); + } + return grainPlayer->play(); + } +}; + +#endif
\ No newline at end of file diff --git a/ofxMaxim/ofxMaxim/libs/maxiMFCC.cpp b/ofxMaxim/ofxMaxim/libs/maxiMFCC.cpp new file mode 100644 index 0000000..befa5f4 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maxiMFCC.cpp @@ -0,0 +1,205 @@ +/* + * maxiMFCC.cpp + * mfccs + * + * Created by Chris on 08/03/2011. + * Copyright 2011 Goldsmiths Creative Computing. All rights reserved. + * + */ + +#include "maxiMFCC.h" +#include <math.h> +#include <iostream> +#ifdef __APPLE_CC__ +#include <Accelerate/Accelerate.h> +#endif + +using namespace std; + +void maxiMFCC::setup(unsigned int numBins, unsigned int numFilters, unsigned int numCoeffs, double minFreq, double maxFreq, unsigned int sampleRate) +{ + this->numFilters = numFilters; + this->numCoeffs = numCoeffs; + this->minFreq = minFreq; + this->maxFreq = maxFreq; + this->sampleRate = sampleRate; + this->numBins = numBins; + melFilters = NULL; + melBands = (double*) malloc(sizeof(double) * numFilters); +#ifdef __APPLE_CC__ + doubleSpec = (double*)malloc(sizeof(double) * numBins); +#endif + //create new matrix + dctMatrix = (double*)malloc(sizeof(double) * numCoeffs * numFilters); + calcMelFilterBank(sampleRate, numBins); + createDCTCoeffs(); +} + +void maxiMFCC::mfcc(float* powerSpectrum, double *mfccs) { + melFilterAndLogSquare(powerSpectrum); + dct(mfccs); +} + + +void maxiMFCC::melFilterAndLogSquare(float* powerSpectrum){ +#ifdef __APPLE_CC__ + //conv to double + vDSP_vspdp(powerSpectrum, 1, doubleSpec, 1, numBins); + vDSP_mmulD(doubleSpec, 1, melFilters, 1, melBands, 1, 1, 42, 512); +#else + for (int filter = 0;filter < numFilters;filter++) { + melBands[filter] = 0.0; + for (int bin=0;bin<numBins;bin++) { +// int idx = (numBins * filter) + bin; + int idx = filter + (bin * numFilters); +// melBands[filter] += (melFilters[filter][bin] * powerSpectrum[bin]); + melBands[filter] += (melFilters[idx] * powerSpectrum[bin]); + } + } +#endif + for(int filter=0; filter < numFilters; filter++) { + // log the square + melBands[filter] = melBands[filter] > 0.000001 ? log(melBands[filter] * melBands[filter]) : 0.0; + } +} + +void maxiMFCC::dct(double *mfccs){ +#ifdef __APPLE_CC__ + vDSP_mmulD(melBands, 1, dctMatrix, 1, mfccs, 1, 1, numCoeffs, numFilters); + double n = (double) numCoeffs; + vDSP_vsdivD(mfccs, 1, &n, mfccs, 1, numCoeffs); +#else + for(int i=0; i < numCoeffs; i++) { + mfccs[i] = 0.0; + } + for(int i=0; i < numCoeffs; i++ ) { + for(int j=0; j < numFilters; j++) { + int idx = i + (j * numCoeffs); +// mfccs[i] += (dctMatrix[i][j] * melBands[j]); + mfccs[i] += (dctMatrix[idx] * melBands[j]); + } + } + for(int i=0; i < numCoeffs; i++) { + mfccs[i] /= numCoeffs; + } +#endif +} + +void maxiMFCC::createDCTCoeffs() { + double k = 3.14159265358979323846/numFilters; + double w1 = 1.0/(sqrt(numFilters)); + double w2 = sqrt(2.0/numFilters); + + + //generate dct matrix + for(int i = 0; i < numCoeffs; i++) + { + for(int j = 0; j < numFilters; j++) + { + int idx = i + (j * numCoeffs); + // if(i == 0) + // dctMatrix[i][j]= w1 * cos(k * (i+1) * (j + 0.5)); + // else + // dctMatrix[i][j] = w2 * cos(k * (i+1) * (j + 0.5)); + if(i == 0) + dctMatrix[idx]= w1 * cos(k * (i+1) * (j + 0.5)); + else + dctMatrix[idx] = w2 * cos(k * (i+1) * (j + 0.5)); + } + } + + +} + + + +// implements this formula: +// mel = 2595 log10(Hz/700 + 1) +inline double hzToMel(double hz){ + return 2595.0 * (log10(hz/700.0 + 1.0)); +} + +// implements this formula +// Hz = 700 (10^(mel/2595) - 1) +inline double melToHz(double mel){ + return 700.0 * (pow(10, mel/2595.0) - 1.0); +} + + +void maxiMFCC::calcMelFilterBank(double sampleRate, int numBins){ + double mel, dMel, maxMel, minMel, nyquist, binFreq, start, end, thisF, nextF, prevF; + int numValidBins; + + // ignore bins over nyquist + numValidBins = numBins; + + nyquist = sampleRate/2; + if (maxFreq > nyquist) { + maxFreq = nyquist; + } + + maxMel = hzToMel(maxFreq); + minMel = hzToMel(minFreq); + + dMel = (maxMel - minMel) / (numFilters + 2 - 1); + + double *filtPos = (double*) malloc(sizeof(double) * (numFilters + 2)); + + // first generate an array of start and end freqs for each triangle + mel = minMel; + for (int i=0;i<numFilters + 2;i++) { + // start of the triangle + filtPos[i] = melToHz(mel); +// std::cout << "[" << i << "] MFCC: centre is at " <<filtPos[i]<<"hz "<<mel<<" mels" << endl; + mel += dMel; + } + // now generate the coefficients for the mag spectrum + melFilters = (double*) malloc(sizeof(double) * numFilters * numValidBins); + + for (int filter = 1; filter < numFilters; filter++) { + for (int bin=0;bin<numValidBins;bin++) { + // frequency this bin represents + binFreq = (double) sampleRate / (double) numValidBins * (double) bin; + thisF = filtPos[filter]; + nextF = filtPos[filter+1]; + prevF = filtPos[filter-1]; + int idx = filter + (bin * numFilters); + if (binFreq > nextF || binFreq < prevF) { + // outside this filter + melFilters[idx] = 0; + //cout << "MFCCMYK: filter at " <<thisF << " bin at " <<binFreq <<" coeff " <<melFilters[filter][bin] << endl; + } + else { + double height = 2.0 / (nextF - prevF); + + if (binFreq < thisF) { + // up + start = prevF; + end = thisF; + melFilters[idx] = (binFreq - start) * (height / (thisF - start)); + } + else { + // down + start = thisF; + end = nextF; + melFilters[idx] = height + ((binFreq - thisF) * (-height /(nextF - thisF))); + } +// cout << "MFCCMYK: filter at " <<thisF << " bin at " <<binFreq <<" coeff " <<melFilters[filter][bin] << endl; + //cout << "MFCCMYK: filter at " <<thisF << " bin at " <<binFreq <<" coeff " <<melFilters[idx] << endl; + } + } + } +} + + +maxiMFCC::~maxiMFCC() { + delete[] melFilters; + delete[] melBands; + delete[] dctMatrix; +#ifdef __APPLE_CC__ + delete doubleSpec; +#endif + +} + + diff --git a/ofxMaxim/ofxMaxim/libs/maxiMFCC.h b/ofxMaxim/ofxMaxim/libs/maxiMFCC.h new file mode 100644 index 0000000..1a2b3a3 --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maxiMFCC.h @@ -0,0 +1,45 @@ +/* + * maxiMFCC.h + * mfccs + * + * Created by Chris on 08/03/2011. + * Copyright 2011 Goldsmiths Creative Computing. All rights reserved. + * + + Based on Matthew Yee-King's MFCCMYK java class + */ + +#pragma once +#pragma pack(16) + +#include "maxiFFT.h" + +class maxiMFCC { +public: + maxiMFCC(){}; + ~maxiMFCC(); + void setup(unsigned int numBins, unsigned int numFilters, unsigned int numCoeffs, double minFreq, double maxFreq, unsigned int sampleRate); + void mfcc(float* powerSpectrum, double *mfccs); + double *melBands; + +private: + unsigned int numFilters, numCoeffs; + double minFreq, maxFreq; + unsigned int sampleRate; +// double **melFilters; + double *melFilters; + unsigned int numBins; +// double **dctMatrix; + double *dctMatrix; +#ifdef __APPLE_CC__ + double *doubleSpec; +#endif + + void melFilterAndLogSquare(float* powerSpectrum); + void dct(double *mfccs); + void calcMelFilterBank(double sampleRate, int numBins); + void createDCTCoeffs(); + + + +};
\ No newline at end of file diff --git a/ofxMaxim/ofxMaxim/libs/maximilian.cpp b/ofxMaxim/ofxMaxim/libs/maximilian.cpp new file mode 100644 index 0000000..10c13ca --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maximilian.cpp @@ -0,0 +1,805 @@ + +/* + * maximilian.cpp + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "maximilian.h" +#include "math.h" + + +//int channels=2; +//int samplerate=44100; +//int buffersize=1024; +float chandiv= 1; + +int maxiSettings::sampleRate = 44100; +int maxiSettings::channels = 2; +int maxiSettings::bufferSize = 1024; + +double sineBuffer[514]={0,0.012268,0.024536,0.036804,0.049042,0.06131,0.073547,0.085785,0.097992,0.1102,0.12241,0.13455,0.1467,0.15884,0.17093,0.18301,0.19507,0.20709,0.21909,0.23105,0.24295,0.25485,0.26669,0.2785,0.29025,0.30197,0.31366,0.32529,0.33685,0.34839,0.35986,0.37128,0.38266,0.39395,0.40521,0.41641,0.42752,0.4386,0.44958,0.46051,0.47137,0.48215,0.49286,0.50351,0.51407,0.52457,0.53497,0.54529,0.55554,0.5657,0.57578,0.58575,0.59567,0.60547,0.6152,0.62482,0.63437,0.6438,0.65314,0.66238,0.67151,0.68057,0.68951,0.69833,0.70706,0.7157,0.72421,0.7326,0.74091,0.74908,0.75717,0.76514,0.77298,0.7807,0.7883,0.79581,0.80316,0.81042,0.81754,0.82455,0.83142,0.8382,0.84482,0.85132,0.8577,0.86392,0.87006,0.87604,0.88187,0.8876,0.89319,0.89862,0.90396,0.90912,0.91415,0.91907,0.92383,0.92847,0.93295,0.93729,0.9415,0.94556,0.94949,0.95325,0.95691,0.96039,0.96375,0.96692,0.97,0.9729,0.97565,0.97827,0.98074,0.98306,0.98523,0.98724,0.98914,0.99084,0.99243,0.99387,0.99515,0.99628,0.99725,0.99808,0.99875,0.99927,0.99966,0.99988,0.99997,0.99988,0.99966,0.99927,0.99875,0.99808,0.99725,0.99628,0.99515,0.99387,0.99243,0.99084,0.98914,0.98724,0.98523,0.98306,0.98074,0.97827,0.97565,0.9729,0.97,0.96692,0.96375,0.96039,0.95691,0.95325,0.94949,0.94556,0.9415,0.93729,0.93295,0.92847,0.92383,0.91907,0.91415,0.90912,0.90396,0.89862,0.89319,0.8876,0.88187,0.87604,0.87006,0.86392,0.8577,0.85132,0.84482,0.8382,0.83142,0.82455,0.81754,0.81042,0.80316,0.79581,0.7883,0.7807,0.77298,0.76514,0.75717,0.74908,0.74091,0.7326,0.72421,0.7157,0.70706,0.69833,0.68951,0.68057,0.67151,0.66238,0.65314,0.6438,0.63437,0.62482,0.6152,0.60547,0.59567,0.58575,0.57578,0.5657,0.55554,0.54529,0.53497,0.52457,0.51407,0.50351,0.49286,0.48215,0.47137,0.46051,0.44958,0.4386,0.42752,0.41641,0.40521,0.39395,0.38266,0.37128,0.35986,0.34839,0.33685,0.32529,0.31366,0.30197,0.29025,0.2785,0.26669,0.25485,0.24295,0.23105,0.21909,0.20709,0.19507,0.18301,0.17093,0.15884,0.1467,0.13455,0.12241,0.1102,0.097992,0.085785,0.073547,0.06131,0.049042,0.036804,0.024536,0.012268,0,-0.012268,-0.024536,-0.036804,-0.049042,-0.06131,-0.073547,-0.085785,-0.097992,-0.1102,-0.12241,-0.13455,-0.1467,-0.15884,-0.17093,-0.18301,-0.19507,-0.20709,-0.21909,-0.23105,-0.24295,-0.25485,-0.26669,-0.2785,-0.29025,-0.30197,-0.31366,-0.32529,-0.33685,-0.34839,-0.35986,-0.37128,-0.38266,-0.39395,-0.40521,-0.41641,-0.42752,-0.4386,-0.44958,-0.46051,-0.47137,-0.48215,-0.49286,-0.50351,-0.51407,-0.52457,-0.53497,-0.54529,-0.55554,-0.5657,-0.57578,-0.58575,-0.59567,-0.60547,-0.6152,-0.62482,-0.63437,-0.6438,-0.65314,-0.66238,-0.67151,-0.68057,-0.68951,-0.69833,-0.70706,-0.7157,-0.72421,-0.7326,-0.74091,-0.74908,-0.75717,-0.76514,-0.77298,-0.7807,-0.7883,-0.79581,-0.80316,-0.81042,-0.81754,-0.82455,-0.83142,-0.8382,-0.84482,-0.85132,-0.8577,-0.86392,-0.87006,-0.87604,-0.88187,-0.8876,-0.89319,-0.89862,-0.90396,-0.90912,-0.91415,-0.91907,-0.92383,-0.92847,-0.93295,-0.93729,-0.9415,-0.94556,-0.94949,-0.95325,-0.95691,-0.96039,-0.96375,-0.96692,-0.97,-0.9729,-0.97565,-0.97827,-0.98074,-0.98306,-0.98523,-0.98724,-0.98914,-0.99084,-0.99243,-0.99387,-0.99515,-0.99628,-0.99725,-0.99808,-0.99875,-0.99927,-0.99966,-0.99988,-0.99997,-0.99988,-0.99966,-0.99927,-0.99875,-0.99808,-0.99725,-0.99628,-0.99515,-0.99387,-0.99243,-0.99084,-0.98914,-0.98724,-0.98523,-0.98306,-0.98074,-0.97827,-0.97565,-0.9729,-0.97,-0.96692,-0.96375,-0.96039,-0.95691,-0.95325,-0.94949,-0.94556,-0.9415,-0.93729,-0.93295,-0.92847,-0.92383,-0.91907,-0.91415,-0.90912,-0.90396,-0.89862,-0.89319,-0.8876,-0.88187,-0.87604,-0.87006,-0.86392,-0.8577,-0.85132,-0.84482,-0.8382,-0.83142,-0.82455,-0.81754,-0.81042,-0.80316,-0.79581,-0.7883,-0.7807,-0.77298,-0.76514,-0.75717,-0.74908,-0.74091,-0.7326,-0.72421,-0.7157,-0.70706,-0.69833,-0.68951,-0.68057,-0.67151,-0.66238,-0.65314,-0.6438,-0.63437,-0.62482,-0.6152,-0.60547,-0.59567,-0.58575,-0.57578,-0.5657,-0.55554,-0.54529,-0.53497,-0.52457,-0.51407,-0.50351,-0.49286,-0.48215,-0.47137,-0.46051,-0.44958,-0.4386,-0.42752,-0.41641,-0.40521,-0.39395,-0.38266,-0.37128,-0.35986,-0.34839,-0.33685,-0.32529,-0.31366,-0.30197,-0.29025,-0.2785,-0.26669,-0.25485,-0.24295,-0.23105,-0.21909,-0.20709,-0.19507,-0.18301,-0.17093,-0.15884,-0.1467,-0.13455,-0.12241,-0.1102,-0.097992,-0.085785,-0.073547,-0.06131,-0.049042,-0.036804,-0.024536,-0.012268,0,0.012268 +}; + +void setup();//use this to do any initialisation if you want. + +void play(double *channels);//run dac! + +maxiOsc::maxiOsc(){ + phase = 0.0; +// memset(phases,0,500); +// memset(freqs,0,500); +} + +double maxiOsc::noise() { + //always the same unless you seed it. + float r = rand()/(float)RAND_MAX; + output=r*2-1; + return(output); +} + +double maxiOsc::sinewave(double frequency) { + output=sin (phase*(TWOPI)); + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(maxiSettings::sampleRate/(frequency))); + return(output); + +} + +double maxiOsc::sinebuf4(double frequency) { + double remainder; + double a,b,c,d,a1,a2,a3; + phase += 512./(maxiSettings::sampleRate/(frequency)); + if ( phase >= 511 ) phase -=512; + remainder = phase - floor(phase); + + if (phase==0) { + a=sineBuffer[(long) 512]; + b=sineBuffer[(long) phase]; + c=sineBuffer[(long) phase+1]; + d=sineBuffer[(long) phase+2]; + + } else { + a=sineBuffer[(long) phase-1]; + b=sineBuffer[(long) phase]; + c=sineBuffer[(long) phase+1]; + d=sineBuffer[(long) phase+2]; + + } + + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = double (((a3 * remainder + a2) * remainder + a1) * remainder + b); + return(output); +} + +double maxiOsc::sinebuf(double frequency) { + double remainder; + phase += 512./(maxiSettings::sampleRate/(frequency*chandiv)); + if ( phase >= 511 ) phase -=512; + remainder = phase - floor(phase); + output = (double) ((1-remainder) * sineBuffer[1+ (long) phase] + remainder * sineBuffer[2+(long) phase]); + return(output); +} + +double maxiOsc::coswave(double frequency) { + output=cos (phase*(TWOPI)); + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(maxiSettings::sampleRate/(frequency))); + return(output); + +} + +double maxiOsc::phasor(double frequency) { + output=phase; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(maxiSettings::sampleRate/(frequency))); + return(output); +} + +double maxiOsc::square(double frequency) { + if (phase<0.5) output=-1; + if (phase>0.5) output=1; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(maxiSettings::sampleRate/(frequency))); + return(output); +} + +double maxiOsc::pulse(double frequency, double duty) { + if (duty<0.) duty=0; + if (duty>1.) duty=1; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(maxiSettings::sampleRate/(frequency))); + if (phase<duty) output=-1.; + if (phase>duty) output=1.; + return(output); +} + +double maxiOsc::phasor(double frequency, double startphase, double endphase) { + output=phase; + if (phase<startphase) { + phase=startphase; + } + if ( phase >= endphase ) phase = startphase; + phase += ((endphase-startphase)/(maxiSettings::sampleRate/(frequency))); + return(output); +} + + +double maxiOsc::saw(double frequency) { + + output=phase; + if ( phase >= 1.0 ) phase -= 2.0; + phase += (1./(maxiSettings::sampleRate/(frequency))); + return(output); + +} + +double maxiOsc::triangle(double frequency, double phase) { + output=tri*2; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(maxiSettings::sampleRate/(frequency*chandiv))); + if (phase <= 0.5 ) { + tri = phase; + } else { + tri =(1-phase); + } + return(output); + +} + +//I like this. +double maxiEnvelope::line(int numberofsegments,double segments[1000]) { + period=2./(segments[valindex+1]*0.004); + nextval=segments[valindex+2]; + currentval=segments[valindex]; + if (currentval-amplitude > 0.0000001 && valindex < numberofsegments) { + amplitude += ((currentval-startval)/(maxiSettings::sampleRate/period)); + } else if (currentval-amplitude < -0.0000001 && valindex < numberofsegments) { + amplitude -= (((currentval-startval)*(-1))/(maxiSettings::sampleRate/period)); + } else if (valindex >numberofsegments-1) { + valindex=numberofsegments-2; + } else { + valindex=valindex+2; + startval=currentval; + } + output=amplitude; + return(output); +} + +//and this +void maxiEnvelope::trigger(int index, double amp) { + valindex=index; + amplitude=amp; + +} + +//and this +double maxiDelayline::dl(double input, int size, double feedback) { + if ( phase >=size ) phase = 0; + memory[phase]=(memory[phase]*feedback)+(input*feedback)*0.5; + phase+=1; + output=memory[phase+1]; + return(output); + +} + +double maxiDelayline::dl(double input, int size, double feedback, int position) { + if ( phase >=size ) phase = 0; + if ( position >=size ) position = 0; + memory[phase]=(memory[phase]*feedback)+(input*feedback)*chandiv; + phase+=1; + output=memory[position]; + return(output); + +} + +//I particularly like these. cutoff between 0 and 1 +double maxiFilter::lopass(double input, double cutoff) { + output=outputs[0] + cutoff*(input-outputs[0]); + outputs[0]=output; + return(output); +} +//as above +double maxiFilter::hipass(double input, double cutoff) { + output=input-(outputs[0] + cutoff*(input-outputs[0])); + outputs[0]=output; + return(output); +} +//awesome. cuttof is freq in hz. res is between 1 and whatever. Watch out! +double maxiFilter::lores(double input,double cutoff1, double resonance) { + cutoff=cutoff1*0.5; + if (cutoff<10) cutoff=10; + if (cutoff>(maxiSettings::sampleRate*0.25)) cutoff=(maxiSettings::sampleRate*0.25); + if (resonance<1.) resonance = 1.; + z=cos(TWOPI*cutoff/maxiSettings::sampleRate); + c=2-2*z; + double r=(sqrt(2.0)*sqrt(-pow((z-1.0),3.0))+resonance*(z-1))/(resonance*(z-1)); + x=x+(input-y)*c; + y=y+x; + x=x*r; + output=y; + return(output); +} + +//working hires filter +double maxiFilter::hires(double input,double cutoff1, double resonance) { + cutoff=cutoff1*0.5; + if (cutoff<10) cutoff=10; + if (cutoff>(maxiSettings::sampleRate*0.25)) cutoff=(maxiSettings::sampleRate*0.25); + if (resonance<1.) resonance = 1.; + z=cos(TWOPI*cutoff/maxiSettings::sampleRate); + c=2-2*z; + double r=(sqrt(2.0)*sqrt(-pow((z-1.0),3.0))+resonance*(z-1))/(resonance*(z-1)); + x=x+(input-y)*c; + y=y+x; + x=x*r; + output=input-y; + return(output); +} + +//This works a bit. Needs attention. +double maxiFilter::bandpass(double input,double cutoff1, double resonance) { + cutoff=cutoff1; + if (cutoff>(maxiSettings::sampleRate*0.5)) cutoff=(maxiSettings::sampleRate*0.5); + if (resonance>=1.) resonance=0.999999; + z=cos(TWOPI*cutoff/maxiSettings::sampleRate); + inputs[0] = (1-resonance)*(sqrt(resonance*(resonance-4.0*pow(z,2.0)+2.0)+1)); + inputs[1] = 2*z*resonance; + inputs[2] = pow((resonance*-1),2); + + output=inputs[0]*input+inputs[1]*outputs[1]+inputs[2]*outputs[2]; + outputs[2]=outputs[1]; + outputs[1]=output; + return(output); +} + +//stereo bus +double *maxiMix::stereo(double input,double two[2],double x) { + if (x>1) x=1; + if (x<0) x=0; + two[0]=input*sqrt(1.0-x); + two[1]=input*sqrt(x); + return(two); +} + +//quad bus +double *maxiMix::quad(double input,double four[4],double x,double y) { + if (x>1) x=1; + if (x<0) x=0; + if (y>1) y=1; + if (y<0) y=0; + four[0]=input*sqrt((1.0-x)*y); + four[1]=input*sqrt((1.0-x)*(1.0-y)); + four[2]=input*sqrt(x*y); + four[3]=input*sqrt(x*(1.0-y)); + return(four); +} + +//ambisonic bus +double *maxiMix::ambisonic(double input,double eight[8],double x,double y,double z) { + if (x>1) x=1; + if (x<0) x=0; + if (y>1) y=1; + if (y<0) y=0; + if (z>1) y=1; + if (z<0) y=0; + eight[0]=input*(sqrt((1.0-x)*y)*1.0-z); + eight[1]=input*(sqrt((1.0-x)*(1.0-y))*1.0-z); + eight[2]=input*(sqrt(x*y)*1.0-z); + eight[3]=input*(sqrt(x*(1.0-y))*1.0-z); + eight[4]=input*(sqrt((1.0-x)*y)*z); + eight[5]=input*(sqrt((1.0-x)*(1.0-y))*z); + eight[6]=input*sqrt((x*y)*z); + eight[7]=input*sqrt((x*(1.0-y))*z); + return(eight); +} + + +bool maxiSample::load(string fileName) { + myPath = fileName; + return read(); +} + +void maxiSample::trigger() { + position = 0; +} + +bool maxiSample::read() +{ + bool result; + ifstream inFile( myPath.c_str(), ios::in | ios::binary); + result = inFile; + + if (inFile) { + bool datafound = false; + + inFile.seekg(4, ios::beg); + inFile.read( (char*) &myChunkSize, 4 ); // read the ChunkSize + + inFile.seekg(16, ios::beg); + inFile.read( (char*) &mySubChunk1Size, 4 ); // read the SubChunk1Size + + //inFile.seekg(20, ios::beg); + inFile.read( (char*) &myFormat, sizeof(short) ); // read the file format. This should be 1 for PCM + + //inFile.seekg(22, ios::beg); + inFile.read( (char*) &myChannels, sizeof(short) ); // read the # of channels (1 or 2) + + //inFile.seekg(24, ios::beg); + inFile.read( (char*) &mySampleRate, sizeof(int) ); // read the samplerate + + //inFile.seekg(28, ios::beg); + inFile.read( (char*) &myByteRate, sizeof(int) ); // read the byterate + + //inFile.seekg(32, ios::beg); + inFile.read( (char*) &myBlockAlign, sizeof(short) ); // read the blockalign + + //inFile.seekg(34, ios::beg); + inFile.read( (char*) &myBitsPerSample, sizeof(short) ); // read the bitspersample + + //ignore any extra chunks + char chunkID[5]=""; + chunkID[4] = 0; + int filePos = 36; + while(!datafound && !inFile.eof()) { + inFile.seekg(filePos, ios::beg); + inFile.read((char*) &chunkID, sizeof(char) * 4); + inFile.seekg(filePos + 4, ios::beg); + inFile.read( (char*) &myDataSize, sizeof(int) ); // read the size of the data + filePos += 8; + if (strcmp(chunkID,"data") == 0) { + datafound = true; + }else{ + filePos += myDataSize; + } + } + + // read the data chunk + myData = (char*) malloc(myDataSize * sizeof(char)); + inFile.seekg(filePos, ios::beg); + inFile.read(myData, myDataSize); + length=myDataSize*(0.5/myChannels); + inFile.close(); // close the input file + + }else { + cout << "ERROR: Could not load sample: " <<myPath << endl; + } + + + return result; // this should probably be something more descriptive +} + + +double maxiSample::play() { +// long length=myDataSize*(1./myChannels); + double remainder; + short* buffer = (short *)myData; + position=(position+1); + remainder = position - (long) position; + if ((long) position>length) position=0; + output = (double) ((1-remainder) * buffer[1+ (long) position] + remainder * buffer[2+(long) position])/32767;//linear interpolation + return(output); +} + +double maxiSample::playOnce() { +// long length=myDataSize*(0.5/myChannels); + double remainder; + short* buffer = (short *)myData; + position=(position+1); + remainder = position - (long) position; + if ((long) position<length) + output = (double) ((1-remainder) * buffer[1+ (long) position] + remainder * buffer[2+(long) position])/32767;//linear interpolation + else + output=0; + + return(output); +} + +double maxiSample::play(double speed) { + double remainder; + long a,b; +// long length=myDataSize*0.5; + short* buffer = (short *)myData; + position=position+((speed*chandiv*myChannels)/(maxiSettings::sampleRate/mySampleRate)); + if (speed >=0) { + + if ((long) position>=length-1) position=1; + remainder = position - floor(position); + if (position+1<length) { + a=position+1; + + } + else { + a=length-1; + } + if (position+2<length) + { + b=position+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation +} else { + if ((long) position<0) position=length; + remainder = position - floor(position); + if (position-1>=0) { + a=position-1; + + } + else { + a=0; + } + if (position-2>=0) { + b=position-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } + return(output); +} + +double maxiSample::play(double frequency, double start, double end) { + return play(frequency, start, end, position); +} + +double maxiSample::play(double frequency, double start, double end, double &pos) { + double remainder; + // long length=myDataSize; + + if (end>=length) end=length-1; + long a,b; + short* buffer = (short *)myData; + if (frequency >0.) { + if (pos<start) { + pos=start; + } + + if ( pos >= end ) pos = start; + pos += ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = pos - floor(pos); + long posl = floor(pos); + if (posl+1<length) { + a=posl+1; + + } + else { + a=posl-1; + } + if (posl+2<length) { + b=posl+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } else { + frequency=frequency-(frequency+frequency); + if ( pos <= start ) pos = end; + pos -= ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = pos - floor(pos); + long posl = floor(pos); + if (posl-1>=0) { + a=posl-1; + } + else { + a=0; + } + if (posl-2>=0) { + b=posl-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + + } + + return(output); +} + + +//better cubic inerpolation. Cobbled together from various (pd externals, yehar, other places). +double maxiSample::play4(double frequency, double start, double end) { + double remainder; + double a,b,c,d,a1,a2,a3; + short* buffer = (short*)myData; + if (frequency >0.) { + if (position<start) { + position=start; + } + if ( position >= end ) position = start; + position += ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>0) { + a=buffer[(int)(floor(position))-1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position<end-2) { + c=buffer[(long) position+1]; + + } else { + c=buffer[0]; + + } + if (position<end-3) { + d=buffer[(long) position+2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * remainder + a1) * remainder + b) / 32767; + + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>start && position < end-1) { + a=buffer[(long) position+1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position>start) { + c=buffer[(long) position-1]; + + } else { + c=buffer[0]; + + } + if (position>start+1) { + d=buffer[(long) position-2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * -remainder + a1) * -remainder + b) / 32767; + + } + + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,long length) { + double remainder; + short* buffer = (short *)bufferin; + position=(position+1); + remainder = position - (long) position; + if ((long) position>length) position=0; + output = (double) ((1-remainder) * buffer[1+ (long) position] + remainder * buffer[2+(long) position])/32767;//linear interpolation + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,double speed,long length) { + double remainder; + long a,b; + short* buffer = (short *)bufferin; + position=position+((speed*chandiv*myChannels)/(maxiSettings::sampleRate/mySampleRate)); + if (speed >=0) { + + if ((long) position>=length-1) position=1; + remainder = position - floor(position); + if (position+1<length) { + a=position+1; + + } + else { + a=length-1; + } + if (position+2<length) + { + b=position+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } else { + if ((long) position<0) position=length; + remainder = position - floor(position); + if (position-1>=0) { + a=position-1; + + } + else { + a=0; + } + if (position-2>=0) { + b=position-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,double frequency, double start, double end) { + double remainder; + length=end; + long a,b; + short* buffer = (short *)bufferin; + if (frequency >0.) { + if (position<start) { + position=start; + } + + if ( position >= end ) position = start; + position += ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos+1<length) { + a=pos+1; + + } + else { + a=pos-1; + } + if (pos+2<length) { + b=pos+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos-1>=0) { + a=pos-1; + } + else { + a=0; + } + if (pos-2>=0) { + b=pos-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + + } + + return(output); +} + +//better cubic inerpolation. Cobbled together from various (pd externals, yehar, other places). +double maxiSample::bufferPlay4(unsigned char &bufferin,double frequency, double start, double end) { + double remainder; + double a,b,c,d,a1,a2,a3; + short* buffer = (short*)bufferin; + if (frequency >0.) { + if (position<start) { + position=start; + } + if ( position >= end ) position = start; + position += ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>0) { + a=buffer[(int)(floor(position))-1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position<end-2) { + c=buffer[(long) position+1]; + + } else { + c=buffer[0]; + + } + if (position<end-3) { + d=buffer[(long) position+2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * remainder + a1) * remainder + b) / 32767; + + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(maxiSettings::sampleRate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>start && position < end-1) { + a=buffer[(long) position+1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position>start) { + c=buffer[(long) position-1]; + + } else { + c=buffer[0]; + + } + if (position>start+1) { + d=buffer[(long) position-2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * -remainder + a1) * -remainder + b) / 32767; + + } + + return(output); +} + + +void maxiSample::getLength() { + length=myDataSize*0.5; +} + + diff --git a/ofxMaxim/ofxMaxim/libs/maximilian.h b/ofxMaxim/ofxMaxim/libs/maximilian.h new file mode 100755 index 0000000..3304bac --- /dev/null +++ b/ofxMaxim/ofxMaxim/libs/maximilian.h @@ -0,0 +1,316 @@ +/* + * maximilian.h + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef MAXIMILIAN_H +#define MAXIMILIAN_H + +//#define MAXIMILIAN_PORTAUDIO +#define MAXIMILIAN_RT_AUDIO + +//#include "ofMain.h" +//#include "ofUtils.h" + + +#include <iostream> +#include <fstream> +#include <string> +#include <cstdlib> +#include "math.h" + +using namespace std; +#define TWOPI (3.14159*2) + +class maxiSettings { +public: + static int sampleRate; + static int channels; + static int bufferSize; + static void setup(int initSampleRate, int initChannels, int initBufferSize) { + maxiSettings::sampleRate = initSampleRate; + maxiSettings::channels = initChannels; + maxiSettings::bufferSize = initBufferSize; + } +}; + + +class maxiOsc { + + double frequency; + double phase; + double startphase; + double endphase; + double output; + double tri; + + +public: + maxiOsc(); + double sinewave(double frequency); + double coswave(double frequency); + double phasor(double frequency); + double phasor(double frequency, double startphase, double endphase); + double saw(double frequency); + double triangle(double frequency,double phase); + double square(double frequency); + double pulse(double frequency, double duty); + double noise(); + double sinebuf(double frequency); + double sinebuf4(double frequency); + +}; + + +class maxiEnvelope { + + double period; + double output; + double startval; + double currentval; + double nextval; + +public: + double line(int numberofsegments,double segments[100]); + void trigger(int index,double amp); + int valindex; + double amplitude; + +}; + + +class maxiDelayline { + double frequency; + int phase; + double startphase; + double endphase; + double output; + double memory[88200]; + +public: + double dl(double input, int size, double feedback); + double dl(double input, int size, double feedback, int position); + + +}; + + +class maxiFilter { + double gain; + double input; + double output; + double inputs[10]; + double outputs[10]; + double cutoff1; + double x;//speed + double y;//pos + double z;//pole + double c;//filter coefficient +public: + double cutoff; + double resonance; + double lores(double input,double cutoff1, double resonance); + double hires(double input,double cutoff1, double resonance); + double bandpass(double input,double cutoff1, double resonance); + double lopass(double input,double cutoff); + double hipass(double input,double cutoff); + +}; + +class maxiMix { + double input; + double two[2]; + double four[4]; + double eight[8]; +public: + double x; + double y; + double z; + double *stereo(double input,double two[2],double x); + double *quad(double input,double four[4], double x,double y); + double *ambisonic(double input,double eight[8],double x,double y, double z); + +}; + + +class maxiSample { + +private: + string myPath; + int myChunkSize; + int mySubChunk1Size; + short myFormat; + int myByteRate; + short myBlockAlign; + short myBitsPerSample; + int myDataSize; + double position; + double speed; + double output; + +public: + short myChannels; + int mySampleRate; + long length; + void getLength(); + + char* myData; + + // get/set for the Path property + + ~maxiSample() + { + delete myData; + myChunkSize = NULL; + mySubChunk1Size = NULL; + myFormat = NULL; + myChannels = NULL; + mySampleRate = NULL; + myByteRate = NULL; + myBlockAlign = NULL; + myBitsPerSample = NULL; + myDataSize = NULL; + } + +// maxiSample(); + + bool load(string fileName); + + void trigger(); + + // read a wav file into this class + bool read(); + + double play(); + + double playOnce(); + + double play(double speed); + + double play(double frequency, double start, double end, double &pos); + + double play(double frequency, double start, double end); + + double play4(double frequency, double start, double end); + + double bufferPlay(unsigned char &bufferin,long length); + + double bufferPlay(unsigned char &bufferin,double speed,long length); + + double bufferPlay(unsigned char &bufferin,double frequency, double start, double end); + + double bufferPlay4(unsigned char &bufferin,double frequency, double start, double end); + + //int open(char *filename) { + // // open the wav file + // char *path = new char[50]; + // strcpy(path, filename); + // sample *myWav = new sample(path); + // return 0; + // } + // // print a summary of the wav file + // int info() { + // char *summary = myWav->getSummary(); + // printf("Summary:\n%s", summary); + // return 0; + // } + // int savefile() { + // // write the summary back out + // strcpy(path, "testout.wav"); + // myWav->setPath(path); + // myWav->save(); + // return 0: + // } + // int close() { + // // collect the garbage + // delete summary; + // delete path; + // delete myWav; + // + // return 0; + // } + // write out the wav file + bool save() + { + fstream myFile (myPath.c_str(), ios::out | ios::binary); + + // write the wav file per the wav file format + myFile.seekp (0, ios::beg); + myFile.write ("RIFF", 4); + myFile.write ((char*) &myChunkSize, 4); + myFile.write ("WAVE", 4); + myFile.write ("fmt ", 4); + myFile.write ((char*) &mySubChunk1Size, 4); + myFile.write ((char*) &myFormat, 2); + myFile.write ((char*) &myChannels, 2); + myFile.write ((char*) &mySampleRate, 4); + myFile.write ((char*) &myByteRate, 4); + myFile.write ((char*) &myBlockAlign, 2); + myFile.write ((char*) &myBitsPerSample, 2); + myFile.write ("data", 4); + myFile.write ((char*) &myDataSize, 4); + myFile.write (myData, myDataSize); + + return true; + } + + // return a printable summary of the wav file + char *getSummary() + { + char *summary = new char[250]; + sprintf(summary, " Format: %d\n Channels: %d\n SampleRate: %d\n ByteRate: %d\n BlockAlign: %d\n BitsPerSample: %d\n DataSize: %d\n", myFormat, myChannels, mySampleRate, myByteRate, myBlockAlign, myBitsPerSample, myDataSize); + std::cout << myDataSize; + return summary; + } +}; + + +class maxiMap { +public: + static double inline linlin(double val, double inMin, double inMax, double outMin, double outMax) { + return ((val - inMin) / (inMax - inMin) * (outMax - outMin)) + outMin; + } + + static double inline linexp(double val, double inMin, double inMax, double outMin, double outMax) { + //clipping + val = max(min(val, inMax), inMin); + return pow((outMax / outMin), (val - inMin) / (inMax - inMin)) * outMin; + } + + static double inline explin(double val, double inMin, double inMax, double outMin, double outMax) { + //clipping + val = max(min(val, inMax), inMin); + return (log(val/inMin) / log(inMax/inMin) * (outMax - outMin)) + outMin; + } + +}; + + +#endif diff --git a/ofxMaxim/ofxMaxim/src/ofxMaxim.h b/ofxMaxim/ofxMaxim/src/ofxMaxim.h new file mode 100644 index 0000000..3b5e3c5 --- /dev/null +++ b/ofxMaxim/ofxMaxim/src/ofxMaxim.h @@ -0,0 +1,53 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _OFMAXIM_H +#define _OFMAXIM_H + +#include "maximilian.h" +#include "maxiFFT.h" +#include "maxiGrains.h" + + +typedef maxiMix ofxMaxiMix; +typedef maxiOsc ofxMaxiOsc; +typedef maxiEnvelope ofxMaxiEnvelope; +typedef maxiDelayline ofxMaxiDelayline; +typedef maxiFilter ofxMaxiFilter; +typedef maxiSample ofxMaxiSample; +typedef maxiFFT ofxMaxiFFT; +typedef maxiIFFT ofxMaxiIFFT; +typedef maxiFFTOctaveAnalyzer ofxMaxiFFTOctaveAnalyzer; +typedef maxiSettings ofxMaxiSettings; + + +#endif diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/bin/data/beat2.wav b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/bin/data/beat2.wav Binary files differnew file mode 100644 index 0000000..c71cee6 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/bin/data/beat2.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/emptyExample.xcodeproj/project.pbxproj b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/emptyExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ee99d36 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/emptyExample.xcodeproj/project.pbxproj @@ -0,0 +1,881 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 831DBDD112A5540B00670A99 /* fft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBDC512A5540B00670A99 /* fft.cpp */; }; + 831DBDD412A5540B00670A99 /* maxiFFT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBDCB12A5540B00670A99 /* maxiFFT.cpp */; }; + 831DBDD512A5540B00670A99 /* maximilian.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBDCD12A5540B00670A99 /* maximilian.cpp */; }; + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE0A90E8CC67C009D7055 /* GLee.a */; }; + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE2E30E8CC69C009D7055 /* rtAudio.a */; }; + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; }; + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4C2422B10CC554B004149E2 /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2421E10CC549C004149E2 /* openFrameworksDebug.a */; }; + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427A10CC5B66004149E2 /* CppUnit.a */; }; + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427B10CC5B66004149E2 /* PocoFoundation.a */; }; + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427C10CC5B66004149E2 /* PocoNet.a */; }; + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427D10CC5B66004149E2 /* PocoUtil.a */; }; + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427E10CC5B66004149E2 /* PocoXML.a */; }; + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2429310CC5C38004149E2 /* freetype.a */; }; + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C242CC10CC650E004149E2 /* libfmodex.dylib */; }; + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */; }; + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C246D910CCAE22004149E2 /* freeimage.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E4B27C1510CBEB8E00536013; + remoteInfo = openFrameworks; + }; + E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = E4B27C1410CBEB8E00536013; + remoteInfo = openFrameworks; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E4C2427710CC5ABF004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E4C2444710CC769B004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 831DBDC312A5540B00670A99 /* install.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = install.xml; sourceTree = "<group>"; }; + 831DBDC512A5540B00670A99 /* fft.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fft.cpp; sourceTree = "<group>"; }; + 831DBDC612A5540B00670A99 /* fft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fft.h; sourceTree = "<group>"; }; + 831DBDCB12A5540B00670A99 /* maxiFFT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maxiFFT.cpp; sourceTree = "<group>"; }; + 831DBDCC12A5540B00670A99 /* maxiFFT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maxiFFT.h; sourceTree = "<group>"; }; + 831DBDCD12A5540B00670A99 /* maximilian.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maximilian.cpp; sourceTree = "<group>"; }; + 831DBDCE12A5540B00670A99 /* maximilian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maximilian.h; sourceTree = "<group>"; }; + 831DBDD012A5540B00670A99 /* ofxMaxim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxMaxim.h; sourceTree = "<group>"; }; + E45BE0390E8CC647009D7055 /* FreeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeImage.h; path = ../../../libs/freeimage/include/FreeImage.h; sourceTree = SOURCE_ROOT; }; + E45BE03F0E8CC650009D7055 /* fmod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod.h; path = ../../../libs/fmodex/include/fmod.h; sourceTree = SOURCE_ROOT; }; + E45BE0400E8CC650009D7055 /* fmod.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = fmod.hpp; path = ../../../libs/fmodex/include/fmod.hpp; sourceTree = SOURCE_ROOT; }; + E45BE0410E8CC650009D7055 /* fmod_codec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_codec.h; path = ../../../libs/fmodex/include/fmod_codec.h; sourceTree = SOURCE_ROOT; }; + E45BE0420E8CC650009D7055 /* fmod_dsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_dsp.h; path = ../../../libs/fmodex/include/fmod_dsp.h; sourceTree = SOURCE_ROOT; }; + E45BE0430E8CC650009D7055 /* fmod_errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_errors.h; path = ../../../libs/fmodex/include/fmod_errors.h; sourceTree = SOURCE_ROOT; }; + E45BE0440E8CC650009D7055 /* fmod_output.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_output.h; path = ../../../libs/fmodex/include/fmod_output.h; sourceTree = SOURCE_ROOT; }; + E45BE0A70E8CC67C009D7055 /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLee.h; path = ../../../libs/GLee/include/GLee.h; sourceTree = SOURCE_ROOT; }; + E45BE0A90E8CC67C009D7055 /* GLee.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = GLee.a; path = ../../../libs/GLee/lib/osx/GLee.a; sourceTree = SOURCE_ROOT; }; + E45BE2E00E8CC69C009D7055 /* RtAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtAudio.h; path = ../../../libs/rtAudio/include/RtAudio.h; sourceTree = SOURCE_ROOT; }; + E45BE2E10E8CC69C009D7055 /* RtError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtError.h; path = ../../../libs/rtAudio/include/RtError.h; sourceTree = SOURCE_ROOT; }; + E45BE2E30E8CC69C009D7055 /* rtAudio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = rtAudio.a; path = ../../../libs/rtAudio/lib/osx/rtAudio.a; sourceTree = SOURCE_ROOT; }; + E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; }; + E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; + E4B69B5B0A3A1756003C02F2 /* maximilianExampleDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = maximilianExampleDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = "<group>"; }; + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; + E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; + E4C2425F10CC5A78004149E2 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = SOURCE_ROOT; }; + E4C2427A10CC5B66004149E2 /* CppUnit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = CppUnit.a; path = ../../../libs/poco/lib/osx/CppUnit.a; sourceTree = SOURCE_ROOT; }; + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoFoundation.a; path = ../../../libs/poco/lib/osx/PocoFoundation.a; sourceTree = SOURCE_ROOT; }; + E4C2427C10CC5B66004149E2 /* PocoNet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoNet.a; path = ../../../libs/poco/lib/osx/PocoNet.a; sourceTree = SOURCE_ROOT; }; + E4C2427D10CC5B66004149E2 /* PocoUtil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoUtil.a; path = ../../../libs/poco/lib/osx/PocoUtil.a; sourceTree = SOURCE_ROOT; }; + E4C2427E10CC5B66004149E2 /* PocoXML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoXML.a; path = ../../../libs/poco/lib/osx/PocoXML.a; sourceTree = SOURCE_ROOT; }; + E4C2429310CC5C38004149E2 /* freetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freetype.a; path = ../../../libs/freetype/lib/osx/freetype.a; sourceTree = SOURCE_ROOT; }; + E4C242CC10CC650E004149E2 /* libfmodex.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfmodex.dylib; path = ../../../libs/fmodex/lib/osx/libfmodex.dylib; sourceTree = SOURCE_ROOT; }; + E4C246D910CCAE22004149E2 /* freeimage.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freeimage.a; path = ../../../libs/FreeImage/lib/osx/freeimage.a; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E4B69B590A3A1756003C02F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E4C2422B10CC554B004149E2 /* openFrameworksDebug.a in Frameworks */, + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */, + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */, + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */, + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */, + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */, + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */, + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */, + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */, + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */, + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */, + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */, + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 831DBDC212A5540B00670A99 /* ofxMaxim */ = { + isa = PBXGroup; + children = ( + 831DBDC312A5540B00670A99 /* install.xml */, + 831DBDC412A5540B00670A99 /* libs */, + 831DBDCF12A5540B00670A99 /* src */, + ); + name = ofxMaxim; + path = ../../../addons/ofxMaxim; + sourceTree = SOURCE_ROOT; + }; + 831DBDC412A5540B00670A99 /* libs */ = { + isa = PBXGroup; + children = ( + 831DBDC512A5540B00670A99 /* fft.cpp */, + 831DBDC612A5540B00670A99 /* fft.h */, + 831DBDCB12A5540B00670A99 /* maxiFFT.cpp */, + 831DBDCC12A5540B00670A99 /* maxiFFT.h */, + 831DBDCD12A5540B00670A99 /* maximilian.cpp */, + 831DBDCE12A5540B00670A99 /* maximilian.h */, + ); + path = libs; + sourceTree = "<group>"; + }; + 831DBDCF12A5540B00670A99 /* src */ = { + isa = PBXGroup; + children = ( + 831DBDD012A5540B00670A99 /* ofxMaxim.h */, + ); + path = src; + sourceTree = "<group>"; + }; + 8335604112A54201008354E9 /* addons */ = { + isa = PBXGroup; + children = ( + 831DBDC212A5540B00670A99 /* ofxMaxim */, + ); + name = addons; + sourceTree = "<group>"; + }; + E45BE0360E8CC5DE009D7055 /* libs */ = { + isa = PBXGroup; + children = ( + E45BEED60E8CCB34009D7055 /* core */, + ); + name = libs; + sourceTree = "<group>"; + }; + E45BE0370E8CC647009D7055 /* freeimage */ = { + isa = PBXGroup; + children = ( + E4C246D810CCAE22004149E2 /* osx */, + E45BE0380E8CC647009D7055 /* include */, + ); + name = freeimage; + path = ../../../libs/freeimage; + sourceTree = SOURCE_ROOT; + }; + E45BE0380E8CC647009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0390E8CC647009D7055 /* FreeImage.h */, + ); + name = include; + path = ../../../libs/freeimage/include; + sourceTree = SOURCE_ROOT; + }; + E45BE03D0E8CC650009D7055 /* fmodex */ = { + isa = PBXGroup; + children = ( + E45BE03E0E8CC650009D7055 /* inc */, + E4C2428E10CC5C18004149E2 /* osx */, + ); + name = fmodex; + path = ../../../libs/fmodex; + sourceTree = SOURCE_ROOT; + }; + E45BE03E0E8CC650009D7055 /* inc */ = { + isa = PBXGroup; + children = ( + E45BE03F0E8CC650009D7055 /* fmod.h */, + E45BE0400E8CC650009D7055 /* fmod.hpp */, + E45BE0410E8CC650009D7055 /* fmod_codec.h */, + E45BE0420E8CC650009D7055 /* fmod_dsp.h */, + E45BE0430E8CC650009D7055 /* fmod_errors.h */, + E45BE0440E8CC650009D7055 /* fmod_output.h */, + ); + name = inc; + path = ../../../libs/fmodex/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0480E8CC657009D7055 /* core libraries */ = { + isa = PBXGroup; + children = ( + E4C2425B10CC5A78004149E2 /* glut */, + E45BEC7B0E8CC911009D7055 /* poco */, + E45BE2D50E8CC69C009D7055 /* rtAudio */, + E45BE0A50E8CC67C009D7055 /* GLee */, + E45BE0490E8CC676009D7055 /* freetype */, + E45BE03D0E8CC650009D7055 /* fmodex */, + E45BE0370E8CC647009D7055 /* freeimage */, + ); + name = "core libraries"; + sourceTree = "<group>"; + }; + E45BE0490E8CC676009D7055 /* freetype */ = { + isa = PBXGroup; + children = ( + E4C2429210CC5C38004149E2 /* osx */, + ); + name = freetype; + path = ../../../libs/freetype; + sourceTree = SOURCE_ROOT; + }; + E45BE0A50E8CC67C009D7055 /* GLee */ = { + isa = PBXGroup; + children = ( + E45BE0A60E8CC67C009D7055 /* include */, + E45BE0A80E8CC67C009D7055 /* lib */, + ); + name = GLee; + path = ../../../libs/GLee; + sourceTree = SOURCE_ROOT; + }; + E45BE0A60E8CC67C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0A70E8CC67C009D7055 /* GLee.h */, + ); + name = include; + path = ../../../libs/GLee/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0A80E8CC67C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE0A90E8CC67C009D7055 /* GLee.a */, + ); + name = lib; + path = ../../../libs/GLee/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE2D50E8CC69C009D7055 /* rtAudio */ = { + isa = PBXGroup; + children = ( + E45BE2D60E8CC69C009D7055 /* include */, + E45BE2E20E8CC69C009D7055 /* lib */, + ); + name = rtAudio; + path = ../../../libs/rtAudio; + sourceTree = SOURCE_ROOT; + }; + E45BE2D60E8CC69C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE2D70E8CC69C009D7055 /* asio */, + E45BE2E00E8CC69C009D7055 /* RtAudio.h */, + E45BE2E10E8CC69C009D7055 /* RtError.h */, + ); + name = include; + path = ../../../libs/rtAudio/include; + sourceTree = SOURCE_ROOT; + }; + E45BE2D70E8CC69C009D7055 /* asio */ = { + isa = PBXGroup; + children = ( + ); + name = asio; + path = ../../../libs/rtAudio/include/asio; + sourceTree = SOURCE_ROOT; + }; + E45BE2E20E8CC69C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE2E30E8CC69C009D7055 /* rtAudio.a */, + ); + name = lib; + path = ../../../libs/rtAudio/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE5980E8CC70C009D7055 /* core frameworks */ = { + isa = PBXGroup; + children = ( + E4C2424410CC5A17004149E2 /* AppKit.framework */, + E4C2424510CC5A17004149E2 /* Cocoa.framework */, + E4C2424610CC5A17004149E2 /* IOKit.framework */, + E45BE9710E8CC7DD009D7055 /* AGL.framework */, + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, + E45BE9740E8CC7DD009D7055 /* Carbon.framework */, + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, + ); + name = "core frameworks"; + sourceTree = "<group>"; + }; + E45BEC7B0E8CC911009D7055 /* poco */ = { + isa = PBXGroup; + children = ( + E4C2427910CC5B66004149E2 /* osx */, + ); + name = poco; + path = ../../../libs/poco; + sourceTree = SOURCE_ROOT; + }; + E45BEED60E8CCB34009D7055 /* core */ = { + isa = PBXGroup; + children = ( + E45BE0480E8CC657009D7055 /* core libraries */, + E45BE5980E8CC70C009D7055 /* core frameworks */, + ); + name = core; + sourceTree = "<group>"; + }; + E4B69B4A0A3A1720003C02F2 = { + isa = PBXGroup; + children = ( + 8335604112A54201008354E9 /* addons */, + E4B69B5B0A3A1756003C02F2 /* maximilianExampleDebug.app */, + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, + E4B69E1C0A3A1BDC003C02F2 /* src */, + E4C2422310CC54B6004149E2 /* openFrameworks */, + E45BE0360E8CC5DE009D7055 /* libs */, + ); + sourceTree = "<group>"; + }; + E4B69E1C0A3A1BDC003C02F2 /* src */ = { + isa = PBXGroup; + children = ( + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; + E4C2421710CC549C004149E2 /* Products */ = { + isa = PBXGroup; + children = ( + E4C2421E10CC549C004149E2 /* openFrameworksDebug.a */, + ); + name = Products; + sourceTree = "<group>"; + }; + E4C2422310CC54B6004149E2 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */, + ); + name = openFrameworks; + sourceTree = "<group>"; + }; + E4C2425B10CC5A78004149E2 /* glut */ = { + isa = PBXGroup; + children = ( + E4C2425D10CC5A78004149E2 /* lib */, + ); + name = glut; + path = ../../../libs/glut; + sourceTree = SOURCE_ROOT; + }; + E4C2425D10CC5A78004149E2 /* lib */ = { + isa = PBXGroup; + children = ( + E4C2425E10CC5A78004149E2 /* osx */, + ); + name = lib; + path = ../../../libs/glut/lib; + sourceTree = SOURCE_ROOT; + }; + E4C2425E10CC5A78004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2425F10CC5A78004149E2 /* GLUT.framework */, + ); + name = osx; + path = ../../../libs/glut/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2427910CC5B66004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2427A10CC5B66004149E2 /* CppUnit.a */, + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */, + E4C2427C10CC5B66004149E2 /* PocoNet.a */, + E4C2427D10CC5B66004149E2 /* PocoUtil.a */, + E4C2427E10CC5B66004149E2 /* PocoXML.a */, + ); + name = osx; + path = ../../../libs/poco/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2428E10CC5C18004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C242CC10CC650E004149E2 /* libfmodex.dylib */, + ); + name = osx; + path = ../../../libs/fmodex/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2429210CC5C38004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2429310CC5C38004149E2 /* freetype.a */, + ); + name = osx; + path = ../../../libs/freetype/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C246D810CCAE22004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C246D910CCAE22004149E2 /* freeimage.a */, + ); + name = osx; + path = ../../../libs/FreeImage/lib/osx; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E4B69B5A0A3A1756003C02F2 /* maximilianExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "maximilianExample" */; + buildPhases = ( + E4B69B580A3A1756003C02F2 /* Sources */, + E4B69B590A3A1756003C02F2 /* Frameworks */, + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, + E4C2427710CC5ABF004149E2 /* CopyFiles */, + E4C2444710CC769B004149E2 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + E4C2422810CC54DA004149E2 /* PBXTargetDependency */, + ); + name = maximilianExample; + productName = myOFApp; + productReference = E4B69B5B0A3A1756003C02F2 /* maximilianExampleDebug.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E4B69B4C0A3A1720003C02F2 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "emptyExample" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = E4B69B4A0A3A1720003C02F2; + productRefGroup = E4B69B4A0A3A1720003C02F2; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = E4C2421710CC549C004149E2 /* Products */; + ProjectRef = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + E4B69B5A0A3A1756003C02F2 /* maximilianExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + E4C2421E10CC549C004149E2 /* openFrameworksDebug.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = openFrameworksDebug.a; + remoteRef = E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXShellScriptBuildPhase section */ + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"\ninstall_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\" "; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E4B69B580A3A1756003C02F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + 831DBDD112A5540B00670A99 /* fft.cpp in Sources */, + 831DBDD412A5540B00670A99 /* maxiFFT.cpp in Sources */, + 831DBDD512A5540B00670A99 /* maximilian.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E4C2422810CC54DA004149E2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = openFrameworks; + targetProxy = E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + E4B27CA010CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + 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_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = ReleaseUniversal; + }; + E4B27CA110CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Universal"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = ReleaseUniversal; + }; + E4B69B4E0A3A1720003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + 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_MODEL_TUNING = G5; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Debug; + }; + E4B69B4F0A3A1720003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + 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_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Release; + }; + E4B69B600A3A1757003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G4; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Debug"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Debug; + }; + E4B69B610A3A1757003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "emptyExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B4E0A3A1720003C02F2 /* Debug */, + E4B69B4F0A3A1720003C02F2 /* Release */, + E4B27CA010CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "maximilianExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B600A3A1757003C02F2 /* Debug */, + E4B69B610A3A1757003C02F2 /* Release */, + E4B27CA110CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/openFrameworks-Info.plist b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/openFrameworks-Info.plist new file mode 100644 index 0000000..e5db555 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/openFrameworks-Info.plist @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.yourcompany.openFrameworks</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> +</dict> +</plist> diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/main.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/main.cpp new file mode 100644 index 0000000..312c54e --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/main.cpp @@ -0,0 +1,16 @@ +#include "ofMain.h" +#include "testApp.h" +#include "ofAppGlutWindow.h" + +//======================================================================== +int main( ){ + + ofAppGlutWindow window; + ofSetupOpenGL(&window, 800,600, 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 testApp()); + +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/testApp.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/testApp.cpp new file mode 100644 index 0000000..9f5bcb3 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/testApp.cpp @@ -0,0 +1,149 @@ +/* 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 "testApp.h" + + + +//------------------------------------------------------------- +testApp::~testApp() { + + delete beat.myData; /*you should probably delete myData for any sample object + that you've created in testApp.h*/ + +} + + +//-------------------------------------------------------------- +void testApp::setup(){ + /* some standard setup stuff*/ + + ofEnableAlphaBlending(); + ofSetupScreen(); + ofBackground(0, 0, 0); + ofSetVerticalSync(true); + + /* This is stuff you always need.*/ + + sampleRate = 44100; /* Sampling Rate */ + initialBufferSize = 512; /* Buffer Size. you have to fill this buffer with sound*/ + + + /* Now you can put anything you would normally put in maximilian's 'setup' method in here. */ + + + beat.load(ofToDataPath("beat2.wav")); + beat.getLength(); + + + ofSoundStreamSetup(2,0,this, sampleRate, initialBufferSize, 4);/* Call this last ! */ +} + +//-------------------------------------------------------------- +void testApp::update(){ + +} + +//-------------------------------------------------------------- +void testApp::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(255, 255, 255,255); + ofRect(600, 300, sample*150, sample*150); /* audio sigs go between -1 and 1. See?*/ + ofCircle(200, 300, wave*150); + +} + +//-------------------------------------------------------------- +void testApp::audioRequested (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'. + + */ + + + + sample=beat.play(0.5, 0, beat.length); + wave=sine1.sinebuf(abs(mouseX));/* mouse controls sinewave pitch. we get abs value to stop it dropping +// delow zero and killing the soundcard*/ + + mymix.stereo(sample + 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]; + } + +} + +//-------------------------------------------------------------- +void testApp::audioReceived (float * input, int bufferSize, int nChannels){ + + + /* You can just grab this input and stick it in a double, then use it above to create output*/ + + for (int i = 0; i < bufferSize; i++){ + + /* you can also grab the data out of the arrays*/ + + + } + +} + +//-------------------------------------------------------------- +void testApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void testApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void testApp::mouseMoved(int x, int y ){ + + + +} + +//-------------------------------------------------------------- +void testApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::windowResized(int w, int h){ + +} + diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/testApp.h b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/testApp.h new file mode 100644 index 0000000..ed251be --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example/src/testApp.h @@ -0,0 +1,41 @@ +#ifndef _TEST_APP +#define _TEST_APP + + +#include "ofMain.h" +#include "ofxMaxim.h" + + +class testApp : public ofBaseApp{ + + public: + ~testApp();/* deconsructor is very useful */ + 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 audioRequested (float * input, int bufferSize, int nChannels); /* output method */ + void audioReceived (float * input, int bufferSize, int nChannels); /* input method */ + + int initialBufferSize; /* buffer size */ + int sampleRate; + + + /* stick you maximilian stuff below */ + + double wave,sample,outputs[2]; + ofxMaxiMix mymix; + ofxMaxiOsc sine1; + ofxMaxiSample beats,beat; + +}; + +#endif diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/ofMaximilian_fft.xcodeproj/project.pbxproj b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/ofMaximilian_fft.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ec0203e --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/ofMaximilian_fft.xcodeproj/project.pbxproj @@ -0,0 +1,885 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 831DBE2512A557A500670A99 /* fft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE1912A557A500670A99 /* fft.cpp */; }; + 831DBE2812A557A500670A99 /* maxiFFT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE1F12A557A500670A99 /* maxiFFT.cpp */; }; + 831DBE2912A557A500670A99 /* maximilian.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE2112A557A500670A99 /* maximilian.cpp */; }; + 83B352D812A6A1BB001DE187 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83B352D712A6A1BB001DE187 /* Accelerate.framework */; }; + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE0A90E8CC67C009D7055 /* GLee.a */; }; + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE2E30E8CC69C009D7055 /* rtAudio.a */; }; + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; }; + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4C2422B10CC554B004149E2 /* openFrameworks.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2421E10CC549C004149E2 /* openFrameworks.a */; }; + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427A10CC5B66004149E2 /* CppUnit.a */; }; + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427B10CC5B66004149E2 /* PocoFoundation.a */; }; + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427C10CC5B66004149E2 /* PocoNet.a */; }; + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427D10CC5B66004149E2 /* PocoUtil.a */; }; + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427E10CC5B66004149E2 /* PocoXML.a */; }; + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2429310CC5C38004149E2 /* freetype.a */; }; + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C242CC10CC650E004149E2 /* libfmodex.dylib */; }; + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */; }; + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C246D910CCAE22004149E2 /* freeimage.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E4B27C1510CBEB8E00536013; + remoteInfo = openFrameworks; + }; + E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = E4B27C1410CBEB8E00536013; + remoteInfo = openFrameworks; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E4C2427710CC5ABF004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E4C2444710CC769B004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 831DBE1712A557A500670A99 /* install.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = install.xml; sourceTree = "<group>"; }; + 831DBE1912A557A500670A99 /* fft.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fft.cpp; sourceTree = "<group>"; }; + 831DBE1A12A557A500670A99 /* fft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fft.h; sourceTree = "<group>"; }; + 831DBE1F12A557A500670A99 /* maxiFFT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maxiFFT.cpp; sourceTree = "<group>"; }; + 831DBE2012A557A500670A99 /* maxiFFT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maxiFFT.h; sourceTree = "<group>"; }; + 831DBE2112A557A500670A99 /* maximilian.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maximilian.cpp; sourceTree = "<group>"; }; + 831DBE2212A557A500670A99 /* maximilian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maximilian.h; sourceTree = "<group>"; }; + 831DBE2412A557A500670A99 /* ofxMaxim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxMaxim.h; sourceTree = "<group>"; }; + 83B352D712A6A1BB001DE187 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + E45BE0390E8CC647009D7055 /* FreeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeImage.h; path = ../../../libs/freeimage/include/FreeImage.h; sourceTree = SOURCE_ROOT; }; + E45BE03F0E8CC650009D7055 /* fmod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod.h; path = ../../../libs/fmodex/include/fmod.h; sourceTree = SOURCE_ROOT; }; + E45BE0400E8CC650009D7055 /* fmod.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = fmod.hpp; path = ../../../libs/fmodex/include/fmod.hpp; sourceTree = SOURCE_ROOT; }; + E45BE0410E8CC650009D7055 /* fmod_codec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_codec.h; path = ../../../libs/fmodex/include/fmod_codec.h; sourceTree = SOURCE_ROOT; }; + E45BE0420E8CC650009D7055 /* fmod_dsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_dsp.h; path = ../../../libs/fmodex/include/fmod_dsp.h; sourceTree = SOURCE_ROOT; }; + E45BE0430E8CC650009D7055 /* fmod_errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_errors.h; path = ../../../libs/fmodex/include/fmod_errors.h; sourceTree = SOURCE_ROOT; }; + E45BE0440E8CC650009D7055 /* fmod_output.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_output.h; path = ../../../libs/fmodex/include/fmod_output.h; sourceTree = SOURCE_ROOT; }; + E45BE0A70E8CC67C009D7055 /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLee.h; path = ../../../libs/GLee/include/GLee.h; sourceTree = SOURCE_ROOT; }; + E45BE0A90E8CC67C009D7055 /* GLee.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = GLee.a; path = ../../../libs/GLee/lib/osx/GLee.a; sourceTree = SOURCE_ROOT; }; + E45BE2E00E8CC69C009D7055 /* RtAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtAudio.h; path = ../../../libs/rtAudio/include/RtAudio.h; sourceTree = SOURCE_ROOT; }; + E45BE2E10E8CC69C009D7055 /* RtError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtError.h; path = ../../../libs/rtAudio/include/RtError.h; sourceTree = SOURCE_ROOT; }; + E45BE2E30E8CC69C009D7055 /* rtAudio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = rtAudio.a; path = ../../../libs/rtAudio/lib/osx/rtAudio.a; sourceTree = SOURCE_ROOT; }; + E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; }; + E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; + E4B69B5B0A3A1756003C02F2 /* maximilian_fftDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = maximilian_fftDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = "<group>"; }; + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; + E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; + E4C2425F10CC5A78004149E2 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = SOURCE_ROOT; }; + E4C2427A10CC5B66004149E2 /* CppUnit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = CppUnit.a; path = ../../../libs/poco/lib/osx/CppUnit.a; sourceTree = SOURCE_ROOT; }; + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoFoundation.a; path = ../../../libs/poco/lib/osx/PocoFoundation.a; sourceTree = SOURCE_ROOT; }; + E4C2427C10CC5B66004149E2 /* PocoNet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoNet.a; path = ../../../libs/poco/lib/osx/PocoNet.a; sourceTree = SOURCE_ROOT; }; + E4C2427D10CC5B66004149E2 /* PocoUtil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoUtil.a; path = ../../../libs/poco/lib/osx/PocoUtil.a; sourceTree = SOURCE_ROOT; }; + E4C2427E10CC5B66004149E2 /* PocoXML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoXML.a; path = ../../../libs/poco/lib/osx/PocoXML.a; sourceTree = SOURCE_ROOT; }; + E4C2429310CC5C38004149E2 /* freetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freetype.a; path = ../../../libs/freetype/lib/osx/freetype.a; sourceTree = SOURCE_ROOT; }; + E4C242CC10CC650E004149E2 /* libfmodex.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfmodex.dylib; path = ../../../libs/fmodex/lib/osx/libfmodex.dylib; sourceTree = SOURCE_ROOT; }; + E4C246D910CCAE22004149E2 /* freeimage.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freeimage.a; path = ../../../libs/FreeImage/lib/osx/freeimage.a; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E4B69B590A3A1756003C02F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E4C2422B10CC554B004149E2 /* openFrameworks.a in Frameworks */, + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */, + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */, + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */, + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */, + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */, + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */, + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */, + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */, + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */, + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */, + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */, + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */, + 83B352D812A6A1BB001DE187 /* Accelerate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 831DBE1012A5579B00670A99 /* addons */ = { + isa = PBXGroup; + children = ( + 831DBE1612A557A500670A99 /* ofxMaxim */, + ); + name = addons; + sourceTree = "<group>"; + }; + 831DBE1612A557A500670A99 /* ofxMaxim */ = { + isa = PBXGroup; + children = ( + 831DBE1712A557A500670A99 /* install.xml */, + 831DBE1812A557A500670A99 /* libs */, + 831DBE2312A557A500670A99 /* src */, + ); + name = ofxMaxim; + path = ../../../addons/ofxMaxim; + sourceTree = SOURCE_ROOT; + }; + 831DBE1812A557A500670A99 /* libs */ = { + isa = PBXGroup; + children = ( + 831DBE1912A557A500670A99 /* fft.cpp */, + 831DBE1A12A557A500670A99 /* fft.h */, + 831DBE1F12A557A500670A99 /* maxiFFT.cpp */, + 831DBE2012A557A500670A99 /* maxiFFT.h */, + 831DBE2112A557A500670A99 /* maximilian.cpp */, + 831DBE2212A557A500670A99 /* maximilian.h */, + ); + path = libs; + sourceTree = "<group>"; + }; + 831DBE2312A557A500670A99 /* src */ = { + isa = PBXGroup; + children = ( + 831DBE2412A557A500670A99 /* ofxMaxim.h */, + ); + path = src; + sourceTree = "<group>"; + }; + E45BE0360E8CC5DE009D7055 /* libs */ = { + isa = PBXGroup; + children = ( + E45BEED60E8CCB34009D7055 /* core */, + ); + name = libs; + sourceTree = "<group>"; + }; + E45BE0370E8CC647009D7055 /* freeimage */ = { + isa = PBXGroup; + children = ( + E4C246D810CCAE22004149E2 /* osx */, + E45BE0380E8CC647009D7055 /* include */, + ); + name = freeimage; + path = ../../../libs/freeimage; + sourceTree = SOURCE_ROOT; + }; + E45BE0380E8CC647009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0390E8CC647009D7055 /* FreeImage.h */, + ); + name = include; + path = ../../../libs/freeimage/include; + sourceTree = SOURCE_ROOT; + }; + E45BE03D0E8CC650009D7055 /* fmodex */ = { + isa = PBXGroup; + children = ( + E45BE03E0E8CC650009D7055 /* inc */, + E4C2428E10CC5C18004149E2 /* osx */, + ); + name = fmodex; + path = ../../../libs/fmodex; + sourceTree = SOURCE_ROOT; + }; + E45BE03E0E8CC650009D7055 /* inc */ = { + isa = PBXGroup; + children = ( + E45BE03F0E8CC650009D7055 /* fmod.h */, + E45BE0400E8CC650009D7055 /* fmod.hpp */, + E45BE0410E8CC650009D7055 /* fmod_codec.h */, + E45BE0420E8CC650009D7055 /* fmod_dsp.h */, + E45BE0430E8CC650009D7055 /* fmod_errors.h */, + E45BE0440E8CC650009D7055 /* fmod_output.h */, + ); + name = inc; + path = ../../../libs/fmodex/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0480E8CC657009D7055 /* core libraries */ = { + isa = PBXGroup; + children = ( + E4C2425B10CC5A78004149E2 /* glut */, + E45BEC7B0E8CC911009D7055 /* poco */, + E45BE2D50E8CC69C009D7055 /* rtAudio */, + E45BE0A50E8CC67C009D7055 /* GLee */, + E45BE0490E8CC676009D7055 /* freetype */, + E45BE03D0E8CC650009D7055 /* fmodex */, + E45BE0370E8CC647009D7055 /* freeimage */, + ); + name = "core libraries"; + sourceTree = "<group>"; + }; + E45BE0490E8CC676009D7055 /* freetype */ = { + isa = PBXGroup; + children = ( + E4C2429210CC5C38004149E2 /* osx */, + ); + name = freetype; + path = ../../../libs/freetype; + sourceTree = SOURCE_ROOT; + }; + E45BE0A50E8CC67C009D7055 /* GLee */ = { + isa = PBXGroup; + children = ( + E45BE0A60E8CC67C009D7055 /* include */, + E45BE0A80E8CC67C009D7055 /* lib */, + ); + name = GLee; + path = ../../../libs/GLee; + sourceTree = SOURCE_ROOT; + }; + E45BE0A60E8CC67C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0A70E8CC67C009D7055 /* GLee.h */, + ); + name = include; + path = ../../../libs/GLee/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0A80E8CC67C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE0A90E8CC67C009D7055 /* GLee.a */, + ); + name = lib; + path = ../../../libs/GLee/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE2D50E8CC69C009D7055 /* rtAudio */ = { + isa = PBXGroup; + children = ( + E45BE2D60E8CC69C009D7055 /* include */, + E45BE2E20E8CC69C009D7055 /* lib */, + ); + name = rtAudio; + path = ../../../libs/rtAudio; + sourceTree = SOURCE_ROOT; + }; + E45BE2D60E8CC69C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE2D70E8CC69C009D7055 /* asio */, + E45BE2E00E8CC69C009D7055 /* RtAudio.h */, + E45BE2E10E8CC69C009D7055 /* RtError.h */, + ); + name = include; + path = ../../../libs/rtAudio/include; + sourceTree = SOURCE_ROOT; + }; + E45BE2D70E8CC69C009D7055 /* asio */ = { + isa = PBXGroup; + children = ( + ); + name = asio; + path = ../../../libs/rtAudio/include/asio; + sourceTree = SOURCE_ROOT; + }; + E45BE2E20E8CC69C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE2E30E8CC69C009D7055 /* rtAudio.a */, + ); + name = lib; + path = ../../../libs/rtAudio/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE5980E8CC70C009D7055 /* core frameworks */ = { + isa = PBXGroup; + children = ( + E4C2424410CC5A17004149E2 /* AppKit.framework */, + E4C2424510CC5A17004149E2 /* Cocoa.framework */, + E4C2424610CC5A17004149E2 /* IOKit.framework */, + E45BE9710E8CC7DD009D7055 /* AGL.framework */, + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, + E45BE9740E8CC7DD009D7055 /* Carbon.framework */, + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, + 83B352D712A6A1BB001DE187 /* Accelerate.framework */, + ); + name = "core frameworks"; + sourceTree = "<group>"; + }; + E45BEC7B0E8CC911009D7055 /* poco */ = { + isa = PBXGroup; + children = ( + E4C2427910CC5B66004149E2 /* osx */, + ); + name = poco; + path = ../../../libs/poco; + sourceTree = SOURCE_ROOT; + }; + E45BEED60E8CCB34009D7055 /* core */ = { + isa = PBXGroup; + children = ( + E45BE0480E8CC657009D7055 /* core libraries */, + E45BE5980E8CC70C009D7055 /* core frameworks */, + ); + name = core; + sourceTree = "<group>"; + }; + E4B69B4A0A3A1720003C02F2 = { + isa = PBXGroup; + children = ( + 831DBE1012A5579B00670A99 /* addons */, + E4B69B5B0A3A1756003C02F2 /* maximilian_fftDebug.app */, + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, + E4B69E1C0A3A1BDC003C02F2 /* src */, + E4C2422310CC54B6004149E2 /* openFrameworks */, + E45BE0360E8CC5DE009D7055 /* libs */, + ); + sourceTree = "<group>"; + }; + E4B69E1C0A3A1BDC003C02F2 /* src */ = { + isa = PBXGroup; + children = ( + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; + E4C2421710CC549C004149E2 /* Products */ = { + isa = PBXGroup; + children = ( + E4C2421E10CC549C004149E2 /* openFrameworks.a */, + ); + name = Products; + sourceTree = "<group>"; + }; + E4C2422310CC54B6004149E2 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */, + ); + name = openFrameworks; + sourceTree = "<group>"; + }; + E4C2425B10CC5A78004149E2 /* glut */ = { + isa = PBXGroup; + children = ( + E4C2425D10CC5A78004149E2 /* lib */, + ); + name = glut; + path = ../../../libs/glut; + sourceTree = SOURCE_ROOT; + }; + E4C2425D10CC5A78004149E2 /* lib */ = { + isa = PBXGroup; + children = ( + E4C2425E10CC5A78004149E2 /* osx */, + ); + name = lib; + path = ../../../libs/glut/lib; + sourceTree = SOURCE_ROOT; + }; + E4C2425E10CC5A78004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2425F10CC5A78004149E2 /* GLUT.framework */, + ); + name = osx; + path = ../../../libs/glut/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2427910CC5B66004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2427A10CC5B66004149E2 /* CppUnit.a */, + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */, + E4C2427C10CC5B66004149E2 /* PocoNet.a */, + E4C2427D10CC5B66004149E2 /* PocoUtil.a */, + E4C2427E10CC5B66004149E2 /* PocoXML.a */, + ); + name = osx; + path = ../../../libs/poco/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2428E10CC5C18004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C242CC10CC650E004149E2 /* libfmodex.dylib */, + ); + name = osx; + path = ../../../libs/fmodex/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2429210CC5C38004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2429310CC5C38004149E2 /* freetype.a */, + ); + name = osx; + path = ../../../libs/freetype/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C246D810CCAE22004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C246D910CCAE22004149E2 /* freeimage.a */, + ); + name = osx; + path = ../../../libs/FreeImage/lib/osx; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E4B69B5A0A3A1756003C02F2 /* maximilian_fft */ = { + isa = PBXNativeTarget; + buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "maximilian_fft" */; + buildPhases = ( + E4B69B580A3A1756003C02F2 /* Sources */, + E4B69B590A3A1756003C02F2 /* Frameworks */, + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, + E4C2427710CC5ABF004149E2 /* CopyFiles */, + E4C2444710CC769B004149E2 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + E4C2422810CC54DA004149E2 /* PBXTargetDependency */, + ); + name = maximilian_fft; + productName = myOFApp; + productReference = E4B69B5B0A3A1756003C02F2 /* maximilian_fftDebug.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E4B69B4C0A3A1720003C02F2 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofMaximilian_fft" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = E4B69B4A0A3A1720003C02F2; + productRefGroup = E4B69B4A0A3A1720003C02F2; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = E4C2421710CC549C004149E2 /* Products */; + ProjectRef = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + E4B69B5A0A3A1756003C02F2 /* maximilian_fft */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + E4C2421E10CC549C004149E2 /* openFrameworks.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = openFrameworks.a; + remoteRef = E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXShellScriptBuildPhase section */ + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"\ninstall_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\" "; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E4B69B580A3A1756003C02F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + 831DBE2512A557A500670A99 /* fft.cpp in Sources */, + 831DBE2812A557A500670A99 /* maxiFFT.cpp in Sources */, + 831DBE2912A557A500670A99 /* maximilian.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E4C2422810CC54DA004149E2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = openFrameworks; + targetProxy = E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + E4B27CA010CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + 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_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = ReleaseUniversal; + }; + E4B27CA110CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Universal"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = ReleaseUniversal; + }; + E4B69B4E0A3A1720003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + 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_MODEL_TUNING = G5; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Debug; + }; + E4B69B4F0A3A1720003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + 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_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Release; + }; + E4B69B600A3A1757003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G4; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Debug"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Debug; + }; + E4B69B610A3A1757003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofMaximilian_fft" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B4E0A3A1720003C02F2 /* Debug */, + E4B69B4F0A3A1720003C02F2 /* Release */, + E4B27CA010CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "maximilian_fft" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B600A3A1757003C02F2 /* Debug */, + E4B69B610A3A1757003C02F2 /* Release */, + E4B27CA110CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/openFrameworks-Info.plist b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/openFrameworks-Info.plist new file mode 100644 index 0000000..e5db555 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/openFrameworks-Info.plist @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.yourcompany.openFrameworks</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> +</dict> +</plist> diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/main.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/main.cpp new file mode 100644 index 0000000..6a32c6a --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/main.cpp @@ -0,0 +1,16 @@ +#include "ofMain.h" +#include "testApp.h" +#include "ofAppGlutWindow.h" + +//======================================================================== +int main( ){ + + ofAppGlutWindow window; + ofSetupOpenGL(&window, 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 testApp()); + +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/testApp.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/testApp.cpp new file mode 100644 index 0000000..c688655 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/testApp.cpp @@ -0,0 +1,192 @@ +/* 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 "testApp.h" +#include "maximilian.h"/* include the lib */ +#include "time.h" + + + +//------------------------------------------------------------- +testApp::~testApp() { + +} + + +//-------------------------------------------------------------- +void testApp::setup(){ + /* some standard setup stuff*/ + + ofEnableAlphaBlending(); + ofSetupScreen(); + ofBackground(0, 0, 0); + ofSetFrameRate(60); + + /* This is stuff you always need.*/ + + sampleRate = 44100; /* Sampling Rate */ + initialBufferSize = 512; /* Buffer Size. you have to fill this buffer with sound*/ + lAudioOut = new float[initialBufferSize];/* outputs */ + rAudioOut = new float[initialBufferSize]; + lAudioIn = new float[initialBufferSize];/* inputs */ + rAudioIn = new float[initialBufferSize]; + + + /* This is a nice safe piece of code */ + memset(lAudioOut, 0, initialBufferSize * sizeof(float)); + memset(rAudioOut, 0, initialBufferSize * sizeof(float)); + + memset(lAudioIn, 0, initialBufferSize * sizeof(float)); + memset(rAudioIn, 0, initialBufferSize * sizeof(float)); + + /* Now you can put anything you would normally put in maximilian's 'setup' method in here. */ + + + + fftSize = 1024; + mfft.setup(fftSize, 1024, 256); + ifft.setup(fftSize, 1024, 256); + + + + nAverages = 12; + oct.setup(sampleRate, fftSize/2, nAverages); + + ofxMaxiSettings::setup(sampleRate, 2, initialBufferSize); + ofSoundStreamSetup(2,0, this, sampleRate, initialBufferSize, 4);/* Call this last ! */ + + ofSetVerticalSync(true); + +} + +//-------------------------------------------------------------- +void testApp::update(){ +} + +//-------------------------------------------------------------- +void testApp::draw(){ + + ofSetColor(255, 255, 255,255); + + //draw fft output + float xinc = 900.0 / fftSize * 2.0; + for(int i=0; i < fftSize / 2; i++) { + float height = mfft.magnitudesDB[i] / 50.0 * 400; + ofRect(100 + (i*xinc),450 - height,2, height); + } + //draw phases + ofSetColor(0, 255, 0,100); + for(int i=0; i < fftSize / 2; i++) { + float height = mfft.phases[i] / 50.0 * 400; + ofRect(100 + (i*xinc),500 - height,2, height); + } + + //octave analyser + ofSetColor(255, 0, 0,100); + xinc = 900.0 / oct.nAverages; + for(int i=0; i < oct.nAverages; i++) { + float height = oct.averages[i] / 50.0 * 100; + ofRect(100 + (i*xinc),700 - height,2, height); + } + +// cout << callTime << endl; + +} + +//-------------------------------------------------------------- +void testApp::audioRequested (float * output, int bufferSize, int nChannels){ +// static double tm; + for (int i = 0; i < bufferSize; i++){ + wave = osc.saw(maxiMap::linexp(mouseY + ofGetWindowPositionY(), 0, ofGetScreenHeight(), 200, 8000)); + //get fft + if (mfft.process(wave)) { + int bins = fftSize / 2.0; + //do some manipulation + int hpCutoff = floor(((mouseX + ofGetWindowPositionX()) / (float) ofGetScreenWidth()) * fftSize / 2.0); +//highpass + memset(mfft.magnitudes, 0, sizeof(float) * hpCutoff); + memset(mfft.phases, 0, sizeof(float) * hpCutoff); +//lowpass +// memset(mfft.magnitudes + hpCutoff, 0, sizeof(float) * (bins - hpCutoff)); +// memset(mfft.phases + hpCutoff, 0, sizeof(float) * (bins - hpCutoff)); + mfft.magsToDB(); + oct.calculate(mfft.magnitudesDB); + cout << mfft.spectralFlatness() << ", " << mfft.spectralCentroid() << endl; + } + //inverse fft + gettimeofday(&callTS,NULL); + ifftVal = ifft.process(mfft.magnitudes, mfft.phases); + gettimeofday(&callEndTS,NULL); + callTime = (float)(callEndTS.tv_usec - callTS.tv_usec) / 1000000.0; + callTime += (float)(callEndTS.tv_sec - callTS.tv_sec); + //play result + mymix.stereo(ifftVal, outputs, 0.5); +// float mix = ((mouseX + ofGetWindowPositionX()) / (float) ofGetScreenWidth()); +// mymix.stereo((wave * mix) + ((1.0-mix) * ifftVal), outputs, 0.5); + lAudioOut[i] = output[i*nChannels ] = outputs[0]; /* You may end up with lots of outputs. add them here */ + rAudioOut[i] = output[i*nChannels + 1] = outputs[1]; + } + + + +} + +//-------------------------------------------------------------- +void testApp::audioReceived (float * input, int bufferSize, int nChannels){ + + + /* You can just grab this input and stick it in a double, then use it above to create output*/ + + for (int i = 0; i < bufferSize; i++){ + + /* you can also grab the data out of the arrays*/ + + lAudioIn[i] = input[i*2]; + rAudioIn[i] = input[i*2+1]; + } + +} + +//-------------------------------------------------------------- +void testApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void testApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void testApp::mouseMoved(int x, int y ){ + + + +} + +//-------------------------------------------------------------- +void testApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::windowResized(int w, int h){ + +} + diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/testApp.h b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/testApp.h new file mode 100644 index 0000000..ff8a65f --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_fft/src/testApp.h @@ -0,0 +1,62 @@ +#ifndef _TEST_APP +#define _TEST_APP + + +#include "ofMain.h" +#include "ofxMaxim.h" +#include <sys/time.h> + +class testApp : public ofBaseApp{ + + public: + ~testApp();/* deconsructor is very useful */ + 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 audioRequested (float * input, int bufferSize, int nChannels); /* output method */ + void audioReceived (float * input, int bufferSize, int nChannels); /* input method */ + + float * lAudioOut; /* outputs */ + float * rAudioOut; + + float * lAudioIn; /* inputs */ + float * rAudioIn; + + int initialBufferSize; /* buffer size */ + int sampleRate; + + + /* stick you maximilian stuff below */ + + double wave,sample,outputs[2], ifftVal; + maxiMix mymix; + maxiOsc osc; + + ofxMaxiFFTOctaveAnalyzer oct; + int nAverages; + float *ifftOutput; + int ifftSize; + + ofxMaxiIFFT ifft; + ofxMaxiFFT mfft; + int fftSize; + int bins, dataSize; + + float callTime; + timeval callTS, callEndTS; + + + + +}; + +#endif diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/24620__anamorphosis__GMB_Kantilan_1.wav b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/24620__anamorphosis__GMB_Kantilan_1.wav Binary files differnew file mode 100644 index 0000000..81666d1 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/24620__anamorphosis__GMB_Kantilan_1.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav Binary files differnew file mode 100644 index 0000000..490d9ea --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/2630__Jovica__133_bpm_ATTACK_LOOP_04_electrified_analog_kit_variation_16_mono.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/26393__brfindla__Calango1berimbau.wav b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/26393__brfindla__Calango1berimbau.wav Binary files differnew file mode 100644 index 0000000..a9c93a4 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/26393__brfindla__Calango1berimbau.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/59210__suonho__abstract_electrofunkbreakbeats_124bpm_mono.wav b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/59210__suonho__abstract_electrofunkbreakbeats_124bpm_mono.wav Binary files differnew file mode 100644 index 0000000..b23c5f0 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/59210__suonho__abstract_electrofunkbreakbeats_124bpm_mono.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/68373__juskiddink__Cello_open_string_bowed.wav b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/68373__juskiddink__Cello_open_string_bowed.wav Binary files differnew file mode 100644 index 0000000..19064f2 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/68373__juskiddink__Cello_open_string_bowed.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav Binary files differnew file mode 100644 index 0000000..98860be --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/bin/data/71515__Microscopia__Wilhelm_Bruder_Sohne_Organ.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/ofMaximilian_granular.xcodeproj/project.pbxproj b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/ofMaximilian_granular.xcodeproj/project.pbxproj new file mode 100644 index 0000000..eb9c289 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/ofMaximilian_granular.xcodeproj/project.pbxproj @@ -0,0 +1,901 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 831DBE2512A557A500670A99 /* fft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE1912A557A500670A99 /* fft.cpp */; }; + 831DBE2812A557A500670A99 /* maxiFFT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE1F12A557A500670A99 /* maxiFFT.cpp */; }; + 831DBE2912A557A500670A99 /* maximilian.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE2112A557A500670A99 /* maximilian.cpp */; }; + 8337F80812AE5B850035703D /* maxiGrains.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8337F80712AE5B850035703D /* maxiGrains.cpp */; }; + 83B352D812A6A1BB001DE187 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83B352D712A6A1BB001DE187 /* Accelerate.framework */; }; + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE0A90E8CC67C009D7055 /* GLee.a */; }; + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE2E30E8CC69C009D7055 /* rtAudio.a */; }; + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; }; + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4C2422B10CC554B004149E2 /* openFrameworks.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2421E10CC549C004149E2 /* openFrameworks.a */; }; + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427A10CC5B66004149E2 /* CppUnit.a */; }; + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427B10CC5B66004149E2 /* PocoFoundation.a */; }; + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427C10CC5B66004149E2 /* PocoNet.a */; }; + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427D10CC5B66004149E2 /* PocoUtil.a */; }; + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427E10CC5B66004149E2 /* PocoXML.a */; }; + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2429310CC5C38004149E2 /* freetype.a */; }; + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C242CC10CC650E004149E2 /* libfmodex.dylib */; }; + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */; }; + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C246D910CCAE22004149E2 /* freeimage.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E4B27C1510CBEB8E00536013; + remoteInfo = openFrameworks; + }; + E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = E4B27C1410CBEB8E00536013; + remoteInfo = openFrameworks; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E4C2427710CC5ABF004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E4C2444710CC769B004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 831DBE1712A557A500670A99 /* install.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = install.xml; sourceTree = "<group>"; }; + 831DBE1912A557A500670A99 /* fft.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fft.cpp; sourceTree = "<group>"; }; + 831DBE1A12A557A500670A99 /* fft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fft.h; sourceTree = "<group>"; }; + 831DBE1F12A557A500670A99 /* maxiFFT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maxiFFT.cpp; sourceTree = "<group>"; }; + 831DBE2012A557A500670A99 /* maxiFFT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maxiFFT.h; sourceTree = "<group>"; }; + 831DBE2112A557A500670A99 /* maximilian.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maximilian.cpp; sourceTree = "<group>"; }; + 831DBE2212A557A500670A99 /* maximilian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maximilian.h; sourceTree = "<group>"; }; + 831DBE2412A557A500670A99 /* ofxMaxim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxMaxim.h; sourceTree = "<group>"; }; + 8337F80612AE5B850035703D /* maxiGrains.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maxiGrains.h; sourceTree = "<group>"; }; + 8337F80712AE5B850035703D /* maxiGrains.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maxiGrains.cpp; sourceTree = "<group>"; }; + 83B352D712A6A1BB001DE187 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + E45BE0390E8CC647009D7055 /* FreeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeImage.h; path = ../../../libs/freeimage/include/FreeImage.h; sourceTree = SOURCE_ROOT; }; + E45BE03F0E8CC650009D7055 /* fmod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod.h; path = ../../../libs/fmodex/include/fmod.h; sourceTree = SOURCE_ROOT; }; + E45BE0400E8CC650009D7055 /* fmod.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = fmod.hpp; path = ../../../libs/fmodex/include/fmod.hpp; sourceTree = SOURCE_ROOT; }; + E45BE0410E8CC650009D7055 /* fmod_codec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_codec.h; path = ../../../libs/fmodex/include/fmod_codec.h; sourceTree = SOURCE_ROOT; }; + E45BE0420E8CC650009D7055 /* fmod_dsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_dsp.h; path = ../../../libs/fmodex/include/fmod_dsp.h; sourceTree = SOURCE_ROOT; }; + E45BE0430E8CC650009D7055 /* fmod_errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_errors.h; path = ../../../libs/fmodex/include/fmod_errors.h; sourceTree = SOURCE_ROOT; }; + E45BE0440E8CC650009D7055 /* fmod_output.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_output.h; path = ../../../libs/fmodex/include/fmod_output.h; sourceTree = SOURCE_ROOT; }; + E45BE0A70E8CC67C009D7055 /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLee.h; path = ../../../libs/GLee/include/GLee.h; sourceTree = SOURCE_ROOT; }; + E45BE0A90E8CC67C009D7055 /* GLee.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = GLee.a; path = ../../../libs/GLee/lib/osx/GLee.a; sourceTree = SOURCE_ROOT; }; + E45BE2E00E8CC69C009D7055 /* RtAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtAudio.h; path = ../../../libs/rtAudio/include/RtAudio.h; sourceTree = SOURCE_ROOT; }; + E45BE2E10E8CC69C009D7055 /* RtError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtError.h; path = ../../../libs/rtAudio/include/RtError.h; sourceTree = SOURCE_ROOT; }; + E45BE2E30E8CC69C009D7055 /* rtAudio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = rtAudio.a; path = ../../../libs/rtAudio/lib/osx/rtAudio.a; sourceTree = SOURCE_ROOT; }; + E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; }; + E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; + E4B69B5B0A3A1756003C02F2 /* maximilian_granularDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = maximilian_granularDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = "<group>"; }; + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; + E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; + E4C2425F10CC5A78004149E2 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = SOURCE_ROOT; }; + E4C2427A10CC5B66004149E2 /* CppUnit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = CppUnit.a; path = ../../../libs/poco/lib/osx/CppUnit.a; sourceTree = SOURCE_ROOT; }; + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoFoundation.a; path = ../../../libs/poco/lib/osx/PocoFoundation.a; sourceTree = SOURCE_ROOT; }; + E4C2427C10CC5B66004149E2 /* PocoNet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoNet.a; path = ../../../libs/poco/lib/osx/PocoNet.a; sourceTree = SOURCE_ROOT; }; + E4C2427D10CC5B66004149E2 /* PocoUtil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoUtil.a; path = ../../../libs/poco/lib/osx/PocoUtil.a; sourceTree = SOURCE_ROOT; }; + E4C2427E10CC5B66004149E2 /* PocoXML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoXML.a; path = ../../../libs/poco/lib/osx/PocoXML.a; sourceTree = SOURCE_ROOT; }; + E4C2429310CC5C38004149E2 /* freetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freetype.a; path = ../../../libs/freetype/lib/osx/freetype.a; sourceTree = SOURCE_ROOT; }; + E4C242CC10CC650E004149E2 /* libfmodex.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfmodex.dylib; path = ../../../libs/fmodex/lib/osx/libfmodex.dylib; sourceTree = SOURCE_ROOT; }; + E4C246D910CCAE22004149E2 /* freeimage.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freeimage.a; path = ../../../libs/FreeImage/lib/osx/freeimage.a; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E4B69B590A3A1756003C02F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E4C2422B10CC554B004149E2 /* openFrameworks.a in Frameworks */, + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */, + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */, + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */, + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */, + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */, + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */, + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */, + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */, + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */, + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */, + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */, + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */, + 83B352D812A6A1BB001DE187 /* Accelerate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 831DBE1012A5579B00670A99 /* addons */ = { + isa = PBXGroup; + children = ( + 831DBE1612A557A500670A99 /* ofxMaxim */, + ); + name = addons; + sourceTree = "<group>"; + }; + 831DBE1612A557A500670A99 /* ofxMaxim */ = { + isa = PBXGroup; + children = ( + 831DBE1712A557A500670A99 /* install.xml */, + 831DBE1812A557A500670A99 /* libs */, + 831DBE2312A557A500670A99 /* src */, + ); + name = ofxMaxim; + path = ../../../addons/ofxMaxim; + sourceTree = SOURCE_ROOT; + }; + 831DBE1812A557A500670A99 /* libs */ = { + isa = PBXGroup; + children = ( + 831DBE1912A557A500670A99 /* fft.cpp */, + 831DBE1A12A557A500670A99 /* fft.h */, + 831DBE1F12A557A500670A99 /* maxiFFT.cpp */, + 831DBE2012A557A500670A99 /* maxiFFT.h */, + 831DBE2112A557A500670A99 /* maximilian.cpp */, + 831DBE2212A557A500670A99 /* maximilian.h */, + 8337F80612AE5B850035703D /* maxiGrains.h */, + 8337F80712AE5B850035703D /* maxiGrains.cpp */, + ); + path = libs; + sourceTree = "<group>"; + }; + 831DBE2312A557A500670A99 /* src */ = { + isa = PBXGroup; + children = ( + 831DBE2412A557A500670A99 /* ofxMaxim.h */, + ); + path = src; + sourceTree = "<group>"; + }; + 83FCA95E12E848EC00256429 /* frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = frameworks; + sourceTree = "<group>"; + }; + E45BE0360E8CC5DE009D7055 /* libs */ = { + isa = PBXGroup; + children = ( + E45BEED60E8CCB34009D7055 /* core */, + ); + name = libs; + sourceTree = "<group>"; + }; + E45BE0370E8CC647009D7055 /* freeimage */ = { + isa = PBXGroup; + children = ( + E4C246D810CCAE22004149E2 /* osx */, + E45BE0380E8CC647009D7055 /* include */, + ); + name = freeimage; + path = ../../../libs/freeimage; + sourceTree = SOURCE_ROOT; + }; + E45BE0380E8CC647009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0390E8CC647009D7055 /* FreeImage.h */, + ); + name = include; + path = ../../../libs/freeimage/include; + sourceTree = SOURCE_ROOT; + }; + E45BE03D0E8CC650009D7055 /* fmodex */ = { + isa = PBXGroup; + children = ( + E45BE03E0E8CC650009D7055 /* inc */, + E4C2428E10CC5C18004149E2 /* osx */, + ); + name = fmodex; + path = ../../../libs/fmodex; + sourceTree = SOURCE_ROOT; + }; + E45BE03E0E8CC650009D7055 /* inc */ = { + isa = PBXGroup; + children = ( + E45BE03F0E8CC650009D7055 /* fmod.h */, + E45BE0400E8CC650009D7055 /* fmod.hpp */, + E45BE0410E8CC650009D7055 /* fmod_codec.h */, + E45BE0420E8CC650009D7055 /* fmod_dsp.h */, + E45BE0430E8CC650009D7055 /* fmod_errors.h */, + E45BE0440E8CC650009D7055 /* fmod_output.h */, + ); + name = inc; + path = ../../../libs/fmodex/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0480E8CC657009D7055 /* core libraries */ = { + isa = PBXGroup; + children = ( + E4C2425B10CC5A78004149E2 /* glut */, + E45BEC7B0E8CC911009D7055 /* poco */, + E45BE2D50E8CC69C009D7055 /* rtAudio */, + E45BE0A50E8CC67C009D7055 /* GLee */, + E45BE0490E8CC676009D7055 /* freetype */, + E45BE03D0E8CC650009D7055 /* fmodex */, + E45BE0370E8CC647009D7055 /* freeimage */, + ); + name = "core libraries"; + sourceTree = "<group>"; + }; + E45BE0490E8CC676009D7055 /* freetype */ = { + isa = PBXGroup; + children = ( + E4C2429210CC5C38004149E2 /* osx */, + ); + name = freetype; + path = ../../../libs/freetype; + sourceTree = SOURCE_ROOT; + }; + E45BE0A50E8CC67C009D7055 /* GLee */ = { + isa = PBXGroup; + children = ( + E45BE0A60E8CC67C009D7055 /* include */, + E45BE0A80E8CC67C009D7055 /* lib */, + ); + name = GLee; + path = ../../../libs/GLee; + sourceTree = SOURCE_ROOT; + }; + E45BE0A60E8CC67C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0A70E8CC67C009D7055 /* GLee.h */, + ); + name = include; + path = ../../../libs/GLee/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0A80E8CC67C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE0A90E8CC67C009D7055 /* GLee.a */, + ); + name = lib; + path = ../../../libs/GLee/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE2D50E8CC69C009D7055 /* rtAudio */ = { + isa = PBXGroup; + children = ( + E45BE2D60E8CC69C009D7055 /* include */, + E45BE2E20E8CC69C009D7055 /* lib */, + ); + name = rtAudio; + path = ../../../libs/rtAudio; + sourceTree = SOURCE_ROOT; + }; + E45BE2D60E8CC69C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE2D70E8CC69C009D7055 /* asio */, + E45BE2E00E8CC69C009D7055 /* RtAudio.h */, + E45BE2E10E8CC69C009D7055 /* RtError.h */, + ); + name = include; + path = ../../../libs/rtAudio/include; + sourceTree = SOURCE_ROOT; + }; + E45BE2D70E8CC69C009D7055 /* asio */ = { + isa = PBXGroup; + children = ( + ); + name = asio; + path = ../../../libs/rtAudio/include/asio; + sourceTree = SOURCE_ROOT; + }; + E45BE2E20E8CC69C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE2E30E8CC69C009D7055 /* rtAudio.a */, + ); + name = lib; + path = ../../../libs/rtAudio/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE5980E8CC70C009D7055 /* core frameworks */ = { + isa = PBXGroup; + children = ( + E4C2424410CC5A17004149E2 /* AppKit.framework */, + E4C2424510CC5A17004149E2 /* Cocoa.framework */, + E4C2424610CC5A17004149E2 /* IOKit.framework */, + E45BE9710E8CC7DD009D7055 /* AGL.framework */, + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, + E45BE9740E8CC7DD009D7055 /* Carbon.framework */, + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, + 83B352D712A6A1BB001DE187 /* Accelerate.framework */, + ); + name = "core frameworks"; + sourceTree = "<group>"; + }; + E45BEC7B0E8CC911009D7055 /* poco */ = { + isa = PBXGroup; + children = ( + E4C2427910CC5B66004149E2 /* osx */, + ); + name = poco; + path = ../../../libs/poco; + sourceTree = SOURCE_ROOT; + }; + E45BEED60E8CCB34009D7055 /* core */ = { + isa = PBXGroup; + children = ( + E45BE0480E8CC657009D7055 /* core libraries */, + E45BE5980E8CC70C009D7055 /* core frameworks */, + ); + name = core; + sourceTree = "<group>"; + }; + E4B69B4A0A3A1720003C02F2 = { + isa = PBXGroup; + children = ( + 83FCA95E12E848EC00256429 /* frameworks */, + 831DBE1012A5579B00670A99 /* addons */, + E4B69B5B0A3A1756003C02F2 /* maximilian_granularDebug.app */, + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, + E4B69E1C0A3A1BDC003C02F2 /* src */, + E4C2422310CC54B6004149E2 /* openFrameworks */, + E45BE0360E8CC5DE009D7055 /* libs */, + ); + sourceTree = "<group>"; + }; + E4B69E1C0A3A1BDC003C02F2 /* src */ = { + isa = PBXGroup; + children = ( + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; + E4C2421710CC549C004149E2 /* Products */ = { + isa = PBXGroup; + children = ( + E4C2421E10CC549C004149E2 /* openFrameworks.a */, + ); + name = Products; + sourceTree = "<group>"; + }; + E4C2422310CC54B6004149E2 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */, + ); + name = openFrameworks; + sourceTree = "<group>"; + }; + E4C2425B10CC5A78004149E2 /* glut */ = { + isa = PBXGroup; + children = ( + E4C2425D10CC5A78004149E2 /* lib */, + ); + name = glut; + path = ../../../libs/glut; + sourceTree = SOURCE_ROOT; + }; + E4C2425D10CC5A78004149E2 /* lib */ = { + isa = PBXGroup; + children = ( + E4C2425E10CC5A78004149E2 /* osx */, + ); + name = lib; + path = ../../../libs/glut/lib; + sourceTree = SOURCE_ROOT; + }; + E4C2425E10CC5A78004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2425F10CC5A78004149E2 /* GLUT.framework */, + ); + name = osx; + path = ../../../libs/glut/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2427910CC5B66004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2427A10CC5B66004149E2 /* CppUnit.a */, + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */, + E4C2427C10CC5B66004149E2 /* PocoNet.a */, + E4C2427D10CC5B66004149E2 /* PocoUtil.a */, + E4C2427E10CC5B66004149E2 /* PocoXML.a */, + ); + name = osx; + path = ../../../libs/poco/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2428E10CC5C18004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C242CC10CC650E004149E2 /* libfmodex.dylib */, + ); + name = osx; + path = ../../../libs/fmodex/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2429210CC5C38004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2429310CC5C38004149E2 /* freetype.a */, + ); + name = osx; + path = ../../../libs/freetype/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C246D810CCAE22004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C246D910CCAE22004149E2 /* freeimage.a */, + ); + name = osx; + path = ../../../libs/FreeImage/lib/osx; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E4B69B5A0A3A1756003C02F2 /* maximilian_granular */ = { + isa = PBXNativeTarget; + buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "maximilian_granular" */; + buildPhases = ( + E4B69B580A3A1756003C02F2 /* Sources */, + E4B69B590A3A1756003C02F2 /* Frameworks */, + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, + E4C2427710CC5ABF004149E2 /* CopyFiles */, + E4C2444710CC769B004149E2 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + E4C2422810CC54DA004149E2 /* PBXTargetDependency */, + ); + name = maximilian_granular; + productName = myOFApp; + productReference = E4B69B5B0A3A1756003C02F2 /* maximilian_granularDebug.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E4B69B4C0A3A1720003C02F2 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofMaximilian_granular" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = E4B69B4A0A3A1720003C02F2; + productRefGroup = E4B69B4A0A3A1720003C02F2; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = E4C2421710CC549C004149E2 /* Products */; + ProjectRef = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + E4B69B5A0A3A1756003C02F2 /* maximilian_granular */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + E4C2421E10CC549C004149E2 /* openFrameworks.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = openFrameworks.a; + remoteRef = E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXShellScriptBuildPhase section */ + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"\ninstall_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\" "; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E4B69B580A3A1756003C02F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + 831DBE2512A557A500670A99 /* fft.cpp in Sources */, + 831DBE2812A557A500670A99 /* maxiFFT.cpp in Sources */, + 831DBE2912A557A500670A99 /* maximilian.cpp in Sources */, + 8337F80812AE5B850035703D /* maxiGrains.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E4C2422810CC54DA004149E2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = openFrameworks; + targetProxy = E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + E4B27CA010CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; + 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_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = ReleaseUniversal; + }; + E4B27CA110CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Universal"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = ReleaseUniversal; + }; + E4B69B4E0A3A1720003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "${NATIVE_ARCH}"; + 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_MODEL_TUNING = G5; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Debug; + }; + E4B69B4F0A3A1720003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "${NATIVE_ARCH}"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + GCC_AUTO_VECTORIZATION = YES; + GCC_DYNAMIC_NO_PIC = YES; + GCC_ENABLE_SSE3_EXTENSIONS = YES; + GCC_ENABLE_SSE41_EXTENSIONS = YES; + GCC_ENABLE_SSE42_EXTENSIONS = YES; + GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_MODEL_PPC64 = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Release; + }; + E4B69B600A3A1757003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G4; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Debug"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Debug; + }; + E4B69B610A3A1757003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofMaximilian_granular" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B4E0A3A1720003C02F2 /* Debug */, + E4B69B4F0A3A1720003C02F2 /* Release */, + E4B27CA010CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "maximilian_granular" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B600A3A1757003C02F2 /* Debug */, + E4B69B610A3A1757003C02F2 /* Release */, + E4B27CA110CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/openFrameworks-Info.plist b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/openFrameworks-Info.plist new file mode 100644 index 0000000..e5db555 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/openFrameworks-Info.plist @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.yourcompany.openFrameworks</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> +</dict> +</plist> diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/main.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/main.cpp new file mode 100644 index 0000000..6a32c6a --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/main.cpp @@ -0,0 +1,16 @@ +#include "ofMain.h" +#include "testApp.h" +#include "ofAppGlutWindow.h" + +//======================================================================== +int main( ){ + + ofAppGlutWindow window; + ofSetupOpenGL(&window, 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 testApp()); + +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/testApp.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/testApp.cpp new file mode 100644 index 0000000..b7ad49b --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/testApp.cpp @@ -0,0 +1,208 @@ +/* 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 "testApp.h" +#include "maximilian.h"/* include the lib */ +#include "time.h" + + + +//------------------------------------------------------------- +testApp::~testApp() { + delete ts, ts2; +} + + +//-------------------------------------------------------------- +void testApp::setup(){ + + //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); + + + /* This is stuff you always need.*/ + sampleRate = 44100; /* Sampling Rate */ + initialBufferSize = 512; /* Buffer Size. you have to fill this buffer with sound*/ + lAudioOut = new float[initialBufferSize];/* outputs */ + rAudioOut = new float[initialBufferSize]; + lAudioIn = new float[initialBufferSize];/* inputs */ + rAudioIn = new float[initialBufferSize]; + + + /* This is a nice safe piece of code */ + memset(lAudioOut, 0, initialBufferSize * sizeof(float)); + memset(rAudioOut, 0, initialBufferSize * sizeof(float)); + + memset(lAudioIn, 0, initialBufferSize * sizeof(float)); + memset(rAudioIn, 0, initialBufferSize * sizeof(float)); + + + + ts = new maxiTimestretch<grainPlayerWin>(&samp); + ts2 = new maxiTimestretch<grainPlayerWin>(&samp2); + ts3 = new maxiTimestretch<grainPlayerWin>(&samp3); + ts4 = new maxiTimestretch<grainPlayerWin>(&samp4); + ts5 = new maxiTimestretch<grainPlayerWin>(&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); + ofSoundStreamSetup(2,0, this, maxiSettings::sampleRate, initialBufferSize, 4);/* Call this last ! */ + + ofSetVerticalSync(true); + ofEnableAlphaBlending(); + ofEnableSmoothing(); +} + +//-------------------------------------------------------------- +void testApp::update(){ +} + +//-------------------------------------------------------------- +void testApp::draw(){ + 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, 1, 0.1, 0); +// glutWireSphere(i * 5, 2 + (10 - (fabs(speed) * 10)), 2 + (fabs(speed) * 10)); + glutWireSphere(i * 5, 10, 10); + glPopMatrix(); + } + + +} + +//-------------------------------------------------------------- +void testApp::audioRequested (float * output, int bufferSize, int nChannels){ + for (int i = 0; i < bufferSize; i++){ +// 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); + lAudioOut[i] = output[i*nChannels ] = outputs[0]; /* You may end up with lots of outputs. add them here */ + rAudioOut[i] = output[i*nChannels + 1] = outputs[1]; + } +} + +//-------------------------------------------------------------- +void testApp::audioReceived (float * input, int bufferSize, int nChannels){ + /* You can just grab this input and stick it in a double, then use it above to create output*/ + for (int i = 0; i < bufferSize; i++){ + /* you can also grab the data out of the arrays*/ + lAudioIn[i] = input[i*2]; + rAudioIn[i] = input[i*2+1]; + } +} + +//-------------------------------------------------------------- +void testApp::keyPressed(int key){ + switch (key) { + case 'a': + case 'A': + current = 0; + break; + case 's': + case 'S': + current = 1; + break; + case 'd': + case 'D': + current = 2; + break; + case 'f': + case 'F': + current = 3; + break; + case 'g': + case 'G': + current = 4; + break; + } + +} + +//-------------------------------------------------------------- +void testApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void testApp::mouseMoved(int x, int y ){ + speed = ((double ) x / ofGetWidth() * 4.0) - 2.0; + grainLength = ((double) y / ofGetHeight() * 0.1) + 0.001; + pos = ((double) x / ofGetWidth() * 2.0); +// cout << pos << endl; + +} + +//-------------------------------------------------------------- +void testApp::mouseDragged(int x, int y, int button){ +} + +//-------------------------------------------------------------- +void testApp::mousePressed(int x, int y, int button){ + if (++current > stretches.size()-1) current = 0; + +} + +//-------------------------------------------------------------- +void testApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::windowResized(int w, int h){ + +} + diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/testApp.h b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/testApp.h new file mode 100644 index 0000000..d5132d8 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofMaxim_example_granular/src/testApp.h @@ -0,0 +1,57 @@ +#ifndef _TEST_APP +#define _TEST_APP + + +#include "ofMain.h" +#include "ofxMaxim.h" +#include "maxiGrains.h" +#include <sys/time.h> + +typedef hannWinFunctor grainPlayerWin; + +class testApp : public ofBaseApp{ + + public: + ~testApp();/* deconsructor is very useful */ + 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 audioRequested (float * input, int bufferSize, int nChannels); /* output method */ + void audioReceived (float * input, int bufferSize, int nChannels); /* input method */ + + float * lAudioOut; /* outputs */ + float * rAudioOut; + + float * lAudioIn; /* inputs */ + float * rAudioIn; + + int initialBufferSize; /* buffer size */ + int sampleRate; + + + /* stick your maximilian stuff below */ + + double wave,sample,outputs[2]; + maxiSample samp, samp2, samp3, samp4, samp5; + vector<maxiTimestretch<grainPlayerWin>*> stretches; + maxiMix mymix; + maxiTimestretch<grainPlayerWin> *ts, *ts2, *ts3, *ts4, *ts5; + double speed, grainLength; + + ofxMaxiFFT fft; + ofxMaxiFFTOctaveAnalyzer oct; + int current; + double pos; + +}; + +#endif diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/additive2.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/additive2.wav Binary files differnew file mode 100755 index 0000000..55e1803 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/additive2.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/additive22.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/additive22.wav Binary files differnew file mode 100644 index 0000000..a81de78 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/additive22.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/beat2.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/beat2.wav Binary files differnew file mode 100644 index 0000000..c71cee6 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/beat2.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/filterSweep.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/filterSweep.wav Binary files differnew file mode 100755 index 0000000..61c6f37 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/filterSweep.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/filterSweep2.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/filterSweep2.wav Binary files differnew file mode 100644 index 0000000..7a18ef6 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/filterSweep2.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/pinknoise.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/pinknoise.wav Binary files differnew file mode 100755 index 0000000..a98ffbd --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/pinknoise.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/pinknoise2.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/pinknoise2.wav Binary files differnew file mode 100644 index 0000000..5fc42f7 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/pinknoise2.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/scmfccs.rtf b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/scmfccs.rtf new file mode 100644 index 0000000..6991978 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/scmfccs.rtf @@ -0,0 +1,114 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Monaco;\f2\froman\fcharset0 Times-Roman; +} +{\colortbl;\red255\green255\blue255;\red0\green0\blue191;\red0\green0\blue0;\red191\green0\blue0; +\red0\green0\blue191;\red96\green96\blue96;\red96\green96\blue96;\red0\green115\blue0;} +\deftab560 +\pard\pardeftab560\ql\qnatural + +\f0\b\fs36 \cf2 MFCC\cf3 mel frequency cepstral coefficients +\b0 \ +\pard\pardeftab560\ql\qnatural + +\fs24 \cf3 \ + +\b #coeff1, coeff2, ... = \cf2 MFCC\cf3 .kr(chain, numcoeff=13) +\b0 \ +\ + +\b chain [fft] - +\b0 \cf2 Audio\cf3 input to track, which has been pre-analysed by the \cf2 FFT\cf3 \cf2 UGen\cf3 ; see examples below for the expected \cf2 FFT\cf3 size\ + +\b numcoeff [s] - +\b0 \cf2 Number\cf3 of coefficients, defaults to 13, maximum of 42; more efficient to use less of course! \ +\ +\cf2 Generates\cf3 a set of \cf2 MFCCs\cf3 ; these are obtained from a band-based frequency representation (using the \cf2 Mel\cf3 scale by default), and then a discrete cosine transform (\cf2 DCT\cf3 ). \cf2 The\cf3 \cf2 DCT\cf3 is an efficient approximation for principal components analysis, so that it allows a compression, or reduction of dimensionality, of the data, in \cf2 this\cf3 case reducing 42 band readings to a smaller set of \cf2 MFCCs\cf3 . \cf2 A\cf3 small number of features (the coefficients) end up describing the spectrum. \cf2 The\cf3 \cf2 MFCCs\cf3 are commonly used as timbral descriptors. \ +\ +\cf2 Output\cf3 values are somewhat normalised for the range 0.0 to 1.0, but there are no guarantees on exact conformance to \cf2 this\cf3 . \cf2 Commonly\cf3 , the first coefficient will be the highest value. \ +\ +\pard\pardeftab560\ql\qnatural + +\f1\fs18 \cf4 //Technical note: The 0th coefficient is not generated as it consists of multiplying all bands by 1 and summing\cf3 \ +\ +\ +\cf4 //assumes hop of half fftsize, fine\cf3 \ +b = \cf2 Buffer\cf3 .alloc(s,1024,1); \cf4 //for sampling rates 44100 and 48000\cf3 \ +\cf4 //b = Buffer.alloc(s,2048,1); //for sampling rates 88200 and 96000\cf3 \ +\cf0 d=\cf5 Buffer\cf0 .read(s,\cf5 Document\cf0 .current.dir ++ \cf6 "/pinknoise2.wav"\cf0 );\ +d=\cf5 Buffer\cf0 .read(s,\cf5 Document\cf0 .current.dir ++ \cf6 "/whitenoise2.wav"\cf0 );\ +\cf3 d=\cf2 Buffer\cf3 .read(s,\cf2 Document\cf3 .current.dir ++ \cf7 "/sinetest_stepping2.wav"\cf3 );\ +d.play\ +d\ +(\ +x= \{\ +\cf2 var\cf3 in, fft, array;\ +\ +in= \cf2 PlayBuf\cf3 .ar(1,d,\cf2 BufRateScale\cf3 .kr(d),1,0,1);\ +\ +\cf4 //in = SoundIn.ar(0); \cf3 \ +\ +fft = \cf2 FFT\cf3 (b, in, 512, 1);\ +\ +array=\cf2 MFCC\cf3 .kr(fft); \ +\ +array.size.postln; \ +\ +\cf2 Out\cf3 .kr(0,array); \ +\ +\cf2 Out\cf3 .ar(0,\cf2 Pan2\cf3 .ar(in)); \ +\}.play\ +)\ +\ +\ +c= \cf2 Bus\cf3 .new(\cf8 'control'\cf3 , 0, 13); \ +\ +\cf4 //poll coefficients\cf3 \ +c.getn(13,\{\cf2 arg\cf3 val; \{val.plot;\}.defer\}); \ +\ +\ +\ +\cf4 //Continuous graphical display of MFCC values; free routine before closing window\cf3 \ +\ +(\ +\cf2 var\cf3 ms; \ +\ +w=\cf2 Window\cf3 .new(\cf7 "Thirteen MFCC coefficients"\cf3 , \cf2 Rect\cf3 (200,400,700,300));\ +\ +ms= \cf2 MultiSliderView\cf3 .new(w, \cf2 Rect\cf3 (10,10,660,280));\ +\ +ms.value_(\cf2 Array\cf3 .fill(13,0.0));\ +ms.valueThumbSize_(40.0);\ +ms.indexThumbSize_(40.0);\ +ms.gap_(0);\ +\ +w.front;\ +\ +r= \{\ +\ +\cf2 inf\cf3 .do\{\ +\ +c.getn(13,\{\cf2 arg\cf3 val; val.postln; \{ms.value_(val*0.9)\}.defer\}); \ +\ +0.02.wait; \cf4 //25 frames per second\cf3 \ +\};\ +\ +\}.fork;\ +\ +)\ +\ +\ +\cf4 //tidy up\cf3 \ +(\ +r.stop;\ +b.free;\ +c.free;\ +x.free;\ +w.close;\ +)\ +\pard\pardeftab560\ql\qnatural + +\f2\fs32 \cf3 \ +\ +\ +\ +}
\ No newline at end of file diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/sinetest_stepping.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/sinetest_stepping.wav Binary files differnew file mode 100755 index 0000000..f6d63a6 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/sinetest_stepping.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/sinetest_stepping2.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/sinetest_stepping2.wav Binary files differnew file mode 100644 index 0000000..feceaf5 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/sinetest_stepping2.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/whitenoise.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/whitenoise.wav Binary files differnew file mode 100755 index 0000000..0c869b9 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/whitenoise.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/whitenoise2.wav b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/whitenoise2.wav Binary files differnew file mode 100644 index 0000000..e00db67 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/bin/data/whitenoise2.wav diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/mfccs.xcodeproj/project.pbxproj b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/mfccs.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ae22d53 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/mfccs.xcodeproj/project.pbxproj @@ -0,0 +1,891 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 831DBE2512A557A500670A99 /* fft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE1912A557A500670A99 /* fft.cpp */; }; + 831DBE2812A557A500670A99 /* maxiFFT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE1F12A557A500670A99 /* maxiFFT.cpp */; }; + 831DBE2912A557A500670A99 /* maximilian.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 831DBE2112A557A500670A99 /* maximilian.cpp */; }; + 83B352D812A6A1BB001DE187 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83B352D712A6A1BB001DE187 /* Accelerate.framework */; }; + 83F72C7513269E3800DCC5B4 /* maxiMFCC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83F72C7413269E3800DCC5B4 /* maxiMFCC.cpp */; }; + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE0A90E8CC67C009D7055 /* GLee.a */; }; + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE2E30E8CC69C009D7055 /* rtAudio.a */; }; + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; }; + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4C2422B10CC554B004149E2 /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2421E10CC549C004149E2 /* openFrameworksDebug.a */; }; + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4C2425F10CC5A78004149E2 /* GLUT.framework */; }; + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427A10CC5B66004149E2 /* CppUnit.a */; }; + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427B10CC5B66004149E2 /* PocoFoundation.a */; }; + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427C10CC5B66004149E2 /* PocoNet.a */; }; + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427D10CC5B66004149E2 /* PocoUtil.a */; }; + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2427E10CC5B66004149E2 /* PocoXML.a */; }; + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2429310CC5C38004149E2 /* freetype.a */; }; + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C242CC10CC650E004149E2 /* libfmodex.dylib */; }; + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */; }; + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C246D910CCAE22004149E2 /* freeimage.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E4B27C1510CBEB8E00536013; + remoteInfo = openFrameworks; + }; + E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = E4B27C1410CBEB8E00536013; + remoteInfo = openFrameworks; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E4C2427710CC5ABF004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + E4C2426B10CC5AA6004149E2 /* GLUT.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E4C2444710CC769B004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + E4C2443910CC7693004149E2 /* openFrameworks-Info.plist in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 831DBE1712A557A500670A99 /* install.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = install.xml; sourceTree = "<group>"; }; + 831DBE1912A557A500670A99 /* fft.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fft.cpp; sourceTree = "<group>"; }; + 831DBE1A12A557A500670A99 /* fft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fft.h; sourceTree = "<group>"; }; + 831DBE1F12A557A500670A99 /* maxiFFT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maxiFFT.cpp; sourceTree = "<group>"; }; + 831DBE2012A557A500670A99 /* maxiFFT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maxiFFT.h; sourceTree = "<group>"; }; + 831DBE2112A557A500670A99 /* maximilian.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maximilian.cpp; sourceTree = "<group>"; }; + 831DBE2212A557A500670A99 /* maximilian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maximilian.h; sourceTree = "<group>"; }; + 831DBE2412A557A500670A99 /* ofxMaxim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxMaxim.h; sourceTree = "<group>"; }; + 83B352D712A6A1BB001DE187 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 83F72C7313269E3800DCC5B4 /* maxiMFCC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maxiMFCC.h; sourceTree = "<group>"; }; + 83F72C7413269E3800DCC5B4 /* maxiMFCC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maxiMFCC.cpp; sourceTree = "<group>"; }; + E45BE0390E8CC647009D7055 /* FreeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeImage.h; path = ../../../libs/freeimage/include/FreeImage.h; sourceTree = SOURCE_ROOT; }; + E45BE03F0E8CC650009D7055 /* fmod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod.h; path = ../../../libs/fmodex/include/fmod.h; sourceTree = SOURCE_ROOT; }; + E45BE0400E8CC650009D7055 /* fmod.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = fmod.hpp; path = ../../../libs/fmodex/include/fmod.hpp; sourceTree = SOURCE_ROOT; }; + E45BE0410E8CC650009D7055 /* fmod_codec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_codec.h; path = ../../../libs/fmodex/include/fmod_codec.h; sourceTree = SOURCE_ROOT; }; + E45BE0420E8CC650009D7055 /* fmod_dsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_dsp.h; path = ../../../libs/fmodex/include/fmod_dsp.h; sourceTree = SOURCE_ROOT; }; + E45BE0430E8CC650009D7055 /* fmod_errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_errors.h; path = ../../../libs/fmodex/include/fmod_errors.h; sourceTree = SOURCE_ROOT; }; + E45BE0440E8CC650009D7055 /* fmod_output.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fmod_output.h; path = ../../../libs/fmodex/include/fmod_output.h; sourceTree = SOURCE_ROOT; }; + E45BE0A70E8CC67C009D7055 /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLee.h; path = ../../../libs/GLee/include/GLee.h; sourceTree = SOURCE_ROOT; }; + E45BE0A90E8CC67C009D7055 /* GLee.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = GLee.a; path = ../../../libs/GLee/lib/osx/GLee.a; sourceTree = SOURCE_ROOT; }; + E45BE2E00E8CC69C009D7055 /* RtAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtAudio.h; path = ../../../libs/rtAudio/include/RtAudio.h; sourceTree = SOURCE_ROOT; }; + E45BE2E10E8CC69C009D7055 /* RtError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RtError.h; path = ../../../libs/rtAudio/include/RtError.h; sourceTree = SOURCE_ROOT; }; + E45BE2E30E8CC69C009D7055 /* rtAudio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = rtAudio.a; path = ../../../libs/rtAudio/lib/osx/rtAudio.a; sourceTree = SOURCE_ROOT; }; + E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; }; + E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; + E4B69B5B0A3A1756003C02F2 /* mfccsDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = mfccsDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = "<group>"; }; + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; + E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; + E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; + E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; + E4C2425F10CC5A78004149E2 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = SOURCE_ROOT; }; + E4C2427A10CC5B66004149E2 /* CppUnit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = CppUnit.a; path = ../../../libs/poco/lib/osx/CppUnit.a; sourceTree = SOURCE_ROOT; }; + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoFoundation.a; path = ../../../libs/poco/lib/osx/PocoFoundation.a; sourceTree = SOURCE_ROOT; }; + E4C2427C10CC5B66004149E2 /* PocoNet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoNet.a; path = ../../../libs/poco/lib/osx/PocoNet.a; sourceTree = SOURCE_ROOT; }; + E4C2427D10CC5B66004149E2 /* PocoUtil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoUtil.a; path = ../../../libs/poco/lib/osx/PocoUtil.a; sourceTree = SOURCE_ROOT; }; + E4C2427E10CC5B66004149E2 /* PocoXML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoXML.a; path = ../../../libs/poco/lib/osx/PocoXML.a; sourceTree = SOURCE_ROOT; }; + E4C2429310CC5C38004149E2 /* freetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freetype.a; path = ../../../libs/freetype/lib/osx/freetype.a; sourceTree = SOURCE_ROOT; }; + E4C242CC10CC650E004149E2 /* libfmodex.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libfmodex.dylib; path = ../../../libs/fmodex/lib/osx/libfmodex.dylib; sourceTree = SOURCE_ROOT; }; + E4C246D910CCAE22004149E2 /* freeimage.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freeimage.a; path = ../../../libs/FreeImage/lib/osx/freeimage.a; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E4B69B590A3A1756003C02F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E4C2422B10CC554B004149E2 /* openFrameworksDebug.a in Frameworks */, + E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */, + E45BE2E40E8CC69C009D7055 /* rtAudio.a in Frameworks */, + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */, + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, + E4C2426610CC5A78004149E2 /* GLUT.framework in Frameworks */, + E4C2427F10CC5B66004149E2 /* CppUnit.a in Frameworks */, + E4C2428010CC5B66004149E2 /* PocoFoundation.a in Frameworks */, + E4C2428110CC5B66004149E2 /* PocoNet.a in Frameworks */, + E4C2428210CC5B66004149E2 /* PocoUtil.a in Frameworks */, + E4C2428310CC5B66004149E2 /* PocoXML.a in Frameworks */, + E4C2429410CC5C38004149E2 /* freetype.a in Frameworks */, + E4C242CD10CC650E004149E2 /* libfmodex.dylib in Frameworks */, + E4C246DA10CCAE22004149E2 /* freeimage.a in Frameworks */, + 83B352D812A6A1BB001DE187 /* Accelerate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 831DBE1012A5579B00670A99 /* addons */ = { + isa = PBXGroup; + children = ( + 831DBE1612A557A500670A99 /* ofxMaxim */, + ); + name = addons; + sourceTree = "<group>"; + }; + 831DBE1612A557A500670A99 /* ofxMaxim */ = { + isa = PBXGroup; + children = ( + 831DBE1712A557A500670A99 /* install.xml */, + 831DBE1812A557A500670A99 /* libs */, + 831DBE2312A557A500670A99 /* src */, + ); + name = ofxMaxim; + path = ../../../addons/ofxMaxim; + sourceTree = SOURCE_ROOT; + }; + 831DBE1812A557A500670A99 /* libs */ = { + isa = PBXGroup; + children = ( + 831DBE1912A557A500670A99 /* fft.cpp */, + 831DBE1A12A557A500670A99 /* fft.h */, + 831DBE1F12A557A500670A99 /* maxiFFT.cpp */, + 831DBE2012A557A500670A99 /* maxiFFT.h */, + 831DBE2112A557A500670A99 /* maximilian.cpp */, + 831DBE2212A557A500670A99 /* maximilian.h */, + 83F72C7313269E3800DCC5B4 /* maxiMFCC.h */, + 83F72C7413269E3800DCC5B4 /* maxiMFCC.cpp */, + ); + path = libs; + sourceTree = "<group>"; + }; + 831DBE2312A557A500670A99 /* src */ = { + isa = PBXGroup; + children = ( + 831DBE2412A557A500670A99 /* ofxMaxim.h */, + ); + path = src; + sourceTree = "<group>"; + }; + E45BE0360E8CC5DE009D7055 /* libs */ = { + isa = PBXGroup; + children = ( + E45BEED60E8CCB34009D7055 /* core */, + ); + name = libs; + sourceTree = "<group>"; + }; + E45BE0370E8CC647009D7055 /* freeimage */ = { + isa = PBXGroup; + children = ( + E4C246D810CCAE22004149E2 /* osx */, + E45BE0380E8CC647009D7055 /* include */, + ); + name = freeimage; + path = ../../../libs/freeimage; + sourceTree = SOURCE_ROOT; + }; + E45BE0380E8CC647009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0390E8CC647009D7055 /* FreeImage.h */, + ); + name = include; + path = ../../../libs/freeimage/include; + sourceTree = SOURCE_ROOT; + }; + E45BE03D0E8CC650009D7055 /* fmodex */ = { + isa = PBXGroup; + children = ( + E45BE03E0E8CC650009D7055 /* inc */, + E4C2428E10CC5C18004149E2 /* osx */, + ); + name = fmodex; + path = ../../../libs/fmodex; + sourceTree = SOURCE_ROOT; + }; + E45BE03E0E8CC650009D7055 /* inc */ = { + isa = PBXGroup; + children = ( + E45BE03F0E8CC650009D7055 /* fmod.h */, + E45BE0400E8CC650009D7055 /* fmod.hpp */, + E45BE0410E8CC650009D7055 /* fmod_codec.h */, + E45BE0420E8CC650009D7055 /* fmod_dsp.h */, + E45BE0430E8CC650009D7055 /* fmod_errors.h */, + E45BE0440E8CC650009D7055 /* fmod_output.h */, + ); + name = inc; + path = ../../../libs/fmodex/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0480E8CC657009D7055 /* core libraries */ = { + isa = PBXGroup; + children = ( + E4C2425B10CC5A78004149E2 /* glut */, + E45BEC7B0E8CC911009D7055 /* poco */, + E45BE2D50E8CC69C009D7055 /* rtAudio */, + E45BE0A50E8CC67C009D7055 /* GLee */, + E45BE0490E8CC676009D7055 /* freetype */, + E45BE03D0E8CC650009D7055 /* fmodex */, + E45BE0370E8CC647009D7055 /* freeimage */, + ); + name = "core libraries"; + sourceTree = "<group>"; + }; + E45BE0490E8CC676009D7055 /* freetype */ = { + isa = PBXGroup; + children = ( + E4C2429210CC5C38004149E2 /* osx */, + ); + name = freetype; + path = ../../../libs/freetype; + sourceTree = SOURCE_ROOT; + }; + E45BE0A50E8CC67C009D7055 /* GLee */ = { + isa = PBXGroup; + children = ( + E45BE0A60E8CC67C009D7055 /* include */, + E45BE0A80E8CC67C009D7055 /* lib */, + ); + name = GLee; + path = ../../../libs/GLee; + sourceTree = SOURCE_ROOT; + }; + E45BE0A60E8CC67C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE0A70E8CC67C009D7055 /* GLee.h */, + ); + name = include; + path = ../../../libs/GLee/include; + sourceTree = SOURCE_ROOT; + }; + E45BE0A80E8CC67C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE0A90E8CC67C009D7055 /* GLee.a */, + ); + name = lib; + path = ../../../libs/GLee/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE2D50E8CC69C009D7055 /* rtAudio */ = { + isa = PBXGroup; + children = ( + E45BE2D60E8CC69C009D7055 /* include */, + E45BE2E20E8CC69C009D7055 /* lib */, + ); + name = rtAudio; + path = ../../../libs/rtAudio; + sourceTree = SOURCE_ROOT; + }; + E45BE2D60E8CC69C009D7055 /* include */ = { + isa = PBXGroup; + children = ( + E45BE2D70E8CC69C009D7055 /* asio */, + E45BE2E00E8CC69C009D7055 /* RtAudio.h */, + E45BE2E10E8CC69C009D7055 /* RtError.h */, + ); + name = include; + path = ../../../libs/rtAudio/include; + sourceTree = SOURCE_ROOT; + }; + E45BE2D70E8CC69C009D7055 /* asio */ = { + isa = PBXGroup; + children = ( + ); + name = asio; + path = ../../../libs/rtAudio/include/asio; + sourceTree = SOURCE_ROOT; + }; + E45BE2E20E8CC69C009D7055 /* lib */ = { + isa = PBXGroup; + children = ( + E45BE2E30E8CC69C009D7055 /* rtAudio.a */, + ); + name = lib; + path = ../../../libs/rtAudio/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E45BE5980E8CC70C009D7055 /* core frameworks */ = { + isa = PBXGroup; + children = ( + E4C2424410CC5A17004149E2 /* AppKit.framework */, + E4C2424510CC5A17004149E2 /* Cocoa.framework */, + E4C2424610CC5A17004149E2 /* IOKit.framework */, + E45BE9710E8CC7DD009D7055 /* AGL.framework */, + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, + E45BE9740E8CC7DD009D7055 /* Carbon.framework */, + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, + 83B352D712A6A1BB001DE187 /* Accelerate.framework */, + ); + name = "core frameworks"; + sourceTree = "<group>"; + }; + E45BEC7B0E8CC911009D7055 /* poco */ = { + isa = PBXGroup; + children = ( + E4C2427910CC5B66004149E2 /* osx */, + ); + name = poco; + path = ../../../libs/poco; + sourceTree = SOURCE_ROOT; + }; + E45BEED60E8CCB34009D7055 /* core */ = { + isa = PBXGroup; + children = ( + E45BE0480E8CC657009D7055 /* core libraries */, + E45BE5980E8CC70C009D7055 /* core frameworks */, + ); + name = core; + sourceTree = "<group>"; + }; + E4B69B4A0A3A1720003C02F2 = { + isa = PBXGroup; + children = ( + 831DBE1012A5579B00670A99 /* addons */, + E4B69B5B0A3A1756003C02F2 /* mfccsDebug.app */, + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, + E4B69E1C0A3A1BDC003C02F2 /* src */, + E4C2422310CC54B6004149E2 /* openFrameworks */, + E45BE0360E8CC5DE009D7055 /* libs */, + ); + sourceTree = "<group>"; + }; + E4B69E1C0A3A1BDC003C02F2 /* src */ = { + isa = PBXGroup; + children = ( + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, + E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; + E4C2421710CC549C004149E2 /* Products */ = { + isa = PBXGroup; + children = ( + E4C2421E10CC549C004149E2 /* openFrameworksDebug.a */, + ); + name = Products; + sourceTree = "<group>"; + }; + E4C2422310CC54B6004149E2 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */, + ); + name = openFrameworks; + sourceTree = "<group>"; + }; + E4C2425B10CC5A78004149E2 /* glut */ = { + isa = PBXGroup; + children = ( + E4C2425D10CC5A78004149E2 /* lib */, + ); + name = glut; + path = ../../../libs/glut; + sourceTree = SOURCE_ROOT; + }; + E4C2425D10CC5A78004149E2 /* lib */ = { + isa = PBXGroup; + children = ( + E4C2425E10CC5A78004149E2 /* osx */, + ); + name = lib; + path = ../../../libs/glut/lib; + sourceTree = SOURCE_ROOT; + }; + E4C2425E10CC5A78004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2425F10CC5A78004149E2 /* GLUT.framework */, + ); + name = osx; + path = ../../../libs/glut/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2427910CC5B66004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2427A10CC5B66004149E2 /* CppUnit.a */, + E4C2427B10CC5B66004149E2 /* PocoFoundation.a */, + E4C2427C10CC5B66004149E2 /* PocoNet.a */, + E4C2427D10CC5B66004149E2 /* PocoUtil.a */, + E4C2427E10CC5B66004149E2 /* PocoXML.a */, + ); + name = osx; + path = ../../../libs/poco/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2428E10CC5C18004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C242CC10CC650E004149E2 /* libfmodex.dylib */, + ); + name = osx; + path = ../../../libs/fmodex/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C2429210CC5C38004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C2429310CC5C38004149E2 /* freetype.a */, + ); + name = osx; + path = ../../../libs/freetype/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4C246D810CCAE22004149E2 /* osx */ = { + isa = PBXGroup; + children = ( + E4C246D910CCAE22004149E2 /* freeimage.a */, + ); + name = osx; + path = ../../../libs/FreeImage/lib/osx; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E4B69B5A0A3A1756003C02F2 /* mfccs */ = { + isa = PBXNativeTarget; + buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "mfccs" */; + buildPhases = ( + E4B69B580A3A1756003C02F2 /* Sources */, + E4B69B590A3A1756003C02F2 /* Frameworks */, + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, + E4C2427710CC5ABF004149E2 /* CopyFiles */, + E4C2444710CC769B004149E2 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + E4C2422810CC54DA004149E2 /* PBXTargetDependency */, + ); + name = mfccs; + productName = myOFApp; + productReference = E4B69B5B0A3A1756003C02F2 /* mfccsDebug.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E4B69B4C0A3A1720003C02F2 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "mfccs" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = E4B69B4A0A3A1720003C02F2; + productRefGroup = E4B69B4A0A3A1720003C02F2; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = E4C2421710CC549C004149E2 /* Products */; + ProjectRef = E4C2421610CC549C004149E2 /* openFrameworksLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + E4B69B5A0A3A1756003C02F2 /* mfccs */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + E4C2421E10CC549C004149E2 /* openFrameworksDebug.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = openFrameworksDebug.a; + remoteRef = E4C2421D10CC549C004149E2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXShellScriptBuildPhase section */ + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"\ninstall_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\" "; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E4B69B580A3A1756003C02F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + 831DBE2512A557A500670A99 /* fft.cpp in Sources */, + 831DBE2812A557A500670A99 /* maxiFFT.cpp in Sources */, + 831DBE2912A557A500670A99 /* maximilian.cpp in Sources */, + 83F72C7513269E3800DCC5B4 /* maxiMFCC.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E4C2422810CC54DA004149E2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = openFrameworks; + targetProxy = E4C2422710CC54DA004149E2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + E4B27CA010CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + 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_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = ReleaseUniversal; + }; + E4B27CA110CBF8A600536013 /* ReleaseUniversal */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Universal"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = ReleaseUniversal; + }; + E4B69B4E0A3A1720003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + 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_MODEL_TUNING = G5; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Debug; + }; + E4B69B4F0A3A1720003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + 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_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + 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; + HEADER_SEARCH_PATHS = ( + "../../../libs/openFrameworks/**", + ../../../libs/freetype/include/, + ../../../libs/freetype/include/freetype2, + ../../../libs/poco/include, + ../../../addons/, + ); + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + ); + OTHER_LDFLAGS = ""; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Release; + }; + E4B69B600A3A1757003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G4; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)Debug"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Debug; + }; + E4B69B610A3A1757003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G4; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/freeimage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14 = "\"$(SRCROOT)/../../../libs/fmodex/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15 = "\"$(SRCROOT)/../../../libs/freetype/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../libs/poco/lib/osx\""; + LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../libs/rtAudio/lib/osx\""; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "mfccs" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B4E0A3A1720003C02F2 /* Debug */, + E4B69B4F0A3A1720003C02F2 /* Release */, + E4B27CA010CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "mfccs" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B600A3A1757003C02F2 /* Debug */, + E4B69B610A3A1757003C02F2 /* Release */, + E4B27CA110CBF8A600536013 /* ReleaseUniversal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/openFrameworks-Info.plist b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/openFrameworks-Info.plist new file mode 100644 index 0000000..e5db555 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/openFrameworks-Info.plist @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.yourcompany.openFrameworks</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> +</dict> +</plist> diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/main.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/main.cpp new file mode 100644 index 0000000..6a32c6a --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/main.cpp @@ -0,0 +1,16 @@ +#include "ofMain.h" +#include "testApp.h" +#include "ofAppGlutWindow.h" + +//======================================================================== +int main( ){ + + ofAppGlutWindow window; + ofSetupOpenGL(&window, 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 testApp()); + +} diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/testApp.cpp b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/testApp.cpp new file mode 100644 index 0000000..abb1e2d --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/testApp.cpp @@ -0,0 +1,227 @@ +/* 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 "testApp.h" +#include "maximilian.h"/* include the lib */ +#include "time.h" + + + +//------------------------------------------------------------- +testApp::~testApp() { + +} + + +//-------------------------------------------------------------- +void testApp::setup(){ + /* some standard setup stuff*/ + + ofEnableAlphaBlending(); + ofSetupScreen(); + ofBackground(0, 0, 0); + ofSetFrameRate(60); + + /* This is stuff you always need.*/ + + sampleRate = 44100; /* Sampling Rate */ + initialBufferSize = 512; /* Buffer Size. you have to fill this buffer with sound*/ + lAudioOut = new float[initialBufferSize];/* outputs */ + rAudioOut = new float[initialBufferSize]; + lAudioIn = new float[initialBufferSize];/* inputs */ + rAudioIn = new float[initialBufferSize]; + + + /* This is a nice safe piece of code */ + memset(lAudioOut, 0, initialBufferSize * sizeof(float)); + memset(rAudioOut, 0, initialBufferSize * sizeof(float)); + + memset(lAudioIn, 0, initialBufferSize * sizeof(float)); + memset(rAudioIn, 0, initialBufferSize * sizeof(float)); + + /* Now you can put anything you would normally put in maximilian's 'setup' method in here. */ + +// samp.load(ofToDataPath("sinetest_stepping2.wav")); +// samp.load(ofToDataPath("whitenoise2.wav")); +// samp.load(ofToDataPath("additive22.wav")); + //samp.load(ofToDataPath("pinknoise2.wav")); + samp.load(ofToDataPath("filtersweep2.wav")); + samp.getLength(); + + + fftSize = 1024; + mfft.setup(fftSize, 512, 256); + ifft.setup(fftSize, 512, 256); + + + + nAverages = 12; + oct.setup(sampleRate, fftSize/2, nAverages); + + mfccs = (double*) malloc(sizeof(double) * 13); + mfcc.setup(512, 42, 13, 20, 20000, sampleRate); + + ofxMaxiSettings::setup(sampleRate, 2, initialBufferSize); + ofSoundStreamSetup(2,2, this, sampleRate, initialBufferSize, 4);/* Call this last ! */ + + ofSetVerticalSync(true); + +} + +//-------------------------------------------------------------- +void testApp::update(){ +} + +//-------------------------------------------------------------- +void testApp::draw(){ + + ofSetColor(255, 255, 255,255); + + //draw fft output + float xinc = 900.0 / fftSize * 2.0; + for(int i=0; i < fftSize / 2; i++) { + float height = mfft.magnitudesDB[i] / 50.0 * 300; + ofRect(100 + (i*xinc),250 - height,2, height); + } + //draw phases + ofSetColor(0, 255, 0,100); + for(int i=0; i < fftSize / 2; i++) { + float height = mfft.phases[i] / 50.0 * 400; + ofRect(100 + (i*xinc),300 - height,2, height); + } + +// //octave analyser +// ofSetColor(255, 0, 0,100); +// xinc = 900.0 / oct.nAverages; +// for(int i=0; i < oct.nAverages; i++) { +// float height = oct.averages[i] / 50.0 * 100; +// ofRect(100 + (i*xinc),700 - height,2, height); +// } + + //Mel bands +// cout << "\nMel bands: "; + ofSetColor(255, 0, 255,100); + xinc = 900.0 / 42.0; + for(int i=0; i < 42; i++) { +// cout << mfcc.melBands[i] << ","; + float height = mfcc.melBands[i] * 5.0; + ofRect(100 + (i*xinc),400 - height,10, height); + } +// cout << endl; + +// cout << "\nMFCCS: "; + ofSetColor(255, 0, 0,100); + xinc = 900.0 / 13; + for(int i=0; i < 13; i++) { + float height = mfccs[i] * 250.0; + ofRect(100 + (i*xinc),600 - height,40, height); +// cout << mfccs[i] << ","; + } +// cout << "\n-------" << endl; + +// cout << callTime << endl; + +} + +//-------------------------------------------------------------- +void testApp::audioRequested (float * output, int bufferSize, int nChannels){ +// static double tm; + for (int i = 0; i < bufferSize; i++){ +// wave = osc.saw(maxiMap::linexp(mouseY + ofGetWindowPositionY(), 0, ofGetScreenHeight(), 200, 8000)); +// wave = lAudioIn[i]; + wave = samp.play(1.); + //get fft + if (mfft.process(wave)) { +// int bins = fftSize / 2.0; + //do some manipulation +// int hpCutoff = floor(((mouseX + ofGetWindowPositionX()) / (float) ofGetScreenWidth()) * fftSize / 2.0); +//highpass +// memset(mfft.magnitudes, 0, sizeof(float) * hpCutoff); +// memset(mfft.phases, 0, sizeof(float) * hpCutoff); +//lowpass +// memset(mfft.magnitudes + hpCutoff, 0, sizeof(float) * (bins - hpCutoff)); +// memset(mfft.phases + hpCutoff, 0, sizeof(float) * (bins - hpCutoff)); + mfft.magsToDB(); +// for(int z=0; z < 512; z++) cout << mfft.magnitudesDB[z] << ","; +// cout << "---------\n"; + oct.calculate(mfft.magnitudesDB); + mfcc.mfcc(mfft.magnitudes, mfccs); + //cout << mfft.spectralFlatness() << ", " << mfft.spectralCentroid() << endl; + } + //inverse fft + gettimeofday(&callTS,NULL); +// ifftVal = ifft.process(mfft.magnitudes, mfft.phases); + gettimeofday(&callEndTS,NULL); + callTime = (float)(callEndTS.tv_usec - callTS.tv_usec) / 1000000.0; + callTime += (float)(callEndTS.tv_sec - callTS.tv_sec); + //play result + mymix.stereo(wave, outputs, 0.5); +// float mix = ((mouseX + ofGetWindowPositionX()) / (float) ofGetScreenWidth()); +// mymix.stereo((wave * mix) + ((1.0-mix) * ifftVal), outputs, 0.5); + lAudioOut[i] = output[i*nChannels ] = outputs[0]; /* You may end up with lots of outputs. add them here */ + rAudioOut[i] = output[i*nChannels + 1] = outputs[1]; + } + + + +} + +//-------------------------------------------------------------- +void testApp::audioReceived (float * input, int bufferSize, int nChannels){ + + + /* You can just grab this input and stick it in a double, then use it above to create output*/ + + for (int i = 0; i < bufferSize; i++){ + + /* you can also grab the data out of the arrays*/ + + lAudioIn[i] = input[i*2]; + rAudioIn[i] = input[i*2+1]; + } + +} + +//-------------------------------------------------------------- +void testApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void testApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void testApp::mouseMoved(int x, int y ){ + + + +} + +//-------------------------------------------------------------- +void testApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void testApp::windowResized(int w, int h){ + +} + diff --git a/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/testApp.h b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/testApp.h new file mode 100644 index 0000000..ea92221 --- /dev/null +++ b/ofxMaxim/ofxMaximExamplesOSX/ofxMaxim_example_mfccs/src/testApp.h @@ -0,0 +1,68 @@ +#ifndef _TEST_APP +#define _TEST_APP + + +#include "ofMain.h" +#include "ofxMaxim.h" +#include <sys/time.h> + +#include "maxiMFCC.h" + +class testApp : public ofBaseApp{ + + public: + ~testApp();/* deconsructor is very useful */ + 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 audioRequested (float * input, int bufferSize, int nChannels); /* output method */ + void audioReceived (float * input, int bufferSize, int nChannels); /* input method */ + + float * lAudioOut; /* outputs */ + float * rAudioOut; + + float * lAudioIn; /* inputs */ + float * rAudioIn; + + int initialBufferSize; /* buffer size */ + int sampleRate; + + + /* stick you maximilian stuff below */ + + double wave,sample,outputs[2], ifftVal; + maxiMix mymix; + maxiOsc osc; + + ofxMaxiFFTOctaveAnalyzer oct; + int nAverages; + float *ifftOutput; + int ifftSize; + + ofxMaxiIFFT ifft; + ofxMaxiFFT mfft; + int fftSize; + int bins, dataSize; + + float callTime; + timeval callTS, callEndTS; + + maxiMFCC mfcc; + double *mfccs; + + maxiSample samp; + + + +}; + +#endif diff --git a/ofxMaxim/ofxMaximiPhoneExample/bin/data/Default.png b/ofxMaxim/ofxMaximiPhoneExample/bin/data/Default.png Binary files differnew file mode 100644 index 0000000..e782497 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/bin/data/Default.png diff --git a/ofxMaxim/ofxMaximiPhoneExample/bin/data/Icon.png b/ofxMaxim/ofxMaximiPhoneExample/bin/data/Icon.png Binary files differnew file mode 100644 index 0000000..2d926c8 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/bin/data/Icon.png diff --git a/ofxMaxim/ofxMaximiPhoneExample/bin/data/beat2.wav b/ofxMaxim/ofxMaximiPhoneExample/bin/data/beat2.wav Binary files differnew file mode 100644 index 0000000..c71cee6 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/bin/data/beat2.wav diff --git a/ofxMaxim/ofxMaximiPhoneExample/bin/data/remoteatmos.wav b/ofxMaxim/ofxMaximiPhoneExample/bin/data/remoteatmos.wav Binary files differnew file mode 100644 index 0000000..87e3cdf --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/bin/data/remoteatmos.wav diff --git a/ofxMaxim/ofxMaximiPhoneExample/iPhoneEmptyExample.xcodeproj/project.pbxproj b/ofxMaxim/ofxMaximiPhoneExample/iPhoneEmptyExample.xcodeproj/project.pbxproj new file mode 100755 index 0000000..dd49a5e --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/iPhoneEmptyExample.xcodeproj/project.pbxproj @@ -0,0 +1,909 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 00EF442D12BAD6C000FF6AA4 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00EF442C12BAD6C000FF6AA4 /* Accelerate.framework */; }; + 00FA16C112B98DFC000A9A42 /* install.xml in Resources */ = {isa = PBXBuildFile; fileRef = 00FA16B712B98DFC000A9A42 /* install.xml */; }; + 00FA16C412B98DFC000A9A42 /* maximilian.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 00FA16BD12B98DFC000A9A42 /* maximilian.cpp */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 5326AEA810A23A0500278DE6 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5326AEA710A23A0500278DE6 /* CoreLocation.framework */; }; + 53F323EB10A20EDB00E0DAE4 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */; }; + 5E25689710ED26CC00A9501C /* CppUnit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25687010ED26CC00A9501C /* CppUnit.a */; }; + 5E25689810ED26CC00A9501C /* PocoFoundation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25687110ED26CC00A9501C /* PocoFoundation.a */; }; + 5E25689910ED26CC00A9501C /* PocoNet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25687210ED26CC00A9501C /* PocoNet.a */; }; + 5E25689A10ED26CC00A9501C /* PocoUtil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25687310ED26CC00A9501C /* PocoUtil.a */; }; + 5E25689B10ED26CC00A9501C /* PocoXML.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25687410ED26CC00A9501C /* PocoXML.a */; }; + 5E2568A410ED26CD00A9501C /* CppUnit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25688010ED26CC00A9501C /* CppUnit.a */; }; + 5E2568A510ED26CD00A9501C /* PocoFoundation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25688110ED26CC00A9501C /* PocoFoundation.a */; }; + 5E2568A610ED26CD00A9501C /* PocoNet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25688210ED26CC00A9501C /* PocoNet.a */; }; + 5E2568A710ED26CD00A9501C /* PocoUtil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25688310ED26CC00A9501C /* PocoUtil.a */; }; + 5E2568A810ED26CD00A9501C /* PocoXML.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E25688410ED26CC00A9501C /* PocoXML.a */; }; + BB16EBD20F2B2A9500518274 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD10F2B2A9500518274 /* OpenGLES.framework */; }; + BB16EBD90F2B2AB500518274 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD80F2B2AB500518274 /* QuartzCore.framework */; }; + BB24DD8F10DA77E000E9C588 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = BB24DD8C10DA77E000E9C588 /* Default.png */; }; + BB24DD9010DA77E000E9C588 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = BB24DD8D10DA77E000E9C588 /* Icon.png */; }; + BB24DDCA10DA781C00E9C588 /* ofxiphone-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB24DDC910DA781C00E9C588 /* ofxiphone-Info.plist */; }; + BBE5EAB80F49AD8400F28951 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */; }; + E434BF6512477ED500452519 /* freeimage-iphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E434BF6412477ED500452519 /* freeimage-iphone.a */; }; + E434BF6812477EDE00452519 /* freeimage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E434BF6712477EDE00452519 /* freeimage.a */; }; + E434BF7312477FBA00452519 /* freetype-iphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E434BF7212477FBA00452519 /* freetype-iphone.a */; }; + E496D5B11252C8210098A2B3 /* glu-iphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E496D5AF1252C8210098A2B3 /* glu-iphone.a */; }; + E496D5B21252C8210098A2B3 /* glu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E496D5B01252C8210098A2B3 /* glu.a */; }; + E49BCC7A12554CD6009F19D0 /* libofxiPhone_macosx_Debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E49BCC5012554B6A009F19D0 /* libofxiPhone_macosx_Debug.a */; }; + E4A8229F12560AFE002F86A2 /* freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4A8229E12560AFE002F86A2 /* freetype.a */; }; + E4A823A412561BE3002F86A2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4A823A312561BE3002F86A2 /* CoreGraphics.framework */; }; + E4D8936E11527B74007E1F53 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4D8936B11527B74007E1F53 /* main.mm */; }; + E4D8936F11527B74007E1F53 /* testApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4D8936D11527B74007E1F53 /* testApp.mm */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E49BCC4F12554B6A009F19D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E49BCC4812554B69009F19D0 /* iPhone+OF Lib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BB24DED610DA7A3F00E9C588; + remoteInfo = "iPhone+OF Static Library"; + }; + E49BCC6D12554C6C009F19D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E49BCC4812554B69009F19D0 /* iPhone+OF Lib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BB24DE5C10DA7A3F00E9C588; + remoteInfo = "iPhone+OF Static Library"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00EF442C12BAD6C000FF6AA4 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = "<absolute>"; }; + 00FA16B712B98DFC000A9A42 /* install.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = install.xml; sourceTree = "<group>"; }; + 00FA16BD12B98DFC000A9A42 /* maximilian.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maximilian.cpp; sourceTree = "<group>"; }; + 00FA16BE12B98DFC000A9A42 /* maximilian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maximilian.h; sourceTree = "<group>"; }; + 00FA16C012B98DFC000A9A42 /* ofxMaxim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxMaxim.h; sourceTree = "<group>"; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D6058910D05DD3D006BFB54 /* emptyExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = emptyExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 32CA4F630368D1EE00C91783 /* iPhone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhone_Prefix.pch; sourceTree = "<group>"; }; + 5326AEA710A23A0500278DE6 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 5E25687010ED26CC00A9501C /* CppUnit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = CppUnit.a; path = ../../../libs/poco/lib/iphone/CppUnit.a; sourceTree = SOURCE_ROOT; }; + 5E25687110ED26CC00A9501C /* PocoFoundation.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoFoundation.a; path = ../../../libs/poco/lib/iphone/PocoFoundation.a; sourceTree = SOURCE_ROOT; }; + 5E25687210ED26CC00A9501C /* PocoNet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoNet.a; path = ../../../libs/poco/lib/iphone/PocoNet.a; sourceTree = SOURCE_ROOT; }; + 5E25687310ED26CC00A9501C /* PocoUtil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoUtil.a; path = ../../../libs/poco/lib/iphone/PocoUtil.a; sourceTree = SOURCE_ROOT; }; + 5E25687410ED26CC00A9501C /* PocoXML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoXML.a; path = ../../../libs/poco/lib/iphone/PocoXML.a; sourceTree = SOURCE_ROOT; }; + 5E25688010ED26CC00A9501C /* CppUnit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = CppUnit.a; path = ../../../libs/poco/lib/osx/CppUnit.a; sourceTree = SOURCE_ROOT; }; + 5E25688110ED26CC00A9501C /* PocoFoundation.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoFoundation.a; path = ../../../libs/poco/lib/osx/PocoFoundation.a; sourceTree = SOURCE_ROOT; }; + 5E25688210ED26CC00A9501C /* PocoNet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoNet.a; path = ../../../libs/poco/lib/osx/PocoNet.a; sourceTree = SOURCE_ROOT; }; + 5E25688310ED26CC00A9501C /* PocoUtil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoUtil.a; path = ../../../libs/poco/lib/osx/PocoUtil.a; sourceTree = SOURCE_ROOT; }; + 5E25688410ED26CC00A9501C /* PocoXML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = PocoXML.a; path = ../../../libs/poco/lib/osx/PocoXML.a; sourceTree = SOURCE_ROOT; }; + BB16EBD10F2B2A9500518274 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + BB16EBD80F2B2AB500518274 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + BB24DD8C10DA77E000E9C588 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; }; + BB24DD8D10DA77E000E9C588 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; }; + BB24DDC910DA781C00E9C588 /* ofxiphone-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ofxiphone-Info.plist"; sourceTree = "<group>"; }; + BB24DDCF10DA784F00E9C588 /* FreeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FreeImage.h; sourceTree = "<group>"; }; + BB24DDE210DA785000E9C588 /* ftconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftconfig.h; sourceTree = "<group>"; }; + BB24DDE310DA785000E9C588 /* ftheader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftheader.h; sourceTree = "<group>"; }; + BB24DDE410DA785000E9C588 /* ftmodule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmodule.h; sourceTree = "<group>"; }; + BB24DDE510DA785000E9C588 /* ftoption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftoption.h; sourceTree = "<group>"; }; + BB24DDE610DA785000E9C588 /* ftstdlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftstdlib.h; sourceTree = "<group>"; }; + BB24DDE710DA785000E9C588 /* freetype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = freetype.h; sourceTree = "<group>"; }; + BB24DDE810DA785000E9C588 /* ftbbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftbbox.h; sourceTree = "<group>"; }; + BB24DDE910DA785000E9C588 /* ftbdf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftbdf.h; sourceTree = "<group>"; }; + BB24DDEA10DA785000E9C588 /* ftbitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftbitmap.h; sourceTree = "<group>"; }; + BB24DDEB10DA785000E9C588 /* ftcache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftcache.h; sourceTree = "<group>"; }; + BB24DDEC10DA785000E9C588 /* ftchapters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftchapters.h; sourceTree = "<group>"; }; + BB24DDED10DA785000E9C588 /* fterrdef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fterrdef.h; sourceTree = "<group>"; }; + BB24DDEE10DA785000E9C588 /* fterrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fterrors.h; sourceTree = "<group>"; }; + BB24DDEF10DA785000E9C588 /* ftgasp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftgasp.h; sourceTree = "<group>"; }; + BB24DDF010DA785000E9C588 /* ftglyph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftglyph.h; sourceTree = "<group>"; }; + BB24DDF110DA785000E9C588 /* ftgxval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftgxval.h; sourceTree = "<group>"; }; + BB24DDF210DA785000E9C588 /* ftgzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftgzip.h; sourceTree = "<group>"; }; + BB24DDF310DA785000E9C588 /* ftimage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftimage.h; sourceTree = "<group>"; }; + BB24DDF410DA785000E9C588 /* ftincrem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftincrem.h; sourceTree = "<group>"; }; + BB24DDF510DA785000E9C588 /* ftlcdfil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftlcdfil.h; sourceTree = "<group>"; }; + BB24DDF610DA785000E9C588 /* ftlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftlist.h; sourceTree = "<group>"; }; + BB24DDF710DA785000E9C588 /* ftlzw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftlzw.h; sourceTree = "<group>"; }; + BB24DDF810DA785000E9C588 /* ftmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmac.h; sourceTree = "<group>"; }; + BB24DDF910DA785000E9C588 /* ftmm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmm.h; sourceTree = "<group>"; }; + BB24DDFA10DA785000E9C588 /* ftmodapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmodapi.h; sourceTree = "<group>"; }; + BB24DDFB10DA785000E9C588 /* ftmoderr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftmoderr.h; sourceTree = "<group>"; }; + BB24DDFC10DA785000E9C588 /* ftotval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftotval.h; sourceTree = "<group>"; }; + BB24DDFD10DA785000E9C588 /* ftoutln.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftoutln.h; sourceTree = "<group>"; }; + BB24DDFE10DA785000E9C588 /* ftpfr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftpfr.h; sourceTree = "<group>"; }; + BB24DDFF10DA785000E9C588 /* ftrender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftrender.h; sourceTree = "<group>"; }; + BB24DE0010DA785000E9C588 /* ftsizes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsizes.h; sourceTree = "<group>"; }; + BB24DE0110DA785000E9C588 /* ftsnames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsnames.h; sourceTree = "<group>"; }; + BB24DE0210DA785000E9C588 /* ftstroke.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftstroke.h; sourceTree = "<group>"; }; + BB24DE0310DA785000E9C588 /* ftsynth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsynth.h; sourceTree = "<group>"; }; + BB24DE0410DA785000E9C588 /* ftsystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftsystem.h; sourceTree = "<group>"; }; + BB24DE0510DA785000E9C588 /* fttrigon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fttrigon.h; sourceTree = "<group>"; }; + BB24DE0610DA785000E9C588 /* fttypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fttypes.h; sourceTree = "<group>"; }; + BB24DE0710DA785000E9C588 /* ftwinfnt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftwinfnt.h; sourceTree = "<group>"; }; + BB24DE0810DA785000E9C588 /* ftxf86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftxf86.h; sourceTree = "<group>"; }; + BB24DE0910DA785000E9C588 /* t1tables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = t1tables.h; sourceTree = "<group>"; }; + BB24DE0A10DA785000E9C588 /* ttnameid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttnameid.h; sourceTree = "<group>"; }; + BB24DE0B10DA785000E9C588 /* tttables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tttables.h; sourceTree = "<group>"; }; + BB24DE0C10DA785000E9C588 /* tttags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tttags.h; sourceTree = "<group>"; }; + BB24DE0D10DA785000E9C588 /* ttunpat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttunpat.h; sourceTree = "<group>"; }; + BB24DE0E10DA785000E9C588 /* ft2build.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2build.h; sourceTree = "<group>"; }; + BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + DA7851271105C039007EFC90 /* glu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glu.h; sourceTree = "<group>"; }; + DA7851281105C039007EFC90 /* gluos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gluos.h; sourceTree = "<group>"; }; + E434BF6412477ED500452519 /* freeimage-iphone.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "freeimage-iphone.a"; path = "../../../libs/FreeImage/lib/iphone/freeimage-iphone.a"; sourceTree = SOURCE_ROOT; }; + E434BF6712477EDE00452519 /* freeimage.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freeimage.a; path = ../../../libs/FreeImage/lib/osx/freeimage.a; sourceTree = SOURCE_ROOT; }; + E434BF7212477FBA00452519 /* freetype-iphone.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "freetype-iphone.a"; path = "../../../libs/freetype/lib/iphone/freetype-iphone.a"; sourceTree = SOURCE_ROOT; }; + E496D5AF1252C8210098A2B3 /* glu-iphone.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "glu-iphone.a"; path = "../../../libs/glu/lib/iphone/glu-iphone.a"; sourceTree = SOURCE_ROOT; }; + E496D5B01252C8210098A2B3 /* glu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = glu.a; path = ../../../libs/glu/lib/iphone/glu.a; sourceTree = SOURCE_ROOT; }; + E49BCC4812554B69009F19D0 /* iPhone+OF Lib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "iPhone+OF Lib.xcodeproj"; path = "../../../libs/openFrameworksCompiled/project/iphone/iPhone+OF Lib.xcodeproj"; sourceTree = SOURCE_ROOT; }; + E4A8229E12560AFE002F86A2 /* freetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = freetype.a; path = ../../../libs/freetype/lib/osx/freetype.a; sourceTree = SOURCE_ROOT; }; + E4A823A312561BE3002F86A2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + E4D8936B11527B74007E1F53 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = main.mm; path = src/main.mm; sourceTree = SOURCE_ROOT; }; + E4D8936C11527B74007E1F53 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4D8936D11527B74007E1F53 /* testApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = testApp.mm; path = src/testApp.mm; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E49BCC7A12554CD6009F19D0 /* libofxiPhone_macosx_Debug.a in Frameworks */, + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, + BB16EBD20F2B2A9500518274 /* OpenGLES.framework in Frameworks */, + BB16EBD90F2B2AB500518274 /* QuartzCore.framework in Frameworks */, + BBE5EAB80F49AD8400F28951 /* AudioToolbox.framework in Frameworks */, + 53F323EB10A20EDB00E0DAE4 /* OpenAL.framework in Frameworks */, + 5326AEA810A23A0500278DE6 /* CoreLocation.framework in Frameworks */, + 5E25689710ED26CC00A9501C /* CppUnit.a in Frameworks */, + 5E25689810ED26CC00A9501C /* PocoFoundation.a in Frameworks */, + 5E25689910ED26CC00A9501C /* PocoNet.a in Frameworks */, + 5E25689A10ED26CC00A9501C /* PocoUtil.a in Frameworks */, + 5E25689B10ED26CC00A9501C /* PocoXML.a in Frameworks */, + 5E2568A410ED26CD00A9501C /* CppUnit.a in Frameworks */, + 5E2568A510ED26CD00A9501C /* PocoFoundation.a in Frameworks */, + 5E2568A610ED26CD00A9501C /* PocoNet.a in Frameworks */, + 5E2568A710ED26CD00A9501C /* PocoUtil.a in Frameworks */, + 5E2568A810ED26CD00A9501C /* PocoXML.a in Frameworks */, + E434BF6512477ED500452519 /* freeimage-iphone.a in Frameworks */, + E434BF6812477EDE00452519 /* freeimage.a in Frameworks */, + E434BF7312477FBA00452519 /* freetype-iphone.a in Frameworks */, + E496D5B11252C8210098A2B3 /* glu-iphone.a in Frameworks */, + E496D5B21252C8210098A2B3 /* glu.a in Frameworks */, + E4A8229F12560AFE002F86A2 /* freetype.a in Frameworks */, + E4A823A412561BE3002F86A2 /* CoreGraphics.framework in Frameworks */, + 00EF442D12BAD6C000FF6AA4 /* Accelerate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00FA16B612B98DFC000A9A42 /* ofxMaxim */ = { + isa = PBXGroup; + children = ( + 00FA16B712B98DFC000A9A42 /* install.xml */, + 00FA16B812B98DFC000A9A42 /* libs */, + 00FA16BF12B98DFC000A9A42 /* src */, + ); + path = ofxMaxim; + sourceTree = "<group>"; + }; + 00FA16B812B98DFC000A9A42 /* libs */ = { + isa = PBXGroup; + children = ( + 00FA16BD12B98DFC000A9A42 /* maximilian.cpp */, + 00FA16BE12B98DFC000A9A42 /* maximilian.h */, + ); + path = libs; + sourceTree = "<group>"; + }; + 00FA16BF12B98DFC000A9A42 /* src */ = { + isa = PBXGroup; + children = ( + 00FA16C012B98DFC000A9A42 /* ofxMaxim.h */, + ); + path = src; + sourceTree = "<group>"; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* emptyExample.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + BB24DDC910DA781C00E9C588 /* ofxiphone-Info.plist */, + E4D8936A11527B74007E1F53 /* src */, + BB24DD8B10DA77E000E9C588 /* data */, + BB24E1F710DAA51900E9C588 /* openFrameworks */, + BB16F26B0F2B646B00518274 /* addons */, + BB16E9930F2B1E5900518274 /* libs */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = "<group>"; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* iPhone_Prefix.pch */, + ); + name = "Other Sources"; + sourceTree = "<group>"; + }; + 29B97323FDCFA39411CA2CEA /* core frameworks */ = { + isa = PBXGroup; + children = ( + 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */, + E4A823A312561BE3002F86A2 /* CoreGraphics.framework */, + BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */, + BB16EBD80F2B2AB500518274 /* QuartzCore.framework */, + BB16EBD10F2B2A9500518274 /* OpenGLES.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + 5326AEA710A23A0500278DE6 /* CoreLocation.framework */, + 00EF442C12BAD6C000FF6AA4 /* Accelerate.framework */, + ); + name = "core frameworks"; + sourceTree = "<group>"; + }; + 5E25686A10ED26BE00A9501C /* poco */ = { + isa = PBXGroup; + children = ( + 5E25686E10ED26CC00A9501C /* lib */, + ); + name = poco; + sourceTree = "<group>"; + }; + 5E25686E10ED26CC00A9501C /* lib */ = { + isa = PBXGroup; + children = ( + 5E25686F10ED26CC00A9501C /* iphone */, + 5E25687F10ED26CC00A9501C /* osx */, + ); + name = lib; + path = ../../../libs/poco/lib; + sourceTree = SOURCE_ROOT; + }; + 5E25686F10ED26CC00A9501C /* iphone */ = { + isa = PBXGroup; + children = ( + 5E25687010ED26CC00A9501C /* CppUnit.a */, + 5E25687110ED26CC00A9501C /* PocoFoundation.a */, + 5E25687210ED26CC00A9501C /* PocoNet.a */, + 5E25687310ED26CC00A9501C /* PocoUtil.a */, + 5E25687410ED26CC00A9501C /* PocoXML.a */, + ); + name = iphone; + path = ../../../libs/poco/lib/iphone; + sourceTree = SOURCE_ROOT; + }; + 5E25687F10ED26CC00A9501C /* osx */ = { + isa = PBXGroup; + children = ( + 5E25688010ED26CC00A9501C /* CppUnit.a */, + 5E25688110ED26CC00A9501C /* PocoFoundation.a */, + 5E25688210ED26CC00A9501C /* PocoNet.a */, + 5E25688310ED26CC00A9501C /* PocoUtil.a */, + 5E25688410ED26CC00A9501C /* PocoXML.a */, + ); + name = osx; + path = ../../../libs/poco/lib/osx; + sourceTree = SOURCE_ROOT; + }; + BB16E9930F2B1E5900518274 /* libs */ = { + isa = PBXGroup; + children = ( + BBE5E94E0F497BD800F28951 /* core */, + ); + name = libs; + sourceTree = "<group>"; + }; + BB16F26B0F2B646B00518274 /* addons */ = { + isa = PBXGroup; + children = ( + 00FA16B612B98DFC000A9A42 /* ofxMaxim */, + ); + name = addons; + sourceTree = "<group>"; + }; + BB24DD8B10DA77E000E9C588 /* data */ = { + isa = PBXGroup; + children = ( + BB24DD8C10DA77E000E9C588 /* Default.png */, + BB24DD8D10DA77E000E9C588 /* Icon.png */, + ); + name = data; + path = bin/data; + sourceTree = "<group>"; + }; + BB24DDCD10DA784F00E9C588 /* FreeImage */ = { + isa = PBXGroup; + children = ( + BB24DDCE10DA784F00E9C588 /* include */, + BB24DDD010DA784F00E9C588 /* lib */, + ); + name = FreeImage; + path = ../../../libs/FreeImage; + sourceTree = SOURCE_ROOT; + }; + BB24DDCE10DA784F00E9C588 /* include */ = { + isa = PBXGroup; + children = ( + BB24DDCF10DA784F00E9C588 /* FreeImage.h */, + ); + path = include; + sourceTree = "<group>"; + }; + BB24DDD010DA784F00E9C588 /* lib */ = { + isa = PBXGroup; + children = ( + E434BF6612477EDE00452519 /* osx */, + BB24DDD110DA784F00E9C588 /* iphone */, + ); + path = lib; + sourceTree = "<group>"; + }; + BB24DDD110DA784F00E9C588 /* iphone */ = { + isa = PBXGroup; + children = ( + E434BF6412477ED500452519 /* freeimage-iphone.a */, + ); + path = iphone; + sourceTree = "<group>"; + }; + BB24DDDD10DA785000E9C588 /* freetype */ = { + isa = PBXGroup; + children = ( + BB24DDDE10DA785000E9C588 /* include */, + BB24DE1110DA785000E9C588 /* lib */, + ); + name = freetype; + path = ../../../libs/freetype; + sourceTree = SOURCE_ROOT; + }; + BB24DDDE10DA785000E9C588 /* include */ = { + isa = PBXGroup; + children = ( + BB24DDDF10DA785000E9C588 /* freetype2 */, + BB24DE0E10DA785000E9C588 /* ft2build.h */, + ); + path = include; + sourceTree = "<group>"; + }; + BB24DDDF10DA785000E9C588 /* freetype2 */ = { + isa = PBXGroup; + children = ( + BB24DDE010DA785000E9C588 /* freetype */, + ); + path = freetype2; + sourceTree = "<group>"; + }; + BB24DDE010DA785000E9C588 /* freetype */ = { + isa = PBXGroup; + children = ( + BB24DDE110DA785000E9C588 /* config */, + BB24DDE710DA785000E9C588 /* freetype.h */, + BB24DDE810DA785000E9C588 /* ftbbox.h */, + BB24DDE910DA785000E9C588 /* ftbdf.h */, + BB24DDEA10DA785000E9C588 /* ftbitmap.h */, + BB24DDEB10DA785000E9C588 /* ftcache.h */, + BB24DDEC10DA785000E9C588 /* ftchapters.h */, + BB24DDED10DA785000E9C588 /* fterrdef.h */, + BB24DDEE10DA785000E9C588 /* fterrors.h */, + BB24DDEF10DA785000E9C588 /* ftgasp.h */, + BB24DDF010DA785000E9C588 /* ftglyph.h */, + BB24DDF110DA785000E9C588 /* ftgxval.h */, + BB24DDF210DA785000E9C588 /* ftgzip.h */, + BB24DDF310DA785000E9C588 /* ftimage.h */, + BB24DDF410DA785000E9C588 /* ftincrem.h */, + BB24DDF510DA785000E9C588 /* ftlcdfil.h */, + BB24DDF610DA785000E9C588 /* ftlist.h */, + BB24DDF710DA785000E9C588 /* ftlzw.h */, + BB24DDF810DA785000E9C588 /* ftmac.h */, + BB24DDF910DA785000E9C588 /* ftmm.h */, + BB24DDFA10DA785000E9C588 /* ftmodapi.h */, + BB24DDFB10DA785000E9C588 /* ftmoderr.h */, + BB24DDFC10DA785000E9C588 /* ftotval.h */, + BB24DDFD10DA785000E9C588 /* ftoutln.h */, + BB24DDFE10DA785000E9C588 /* ftpfr.h */, + BB24DDFF10DA785000E9C588 /* ftrender.h */, + BB24DE0010DA785000E9C588 /* ftsizes.h */, + BB24DE0110DA785000E9C588 /* ftsnames.h */, + BB24DE0210DA785000E9C588 /* ftstroke.h */, + BB24DE0310DA785000E9C588 /* ftsynth.h */, + BB24DE0410DA785000E9C588 /* ftsystem.h */, + BB24DE0510DA785000E9C588 /* fttrigon.h */, + BB24DE0610DA785000E9C588 /* fttypes.h */, + BB24DE0710DA785000E9C588 /* ftwinfnt.h */, + BB24DE0810DA785000E9C588 /* ftxf86.h */, + BB24DE0910DA785000E9C588 /* t1tables.h */, + BB24DE0A10DA785000E9C588 /* ttnameid.h */, + BB24DE0B10DA785000E9C588 /* tttables.h */, + BB24DE0C10DA785000E9C588 /* tttags.h */, + BB24DE0D10DA785000E9C588 /* ttunpat.h */, + ); + path = freetype; + sourceTree = "<group>"; + }; + BB24DDE110DA785000E9C588 /* config */ = { + isa = PBXGroup; + children = ( + BB24DDE210DA785000E9C588 /* ftconfig.h */, + BB24DDE310DA785000E9C588 /* ftheader.h */, + BB24DDE410DA785000E9C588 /* ftmodule.h */, + BB24DDE510DA785000E9C588 /* ftoption.h */, + BB24DDE610DA785000E9C588 /* ftstdlib.h */, + ); + path = config; + sourceTree = "<group>"; + }; + BB24DE1110DA785000E9C588 /* lib */ = { + isa = PBXGroup; + children = ( + E4A8229D12560AFE002F86A2 /* osx */, + BB24DE1210DA785000E9C588 /* iphone */, + ); + path = lib; + sourceTree = "<group>"; + }; + BB24DE1210DA785000E9C588 /* iphone */ = { + isa = PBXGroup; + children = ( + E434BF7212477FBA00452519 /* freetype-iphone.a */, + ); + path = iphone; + sourceTree = "<group>"; + }; + BB24DE1F10DA785000E9C588 /* glu */ = { + isa = PBXGroup; + children = ( + DA7851261105C039007EFC90 /* include_iphone */, + BB24DE2510DA785000E9C588 /* lib */, + ); + name = glu; + path = ../../../libs/glu; + sourceTree = SOURCE_ROOT; + }; + BB24DE2510DA785000E9C588 /* lib */ = { + isa = PBXGroup; + children = ( + BB24DE2610DA785000E9C588 /* iphone */, + ); + path = lib; + sourceTree = "<group>"; + }; + BB24DE2610DA785000E9C588 /* iphone */ = { + isa = PBXGroup; + children = ( + E496D5AF1252C8210098A2B3 /* glu-iphone.a */, + E496D5B01252C8210098A2B3 /* glu.a */, + ); + path = iphone; + sourceTree = "<group>"; + }; + BB24E1F710DAA51900E9C588 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E49BCC4812554B69009F19D0 /* iPhone+OF Lib.xcodeproj */, + ); + name = openFrameworks; + sourceTree = "<group>"; + }; + BB3F144E0F4C6BF200A33527 /* core libraries */ = { + isa = PBXGroup; + children = ( + 5E25686A10ED26BE00A9501C /* poco */, + BB24DDCD10DA784F00E9C588 /* FreeImage */, + BB24DDDD10DA785000E9C588 /* freetype */, + BB24DE1F10DA785000E9C588 /* glu */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + ); + name = "core libraries"; + sourceTree = "<group>"; + }; + BBE5E94E0F497BD800F28951 /* core */ = { + isa = PBXGroup; + children = ( + BB3F144E0F4C6BF200A33527 /* core libraries */, + 29B97323FDCFA39411CA2CEA /* core frameworks */, + ); + name = core; + sourceTree = "<group>"; + }; + DA7851261105C039007EFC90 /* include_iphone */ = { + isa = PBXGroup; + children = ( + DA7851271105C039007EFC90 /* glu.h */, + DA7851281105C039007EFC90 /* gluos.h */, + ); + path = include_iphone; + sourceTree = "<group>"; + }; + E434BF6612477EDE00452519 /* osx */ = { + isa = PBXGroup; + children = ( + E434BF6712477EDE00452519 /* freeimage.a */, + ); + name = osx; + path = ../../../libs/FreeImage/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E49BCC4912554B69009F19D0 /* Products */ = { + isa = PBXGroup; + children = ( + E49BCC5012554B6A009F19D0 /* libofxiPhone_macosx_Debug.a */, + ); + name = Products; + sourceTree = "<group>"; + }; + E4A8229D12560AFE002F86A2 /* osx */ = { + isa = PBXGroup; + children = ( + E4A8229E12560AFE002F86A2 /* freetype.a */, + ); + name = osx; + path = ../../../libs/freetype/lib/osx; + sourceTree = SOURCE_ROOT; + }; + E4D8936A11527B74007E1F53 /* src */ = { + isa = PBXGroup; + children = ( + E4D8936B11527B74007E1F53 /* main.mm */, + E4D8936D11527B74007E1F53 /* testApp.mm */, + E4D8936C11527B74007E1F53 /* testApp.h */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* emptyExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "emptyExample" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + 9255DD331112741900D6945E /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + E49BCC6E12554C6C009F19D0 /* PBXTargetDependency */, + ); + name = emptyExample; + productName = iPhone; + productReference = 1D6058910D05DD3D006BFB54 /* emptyExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneEmptyExample" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = E49BCC4912554B69009F19D0 /* Products */; + ProjectRef = E49BCC4812554B69009F19D0 /* iPhone+OF Lib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* emptyExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + E49BCC5012554B6A009F19D0 /* libofxiPhone_macosx_Debug.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libofxiPhone_macosx_Debug.a; + remoteRef = E49BCC4F12554B6A009F19D0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BB24DD8F10DA77E000E9C588 /* Default.png in Resources */, + BB24DD9010DA77E000E9C588 /* Icon.png in Resources */, + BB24DDCA10DA781C00E9C588 /* ofxiphone-Info.plist in Resources */, + 00FA16C112B98DFC000A9A42 /* install.xml in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 9255DD331112741900D6945E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp -rf bin/data/ \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4D8936E11527B74007E1F53 /* main.mm in Sources */, + E4D8936F11527B74007E1F53 /* testApp.mm in Sources */, + 00FA16C412B98DFC000A9A42 /* maximilian.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E49BCC6E12554C6C009F19D0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "iPhone+OF Static Library"; + targetProxy = E49BCC6D12554C6C009F19D0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = iPhone_Prefix.pch; + GCC_THUMB_SUPPORT = NO; + INFOPLIST_FILE = "ofxiphone-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../libs/freetype/lib/osx\"", + ); + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = iPhone_Prefix.pch; + GCC_THUMB_SUPPORT = NO; + INFOPLIST_FILE = "ofxiphone-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../libs/freetype/lib/osx\"", + ); + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = iphoneos; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_THUMB_SUPPORT = NO; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; + GCC_WARN_PROTOTYPE_CONVERSION = NO; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../../libs/poco/include, + "../../../addons/ofxAccelerometer/**", + "../../../addons/ofxMultitouch/**", + "../../../addons/ofxiPhone/**", + "../../../libs/openFrameworks/**", + "../../../libs/freetype/**", + ); + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../libs/freetype/lib\"", + "\"$(SRCROOT)/../../../libs/freeimage/lib\"", + "\"$(SRCROOT)/../../../libs/FreeImage/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\"", + "\"$(SRCROOT)/../../../libs/freetype/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/freetype/lib/osx\"", + "\"$(SRCROOT)/../../../libs/glu/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/poco/lib/osx\"", + "\"$(SRCROOT)/../../../libs/poco/lib/iphone\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = "-ObjC"; + PREBINDING = NO; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos4.2; + TARGETED_DEVICE_FAMILY = 1; + WARNING_LDFLAGS = ""; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_THUMB_SUPPORT = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../../libs/poco/include, + "../../../addons/ofxAccelerometer/**", + "../../../addons/ofxMultitouch/**", + "../../../addons/ofxiPhone/**", + "../../../libs/openFrameworks/**", + "../../../libs/freetype/**", + ); + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../libs/freetype/lib\"", + "\"$(SRCROOT)/../../../libs/freeimage/lib\"", + "\"$(SRCROOT)/../../../libs/FreeImage/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\"", + "\"$(SRCROOT)/../../../libs/freetype/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/freetype/lib/osx\"", + "\"$(SRCROOT)/../../../libs/glu/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/poco/lib/osx\"", + "\"$(SRCROOT)/../../../libs/poco/lib/iphone\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = "-ObjC"; + PREBINDING = NO; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + E49BCC2F12554938009F19D0 /* ReleaseArmv7 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COMPRESS_PNG_FILES = NO; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_THUMB_SUPPORT = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + ../../../libs/poco/include, + "../../../addons/ofxAccelerometer/**", + "../../../addons/ofxMultitouch/**", + "../../../addons/ofxiPhone/**", + "../../../libs/openFrameworks/**", + "../../../libs/freetype/**", + ); + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../libs/freetype/lib\"", + "\"$(SRCROOT)/../../../libs/freeimage/lib\"", + "\"$(SRCROOT)/../../../libs/FreeImage/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/FreeImage/lib/osx\"", + "\"$(SRCROOT)/../../../libs/freetype/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/freetype/lib/osx\"", + "\"$(SRCROOT)/../../../libs/glu/lib/iphone\"", + "\"$(SRCROOT)/../../../libs/poco/lib/osx\"", + "\"$(SRCROOT)/../../../libs/poco/lib/iphone\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = "-ObjC"; + PREBINDING = NO; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos4.2; + TARGETED_DEVICE_FAMILY = 1; + }; + name = ReleaseArmv7; + }; + E49BCC3012554938009F19D0 /* ReleaseArmv7 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = iPhone_Prefix.pch; + GCC_THUMB_SUPPORT = NO; + INFOPLIST_FILE = "ofxiphone-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../libs/freetype/lib/osx\"", + ); + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = iphoneos; + }; + name = ReleaseArmv7; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "emptyExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + E49BCC3012554938009F19D0 /* ReleaseArmv7 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iPhoneEmptyExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + E49BCC2F12554938009F19D0 /* ReleaseArmv7 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/ofxMaxim/ofxMaximiPhoneExample/iPhone_Prefix.pch b/ofxMaxim/ofxMaximiPhoneExample/iPhone_Prefix.pch new file mode 100644 index 0000000..fd3401c --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/iPhone_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'iPhone' target in the 'iPhone' project +// + +#ifdef __OBJC__ + #import <Foundation/Foundation.h> + #import <UIKit/UIKit.h> +#endif diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/install.xml b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/install.xml new file mode 100644 index 0000000..58923be --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/install.xml @@ -0,0 +1,35 @@ +<install> + <version>0.1</version> + <author>Goldsmiths Creative Computing</author> + <url>http://www.maximilian.strangeloop.co.uk/</url> + <requires></requires> + + + <add> + <!-- ===================================================================== --> + <!-- ========================== add per project using this addon ========= --> + <!-- ===================================================================== --> + + <src> + + <folder name="addons/ofxMaxim/src"> + <file>../../../addons/ofxMaxim/src/ofxMaxim.h</file> + </folder> + + <folder name="addons/ofxMaxim/libs"> + <file>../../../addons/ofxMaxim/libs/fft.h</file> + <file>../../../addons/ofxMaxim/libs/fft.cpp</file> + <file>../../../addons/ofxMaxim/libs/fftOctaveAnalyzer.h</file> + <file>../../../addons/ofxMaxim/libs/fftOctaveAnalyzer.cpp</file> + <file>../../../addons/ofxMaxim/libs/maximilian.h</file> + <file>../../../addons/ofxMaxim/libs/maximilian.cpp</file> + </folder> + + </src> + + <include> + <path>../../../addons/ofxMaxim/src</path> + <path>../../../addons/ofxMaxim/libs</path> + </include> + </add> +</install>
\ No newline at end of file diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/fft.cpp b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/fft.cpp new file mode 100644 index 0000000..e19498d --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/fft.cpp @@ -0,0 +1,592 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ +/* + + fft.cpp + + Based on K+R Numerical recipes in C and some other stuff hacked about. + + */ + +#include "fft.h" +#include <stdlib.h> +#include <stdio.h> +#include <math.h> +#include <string.h> + +int **gFFTBitTable = NULL; +const int MaxFastBits = 16; + +int IsPowerOfTwo(int x) +{ + if (x < 2) + return false; + + if (x & (x - 1)) + return false; + + return true; +} + +int NumberOfBitsNeeded(int PowerOfTwo) +{ + int i; + + if (PowerOfTwo < 2) { + fprintf(stderr, "Error: FFT called with size %d\n", PowerOfTwo); + exit(1); + } + + for (i = 0;; i++) + if (PowerOfTwo & (1 << i)) + return i; +} + +int ReverseBits(int index, int NumBits) +{ + int i, rev; + + for (i = rev = 0; i < NumBits; i++) { + rev = (rev << 1) | (index & 1); + index >>= 1; + } + + return rev; +} + +void InitFFT() +{ +// gFFTBitTable = new int *[MaxFastBits]; + //use malloc for 16 byte alignment + gFFTBitTable = (int**) malloc(MaxFastBits * sizeof(int*)); + + int len = 2; + for (int b = 1; b <= MaxFastBits; b++) { + +// gFFTBitTable[b - 1] = new int[len]; + gFFTBitTable[b - 1] = (int*) malloc(len * sizeof(int)); + + for (int i = 0; i < len; i++) + gFFTBitTable[b - 1][i] = ReverseBits(i, b); + + len <<= 1; + } +} + +inline int FastReverseBits(int i, int NumBits) +{ + if (NumBits <= MaxFastBits) + return gFFTBitTable[NumBits - 1][i]; + else + return ReverseBits(i, NumBits); +} + +/* + * Complex Fast Fourier Transform + */ + +void FFT(int NumSamples, + bool InverseTransform, + float *RealIn, float *ImagIn, float *RealOut, float *ImagOut) +{ + int NumBits; /* Number of bits needed to store indices */ + int i, j, k, n; + int BlockSize, BlockEnd; + + double angle_numerator = 2.0 * M_PI; + float tr, ti; /* temp real, temp imaginary */ + + if (!IsPowerOfTwo(NumSamples)) { + fprintf(stderr, "%d is not a power of two\n", NumSamples); + exit(1); + } + + if (!gFFTBitTable) + InitFFT(); + + if (InverseTransform) + angle_numerator = -angle_numerator; + + NumBits = NumberOfBitsNeeded(NumSamples); + + /* + ** Do simultaneous data copy and bit-reversal ordering into outputs... + */ + + for (i = 0; i < NumSamples; i++) { + j = FastReverseBits(i, NumBits); + RealOut[j] = RealIn[i]; + ImagOut[j] = (ImagIn == NULL) ? 0.0 : ImagIn[i]; + } + + /* + ** Do the FFT itself... + */ + + BlockEnd = 1; + for (BlockSize = 2; BlockSize <= NumSamples; BlockSize <<= 1) { + + double delta_angle = angle_numerator / (double) BlockSize; + + float sm2 = sin(-2 * delta_angle); + float sm1 = sin(-delta_angle); + float cm2 = cos(-2 * delta_angle); + float cm1 = cos(-delta_angle); + float w = 2 * cm1; + float ar0, ar1, ar2, ai0, ai1, ai2; + + for (i = 0; i < NumSamples; i += BlockSize) { + ar2 = cm2; + ar1 = cm1; + + ai2 = sm2; + ai1 = sm1; + + for (j = i, n = 0; n < BlockEnd; j++, n++) { + ar0 = w * ar1 - ar2; + ar2 = ar1; + ar1 = ar0; + + ai0 = w * ai1 - ai2; + ai2 = ai1; + ai1 = ai0; + + k = j + BlockEnd; + tr = ar0 * RealOut[k] - ai0 * ImagOut[k]; + ti = ar0 * ImagOut[k] + ai0 * RealOut[k]; + + RealOut[k] = RealOut[j] - tr; + ImagOut[k] = ImagOut[j] - ti; + + RealOut[j] += tr; + ImagOut[j] += ti; + } + } + + BlockEnd = BlockSize; + } + + /* + ** Need to normalize if inverse transform... + */ + + if (InverseTransform) { + float denom = (float) NumSamples; + + for (i = 0; i < NumSamples; i++) { + RealOut[i] /= denom; + ImagOut[i] /= denom; + } + } +} + +/* + * Real Fast Fourier Transform + * + * This function was based on the code in Numerical Recipes in C. + * In Num. Rec., the inner loop is based on a single 1-based array + * of interleaved real and imaginary numbers. Because we have two + * separate zero-based arrays, our indices are quite different. + * Here is the correspondence between Num. Rec. indices and our indices: + * + * i1 <-> real[i] + * i2 <-> imag[i] + * i3 <-> real[n/2-i] + * i4 <-> imag[n/2-i] + */ + +void RealFFT(int NumSamples, float *RealIn, float *RealOut, float *ImagOut) +{ + int Half = NumSamples / 2; + int i; + + float theta = M_PI / Half; + + float *tmpReal = (float*) malloc(Half * sizeof(float)); + float *tmpImag = (float*) malloc(Half * sizeof(float)); + + for (i = 0; i < Half; i++) { + tmpReal[i] = RealIn[2 * i]; + tmpImag[i] = RealIn[2 * i + 1]; + } + + FFT(Half, 0, tmpReal, tmpImag, RealOut, ImagOut); + + float wtemp = float (sin(0.5 * theta)); + + float wpr = -2.0 * wtemp * wtemp; + float wpi = float (sin(theta)); + float wr = 1.0 + wpr; + float wi = wpi; + + int i3; + + float h1r, h1i, h2r, h2i; + + for (i = 1; i < Half / 2; i++) { + + i3 = Half - i; + + h1r = 0.5 * (RealOut[i] + RealOut[i3]); + h1i = 0.5 * (ImagOut[i] - ImagOut[i3]); + h2r = 0.5 * (ImagOut[i] + ImagOut[i3]); + h2i = -0.5 * (RealOut[i] - RealOut[i3]); + + RealOut[i] = h1r + wr * h2r - wi * h2i; + ImagOut[i] = h1i + wr * h2i + wi * h2r; + RealOut[i3] = h1r - wr * h2r + wi * h2i; + ImagOut[i3] = -h1i + wr * h2i + wi * h2r; + + wr = (wtemp = wr) * wpr - wi * wpi + wr; + wi = wi * wpr + wtemp * wpi + wi; + } + + RealOut[0] = (h1r = RealOut[0]) + ImagOut[0]; + ImagOut[0] = h1r - ImagOut[0]; + + delete[]tmpReal; + delete[]tmpImag; +} + +/* + * PowerSpectrum + * + * This function computes the same as RealFFT, above, but + * adds the squares of the real and imaginary part of each + * coefficient, extracting the power and throwing away the + * phase. + * + * For speed, it does not call RealFFT, but duplicates some + * of its code. + */ + +void PowerSpectrum(int NumSamples, float *In, float *Out) +{ + int Half = NumSamples / 2; + int i; + + float theta = M_PI / Half; + + float *tmpReal = new float[Half]; + float *tmpImag = new float[Half]; + float *RealOut = new float[Half]; + float *ImagOut = new float[Half]; + + for (i = 0; i < Half; i++) { + tmpReal[i] = In[2 * i]; + tmpImag[i] = In[2 * i + 1]; + } + + FFT(Half, 0, tmpReal, tmpImag, RealOut, ImagOut); + + float wtemp = float (sin(0.5 * theta)); + + float wpr = -2.0 * wtemp * wtemp; + float wpi = float (sin(theta)); + float wr = 1.0 + wpr; + float wi = wpi; + + int i3; + + float h1r, h1i, h2r, h2i, rt, it; + //float total=0; + + for (i = 1; i < Half / 2; i++) { + + i3 = Half - i; + + h1r = 0.5 * (RealOut[i] + RealOut[i3]); + h1i = 0.5 * (ImagOut[i] - ImagOut[i3]); + h2r = 0.5 * (ImagOut[i] + ImagOut[i3]); + h2i = -0.5 * (RealOut[i] - RealOut[i3]); + + rt = h1r + wr * h2r - wi * h2i; //printf("Realout%i = %f",i,rt);total+=fabs(rt); + it = h1i + wr * h2i + wi * h2r; // printf(" Imageout%i = %f\n",i,it); + + Out[i] = rt * rt + it * it; + + rt = h1r - wr * h2r + wi * h2i; + it = -h1i + wr * h2i + wi * h2r; + + Out[i3] = rt * rt + it * it; + + wr = (wtemp = wr) * wpr - wi * wpi + wr; + wi = wi * wpr + wtemp * wpi + wi; + } + //printf("total = %f\n",total); + rt = (h1r = RealOut[0]) + ImagOut[0]; + it = h1r - ImagOut[0]; + Out[0] = rt * rt + it * it; + + rt = RealOut[Half / 2]; + it = ImagOut[Half / 2]; + Out[Half / 2] = rt * rt + it * it; + + delete[]tmpReal; + delete[]tmpImag; + delete[]RealOut; + delete[]ImagOut; +} + +/* + * Windowing Functions + */ + +int NumWindowFuncs() +{ + return 4; +} + +char *WindowFuncName(int whichFunction) +{ + switch (whichFunction) { + default: + case 0: + return "Rectangular"; + case 1: + return "Bartlett"; + case 2: + return "Hamming"; + case 3: + return "Hanning"; + } +} + +void WindowFunc(int whichFunction, int NumSamples, float *in) +{ + int i; + + if (whichFunction == 1) { + // Bartlett (triangular) window + for (i = 0; i < NumSamples / 2; i++) { + in[i] *= (i / (float) (NumSamples / 2)); + in[i + (NumSamples / 2)] *= + (1.0 - (i / (float) (NumSamples / 2))); + } + } + + if (whichFunction == 2) { + // Hamming + for (i = 0; i < NumSamples; i++) + in[i] *= 0.54 - 0.46 * cos(2 * M_PI * i / (NumSamples - 1)); + } + + if (whichFunction == 3) { + // Hanning + for (i = 0; i < NumSamples; i++) + in[i] *= 0.50 - 0.50 * cos(2 * M_PI * i / (NumSamples - 1)); + } +} + +void fft::genWindow(int whichFunction, int NumSamples, float *window) +{ + int i; + + if (whichFunction == 1) { + // Bartlett (triangular) window + for (i = 0; i < NumSamples / 2; i++) { + window[i] = (i / (float) (NumSamples / 2)); + window[i + (NumSamples / 2)] = + (1.0 - (i / (float) (NumSamples / 2))); + } + } + + if (whichFunction == 2) { + // Hamming + for (i = 0; i < NumSamples; i++) + window[i] = 0.54 - 0.46 * cos(2 * M_PI * i / (NumSamples - 1)); + } + + if (whichFunction == 3) { + // Hanning + for (i = 0; i < NumSamples; i++) + window[i] = 0.50 - 0.50 * cos(2 * M_PI * i / (NumSamples - 1)); + } +} + +/* constructor */ +fft::fft(int fftSize) { + n = fftSize; + half = fftSize / 2; + //use malloc for 16 byte alignment + in_real = (float *) malloc(n * sizeof(float)); + in_img = (float *) malloc(n * sizeof(float)); + out_real = (float *) malloc(n * sizeof(float)); + out_img = (float *) malloc(n * sizeof(float)); + +#ifdef __APPLE_CC__ + log2n = log2(n); + A.realp = (float *) malloc(half * sizeof(float)); + A.imagp = (float *) malloc(half * sizeof(float)); + setupReal = vDSP_create_fftsetup(log2n, FFT_RADIX2); + if (setupReal == NULL) { + printf("\nFFT_Setup failed to allocate enough memory for" + "the real FFT.\n"); + } + polar = (float *) malloc(n * sizeof(float)); +#endif +} + +/* destructor */ +fft::~fft() { + delete[] in_real, out_real, in_img, out_img; +#ifdef __APPLE_CC__ + vDSP_destroy_fftsetup(setupReal); + delete[] A.realp; + delete[] A.imagp; + delete[] polar; +#endif + +} + +/* Calculate the power spectrum */ +void fft::powerSpectrum(int start, float *data, float *window, float *magnitude,float *phase, float *power, float *avg_power) { + int i; + float total_power = 0.0f; + + + //windowing + for (i = 0; i < n; i++) { + in_real[i] = data[start + i] * window[i]; + } + + + RealFFT(n, in_real, out_real, out_img); + + for (i = 0; i < half; i++) { + /* compute power */ + power[i] = out_real[i]*out_real[i] + out_img[i]*out_img[i]; + total_power += power[i]; + /* compute magnitude and phase */ + magnitude[i] = 2.0*sqrt(power[i]); + + if (magnitude[i] < 0.000001){ // less than 0.1 nV + magnitude[i] = 0; // out of range + } else { + magnitude[i] = 20.0*log10(magnitude[i] + 1); // get to to db scale + } + phase[i] = atan2(out_img[i],out_real[i]); + } + /* calculate average power */ + *(avg_power) = total_power / (float) half; + +} + +#ifdef __APPLE_CC__ + +/* Calculate the power spectrum */ +void fft::powerSpectrum_vdsp(int start, float *data, float *window, float *magnitude,float *phase) { + + uint32_t i; + + //multiply by window + vDSP_vmul(data, 1, window, 1, in_real, 1, n); + + //convert to split complex format - evens and odds + vDSP_ctoz((COMPLEX *) in_real, 2, &A, 1, half); + + + //calc fft + vDSP_fft_zrip(setupReal, &A, 1, log2n, FFT_FORWARD); + + //scale by 2 (see vDSP docs) + static float scale=0.5; + vDSP_vsmul(A.realp, 1, &scale, A.realp, 1, half); + vDSP_vsmul(A.imagp, 1, &scale, A.imagp, 1, half); + + //back to split complex format + vDSP_ztoc(&A, 1, (COMPLEX*) out_real, 2, half); + + //convert to polar + vDSP_polar(out_real, 2, polar, 2, half); + + for (i = 0; i < half; i++) { + magnitude[i]=polar[2*i]+1.0; + phase[i]=polar[2*i + 1]; + } + float ref = 1.0; + vDSP_vdbcon(magnitude, 1, &ref, magnitude, 1, half, 1); + + + +} + +#endif + +void fft::inversePowerSpectrum(int start, float *finalOut, float *window, float *magnitude,float *phase) { + int i; + + /* get real and imag part */ + for (i = 0; i < half; i++) { + float mag = pow(10.0, magnitude[i] / 20.0) - 1.0; + in_real[i] = mag *cos(phase[i]); + in_img[i] = mag *sin(phase[i]); + } + + /* zero negative frequencies */ + memset(in_real+half, half, 0.0); + memset(in_img+half, half, 0.0); + + FFT(n, 1, in_real, in_img, out_real, out_img); // second parameter indicates inverse transform + + for (i = 0; i < n; i++) { + finalOut[start + i] += out_real[i] * window[i] + ; + } + +} + + +#ifdef __APPLE_CC__ +void fft::inversePowerSpectrum_vdsp(int start, float *finalOut, float *window, float *magnitude,float *phase) { + uint32_t i; + + for (i = 0; i < half; i++) { + polar[2*i] = pow(10.0, magnitude[i] / 20.0) - 1.0; + polar[2*i + 1] = phase[i]; + } + + vDSP_rect(polar, 2, in_real, 2, half); + + vDSP_ctoz((COMPLEX*) in_real, 2, &A, 1, half); + vDSP_fft_zrip(setupReal, &A, 1, log2n, FFT_INVERSE); + vDSP_ztoc(&A, 1, (COMPLEX*) out_real, 2, half); + + static float scale = 1./(2. * n); + vDSP_vsmul(out_real, 1, &scale, out_real, 1, n); + + //multiply by window + vDSP_vmul(out_real, 1, window, 1, finalOut, 1, n); + +} + +#endif diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/fft.h b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/fft.h new file mode 100644 index 0000000..77aa777 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/fft.h @@ -0,0 +1,76 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _FFT +#define _FFT + +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + +#ifdef __APPLE_CC__ +#include <Accelerate/Accelerate.h> +#endif + + +class fft { + +public: + + fft(int fftSize); + ~fft(); + + int n; //fftSize + int half; //halfFFTSize + + float *in_real, *out_real, *in_img, *out_img; + +#ifdef __APPLE_CC__ + int log2n; //log2(n); + FFTSetup setupReal; + COMPLEX_SPLIT A; + float *polar; + void powerSpectrum_vdsp(int start, float *data, float *window, float *magnitude,float *phase); + void inversePowerSpectrum_vdsp(int start, float *finalOut, float *window, float *magnitude,float *phase); +#endif; + + /* Calculate the power spectrum */ + void powerSpectrum(int start, float *data, float *window, float *magnitude, float *phase, float *power, float *avg_power); + /* ... the inverse */ + void inversePowerSpectrum(int start, float *finalOut, float *window, float *magnitude,float *phase); + + static void genWindow(int whichFunction, int NumSamples, float *window); + +}; + + +#endif diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maxiFFT.cpp b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maxiFFT.cpp new file mode 100644 index 0000000..eee8ee8 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maxiFFT.cpp @@ -0,0 +1,257 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "maxiFFT.h" +#include <iostream> +#include "math.h" + +using namespace std; + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//F F T +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void maxiFFT::setup(int _fftSize, int _windowSize, int _hopSize) { + _fft = new fft(_fftSize); + fftSize = _fftSize; + windowSize = _windowSize; + bins = fftSize / 2; + hopSize = _hopSize; + buffer = (float *) malloc(fftSize * sizeof(float)); + magnitudes = (float *) malloc(bins * sizeof(float)); + phases = (float *) malloc(bins * sizeof(float)); + powers = (float *) malloc(bins * sizeof(float)); + avgPower = new float; + memset(buffer, 0, fftSize * sizeof(float)); + memset(magnitudes, 0, bins * sizeof(float)); + memset(phases, 0, bins * sizeof(float)); + memset(powers, 0, bins * sizeof(float)); + *avgPower = 0; + pos =windowSize - hopSize; + newFFT = 0; + window = (float*) malloc(fftSize * sizeof(float)); + memset(window, 0, fftSize * sizeof(float)); + fft::genWindow(3, windowSize, window); +} + +bool maxiFFT::process(float value) { + //add value to buffer at current pos + buffer[pos++] = value; + //if buffer full, run fft + newFFT = pos == windowSize; + if (newFFT) { +#if defined(__APPLE_CC__) && !defined(_NO_VDSP) + _fft->powerSpectrum_vdsp(0, buffer, window, magnitudes, phases); +#else + _fft->powerSpectrum(0, buffer, window, magnitudes, phases, powers, avgPower); +#endif + //shift buffer back by one hop size + memcpy(buffer, buffer + hopSize, (windowSize - hopSize) * sizeof(float)); + //set the new data to zero (is this necessary?, it will get overwritten) + memset(buffer + windowSize - hopSize, 0, hopSize * sizeof(float)); + //reset pos to start of hop + pos= windowSize - hopSize; + } + return newFFT; +} + +maxiFFT::~maxiFFT() { + delete _fft; + delete[] buffer,magnitudes,phases,powers, window; + delete avgPower; +} + + + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//I N V E R S E F F T +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void maxiIFFT::setup(int _fftSize, int _windowSize, int _hopSize) { + _fft = new fft(_fftSize); + fftSize = _fftSize; + windowSize = _windowSize; + bins = fftSize / 2; + hopSize = _hopSize; + buffer = (float *) malloc(fftSize * sizeof(float)); + ifftOut = (float *) malloc(fftSize * sizeof(float)); + memset(buffer, 0, windowSize * sizeof(float)); + pos =0; + window = (float*) malloc(fftSize * sizeof(float)); + memset(window, 0, fftSize * sizeof(float)); + fft::genWindow(3, windowSize, window); +} + +float maxiIFFT::process(float *magnitudes, float *phases) { + if (0==pos) { + //do ifft + memset(ifftOut, 0, fftSize * sizeof(float)); +#if defined(__APPLE_CC__) && !defined(_NO_VDSP) + _fft->inversePowerSpectrum_vdsp(0, ifftOut, window, magnitudes, phases); +#else + _fft->inversePowerSpectrum(0, ifftOut, window, magnitudes, phases); +#endif + //add to output + //shift back by one hop + memcpy(buffer, buffer+hopSize, (fftSize - hopSize) * sizeof(float)); + //clear the end chunk + memset(buffer + (fftSize - hopSize), 0, hopSize * sizeof(float)); + //merge new output + for(int i=0; i < fftSize; i++) { + buffer[i] += ifftOut[i]; + } + } + + nextValue = buffer[pos]; + //limit the values, this alg seems to spike occasionally (and break the audio drivers) + if (nextValue > 0.99999f) nextValue = 0.99999f; + if (nextValue < -0.99999f) nextValue = -0.99999f; + if (hopSize == ++pos ) { + pos=0; + } + + return nextValue; +} + +maxiIFFT::~maxiIFFT() { + delete _fft; + delete[] ifftOut, buffer, window; +}; + + + + + + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//O C T A V E A N A L Y S E R +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +void maxiFFTOctaveAnalyzer::setup(float samplingRate, int nBandsInTheFFT, int nAveragesPerOctave){ + + samplingRate = samplingRate; + nSpectrum = nBandsInTheFFT; + spectrumFrequencySpan = (samplingRate / 2.0f) / (float)(nSpectrum); + nAverages = nBandsInTheFFT; + // fe: 2f for octave bands, sqrt(2) for half-octave bands, cuberoot(2) for third-octave bands, etc + if (nAveragesPerOctave==0) // um, wtf? + nAveragesPerOctave = 1; + nAveragesPerOctave = nAveragesPerOctave; + averageFrequencyIncrement = pow(2.0f, 1.0f/(float)(nAveragesPerOctave)); + // this isn't currently configurable (used once here then no effect), but here's some reasoning: + // 43 is a good value if you want to approximate "computer" octaves: 44100/2/2/2/2/2/2/2/2/2/2 + // 55 is a good value if you'd rather approximate A-440 octaves: 440/2/2/2 + // 65 is a good value if you'd rather approximate "middle-C" octaves: ~262/2/2 + // you could easily double it if you felt the lowest band was just rumble noise (as it probably is) + // but don't go much smaller unless you have a huge fft window size (see below for more why) + // keep in mind, if you change it, that the number of actual bands may change +/-1, and + // for some values, the last averaging band may not be very useful (may extend above nyquist) + firstOctaveFrequency = 55.0f; + // for each spectrum[] bin, calculate the mapping into the appropriate average[] bin. + // this gives us roughly log-sized averaging bins, subject to how "fine" the spectrum bins are. + // with more spectrum bins, you can better map into the averaging bins (especially at low + // frequencies) or use more averaging bins per octave. with an fft window size of 2048, + // sampling rate of 44100, and first octave around 55, that's about enough to do half-octave + // analysis. if you don't have enough spectrum bins to map adequately into averaging bins + // at the requested number per octave then you'll end up with "empty" averaging bins, where + // there is no spectrum available to map into it. (so... if you have "nonreactive" averages, + // either increase fft buffer size, or decrease number of averages per octave, etc) + spe2avg = new int[nSpectrum]; + int avgidx = 0; + float averageFreq = firstOctaveFrequency; // the "top" of the first averaging bin + // we're looking for the "top" of the first spectrum bin, and i'm just sort of + // guessing that this is where it is (or possibly spectrumFrequencySpan/2?) + // ... either way it's probably close enough for these purposes + float spectrumFreq = spectrumFrequencySpan; + for (int speidx=0; speidx < nSpectrum; speidx++) { + while (spectrumFreq > averageFreq) { + avgidx++; + averageFreq *= averageFrequencyIncrement; + } + spe2avg[speidx] = avgidx; + spectrumFreq += spectrumFrequencySpan; + } + nAverages = avgidx; + averages = new float[nAverages]; + peaks = new float[nAverages]; + peakHoldTimes = new int[nAverages]; + peakHoldTime = 0; // arbitrary + peakDecayRate = 0.9f; // arbitrary + linearEQIntercept = 1.0f; // unity -- no eq by default + linearEQSlope = 0.0f; // unity -- no eq by default +} + +void maxiFFTOctaveAnalyzer::calculate(float * fftData){ + + int last_avgidx = 0; // tracks when we've crossed into a new averaging bin, so store current average + float sum = 0.0f; // running total of spectrum data + int count = 0; // count of spectrums accumulated (for averaging) + for (int speidx=0; speidx < nSpectrum; speidx++) { + count++; + sum += fftData[speidx] * (linearEQIntercept + (float)(speidx) * linearEQSlope); + int avgidx = spe2avg[speidx]; + if (avgidx != last_avgidx) { + + for (int j = last_avgidx; j < avgidx; j++){ + averages[j] = sum / (float)(count); + } + count = 0; + sum = 0.0f; + } + last_avgidx = avgidx; + } + // the last average was probably not calculated... + if ((count > 0) && (last_avgidx < nAverages)){ + averages[last_avgidx] = sum / (float)(count); + } + + // update the peaks separately + for (int i=0; i < nAverages; i++) { + if (averages[i] >= peaks[i]) { + // save new peak level, also reset the hold timer + peaks[i] = averages[i]; + peakHoldTimes[i] = peakHoldTime; + } else { + // current average does not exceed peak, so hold or decay the peak + if (peakHoldTimes[i] > 0) { + peakHoldTimes[i]--; + } else { + peaks[i] *= peakDecayRate; + } + } + } +} diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maxiFFT.h b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maxiFFT.h new file mode 100644 index 0000000..4d73441 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maxiFFT.h @@ -0,0 +1,120 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _MAXI_FFT +#define _MAXI_FFT + +//#define _NO_VDSP //set this if you don't want to use apple's vDSP fft functions + + +#include "fft.h" + +class maxiFFT { + +public: + maxiFFT(){ + _fft = 0; + }; + ~maxiFFT(); + void setup(int fftSize, int windowSize, int hopSize); + bool process(float value); + float *magnitudes, *phases, *powers; + float *avgPower; + int windowSize; + int hopSize; + +private: + float *buffer, *window; + int bins; + int pos; + float nextValue; + int fftSize; + fft *_fft; + bool newFFT; +}; + +class maxiIFFT { + +public: + maxiIFFT(){ + _fft=0; + }; + ~maxiIFFT(); + void setup(int fftSize, int windowSize, int hopSize); + float process(float *magnitudes, float *phases); + +private: + float *ifftOut, *buffer, *window; + int windowSize; + int bins; + int hopSize; + int pos; + float nextValue; + int fftSize; + fft *_fft; +}; + + +class maxiFFTOctaveAnalyzer { +/*based on code by David Bollinger, http://www.davebollinger.com/ + */ +public: + + float samplingRate; // sampling rate in Hz (needed to calculate frequency spans) + int nSpectrum; // number of spectrum bins in the fft + int nAverages; // number of averaging bins here + int nAveragesPerOctave; // number of averages per octave as requested by user + float spectrumFrequencySpan; // the "width" of an fft spectrum bin in Hz + float firstOctaveFrequency; // the "top" of the first averaging bin here in Hz + float averageFrequencyIncrement; // the root-of-two multiplier between averaging bin frequencies + float * averages; // the actual averages + float * peaks; // peaks of the averages, aka "maxAverages" in other implementations + int * peakHoldTimes; // how long to hold THIS peak meter? decay if == 0 + int peakHoldTime; // how long do we hold peaks? (in fft frames) + float peakDecayRate; // how quickly the peaks decay: 0f=instantly .. 1f=not at all + int * spe2avg; // the mapping between spectrum[] indices and averages[] indices + // the fft's log equalizer() is no longer of any use (it would be nonsense to log scale + // the spectrum values into log-sized average bins) so here's a quick-and-dirty linear + // equalizer instead: + float linearEQSlope; // the rate of linear eq + float linearEQIntercept; // the base linear scaling used at the first averaging bin + // the formula is: spectrum[i] * (linearEQIntercept + i * linearEQSlope) + // so.. note that clever use of it can also provide a "gain" control of sorts + // (fe: set intercept to 2f and slope to 0f to double gain) + + void setup(float samplingRate, int nBandsInTheFFT, int nAveragesPerOctave); + + void calculate(float * fftData); + +}; + +#endif
\ No newline at end of file diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maximilian.cpp b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maximilian.cpp new file mode 100644 index 0000000..efd6d28 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maximilian.cpp @@ -0,0 +1,712 @@ + +/* + * maximilian.cpp + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "maximilian.h" +#include "math.h" + +int channels=2; +int samplerate=44100; +int buffersize=1024; +float chandiv= 1; + +double sineBuffer[514]={0,0.012268,0.024536,0.036804,0.049042,0.06131,0.073547,0.085785,0.097992,0.1102,0.12241,0.13455,0.1467,0.15884,0.17093,0.18301,0.19507,0.20709,0.21909,0.23105,0.24295,0.25485,0.26669,0.2785,0.29025,0.30197,0.31366,0.32529,0.33685,0.34839,0.35986,0.37128,0.38266,0.39395,0.40521,0.41641,0.42752,0.4386,0.44958,0.46051,0.47137,0.48215,0.49286,0.50351,0.51407,0.52457,0.53497,0.54529,0.55554,0.5657,0.57578,0.58575,0.59567,0.60547,0.6152,0.62482,0.63437,0.6438,0.65314,0.66238,0.67151,0.68057,0.68951,0.69833,0.70706,0.7157,0.72421,0.7326,0.74091,0.74908,0.75717,0.76514,0.77298,0.7807,0.7883,0.79581,0.80316,0.81042,0.81754,0.82455,0.83142,0.8382,0.84482,0.85132,0.8577,0.86392,0.87006,0.87604,0.88187,0.8876,0.89319,0.89862,0.90396,0.90912,0.91415,0.91907,0.92383,0.92847,0.93295,0.93729,0.9415,0.94556,0.94949,0.95325,0.95691,0.96039,0.96375,0.96692,0.97,0.9729,0.97565,0.97827,0.98074,0.98306,0.98523,0.98724,0.98914,0.99084,0.99243,0.99387,0.99515,0.99628,0.99725,0.99808,0.99875,0.99927,0.99966,0.99988,0.99997,0.99988,0.99966,0.99927,0.99875,0.99808,0.99725,0.99628,0.99515,0.99387,0.99243,0.99084,0.98914,0.98724,0.98523,0.98306,0.98074,0.97827,0.97565,0.9729,0.97,0.96692,0.96375,0.96039,0.95691,0.95325,0.94949,0.94556,0.9415,0.93729,0.93295,0.92847,0.92383,0.91907,0.91415,0.90912,0.90396,0.89862,0.89319,0.8876,0.88187,0.87604,0.87006,0.86392,0.8577,0.85132,0.84482,0.8382,0.83142,0.82455,0.81754,0.81042,0.80316,0.79581,0.7883,0.7807,0.77298,0.76514,0.75717,0.74908,0.74091,0.7326,0.72421,0.7157,0.70706,0.69833,0.68951,0.68057,0.67151,0.66238,0.65314,0.6438,0.63437,0.62482,0.6152,0.60547,0.59567,0.58575,0.57578,0.5657,0.55554,0.54529,0.53497,0.52457,0.51407,0.50351,0.49286,0.48215,0.47137,0.46051,0.44958,0.4386,0.42752,0.41641,0.40521,0.39395,0.38266,0.37128,0.35986,0.34839,0.33685,0.32529,0.31366,0.30197,0.29025,0.2785,0.26669,0.25485,0.24295,0.23105,0.21909,0.20709,0.19507,0.18301,0.17093,0.15884,0.1467,0.13455,0.12241,0.1102,0.097992,0.085785,0.073547,0.06131,0.049042,0.036804,0.024536,0.012268,0,-0.012268,-0.024536,-0.036804,-0.049042,-0.06131,-0.073547,-0.085785,-0.097992,-0.1102,-0.12241,-0.13455,-0.1467,-0.15884,-0.17093,-0.18301,-0.19507,-0.20709,-0.21909,-0.23105,-0.24295,-0.25485,-0.26669,-0.2785,-0.29025,-0.30197,-0.31366,-0.32529,-0.33685,-0.34839,-0.35986,-0.37128,-0.38266,-0.39395,-0.40521,-0.41641,-0.42752,-0.4386,-0.44958,-0.46051,-0.47137,-0.48215,-0.49286,-0.50351,-0.51407,-0.52457,-0.53497,-0.54529,-0.55554,-0.5657,-0.57578,-0.58575,-0.59567,-0.60547,-0.6152,-0.62482,-0.63437,-0.6438,-0.65314,-0.66238,-0.67151,-0.68057,-0.68951,-0.69833,-0.70706,-0.7157,-0.72421,-0.7326,-0.74091,-0.74908,-0.75717,-0.76514,-0.77298,-0.7807,-0.7883,-0.79581,-0.80316,-0.81042,-0.81754,-0.82455,-0.83142,-0.8382,-0.84482,-0.85132,-0.8577,-0.86392,-0.87006,-0.87604,-0.88187,-0.8876,-0.89319,-0.89862,-0.90396,-0.90912,-0.91415,-0.91907,-0.92383,-0.92847,-0.93295,-0.93729,-0.9415,-0.94556,-0.94949,-0.95325,-0.95691,-0.96039,-0.96375,-0.96692,-0.97,-0.9729,-0.97565,-0.97827,-0.98074,-0.98306,-0.98523,-0.98724,-0.98914,-0.99084,-0.99243,-0.99387,-0.99515,-0.99628,-0.99725,-0.99808,-0.99875,-0.99927,-0.99966,-0.99988,-0.99997,-0.99988,-0.99966,-0.99927,-0.99875,-0.99808,-0.99725,-0.99628,-0.99515,-0.99387,-0.99243,-0.99084,-0.98914,-0.98724,-0.98523,-0.98306,-0.98074,-0.97827,-0.97565,-0.9729,-0.97,-0.96692,-0.96375,-0.96039,-0.95691,-0.95325,-0.94949,-0.94556,-0.9415,-0.93729,-0.93295,-0.92847,-0.92383,-0.91907,-0.91415,-0.90912,-0.90396,-0.89862,-0.89319,-0.8876,-0.88187,-0.87604,-0.87006,-0.86392,-0.8577,-0.85132,-0.84482,-0.8382,-0.83142,-0.82455,-0.81754,-0.81042,-0.80316,-0.79581,-0.7883,-0.7807,-0.77298,-0.76514,-0.75717,-0.74908,-0.74091,-0.7326,-0.72421,-0.7157,-0.70706,-0.69833,-0.68951,-0.68057,-0.67151,-0.66238,-0.65314,-0.6438,-0.63437,-0.62482,-0.6152,-0.60547,-0.59567,-0.58575,-0.57578,-0.5657,-0.55554,-0.54529,-0.53497,-0.52457,-0.51407,-0.50351,-0.49286,-0.48215,-0.47137,-0.46051,-0.44958,-0.4386,-0.42752,-0.41641,-0.40521,-0.39395,-0.38266,-0.37128,-0.35986,-0.34839,-0.33685,-0.32529,-0.31366,-0.30197,-0.29025,-0.2785,-0.26669,-0.25485,-0.24295,-0.23105,-0.21909,-0.20709,-0.19507,-0.18301,-0.17093,-0.15884,-0.1467,-0.13455,-0.12241,-0.1102,-0.097992,-0.085785,-0.073547,-0.06131,-0.049042,-0.036804,-0.024536,-0.012268,0,0.012268 +}; + +void setup();//use this to do any initialisation if you want. + +void play(double *channels);//run dac! + +maxiOsc::maxiOsc(){ + phase = 0.0; +// memset(phases,0,500); +// memset(freqs,0,500); +} + +double maxiOsc::noise() { + //always the same unless you seed it. + float r = rand()/(float)RAND_MAX; + output=r*2-1; + return(output); +} + +double maxiOsc::sinewave(double frequency) { + output=sin (phase*(TWOPI)); + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); + +} + +double maxiOsc::sinebuf4(double frequency) { + double remainder; + double a,b,c,d,a1,a2,a3; + phase += 512./(samplerate/(frequency)); + if ( phase >= 511 ) phase -=512; + remainder = phase - floor(phase); + + if (phase==0) { + a=sineBuffer[(long) 512]; + b=sineBuffer[(long) phase]; + c=sineBuffer[(long) phase+1]; + d=sineBuffer[(long) phase+2]; + + } else { + a=sineBuffer[(long) phase-1]; + b=sineBuffer[(long) phase]; + c=sineBuffer[(long) phase+1]; + d=sineBuffer[(long) phase+2]; + + } + + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = double (((a3 * remainder + a2) * remainder + a1) * remainder + b); + return(output); +} + +double maxiOsc::sinebuf(double frequency) { + double remainder; + phase += 512./(samplerate/(frequency*chandiv)); + if ( phase >= 511 ) phase -=512; + remainder = phase - floor(phase); + output = (double) ((1-remainder) * sineBuffer[1+ (long) phase] + remainder * sineBuffer[2+(long) phase]); + return(output); +} + +double maxiOsc::coswave(double frequency) { + output=cos (phase*(TWOPI)); + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); + +} + +double maxiOsc::phasor(double frequency) { + output=phase; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); +} + +double maxiOsc::square(double frequency) { + if (phase<0.5) output=-1; + if (phase>0.5) output=1; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + return(output); +} + +double maxiOsc::pulse(double frequency, double duty) { + if (duty<0.) duty=0; + if (duty>1.) duty=1; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency))); + if (phase<duty) output=-1.; + if (phase>duty) output=1.; + return(output); +} + +double maxiOsc::phasor(double frequency, double startphase, double endphase) { + output=phase; + if (phase<startphase) { + phase=startphase; + } + if ( phase >= endphase ) phase = startphase; + phase += ((endphase-startphase)/(samplerate/(frequency))); + return(output); +} + + +double maxiOsc::saw(double frequency) { + + output=phase; + if ( phase >= 1.0 ) phase -= 2.0; + phase += (1./(samplerate/(frequency))); + return(output); + +} + +double maxiOsc::triangle(double frequency, double phase) { + output=tri*2; + if ( phase >= 1.0 ) phase -= 1.0; + phase += (1./(samplerate/(frequency*chandiv))); + if (phase <= 0.5 ) { + tri = phase; + } else { + tri =(1-phase); + } + return(output); + +} + +//I like this. +double maxiEnvelope::line(int numberofsegments,double segments[1000]) { + period=2./(segments[valindex+1]*0.004); + nextval=segments[valindex+2]; + currentval=segments[valindex]; + if (currentval-amplitude > 0.0000001 && valindex < numberofsegments) { + amplitude += ((currentval-startval)/(samplerate/period)); + } else if (currentval-amplitude < -0.0000001 && valindex < numberofsegments) { + amplitude -= (((currentval-startval)*(-1))/(samplerate/period)); + } else if (valindex >numberofsegments-1) { + valindex=numberofsegments-2; + } else { + valindex=valindex+2; + startval=currentval; + } + output=amplitude; + return(output); +} + +//and this +void maxiEnvelope::trigger(int index,double amp) { + valindex=index; + amplitude=amp; + +} + +//and this +double maxiDelayline::dl(double input, int size, double feedback) { + if ( phase >=size ) phase = 0; + memory[phase]=(memory[phase]*feedback)+(input*feedback)*0.5; + phase+=1; + output=memory[phase+1]; + return(output); + +} + +double maxiDelayline::dl(double input, int size, double feedback, int position) { + if ( phase >=size ) phase = 0; + if ( position >=size ) position = 0; + memory[phase]=(memory[phase]*feedback)+(input*feedback)*chandiv; + phase+=1; + output=memory[position]; + return(output); + +} + +//I particularly like these. cutoff between 0 and 1 +double maxiFilter::lopass(double input, double cutoff) { + output=outputs[0] + cutoff*(input-outputs[0]); + outputs[0]=output; + return(output); +} +//as above +double maxiFilter::hipass(double input, double cutoff) { + output=input-(outputs[0] + cutoff*(input-outputs[0])); + outputs[0]=output; + return(output); +} +//awesome. cuttof is freq in hz. res is between 1 and whatever. Watch out! +double maxiFilter::lores(double input,double cutoff1, double resonance) { + cutoff=cutoff1*0.5; + if (cutoff>(samplerate*0.25)) cutoff=(samplerate*0.25); + if (resonance<1.) resonance = 1.; + z=cos(TWOPI*cutoff/samplerate); + c=2-2*z; + double r=(sqrt(2.0)*sqrt(-pow((z-1.0),3.0))+resonance*(z-1))/(resonance*(z-1)); + x=x+(input-y)*c; + y=y+x; + x=x*r; + output=y; + return(output); +} + +//this is just stupid. Kindof works. +double maxiFilter::hires(double input,double cutoff1, double resonance) { + cutoff=cutoff1*0.5; + if (cutoff>(samplerate*0.25)) cutoff=(samplerate*0.25); + if (resonance<1.) resonance = 1.; + z=cos(TWOPI*cutoff/samplerate); + c=2-2*z; + double r=(sqrt(2.0)*sqrt(-pow((z-1.0),3.0))+resonance*(z-1))/(resonance*(z-1)); + x=x+(input-y)*c; + y=y+x; + x=x*r; + output=input-y; + return(output); +} + +//This works a bit. Needs attention. +double maxiFilter::bandpass(double input,double cutoff1, double resonance) { + cutoff=cutoff1; + if (cutoff>(samplerate*0.5)) cutoff=(samplerate*0.5); + if (resonance>=1.) resonance=0.999999; + z=cos(TWOPI*cutoff/samplerate); + inputs[0] = (1-resonance)*(sqrt(resonance*(resonance-4.0*pow(z,2.0)+2.0)+1)); + inputs[1] = 2*z*resonance; + inputs[2] = pow((resonance*-1),2); + + output=inputs[0]*input+inputs[1]*outputs[1]+inputs[2]*outputs[2]; + outputs[2]=outputs[1]; + outputs[1]=output; + return(output); +} + +//stereo bus +double *maxiMix::stereo(double input,double two[2],double x) { + if (x>1) x=1; + if (x<0) x=0; + two[0]=input*sqrt(1.0-x); + two[1]=input*sqrt(x); + return(two); +} + +//quad bus +double *maxiMix::quad(double input,double four[4],double x,double y) { + if (x>1) x=1; + if (x<0) x=0; + if (y>1) y=1; + if (y<0) y=0; + four[0]=input*sqrt((1.0-x)*y); + four[1]=input*sqrt((1.0-x)*(1.0-y)); + four[2]=input*sqrt(x*y); + four[3]=input*sqrt(x*(1.0-y)); + return(four); +} + +//ambisonic bus +double *maxiMix::ambisonic(double input,double eight[8],double x,double y,double z) { + if (x>1) x=1; + if (x<0) x=0; + if (y>1) y=1; + if (y<0) y=0; + if (z>1) y=1; + if (z<0) y=0; + eight[0]=input*(sqrt((1.0-x)*y)*1.0-z); + eight[1]=input*(sqrt((1.0-x)*(1.0-y))*1.0-z); + eight[2]=input*(sqrt(x*y)*1.0-z); + eight[3]=input*(sqrt(x*(1.0-y))*1.0-z); + eight[4]=input*(sqrt((1.0-x)*y)*z); + eight[5]=input*(sqrt((1.0-x)*(1.0-y))*z); + eight[6]=input*sqrt((x*y)*z); + eight[7]=input*sqrt((x*(1.0-y))*z); + return(eight); +} + + +bool maxiSample::load(string fileName) { + myPath = fileName; + return read(); +} + +void maxiSample::trigger() { + position = 0; +} + +double maxiSample::play() { + long length=myDataSize*(1./myChannels); + double remainder; + short* buffer = (short *)myData; + position=(position+1); + remainder = position - (long) position; + if ((long) position>length) position=0; + output = (double) ((1-remainder) * buffer[1+ (long) position] + remainder * buffer[2+(long) position])/32767;//linear interpolation + return(output); +} + +double maxiSample::play(double speed) { + double remainder; + long a,b; +// long length=myDataSize*0.5; + short* buffer = (short *)myData; + position=position+((speed*chandiv*myChannels)/(samplerate/mySampleRate)); + if (speed >=0) { + + if ((long) position>=length-1) position=1; + remainder = position - floor(position); + if (position+1<length) { + a=position+1; + + } + else { + a=length-1; + } + if (position+2<length) + { + b=position+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation +} else { + if ((long) position<0) position=length; + remainder = position - floor(position); + if (position-1>=0) { + a=position-1; + + } + else { + a=0; + } + if (position-2>=0) { + b=position-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } + return(output); +} + +double maxiSample::play(double frequency, double start, double end) { + double remainder; +// long length=myDataSize; + if (end>=length) end=length-1; + long a,b; + short* buffer = (short *)myData; + if (frequency >0.) { + if (position<start) { + position=start; + } + + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos+1<length) { + a=pos+1; + + } + else { + a=pos-1; + } + if (pos+2<length) { + b=pos+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos-1>=0) { + a=pos-1; + } + else { + a=0; + } + if (pos-2>=0) { + b=pos-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + + } + + return(output); +} + +//better cubic inerpolation. Cobbled together from various (pd externals, yehar, other places). +double maxiSample::play4(double frequency, double start, double end) { + double remainder; + double a,b,c,d,a1,a2,a3; + short* buffer = (short*)myData; + if (frequency >0.) { + if (position<start) { + position=start; + } + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>0) { + a=buffer[(int)(floor(position))-1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position<end-2) { + c=buffer[(long) position+1]; + + } else { + c=buffer[0]; + + } + if (position<end-3) { + d=buffer[(long) position+2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * remainder + a1) * remainder + b) / 32767; + + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>start && position < end-1) { + a=buffer[(long) position+1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position>start) { + c=buffer[(long) position-1]; + + } else { + c=buffer[0]; + + } + if (position>start+1) { + d=buffer[(long) position-2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * -remainder + a1) * -remainder + b) / 32767; + + } + + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,long length) { + double remainder; + short* buffer = (short *)bufferin; + position=(position+1); + remainder = position - (long) position; + if ((long) position>length) position=0; + output = (double) ((1-remainder) * buffer[1+ (long) position] + remainder * buffer[2+(long) position])/32767;//linear interpolation + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,double speed,long length) { + double remainder; + long a,b; + short* buffer = (short *)bufferin; + position=position+((speed*chandiv*myChannels)/(samplerate/mySampleRate)); + if (speed >=0) { + + if ((long) position>=length-1) position=1; + remainder = position - floor(position); + if (position+1<length) { + a=position+1; + + } + else { + a=length-1; + } + if (position+2<length) + { + b=position+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } else { + if ((long) position<0) position=length; + remainder = position - floor(position); + if (position-1>=0) { + a=position-1; + + } + else { + a=0; + } + if (position-2>=0) { + b=position-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + remainder * buffer[b])/32767;//linear interpolation + } + return(output); +} + +double maxiSample::bufferPlay(unsigned char &bufferin,double frequency, double start, double end) { + double remainder; + length=end; + long a,b; + short* buffer = (short *)bufferin; + if (frequency >0.) { + if (position<start) { + position=start; + } + + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos+1<length) { + a=pos+1; + + } + else { + a=pos-1; + } + if (pos+2<length) { + b=pos+2; + } + else { + b=length-1; + } + + output = (double) ((1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + long pos = floor(position); + if (pos-1>=0) { + a=pos-1; + } + else { + a=0; + } + if (pos-2>=0) { + b=pos-2; + } + else { + b=0; + } + output = (double) ((-1-remainder) * buffer[a] + + remainder * buffer[b])/32767;//linear interpolation + + } + + return(output); +} + +//better cubic inerpolation. Cobbled together from various (pd externals, yehar, other places). +double maxiSample::bufferPlay4(unsigned char &bufferin,double frequency, double start, double end) { + double remainder; + double a,b,c,d,a1,a2,a3; + short* buffer = (short*)bufferin; + if (frequency >0.) { + if (position<start) { + position=start; + } + if ( position >= end ) position = start; + position += ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>0) { + a=buffer[(int)(floor(position))-1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position<end-2) { + c=buffer[(long) position+1]; + + } else { + c=buffer[0]; + + } + if (position<end-3) { + d=buffer[(long) position+2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * remainder + a1) * remainder + b) / 32767; + + } else { + frequency=frequency-(frequency+frequency); + if ( position <= start ) position = end; + position -= ((end-start)/(samplerate/(frequency*chandiv))); + remainder = position - floor(position); + if (position>start && position < end-1) { + a=buffer[(long) position+1]; + + } else { + a=buffer[0]; + + } + + b=buffer[(long) position]; + if (position>start) { + c=buffer[(long) position-1]; + + } else { + c=buffer[0]; + + } + if (position>start+1) { + d=buffer[(long) position-2]; + + } else { + d=buffer[0]; + } + a1 = 0.5f * (c - a); + a2 = a - 2.5 * b + 2.f * c - 0.5f * d; + a3 = 0.5f * (d - a) + 1.5f * (b - c); + output = (double) (((a3 * remainder + a2) * -remainder + a1) * -remainder + b) / 32767; + + } + + return(output); +} + + +void maxiSample::getLength() { + length=myDataSize*0.5; +} + + diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maximilian.h b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maximilian.h new file mode 100755 index 0000000..86fcef4 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/libs/maximilian.h @@ -0,0 +1,355 @@ +/* + * maximilian.h + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef MAXIMILIAN_H +#define MAXIMILIAN_H + +//#define MAXIMILIAN_PORTAUDIO +#define MAXIMILIAN_RT_AUDIO + +#include "ofMain.h" +#include "ofUtils.h" + + +#include <iostream> +#include <fstream> +#include <string> +#include <cstdlib> + +using namespace std; +#define TWOPI 3.14159*2 + +class maxiOsc { + + double frequency; + double phase; + double startphase; + double endphase; + double output; + double tri; + + +public: + maxiOsc(); + double sinewave(double frequency); + double coswave(double frequency); + double phasor(double frequency); + double phasor(double frequency, double startphase, double endphase); + double saw(double frequency); + double triangle(double frequency,double phase); + double square(double frequency); + double pulse(double frequency, double duty); + double noise(); + double sinebuf(double frequency); + double sinebuf4(double frequency); + +}; + + +class maxiEnvelope { + + double period; + double output; + double startval; + double currentval; + double nextval; + +public: + double line(int numberofsegments,double segments[100]); + void trigger(int index,double amp); + int valindex; + double amplitude; + +}; + + +class maxiDelayline { + double frequency; + int phase; + double startphase; + double endphase; + double output; + double memory[88200]; + +public: + double dl(double input, int size, double feedback); + double dl(double input, int size, double feedback, int position); + + +}; + + +class maxiFilter { + double gain; + double input; + double output; + double inputs[10]; + double outputs[10]; + double cutoff1; + double x;//speed + double y;//pos + double z;//pole + double c;//filter coefficient +public: + double cutoff; + double resonance; + double lores(double input,double cutoff1, double resonance); + double hires(double input,double cutoff1, double resonance); + double bandpass(double input,double cutoff1, double resonance); + double lopass(double input,double cutoff); + double hipass(double input,double cutoff); + +}; + +class maxiMix { + double input; + double two[2]; + double four[4]; + double eight[8]; +public: + double x; + double y; + double z; + double *stereo(double input,double two[2],double x); + double *quad(double input,double four[4], double x,double y); + double *ambisonic(double input,double eight[8],double x,double y, double z); + +}; + + +class maxiSample { + +private: + string myPath; + int myChunkSize; + int mySubChunk1Size; + short myFormat; + int myByteRate; + short myBlockAlign; + short myBitsPerSample; + int myDataSize; + double position; + double speed; + double output; + +public: + short myChannels; + int mySampleRate; + long length; + void getLength(); + + char* myData; + + // get/set for the Path property + + ~maxiSample() + { + delete myData; + myChunkSize = NULL; + mySubChunk1Size = NULL; + myFormat = NULL; + myChannels = NULL; + mySampleRate = NULL; + myByteRate = NULL; + myBlockAlign = NULL; + myBitsPerSample = NULL; + myDataSize = NULL; + } + +// maxiSample(); + + bool load(string fileName); + + void trigger(); + + // read a wav file into this class + bool read() + { + bool result; + ifstream inFile( myPath.c_str(), ios::in | ios::binary); + result = inFile; + + if (inFile) { + //printf("Reading wav file...\n"); // for debugging only + + inFile.seekg(4, ios::beg); + inFile.read( (char*) &myChunkSize, 4 ); // read the ChunkSize + + inFile.seekg(16, ios::beg); + inFile.read( (char*) &mySubChunk1Size, 4 ); // read the SubChunk1Size + + //inFile.seekg(20, ios::beg); + inFile.read( (char*) &myFormat, sizeof(short) ); // read the file format. This should be 1 for PCM + + //inFile.seekg(22, ios::beg); + inFile.read( (char*) &myChannels, sizeof(short) ); // read the # of channels (1 or 2) + + //inFile.seekg(24, ios::beg); + inFile.read( (char*) &mySampleRate, sizeof(int) ); // read the samplerate + + //inFile.seekg(28, ios::beg); + inFile.read( (char*) &myByteRate, sizeof(int) ); // read the byterate + + //inFile.seekg(32, ios::beg); + inFile.read( (char*) &myBlockAlign, sizeof(short) ); // read the blockalign + + //inFile.seekg(34, ios::beg); + inFile.read( (char*) &myBitsPerSample, sizeof(short) ); // read the bitspersample + + //ignore any extra chunks + char chunkID[4]=""; + int filePos = 36; + bool found = false; + while(!found && !inFile.eof()) { + inFile.seekg(filePos, ios::beg); + inFile.read((char*) &chunkID, sizeof(char) * 4); + inFile.seekg(filePos + 4, ios::beg); + inFile.read( (char*) &myDataSize, sizeof(int) ); // read the size of the data + filePos += 8; + if (strcmp(chunkID,"data") == 0) { + found = true; + }else{ + filePos += myDataSize; + } + } + + + + // read the data chunk + myData = (char*) malloc(myDataSize * sizeof(char)); + inFile.seekg(filePos, ios::beg); + inFile.read(myData, myDataSize); + length=myDataSize*(0.5/myChannels); + + inFile.close(); // close the input file + } + + + return result; // this should probably be something more descriptive + } + + + double play(); + + double play(double speed); + + double play(double frequency, double start, double end); + + double play4(double frequency, double start, double end); + + double bufferPlay(unsigned char &bufferin,long length); + + double bufferPlay(unsigned char &bufferin,double speed,long length); + + double bufferPlay(unsigned char &bufferin,double frequency, double start, double end); + + double bufferPlay4(unsigned char &bufferin,double frequency, double start, double end); + + //int open(char *filename) { + // // open the wav file + // char *path = new char[50]; + // strcpy(path, filename); + // sample *myWav = new sample(path); + // return 0; + // } + // // print a summary of the wav file + // int info() { + // char *summary = myWav->getSummary(); + // printf("Summary:\n%s", summary); + // return 0; + // } + // int savefile() { + // // write the summary back out + // strcpy(path, "testout.wav"); + // myWav->setPath(path); + // myWav->save(); + // return 0: + // } + // int close() { + // // collect the garbage + // delete summary; + // delete path; + // delete myWav; + // + // return 0; + // } + // write out the wav file + bool save() + { + fstream myFile (myPath.c_str(), ios::out | ios::binary); + + // write the wav file per the wav file format + myFile.seekp (0, ios::beg); + myFile.write ("RIFF", 4); + myFile.write ((char*) &myChunkSize, 4); + myFile.write ("WAVE", 4); + myFile.write ("fmt ", 4); + myFile.write ((char*) &mySubChunk1Size, 4); + myFile.write ((char*) &myFormat, 2); + myFile.write ((char*) &myChannels, 2); + myFile.write ((char*) &mySampleRate, 4); + myFile.write ((char*) &myByteRate, 4); + myFile.write ((char*) &myBlockAlign, 2); + myFile.write ((char*) &myBitsPerSample, 2); + myFile.write ("data", 4); + myFile.write ((char*) &myDataSize, 4); + myFile.write (myData, myDataSize); + + return true; + } + + // return a printable summary of the wav file + char *getSummary() + { + char *summary = new char[250]; + sprintf(summary, " Format: %d\n Channels: %d\n SampleRate: %d\n ByteRate: %d\n BlockAlign: %d\n BitsPerSample: %d\n DataSize: %d\n", myFormat, myChannels, mySampleRate, myByteRate, myBlockAlign, myBitsPerSample, myDataSize); + std::cout << myDataSize; + return summary; + } +}; + + +class maxiMap { +public: + static double inline linlin(double val, double inMin, double inMax, double outMin, double outMax) { + return ((val - inMin) / (inMax - inMin) * (outMax - outMin)) + outMin; + } + + static double inline linexp(double val, double inMin, double inMax, double outMin, double outMax) { + //clipping + val = max(min(val, inMax), inMin); + return pow((outMax / outMin), (val - inMin) / (inMax - inMin)) * outMin; + } +}; + + +#endif diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/src/ofxMaxim.h b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/src/ofxMaxim.h new file mode 100644 index 0000000..317ba34 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxMaxim/src/ofxMaxim.h @@ -0,0 +1,50 @@ +/* + * maximilian + * platform independent synthesis library using portaudio or rtaudio + * + * Created by Mick Grierson on 29/12/2009. + * Copyright 2009 Mick Grierson & Strangeloop Limited. All rights reserved. + * Thanks to the Goldsmiths Creative Computing Team. + * Special thanks to Arturo Castro for the PortAudio implementation. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _OFMAXIM_H +#define _OFMAXIM_H + +#include "maximilian.h" +//#include "maxiFFT.h" + + +typedef maxiMix ofxMaxiMix; +typedef maxiOsc ofxMaxiOsc; +typedef maxiEnvelope ofxMaxiEnvelope; +typedef maxiDelayline ofxMaxiDelayline; +typedef maxiFilter ofxMaxiFilter; +typedef maxiSample ofxMaxiSample; +//typedef maxiFFT ofxMaxiFFT; +//typedef maxiIFFT ofxMaxiIFFT; +//typedef maxiFFTOctaveAnalyzer ofxMaxiFFTOctaveAnalyzer; + +#endif diff --git a/ofxMaxim/ofxMaximiPhoneExample/ofxiphone-Info.plist b/ofxMaxim/ofxMaximiPhoneExample/ofxiphone-Info.plist new file mode 100644 index 0000000..43db2fa --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/ofxiphone-Info.plist @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleIdentifier</key> + <string>${PRODUCT_NAME:identifier}</string> + <key>UIStatusBarHidden</key> + <true/> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDisplayName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UIApplicationExitsOnSuspend</key> + <true/> + <key>UIInterfaceOrientation</key> + <string>UIInterfaceOrientationPortrait</string> +</dict> +</plist> diff --git a/ofxMaxim/ofxMaximiPhoneExample/src/main.mm b/ofxMaxim/ofxMaximiPhoneExample/src/main.mm new file mode 100644 index 0000000..a0b6b4c --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/src/main.mm @@ -0,0 +1,8 @@ +#include "ofMain.h" +#include "testApp.h" + +int main(){ + ofSetupOpenGL(1024,768, OF_FULLSCREEN); // <-------- setup the GL context + + ofRunApp(new testApp); +} diff --git a/ofxMaxim/ofxMaximiPhoneExample/src/testApp.h b/ofxMaxim/ofxMaximiPhoneExample/src/testApp.h new file mode 100755 index 0000000..ac944e5 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/src/testApp.h @@ -0,0 +1,42 @@ +#pragma once + +#include "ofMain.h" +#include "ofxiPhone.h" +#include "ofxiPhoneExtras.h" +#include "ofxMaxim.h" + + +class testApp : public ofxiPhoneApp { + +public: + ~testApp(); + void setup(); + void update(); + void draw(); + void exit(); + + void touchDown(ofTouchEventArgs &touch); + void touchMoved(ofTouchEventArgs &touch); + void touchUp(ofTouchEventArgs &touch); + void touchDoubleTap(ofTouchEventArgs &touch); + + void lostFocus(); + void gotFocus(); + void gotMemoryWarning(); + void deviceOrientationChanged(int newOrientation); + + void audioReceived( float * input, int bufferSize, int nChannels ); + void audioRequested( float * output, int bufferSize, int nChannels ); + + int initialBufferSize; + int sampleRate; + + + ofxMaxiOsc myOsc1; + ofxMaxiSample sample1; + double patch1,sample,outputs1[2]; + ofxMaxiMix channel1; + +}; + + diff --git a/ofxMaxim/ofxMaximiPhoneExample/src/testApp.mm b/ofxMaxim/ofxMaximiPhoneExample/src/testApp.mm new file mode 100755 index 0000000..8dc9e95 --- /dev/null +++ b/ofxMaxim/ofxMaximiPhoneExample/src/testApp.mm @@ -0,0 +1,116 @@ +#include "testApp.h" +#include "ofxMaxim.h" + +testApp::~testApp() { + + delete sample1.myData; + +} + + +//-------------------------------------------------------------- +void testApp::setup(){ + ofEnableAlphaBlending(); + // register touch events + ofRegisterTouchEvents(this); + + // initialize the accelerometer + ofxAccelerometer.setup(); + + //iPhoneAlerts will be sent to this. + ofxiPhoneAlerts.addListener(this); + + sampleRate = 44100; + initialBufferSize = 512; + + sample1.load(ofToDataPath("beat2.wav")); + + ofSoundStreamSetup(2,0,this, sampleRate, initialBufferSize, 4); + + //If you want a landscape oreintation + //iPhoneSetOrientation(OFXIPHONE_ORIENTATION_LANDSCAPE_RIGHT); + + ofBackground(255,255,255); +} + +//-------------------------------------------------------------- +void testApp::update(){ + +} + +//-------------------------------------------------------------- +void testApp::draw(){ + +} + +//-------------------------------------------------------------- +void testApp::exit(){ + +} + + +//-------------------------------------------------------------- +void testApp::audioRequested(float * output, int bufferSize, int nChannels){ + + if( initialBufferSize != bufferSize ){ + ofLog(OF_LOG_ERROR, "your buffer size was set to %i - but the stream needs a buffer size of %i", initialBufferSize, bufferSize); + return; + } + + for (int i = 0; i < bufferSize; i++){ + + sample=sample1.play(1.); + channel1.stereo(sample,outputs1,0.5); + + output[i*nChannels ] = outputs1[0]; + output[i*nChannels + 1] = outputs1[1]; + + } + +} + +//-------------------------------------------------------------- +void testApp::audioReceived(float * input, int bufferSize, int nChannels){ + +} + +//-------------------------------------------------------------- +void testApp::touchDown(ofTouchEventArgs &touch){ + +} + +//-------------------------------------------------------------- +void testApp::touchMoved(ofTouchEventArgs &touch){ + +} + +//-------------------------------------------------------------- +void testApp::touchUp(ofTouchEventArgs &touch){ + +} + +//-------------------------------------------------------------- +void testApp::touchDoubleTap(ofTouchEventArgs &touch){ + +} + +//-------------------------------------------------------------- +void testApp::lostFocus(){ + +} + +//-------------------------------------------------------------- +void testApp::gotFocus(){ + +} + +//-------------------------------------------------------------- +void testApp::gotMemoryWarning(){ + +} + +//-------------------------------------------------------------- +void testApp::deviceOrientationChanged(int newOrientation){ + +} + |
