├── documentation ├── PikaCmdSource │ ├── PikaPrompt.cmd │ ├── PikaPrompt │ ├── InstallPikaPrompt.bat │ ├── InstallPikaPrompt.sh │ ├── BuildPikaCmd.sh │ ├── BuildPikaCmd.cmd │ ├── systoolsTests.pika │ ├── systools.pika │ └── unittests.pika ├── default.pika ├── Symbiosis.png ├── Symbiosis Wrap Alt 1.png ├── Symbiosis Wrap Alt 2.png ├── Symbiosis Wrap Alt 3.png ├── Symbiosis Wrap Alt 4.png ├── Symbiosis Wrap Alt 5.png ├── Symbiosis Documentation.txt ├── docstyle.css ├── htmlify.pika └── Symbiosis Documentation.html ├── examples └── Sinoplex │ ├── SinoplexExports │ ├── Programs │ ├── 3Molo.fxp │ ├── Bleep Me.fxp │ ├── Hi Freek.fxp │ ├── Play Duck.fxp │ ├── Eat Ma Hi Fi.fxp │ ├── Rice In Sun.fxp │ ├── Stop Whining.fxp │ ├── AM dot klimax.fxp │ ├── Doing Doing Doing.fxp │ ├── Add Chirps And Serve.fxp │ └── Sinoplex Factory Bank.fxb │ ├── SYResources │ ├── SYFactoryPresets.txt │ ├── SYParameters.txt │ ├── ReadMeAboutThisFolder.txt │ ├── 3Molo.aupreset │ ├── Bleep Me.aupreset │ ├── Hi Freek.aupreset │ ├── Play Duck.aupreset │ ├── Eat Ma Hi Fi.aupreset │ ├── Rice In Sun.aupreset │ ├── Stop Whining.aupreset │ ├── AM dot klimax.aupreset │ ├── Doing Doing Doing.aupreset │ └── Add Chirps And Serve.aupreset │ ├── Sinoplex_Prefix.pch │ ├── Sinoplex.sln │ ├── Sinoplex.plist │ ├── Sinoplex.r │ ├── Sinoplex.vcproj │ └── Sinoplex.xcodeproj │ └── project.pbxproj ├── PreBuiltWrappers.zip ├── CompileSymbiosisRsrc.command ├── VST2400 └── ReadMeAboutVSTSDK.txt ├── BuildDocs.command ├── VST2300 └── ReadMeAboutVSTSDK.txt ├── UploadGoogleDownload.command ├── Symbiosis_Prefix.pch ├── BuildWrappers.command ├── README.md ├── Symbiosis.plist ├── Symbiosis.r ├── googlecode_upload.py └── Symbiosis.xcodeproj ├── project.pbxproj └── magnus.pbxuser /documentation/PikaCmdSource/PikaPrompt.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | "%~dp0PikaCmd.exe" %* 3 | -------------------------------------------------------------------------------- /examples/Sinoplex/SinoplexExports: -------------------------------------------------------------------------------- 1 | _main_macho 2 | _VSTPluginMain 3 | _SymbiosisEntry 4 | 5 | -------------------------------------------------------------------------------- /PreBuiltWrappers.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/PreBuiltWrappers.zip -------------------------------------------------------------------------------- /documentation/default.pika: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/default.pika -------------------------------------------------------------------------------- /documentation/Symbiosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/Symbiosis.png -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/3Molo.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/3Molo.fxp -------------------------------------------------------------------------------- /documentation/Symbiosis Wrap Alt 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/Symbiosis Wrap Alt 1.png -------------------------------------------------------------------------------- /documentation/Symbiosis Wrap Alt 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/Symbiosis Wrap Alt 2.png -------------------------------------------------------------------------------- /documentation/Symbiosis Wrap Alt 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/Symbiosis Wrap Alt 3.png -------------------------------------------------------------------------------- /documentation/Symbiosis Wrap Alt 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/Symbiosis Wrap Alt 4.png -------------------------------------------------------------------------------- /documentation/Symbiosis Wrap Alt 5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/Symbiosis Wrap Alt 5.png -------------------------------------------------------------------------------- /documentation/Symbiosis Documentation.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/documentation/Symbiosis Documentation.txt -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Bleep Me.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Bleep Me.fxp -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Hi Freek.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Hi Freek.fxp -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Play Duck.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Play Duck.fxp -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Eat Ma Hi Fi.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Eat Ma Hi Fi.fxp -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Rice In Sun.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Rice In Sun.fxp -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Stop Whining.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Stop Whining.fxp -------------------------------------------------------------------------------- /documentation/PikaCmdSource/PikaPrompt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ -e $(which rlwrap) ]]; then rlwrap ${0%/*}/PikaCmd $*; else ${0%/*}/PikaCmd $*; fi 4 | -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/AM dot klimax.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/AM dot klimax.fxp -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Doing Doing Doing.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Doing Doing Doing.fxp -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Add Chirps And Serve.fxp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Add Chirps And Serve.fxp -------------------------------------------------------------------------------- /CompileSymbiosisRsrc.command: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "${0%/*}" 4 | /Developer/Tools/Rez -d SystemSevenOrLater=1 -useDF -script Roman -o Symbiosis.rsrc Symbiosis.r 5 | -------------------------------------------------------------------------------- /examples/Sinoplex/Programs/Sinoplex Factory Bank.fxb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blurkk/symbiosis-au-vst-2/HEAD/examples/Sinoplex/Programs/Sinoplex Factory Bank.fxb -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/SYFactoryPresets.txt: -------------------------------------------------------------------------------- 1 | Add Chirps And Serve.aupreset AM dot klimax.aupreset Bleep Me.aupreset Doing Doing Doing.aupreset Eat Ma Hi Fi.aupreset Hi Freek.aupreset Play Duck.aupreset Rice In Sun.aupreset Stop Whining.aupreset 3Molo.aupreset -------------------------------------------------------------------------------- /documentation/PikaCmdSource/InstallPikaPrompt.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 3 | 4 | IF "%~1"=="" ( 5 | ECHO. 6 | ECHO InstallPikaPrompt ^ 7 | ECHO. 8 | ECHO E.g. "InstallPikaPrompt C:\WINDOWS" 9 | EXIT /B 1 10 | ) 11 | COPY PikaPrompt.cmd %1\ 12 | COPY PikaCmd.exe %1\ 13 | COPY systools.pika %1\ 14 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/SYParameters.txt: -------------------------------------------------------------------------------- 1 | vst param # name min max display unit default 0 Frequency 0 1 ? Hz 0.68 4 LFO Wave 0 3 Sine|Square|Saw Down|Saw Up - 0 5 LFO Sync 0 1 b - 1 6 LFO Rate 0 1 ? - 1 1 LFO>Freq Amount 0 1 ? sm 0.01 7 Env Attack 0 1 ? ms 0.21 8 Env Decay 0 1 ? ms 0.21 2 Env>Freq Amount 0 1 ? sm 1 3 Env>Freq Invert 0 1 b - 0 9 MIDI 0 1 b - 0 10 AM 0 1 b - 0 11 Mix 0 100 = % 25 -------------------------------------------------------------------------------- /VST2400/ReadMeAboutVSTSDK.txt: -------------------------------------------------------------------------------- 1 | Due to licensing restrictions, the source files for the VST SDK are not included in this distribution but must be obtained from Steinberg and copied to this folder manually. Simply put the entire installation beneath this subdirectory. The final directory should looks something like this: 2 | 3 | artwork/ 4 | bin/ 5 | doc/ 6 | index.html 7 | pluginterfaces/ (required) 8 | public.sdk/ (required) 9 | ReadMeAboutVSTSDK.txt (this file) 10 | vstgui.sf/ 11 | -------------------------------------------------------------------------------- /documentation/PikaCmdSource/InstallPikaPrompt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | chmod +x ./PikaPrompt 4 | if [ ! -d /usr/local ]; then 5 | sudo mkdir /usr/local 6 | sudo chown root:wheel /usr/local 7 | sudo chmod 755 /usr/local 8 | fi 9 | if [ ! -d /usr/local/bin ]; then 10 | sudo mkdir /usr/local/bin 11 | sudo chown root:wheel /usr/local/bin 12 | sudo chmod 755 /usr/local/bin 13 | fi 14 | sudo cp ./PikaCmd /usr/local/bin/ 15 | sudo cp ./PikaPrompt /usr/local/bin/ 16 | sudo cp systools.pika /usr/local/bin/ 17 | -------------------------------------------------------------------------------- /BuildDocs.command: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd ${0%/*}/documentation 4 | if [ -x ./PikaCmd ] 5 | then 6 | chmod +x ./PikaCmd 7 | else 8 | cd PikaCmdSource 9 | ./BuildPikaCmd.sh 10 | cd .. 11 | mv PikaCmdSource/PikaCmd . 12 | fi 13 | ./PikaCmd 14 | if [[ -a $(which doxygen) ]]; then 15 | # I had problems getting doxygen to parse my .mm properly, but when renamed to .cpp it worked (and no, EXTENSION_MAPPING didn't help) 16 | mv ../Symbiosis.mm ../Symbiosis.cpp 17 | doxygen 18 | mv ../Symbiosis.cpp ../Symbiosis.mm 19 | fi 20 | -------------------------------------------------------------------------------- /VST2300/ReadMeAboutVSTSDK.txt: -------------------------------------------------------------------------------- 1 | Due to licensing restrictions, the source files for the VST SDK are not included in this distribution but must be obtained from Steinberg and copied to this folder manually. Simply put the entire installation beneath this subdirectory. The final directory should looks something like this: 2 | 3 | beos/ 4 | doc/ 5 | mac/ 6 | ReadMeAboutVSTSDK.txt (this file) 7 | resource/ 8 | sgi/ 9 | source/ (actually, the only required directory) 10 | VST Licensing Agreement.html 11 | VST Licensing Agreement.rtf 12 | win/ 13 | -------------------------------------------------------------------------------- /UploadGoogleDownload.command: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If google code upload python fails install python v2.6 (with http://www.macports.org/ : sudo port install python26). 4 | 5 | version=1_3b 6 | todayLong=$(date +%Y-%m-%d) 7 | todayShort=$(date +%Y%m%d) 8 | filename=Symbiosis_v$version'_'$todayShort.zip 9 | 10 | rm -r -f temp 11 | svn export https://symbiosis-au-vst.googlecode.com/svn/trunk temp 12 | ditto -ck --rsrc temp $filename 13 | ./googlecode_upload.py -s "Entire trunk from repository $todayLong" -p "symbiosis-au-vst" -u malstrom72 -l Featured $filename 14 | rm $filename 15 | rm -r -f temp 16 | -------------------------------------------------------------------------------- /examples/Sinoplex/Sinoplex_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Sinoplex' target in the 'Sinoplex' project. 3 | // 4 | 5 | // Define to 2300 to use version 2.3 of the VST SDK or 2400 to use version 2.4. 6 | // Alternatively, you may include one of the VST header files here (such as aeffect.h) and the version will be detected automatically. 7 | 8 | #define SY_USE_VST_VERSION 2400 9 | #define SINOPLEX_USE_VST_VERSION 2400 10 | 11 | #include 12 | 13 | #if (SINOPLEX_USE_VST_VERSION == 2300) 14 | #include "VST2300/source/common/vstplugsmacho.h" 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/ReadMeAboutThisFolder.txt: -------------------------------------------------------------------------------- 1 | This folder contains resources that were first auto-generated (inside the bundle) when launching the plug-in with Symbiosis for the first time. They have then been added to the XCode project and further edited and fine-tuned. 2 | 3 | We can of course leave these files out of the project as well and they will be created the first time the end-user runs the Audio Unit. The caveat with this solution (except obviously not being able to fine tune the resources) is that the end-user may not have write access in his root /Library path. This means that Symbiosis may not be able to launch because it can't create the necessary resource files. 4 | -------------------------------------------------------------------------------- /Symbiosis_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Symbiosis' target in the 'Symbiosis' project. 3 | // 4 | 5 | // Define to 2300 to use version 2.3 of the VST SDK or 2400 to use version 2.4. 6 | // Alternatively, you may include one of the VST header files here (such as aeffect.h) and the version will be detected 7 | // automatically. 8 | 9 | // Notice that the choice of VST SDK version here only concerns which version of the SDK you install to build Symbiosis. 10 | // Regardless of this choice, Symbiosis will be compatible with VSTs built with version 2.3 or version 2.4 of the SDK. 11 | 12 | #define SY_USE_VST_VERSION 2400 13 | #include 14 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/3Molo.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | 3Molo 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADDNNb2xvAAAAAAAAAAAAAAAAAAAAAAAA 18 | AAAAAAAAAAAAP4AAAAAAAAA/gAAAAAAAAAAAAAAAAAAAPsKPXD9hR64AAAAAP4AAAD+A 19 | AAA= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Bleep Me.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Bleep Me 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADEJsZWVwIE1lAAAAAAAAAAAAAAAAAAAA 18 | AAAAAAA/Sj1xPweuFD6zMzM/gAAAPqqqqz+AAAA/gAAAPi4Uez7Cj1wAAAAAP4AAAD4Z 19 | mZo= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Hi Freek.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Hi Freek 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADEhpIEZyZWVrAAAAAAAAAAAAAAAAAAAA 18 | AAAAAAA/aPXDPoo9cQAAAAA/gAAAAAAAAAAAAAA9zMzNAAAAAD2j1woAAAAAP4AAAD4Z 19 | mZo= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Play Duck.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Play Duck 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADFBsYXkgRHVjawAAAAAAAAAAAAAAAAAA 18 | AAAAAAA/EeuFAAAAAAAAAAA/gAAAAAAAAAAAAAA/BR64PczMzT3MzM0/gAAAAAAAAD8A 19 | AAA= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Eat Ma Hi Fi.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Eat Ma Hi Fi 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADEVhdCBNYSBIaSBGaQAAAAAAAAAAAAAA 18 | AAAAAAA+ij1xPCPXCj+AAAAAAAAAAAAAAD+AAAA/gAAAPCPXCgAAAAAAAAAAAAAAAD+A 19 | AAA= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Rice In Sun.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Rice In Sun 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADFJpY2UgSW4gU3VuAAAAAAAAAAAAAAAA 18 | AAAAAAA/PXCkPvXCjz9hR64/gAAAP4AAAAAAAAA/gAAAPszMzT9mZmYAAAAAAAAAAD6o 19 | 9cM= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Stop Whining.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Stop Whining 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADFN0b3AgV2hpbmluZwAAAAAAAAAAAAAA 18 | AAAAAAA/EeuFPrMzMz84UewAAAAAAAAAAAAAAAA/ZmZmPuFHrj71wo8AAAAAAAAAAD8A 19 | AAA= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/AM dot klimax.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | AM dot klimax 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADEFNIGRvdCBrbGltYXgAAAAAAAAAAAAA 18 | AAAAAAA/AAAAP4AAAAAAAAAAAAAAP4AAAD+AAAAAAAAAPszMzT7MzM0AAAAAP4AAAD+A 19 | AAA= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Doing Doing Doing.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Doing Doing Doing 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADERvaW5nIERvaW5nIERvaW5nAAAAAAAA 18 | AAAAAAA+0euFPvXCjz81wo8/gAAAAAAAAAAAAAA/gAAAPg9cKT8rhR8AAAAAP4AAAD+A 19 | AAA= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/Sinoplex/SYResources/Add Chirps And Serve.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | manufacturer 6 | 1316308324 7 | name 8 | Add Chirps And Serve 9 | subtype 10 | 1399410808 11 | type 12 | 1635085670 13 | version 14 | 1 15 | vstdata 16 | 17 | Q2NuSwAAAGBGeENrAAAAAVNpUHgAAAABAAAADEFkZCBDaGlycHMgQW5kIFNlcnZlAAAA 18 | AAAAAAA/LhR7PCPXCj+AAAAAAAAAAAAAAD+AAAA/gAAAPlcKPT5XCj0AAAAAAAAAAD6A 19 | AAA= 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /BuildWrappers.command: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | XCODE_PATH= 4 | if [ -e /Developer ]; then 5 | XCODE_PATH=/Developer/usr/bin/ 6 | fi 7 | 8 | cd "${0%/*}" 9 | 10 | ${XCODE_PATH}xcodebuild -configuration Development -target Symbiosis clean 11 | ${XCODE_PATH}xcodebuild -configuration Beta -target Symbiosis clean 12 | ${XCODE_PATH}xcodebuild -configuration Deployment -target Symbiosis clean 13 | ${XCODE_PATH}xcodebuild -configuration Development -target Symbiosis build 14 | ${XCODE_PATH}xcodebuild -configuration Beta -target Symbiosis build 15 | ${XCODE_PATH}xcodebuild -configuration Deployment -target Symbiosis build 16 | cp ./Symbiosis.r ./build/Development/Symbiosis.component/Contents/Resources 17 | cp ./Symbiosis.r ./build/Beta/Symbiosis.component/Contents/Resources 18 | cp ./Symbiosis.r ./build/Deployment/Symbiosis.component/Contents/Resources 19 | ditto -ck --rsrc build PreBuiltWrappers.zip 20 | -------------------------------------------------------------------------------- /examples/Sinoplex/Sinoplex.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual C++ Express 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sinoplex", "Sinoplex.vcproj", "{C29BE9C6-5C38-4449-9270-C552BDA3B614}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | Release|Win32 = Release|Win32 9 | EndGlobalSection 10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 11 | {C29BE9C6-5C38-4449-9270-C552BDA3B614}.Debug|Win32.ActiveCfg = Debug|Win32 12 | {C29BE9C6-5C38-4449-9270-C552BDA3B614}.Debug|Win32.Build.0 = Debug|Win32 13 | {C29BE9C6-5C38-4449-9270-C552BDA3B614}.Release|Win32.ActiveCfg = Release|Win32 14 | {C29BE9C6-5C38-4449-9270-C552BDA3B614}.Release|Win32.Build.0 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | EndGlobal 20 | -------------------------------------------------------------------------------- /documentation/PikaCmdSource/BuildPikaCmd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BuildCpp() 4 | { 5 | echo Compiling $1... 6 | g++ -x c++ -pipe -Wno-trigraphs -fno-rtti -Os -Wreturn-type -Wunused-variable -DNDEBUG -fmessage-length=0 -funroll-loops -ffast-math -fstrict-aliasing -m32 -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -o $@ >/var/tmp/buildlog.txt 2>&1 7 | if [ $? -ne 0 ]; then 8 | cat /var/tmp/buildlog.txt 9 | echo Compilation of $1 failed 10 | exit 1 11 | else 12 | echo Compiled $1 13 | fi 14 | } 15 | 16 | if [ -e ./PikaCmd ]; then 17 | chmod +x ./PikaCmd >/dev/null 2>&1 18 | else 19 | BuildCpp ./PikaCmd -DPLATFORM_STRING=UNIX PikaCmdAmalgam.cpp 20 | if [ $? -ne 0 ]; then 21 | exit 1 22 | fi 23 | echo Testing... 24 | if [ -e ./unittests.pika ]; then 25 | ./PikaCmd unittests.pika >/dev/null 26 | if [ $? -ne 0 ]; then 27 | echo Unit tests failed 28 | exit 1 29 | fi 30 | fi 31 | if [ -e ./systoolsTests.pika ]; then 32 | ./PikaCmd systoolsTests.pika 33 | if [ $? -ne 0 ]; then 34 | echo Systools tests failed 35 | exit 1 36 | fi 37 | fi 38 | echo Success 39 | fi 40 | 41 | exit 0 42 | -------------------------------------------------------------------------------- /examples/Sinoplex/Sinoplex.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | Sinoplex 9 | CFBundleGetInfoString 10 | Copyright 2011 NuEdge Development 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | net.nuedge.sinoplex 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | Sinoplex 19 | CFBundlePackageType 20 | BNDL 21 | CFBundleShortVersionString 22 | 1.0.0 23 | CFBundleSignature 24 | SiPx 25 | CFBundleVersion 26 | 1.0.0 27 | CSResourcesFileMapped 28 | 29 | SYConfig 30 | 31 | AutoConvertPresets 32 | 33 | PresetIsFXB 34 | 35 | UpdateNameOnLoad 36 | 37 | CanDoMonoIO 38 | 39 | 40 | VSTWindowCompositing 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # What Is Symbiosis? 2 | 3 | From the [original documentation](documentation/Symbiosis%20Documentation.txt): 4 | > Symbiosis is a developer tool for adapting Mac OS X VST plug-ins to the Audio Unit (AU) standard. It essentially 5 | consists of a single C++ file that you can compile into your VST project to make the plug-in compatible with the 6 | Audio Unit protocol. Optionally, you may choose to use a pre-built "wrapper plug-in" for adapting your existing VST 7 | plug-in to the AU standard without even having to recompile any source code. 8 | 9 | # History 10 | 11 | *Symbiosis* was developed and open-sourced by Magnus Lidström of [Sonic Charge](http://soniccharge.com/) fame. 12 | It was originally hosted on [Google Code](http://code.google.com/p/symbiosis-au-vst) but doesn't appear to have been 13 | actively maintained for some time now (the last commit by Magnus was on April 22, 2013). With the closure of Google Code, 14 | the question was asked on the [Symbiosis mailing list / group](https://groups.google.com/forum/#!forum/symbiosis-au-vst) 15 | whether the official repository would move, but there was no response from Magnus. In the meantime, several people have 16 | imported the [Symbiosis Google Code repository](https://code.google.com/p/symbiosis-au-vst) into GitHub. 17 | 18 | This repository is also an import of the *Symbiosis* repository. It contains some updates that are useful for the 19 | [NUsofting plugins](http://nusofting.liqihsynth.com/): the ones on the `develop` branch are those that seem to be more 20 | generally applicable, the ones on the `NUsofting/develop` branch are increasingly large divergences from the original 21 | *Symbiosis* where we no longer need the full flexibility that it originally provided. This is especially the case where 22 | we can provide a more direct interface to our plugin framework, and don't want / need to be limited by the VST 2.4 23 | interface. 24 | 25 | This version of the project also contains updates to support the Audio Unit version 2 API. 26 | -------------------------------------------------------------------------------- /documentation/PikaCmdSource/BuildPikaCmd.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 3 | 4 | IF NOT EXIST PikaCmd.exe ( 5 | CALL :BuildCpp PikaCmd.exe -DPLATFORM_STRING=WINDOWS PikaCmdAmalgam.cpp 6 | IF ERRORLEVEL 1 EXIT /B 1 7 | ECHO Testing... 8 | IF EXIST unittests.pika ( 9 | .\PikaCmd unittests.pika >NUL 10 | IF ERRORLEVEL 1 ( 11 | ECHO Unit tests failed 12 | EXIT /B 1 13 | ) 14 | ) 15 | IF EXIST systoolsTests.pika ( 16 | .\PikaCmd systoolsTests.pika 17 | IF ERRORLEVEL 1 ( 18 | ECHO Systools tests failed 19 | EXIT /B 1 20 | ) 21 | ) 22 | ECHO Success 23 | ) 24 | 25 | EXIT /B 0 26 | 27 | :BuildCpp 28 | 29 | IF "%~1"=="" ( 30 | ECHO BuildCpp ^ ^ 31 | EXIT /B 1 32 | ) 33 | 34 | SET pfpath=%ProgramFiles(x86)% 35 | SET temppath=%TEMP%\%~n1\ 36 | IF NOT DEFINED pfpath SET pfpath=%ProgramFiles% 37 | 38 | IF NOT DEFINED VCINSTALLDIR ( 39 | IF EXIST "%pfpath%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" ( 40 | CALL "%pfpath%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >NUL 41 | ) ELSE ( 42 | IF EXIST "%pfpath%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" ( 43 | CALL "%pfpath%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" >NUL 44 | ) ELSE ( 45 | ECHO Could not find Visual C++ in one of the standard paths. 46 | ECHO Manually run vcvarsall.bat first or run this batch from a Visual Studio command line. 47 | EXIT /B 1 48 | ) 49 | ) 50 | ) 51 | 52 | MKDIR "%TEMP%\%~n1\" >NUL 53 | ECHO Compiling %~1... 54 | cl /nologo /W3 /WX- /Ox /GL /GF /Gm- /EHsc /MT /GS- /Gy /arch:SSE /fp:fast /Zc:wchar_t /Zc:forScope /GR- /Gd /wd"4355" /wd"4267" /analyze- /errorReport:queue /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_WARNINGS" /D "_SCL_SECURE_NO_WARNINGS" /Fo"%TEMP%\\%~n1\\" /Fe%* >"%TEMP%\buildlog.txt" 55 | IF ERRORLEVEL 1 ( 56 | TYPE %TEMP%\buildlog.txt 57 | ECHO Compilation of %~1 failed 58 | DEL /Q "%TEMP%\%~n1\*" >NUL 59 | RMDIR /Q "%TEMP%\%~n1\" >NUL 60 | EXIT /B 1 61 | ) ELSE ( 62 | ECHO Compiled %~1 63 | DEL /Q "%TEMP%\%~n1\*" >NUL 64 | RMDIR /Q "%TEMP%\%~n1\" >NUL 65 | 66 | EXIT /B 0 67 | ) 68 | -------------------------------------------------------------------------------- /documentation/docstyle.css: -------------------------------------------------------------------------------- 1 | html { 2 | background:#faf8f3; 3 | } 4 | body { 5 | min-width:650px; 6 | max-width:960px; 7 | _width:650px; 8 | color:#000; 9 | margin:0; 10 | font-family:'Cambria',Georgia,'Times New Roman',Times,serif; 11 | height:100%; 12 | overflow:visible; 13 | padding:36px; 14 | } 15 | table { 16 | line-height:18px; 17 | margin-bottom:17px; 18 | border:1px solid #ccc; 19 | border-collapse:collapse; 20 | border-bottom-color:#aaa; 21 | border-radius:2px; 22 | box-shadow:0px 1px 0 #ddd; 23 | -moz-border-radius:2px; 24 | -moz-box-shadow:0px 1px 0 #ddd; 25 | -webkit-box-shadow:0px 1px 0 #ddd; 26 | } 27 | tr { 28 | background:#fff; 29 | vertical-align:top; 30 | } 31 | th,tr:nth-child(even) { 32 | background:#eee; 33 | } 34 | td { 35 | border:1px dotted #ccc; 36 | padding:2px 18px 4px 9px; 37 | font-size:0.9em; 38 | } 39 | th { 40 | background:#ddd; 41 | border:1px solid #bbb; 42 | color:#000; 43 | font-weight:normal; 44 | padding:4px 18px 4px 9px; 45 | text-align:left; 46 | font-size:0.85em; 47 | } 48 | tr:nth-child(1) th { 49 | background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#ccc), to(#bbb)); 50 | background:-moz-linear-gradient(top, #ccc, #bbb); 51 | border:1px solid #aaa; 52 | border-bottom-color:#999; 53 | border-top-color:#bbb; 54 | box-shadow:0px 1px 1px #ccc; 55 | -moz-box-shadow:0px 1px 1px #ccc; 56 | -webkit-box-shadow:0px 1px 1px #ccc; 57 | color:#333; 58 | padding:8px 18px 8px 9px; 59 | text-shadow:0 1px #ddd; 60 | } 61 | tt { 62 | color:#5d5d5d; 63 | padding-right:4px; 64 | padding-left:4px; 65 | } 66 | pre { 67 | border:1px solid #d0d0d0; 68 | overflow:auto; 69 | color:#5f5f5f; 70 | padding:0.4em; 71 | } 72 | ul { 73 | list-style-type:disc; 74 | padding-left:14px; 75 | list-style-position:inside; 76 | } 77 | h1,h2,h3,h4,h5,h6 { 78 | font-weight:bold; 79 | margin-bottom:18px; 80 | } 81 | h1,h2 { line-height:36px; } 82 | h3,h4 { line-height:18px; } 83 | h1 { font-size:2.0em; } 84 | h2 { font-size:1.5em; } 85 | h3 { font-size:1.3em; } 86 | h4 { font-size:1.2em; } 87 | h5 { font-size:1.1em; } 88 | h6 { font-size:1.0em; } 89 | 90 | a { text-decoration:none; } 91 | a[href]:hover { text-decoration:underline; } 92 | a sup { font-size:0.7em; } 93 | 94 | -------------------------------------------------------------------------------- /Symbiosis.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | SYConfig 10 | 11 | 16 | AutoConvertPresets 17 | 18 | 19 | 23 | PresetIsFXB 24 | 25 | 26 | 31 | UpdateNameOnLoad 32 | 33 | 34 | 39 | CanDoMonoIO 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | CFBundleIdentifier 51 | com.mycompany.myau 52 | 53 | 56 | CFBundleSignature 57 | ???? 58 | 59 | 62 | CFBundleName 63 | myplugin 64 | 65 | 68 | CFBundleShortVersionString 69 | 1.0.0 70 | 71 | 74 | CFBundleVersion 75 | 1.0.0 76 | 77 | 80 | CFBundleGetInfoString 81 | Copyright 2011 My Company 82 | 83 | 84 | 85 | 86 | 87 | CFBundleDevelopmentRegion 88 | English 89 | CFBundleExecutable 90 | Symbiosis 91 | CFBundleIconFile 92 | 93 | CFBundleInfoDictionaryVersion 94 | 6.0 95 | CFBundlePackageType 96 | BNDL 97 | CSResourcesFileMapped 98 | 99 | VSTWindowCompositing 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /examples/Sinoplex/Sinoplex.r: -------------------------------------------------------------------------------- 1 | #define UseExtendedThingResource 1 2 | 3 | #include 4 | #include 5 | 6 | /*********************************************************************************************************************/ 7 | /***** *****/ 8 | /***** Change the following definitions *****/ 9 | /***** *****/ 10 | /*********************************************************************************************************************/ 11 | 12 | // IMPORTANT : You should define i386_YES (for Intel 32-bit), x86_64_YES (for Intel 64-bit), ppc_YES (for PPC) or a 13 | // combination of these (for "universal binary"). Otherwise the Audio Unit may not be found during scanning. To make 14 | // this selection depend on the architectures settings in XCode, add the following definition for OTHER_REZFLAGS to the 15 | // project configuration: -d ppc_$(ppc) -d i386_$(i386) -d x86_64_$(x86_64) 16 | // 17 | 18 | #ifndef ppc_YES || i386_YES || x86_64_YES 19 | #define ppc_YES 20 | #define i386_YES 21 | #define x86_64_NO 22 | #endif 23 | 24 | // AudioUnit name in "company: product" format. This is typically the name that is presented to the user by the host 25 | // (also, some hosts arranges their plug-in menus according to company name). 26 | // 27 | #define NAME "NuEdge Development: Sinoplex" 28 | 29 | // Description (anything you want). 30 | // 31 | #define DESCRIPTION "NuEdge Development Symbiosis Example Effect" 32 | 33 | // Plug-in version aa.bb.cc in 0xaabbcc format. Remember to keep this up-to-date so that hosts will rescan plug-ins 34 | // when they change. 35 | // 36 | #define VERSION 0x010000 37 | 38 | // kAudioUnitType_Effect (no MIDI), kAudioUnitType_MusicDevice (MIDI, no input) or kAudioUnitType_MusicEffect (MIDI + 39 | // input). See AudioUnit/AUComponent.r for all types. 40 | // 41 | #define TYPE kAudioUnitType_MusicEffect 42 | 43 | // Use the same unique ID you use for the VST. 44 | // 45 | #define SUBTYPE 'SiPx' 46 | 47 | // Your unique manufacturer signature. 48 | // 49 | #define SIGNATURE 'NuEd' 50 | 51 | // Set to 1 if your VST has a custom GUI (editor), set to 0 if you wish to use the standard editor. 52 | // 53 | #define CUSTOM_GUI 0 54 | 55 | /*********************************************************************************************************************/ 56 | /***** *****/ 57 | /***** That's it, the rest you shouldn't need to touch. *****/ 58 | /***** *****/ 59 | /*********************************************************************************************************************/ 60 | 61 | resource 'STR ' (10002, "AUName", purgeable) { NAME }; 62 | resource 'STR ' (10003, "AUDescription", purgeable) { DESCRIPTION }; 63 | resource 'dlle' (10004, "AUEntryPoint") { "SymbiosisEntry" }; 64 | resource 'thng' (10000, NAME) { 65 | TYPE, 66 | SUBTYPE, 67 | SIGNATURE, 68 | 0, 0, 69 | 0, 0, 70 | 'STR ', 10002, 71 | 'STR ', 10003, 72 | 0, 0, 73 | VERSION, 74 | componentHasMultiplePlatforms | componentDoAutoVersion, 75 | 0, 76 | { 77 | #ifndef ppc_YES 78 | #ifndef i386_YES 79 | #printf("***** You must define ppc_YES, i386_YES, x86_64_YES or a combination of these, see comment in .r for more info. *****\n") 80 | #error 81 | #endif 82 | #endif 83 | #ifdef ppc_YES 84 | 0x10000000, 85 | 'dlle', 10004, 86 | platformPowerPCNativeEntryPoint 87 | #ifdef i386_YES 88 | , 89 | #endif 90 | #endif 91 | #ifdef i386_YES 92 | 0x10000000, 93 | 'dlle', 10004, 94 | platformIA32NativeEntryPoint 95 | #ifdef x86_64_YES 96 | , 97 | #endif 98 | #endif 99 | #ifdef x86_64_YES 100 | 0x10000000, 101 | 'dlle', 10004, 102 | 8 103 | #endif 104 | } 105 | }; 106 | 107 | #if (CUSTOM_GUI) 108 | 109 | resource 'STR ' (10005, "AUViewName", purgeable) { "Editor" }; 110 | resource 'STR ' (10006, "AUViewDescription", purgeable) { "Editor" }; // Description for AUView is same as name. 111 | resource 'dlle' (10007, "AUViewEntryPoint") { "SymbiosisViewEntry" }; 112 | resource 'thng' (10001, "Editor") { 113 | kAudioUnitCarbonViewComponentType, 114 | SUBTYPE, 115 | SIGNATURE, 116 | 0, 0, 117 | 0, 0, 118 | 'STR ', 10005, 119 | 'STR ', 10006, 120 | 0, 0, 121 | VERSION, 122 | componentHasMultiplePlatforms | componentDoAutoVersion, 123 | 0, 124 | { 125 | #ifndef ppc_YES 126 | #ifndef i386_YES 127 | #printf("***** You must define ppc_YES, i386_YES, x86_64_YES or a combination of these, see comment in .r for more info. *****\n") 128 | #error 129 | #endif 130 | #endif 131 | #ifdef ppc_YES 132 | 0x10000000, 133 | 'dlle', 10007, 134 | platformPowerPCNativeEntryPoint, 135 | #ifdef i386_YES 136 | , 137 | #endif 138 | #endif 139 | #ifdef i386_YES 140 | 0x10000000, 141 | 'dlle', 10007, 142 | platformIA32NativeEntryPoint 143 | #ifdef x86_64_YES 144 | , 145 | #endif 146 | #endif 147 | #ifdef x86_64_YES 148 | 0x10000000, 149 | 'dlle', 10007, 150 | 8 151 | #endif 152 | } 153 | }; 154 | 155 | #endif 156 | -------------------------------------------------------------------------------- /Symbiosis.r: -------------------------------------------------------------------------------- 1 | #define UseExtendedThingResource 1 2 | 3 | #include 4 | #include 5 | 6 | /*********************************************************************************************************************/ 7 | /***** *****/ 8 | /***** Change the following definitions *****/ 9 | /***** *****/ 10 | /*********************************************************************************************************************/ 11 | 12 | // IMPORTANT : You should define i386_YES (for Intel 32-bit), x86_64_YES (for Intel 64-bit), ppc_YES (for PPC) or a 13 | // combination of these (for "universal binary"). Otherwise the Audio Unit may not be found during scanning. To make 14 | // this selection depend on the architectures settings in XCode, add the following definition for OTHER_REZFLAGS to the 15 | // project configuration: -d ppc_$(ppc) -d i386_$(i386) -d x86_64_$(x86_64) 16 | // 17 | 18 | #ifndef ppc_YES 19 | #ifndef i386_YES 20 | #ifndef x86_64_YES 21 | #define ppc_YES 22 | #define i386_YES 23 | #define x86_64_YES 24 | #endif 25 | #endif 26 | #endif 27 | 28 | // AudioUnit name in "company: product" format. This is typically the name that is presented to the user by the host 29 | // (also, some hosts arranges their plug-in menus according to company name). 30 | // 31 | #define NAME "mycompany: myau" 32 | 33 | // Description (anything you want). 34 | // 35 | #define DESCRIPTION "AU version of my bizarre VST converted with Symbiosis from NuEdge Development" 36 | 37 | // Plug-in version aa.bb.cc in 0xaabbcc format. Remember to keep this up-to-date so that hosts will rescan plug-ins 38 | // when they change. 39 | // 40 | #define VERSION 0x010000 41 | 42 | // kAudioUnitType_Effect (no MIDI), kAudioUnitType_MusicDevice (MIDI, no input) or kAudioUnitType_MusicEffect (MIDI + 43 | // input). See AudioUnit/AUComponent.r for all types. 44 | // 45 | #define TYPE kAudioUnitType_Effect 46 | 47 | // Use the same unique ID you use for the VST. 48 | // 49 | #define SUBTYPE '????' 50 | 51 | // Your unique manufacturer signature. 52 | // 53 | #define SIGNATURE '????' 54 | 55 | // Set to 1 if your VST has a custom GUI (editor), set to 0 if you wish to use the standard editor. 56 | // 57 | #define CUSTOM_GUI 0 58 | 59 | /*********************************************************************************************************************/ 60 | /***** *****/ 61 | /***** That's it, the rest you shouldn't need to touch. *****/ 62 | /***** *****/ 63 | /*********************************************************************************************************************/ 64 | 65 | resource 'STR ' (10002, "AUName", purgeable) { NAME }; 66 | resource 'STR ' (10003, "AUDescription", purgeable) { DESCRIPTION }; 67 | resource 'dlle' (10004, "AUEntryPoint") { "SymbiosisEntry" }; 68 | resource 'thng' (10000, NAME) { 69 | TYPE, 70 | SUBTYPE, 71 | SIGNATURE, 72 | 0, 0, 73 | 0, 0, 74 | 'STR ', 10002, 75 | 'STR ', 10003, 76 | 0, 0, 77 | VERSION, 78 | componentHasMultiplePlatforms | componentDoAutoVersion, 79 | 0, 80 | { 81 | #ifndef ppc_YES 82 | #ifndef i386_YES 83 | #ifndef x86_64_YES 84 | #printf("***** You must define ppc_YES, i386_YES, x86_64_YES or a combination of these, see comment in .r for more info. *****\n") 85 | #error 86 | #endif 87 | #endif 88 | #endif 89 | #ifdef ppc_YES 90 | 0x10000000, 91 | 'dlle', 10004, 92 | platformPowerPCNativeEntryPoint 93 | #ifdef i386_YES 94 | , 95 | #endif 96 | #endif 97 | #ifdef i386_YES 98 | 0x10000000, 99 | 'dlle', 10004, 100 | platformIA32NativeEntryPoint 101 | #ifdef x86_64_YES 102 | , 103 | #endif 104 | #endif 105 | #ifdef x86_64_YES 106 | 0x10000000, 107 | 'dlle', 10004, 108 | 8 109 | #endif 110 | } 111 | }; 112 | 113 | #if (CUSTOM_GUI) 114 | 115 | resource 'STR ' (10005, "AUViewName", purgeable) { "Editor" }; 116 | resource 'STR ' (10006, "AUViewDescription", purgeable) { "Editor" }; // Description for AUView is same as name. 117 | resource 'dlle' (10007, "AUViewEntryPoint") { "SymbiosisViewEntry" }; 118 | resource 'thng' (10001, "Editor") { 119 | kAudioUnitCarbonViewComponentType, 120 | SUBTYPE, 121 | SIGNATURE, 122 | 0, 0, 123 | 0, 0, 124 | 'STR ', 10005, 125 | 'STR ', 10006, 126 | 0, 0, 127 | VERSION, 128 | componentHasMultiplePlatforms | componentDoAutoVersion, 129 | 0, 130 | { 131 | #ifndef ppc_YES 132 | #ifndef i386_YES 133 | #ifndef x86_64_YES 134 | #printf("***** You must define ppc_YES, i386_YES, x86_64_YES or a combination of these, see comment in .r for more info. *****\n") 135 | #error 136 | #endif 137 | #endif 138 | #endif 139 | #ifdef ppc_YES 140 | 0x10000000, 141 | 'dlle', 10007, 142 | platformPowerPCNativeEntryPoint, 143 | #ifdef i386_YES 144 | , 145 | #endif 146 | #endif 147 | #ifdef i386_YES 148 | 0x10000000, 149 | 'dlle', 10007, 150 | platformIA32NativeEntryPoint 151 | #ifdef x86_64_YES 152 | , 153 | #endif 154 | #endif 155 | #ifdef x86_64_YES 156 | 0x10000000, 157 | 'dlle', 10007, 158 | 8 159 | #endif 160 | } 161 | }; 162 | 163 | #endif 164 | -------------------------------------------------------------------------------- /examples/Sinoplex/Sinoplex.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 26 | 29 | 32 | 35 | 38 | 41 | 54 | 57 | 60 | 63 | 75 | 78 | 81 | 84 | 87 | 90 | 93 | 96 | 97 | 105 | 108 | 111 | 114 | 117 | 120 | 135 | 138 | 141 | 144 | 157 | 160 | 163 | 166 | 169 | 172 | 175 | 178 | 179 | 180 | 181 | 182 | 183 | 186 | 187 | 190 | 191 | 194 | 195 | 198 | 199 | 202 | 203 | 206 | 207 | 208 | 209 | 210 | 211 | -------------------------------------------------------------------------------- /googlecode_upload.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2006, 2007 Google Inc. All Rights Reserved. 4 | # Author: danderson@google.com (David Anderson) 5 | # 6 | # Script for uploading files to a Google Code project. 7 | # 8 | # This is intended to be both a useful script for people who want to 9 | # streamline project uploads and a reference implementation for 10 | # uploading files to Google Code projects. 11 | # 12 | # To upload a file to Google Code, you need to provide a path to the 13 | # file on your local machine, a small summary of what the file is, a 14 | # project name, and a valid account that is a member or owner of that 15 | # project. You can optionally provide a list of labels that apply to 16 | # the file. The file will be uploaded under the same name that it has 17 | # in your local filesystem (that is, the "basename" or last path 18 | # component). Run the script with '--help' to get the exact syntax 19 | # and available options. 20 | # 21 | # Note that the upload script requests that you enter your 22 | # googlecode.com password. This is NOT your Gmail account password! 23 | # This is the password you use on googlecode.com for committing to 24 | # Subversion and uploading files. You can find your password by going 25 | # to http://code.google.com/hosting/settings when logged in with your 26 | # Gmail account. If you have already committed to your project's 27 | # Subversion repository, the script will automatically retrieve your 28 | # credentials from there (unless disabled, see the output of '--help' 29 | # for details). 30 | # 31 | # If you are looking at this script as a reference for implementing 32 | # your own Google Code file uploader, then you should take a look at 33 | # the upload() function, which is the meat of the uploader. You 34 | # basically need to build a multipart/form-data POST request with the 35 | # right fields and send it to https://PROJECT.googlecode.com/files . 36 | # Authenticate the request using HTTP Basic authentication, as is 37 | # shown below. 38 | # 39 | # Licensed under the terms of the Apache Software License 2.0: 40 | # http://www.apache.org/licenses/LICENSE-2.0 41 | # 42 | # Questions, comments, feature requests and patches are most welcome. 43 | # Please direct all of these to the Google Code users group: 44 | # http://groups.google.com/group/google-code-hosting 45 | 46 | """Google Code file uploader script. 47 | """ 48 | 49 | __author__ = 'danderson@google.com (David Anderson)' 50 | 51 | import httplib 52 | import os.path 53 | import optparse 54 | import getpass 55 | import base64 56 | import sys 57 | 58 | 59 | def upload(file, project_name, user_name, password, summary, labels=None): 60 | """Upload a file to a Google Code project's file server. 61 | 62 | Args: 63 | file: The local path to the file. 64 | project_name: The name of your project on Google Code. 65 | user_name: Your Google account name. 66 | password: The googlecode.com password for your account. 67 | Note that this is NOT your global Google Account password! 68 | summary: A small description for the file. 69 | labels: an optional list of label strings with which to tag the file. 70 | 71 | Returns: a tuple: 72 | http_status: 201 if the upload succeeded, something else if an 73 | error occured. 74 | http_reason: The human-readable string associated with http_status 75 | file_url: If the upload succeeded, the URL of the file on Google 76 | Code, None otherwise. 77 | """ 78 | # The login is the user part of user@gmail.com. If the login provided 79 | # is in the full user@domain form, strip it down. 80 | if user_name.endswith('@gmail.com'): 81 | user_name = user_name[:user_name.index('@gmail.com')] 82 | 83 | form_fields = [('summary', summary)] 84 | if labels is not None: 85 | form_fields.extend([('label', l.strip()) for l in labels]) 86 | 87 | content_type, body = encode_upload_request(form_fields, file) 88 | 89 | upload_host = '%s.googlecode.com' % project_name 90 | upload_uri = '/files' 91 | auth_token = base64.b64encode('%s:%s'% (user_name, password)) 92 | headers = { 93 | 'Authorization': 'Basic %s' % auth_token, 94 | 'User-Agent': 'Googlecode.com uploader v0.9.4', 95 | 'Content-Type': content_type, 96 | } 97 | 98 | server = httplib.HTTPSConnection(upload_host) 99 | server.request('POST', upload_uri, body, headers) 100 | resp = server.getresponse() 101 | server.close() 102 | 103 | if resp.status == 201: 104 | location = resp.getheader('Location', None) 105 | else: 106 | location = None 107 | return resp.status, resp.reason, location 108 | 109 | 110 | def encode_upload_request(fields, file_path): 111 | """Encode the given fields and file into a multipart form body. 112 | 113 | fields is a sequence of (name, value) pairs. file is the path of 114 | the file to upload. The file will be uploaded to Google Code with 115 | the same file name. 116 | 117 | Returns: (content_type, body) ready for httplib.HTTP instance 118 | """ 119 | BOUNDARY = '----------Googlecode_boundary_reindeer_flotilla' 120 | CRLF = '\r\n' 121 | 122 | body = [] 123 | 124 | # Add the metadata about the upload first 125 | for key, value in fields: 126 | body.extend( 127 | ['--' + BOUNDARY, 128 | 'Content-Disposition: form-data; name="%s"' % key, 129 | '', 130 | value, 131 | ]) 132 | 133 | # Now add the file itself 134 | file_name = os.path.basename(file_path) 135 | f = open(file_path, 'rb') 136 | file_content = f.read() 137 | f.close() 138 | 139 | body.extend( 140 | ['--' + BOUNDARY, 141 | 'Content-Disposition: form-data; name="filename"; filename="%s"' 142 | % file_name, 143 | # The upload server determines the mime-type, no need to set it. 144 | 'Content-Type: application/octet-stream', 145 | '', 146 | file_content, 147 | ]) 148 | 149 | # Finalize the form body 150 | body.extend(['--' + BOUNDARY + '--', '']) 151 | 152 | return 'multipart/form-data; boundary=%s' % BOUNDARY, CRLF.join(body) 153 | 154 | 155 | def upload_find_auth(file_path, project_name, summary, labels=None, 156 | user_name=None, password=None, tries=3): 157 | """Find credentials and upload a file to a Google Code project's file server. 158 | 159 | file_path, project_name, summary, and labels are passed as-is to upload. 160 | 161 | Args: 162 | file_path: The local path to the file. 163 | project_name: The name of your project on Google Code. 164 | summary: A small description for the file. 165 | labels: an optional list of label strings with which to tag the file. 166 | config_dir: Path to Subversion configuration directory, 'none', or None. 167 | user_name: Your Google account name. 168 | tries: How many attempts to make. 169 | """ 170 | 171 | while tries > 0: 172 | if user_name is None: 173 | # Read username if not specified or loaded from svn config, or on 174 | # subsequent tries. 175 | sys.stdout.write('Please enter your googlecode.com username: ') 176 | sys.stdout.flush() 177 | user_name = sys.stdin.readline().rstrip() 178 | if password is None: 179 | # Read password if not loaded from svn config, or on subsequent tries. 180 | print 'Please enter your googlecode.com password.' 181 | print '** Note that this is NOT your Gmail account password! **' 182 | print 'It is the password you use to access Subversion repositories,' 183 | print 'and can be found here: http://code.google.com/hosting/settings' 184 | password = getpass.getpass() 185 | 186 | status, reason, url = upload(file_path, project_name, user_name, password, 187 | summary, labels) 188 | # Returns 403 Forbidden instead of 401 Unauthorized for bad 189 | # credentials as of 2007-07-17. 190 | if status in [httplib.FORBIDDEN, httplib.UNAUTHORIZED]: 191 | # Rest for another try. 192 | user_name = password = None 193 | tries = tries - 1 194 | else: 195 | # We're done. 196 | break 197 | 198 | return status, reason, url 199 | 200 | 201 | def main(): 202 | parser = optparse.OptionParser(usage='googlecode-upload.py -s SUMMARY ' 203 | '-p PROJECT [options] FILE') 204 | parser.add_option('-s', '--summary', dest='summary', 205 | help='Short description of the file') 206 | parser.add_option('-p', '--project', dest='project', 207 | help='Google Code project name') 208 | parser.add_option('-u', '--user', dest='user', 209 | help='Your Google Code username') 210 | parser.add_option('-w', '--password', dest='password', 211 | help='Your Google Code password') 212 | parser.add_option('-l', '--labels', dest='labels', 213 | help='An optional list of comma-separated labels to attach ' 214 | 'to the file') 215 | 216 | options, args = parser.parse_args() 217 | 218 | if not options.summary: 219 | parser.error('File summary is missing.') 220 | elif not options.project: 221 | parser.error('Project name is missing.') 222 | elif len(args) < 1: 223 | parser.error('File to upload not provided.') 224 | elif len(args) > 1: 225 | parser.error('Only one file may be specified.') 226 | 227 | file_path = args[0] 228 | 229 | if options.labels: 230 | labels = options.labels.split(',') 231 | else: 232 | labels = None 233 | 234 | status, reason, url = upload_find_auth(file_path, options.project, 235 | options.summary, labels, 236 | options.user, options.password) 237 | if url: 238 | print 'The file was uploaded successfully.' 239 | print 'URL: %s' % url 240 | return 0 241 | else: 242 | print 'An error occurred. Your file was not uploaded.' 243 | print 'Google Code upload server said: %s (%s)' % (reason, status) 244 | return 1 245 | 246 | 247 | if __name__ == '__main__': 248 | sys.exit(main()) 249 | -------------------------------------------------------------------------------- /documentation/PikaCmdSource/systoolsTests.pika: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/PikaCmd 2 | 3 | include('stdlib.pika'); 4 | include('systools.pika'); 5 | include('debug.pika'); 6 | 7 | function { 8 | SLOW_FILE_COUNT = 5; 9 | TEST_FILE_COUNT = 500; 10 | print('Current working dir: ' # currentDir()); 11 | assert(> appendDirSlash('abcd' # DIR_SLASH) == 'abcd' # DIR_SLASH); 12 | assert(> appendDirSlash('abcd') == 'abcd/'); 13 | assert(> dirOfPath('abcd') == void); 14 | assert(> dirOfPath('abcd.efg') == void); 15 | assert(> dirOfPath('hijk/') == 'hijk/'); 16 | assert(> dirOfPath('hijk' # DIR_SLASH # 'abcd') == 'hijk' # DIR_SLASH); 17 | assert(> dirOfPath('hijk/abcd') == 'hijk/'); 18 | assert(> dirOfPath('hijk/abcd.efg') == 'hijk/'); 19 | assert(> dirOfPath('hijk.lmn/abcd') == 'hijk.lmn/'); 20 | assert(> dirOfPath('hijk.lmn/abcd.efg') == 'hijk.lmn/'); 21 | assert(> dirOfPath('hijk.lmn/abcd.efg.xyz') == 'hijk.lmn/'); 22 | assert(> filenameOfPath('abcd') == 'abcd'); 23 | assert(> filenameOfPath('abcd.efg') == 'abcd.efg'); 24 | assert(> filenameOfPath('hijk/') == void); 25 | assert(> filenameOfPath('hijk' # DIR_SLASH # 'abcd') == 'abcd'); 26 | assert(> filenameOfPath('hijk/abcd') == 'abcd'); 27 | assert(> filenameOfPath('hijk/abcd.efg') == 'abcd.efg'); 28 | assert(> filenameOfPath('hijk.lmn/abcd') == 'abcd'); 29 | assert(> filenameOfPath('hijk.lmn/abcd.efg') == 'abcd.efg'); 30 | assert(> filenameOfPath('hijk.lmn/abcd.efg.xyz') == 'abcd.efg.xyz'); 31 | assert(> basenameOfPath('abcd') == 'abcd'); 32 | assert(> basenameOfPath('abcd.efg') == 'abcd'); 33 | assert(> basenameOfPath('hijk/') == void); 34 | assert(> basenameOfPath('hijk' # DIR_SLASH # 'abcd') == 'abcd'); 35 | assert(> basenameOfPath('hijk/abcd') == 'abcd'); 36 | assert(> basenameOfPath('hijk/abcd.efg') == 'abcd'); 37 | assert(> basenameOfPath('hijk.lmn/abcd') == 'abcd'); 38 | assert(> basenameOfPath('hijk.lmn/abcd.efg') == 'abcd'); 39 | assert(> basenameOfPath('hijk.lmn/abcd.efg.xyz') == 'abcd.efg'); 40 | assert(> extensionOfPath('abcd') == void); 41 | assert(> extensionOfPath('abcd.efg') == '.efg'); 42 | assert(> extensionOfPath('hijk/') == void); 43 | assert(> extensionOfPath('hijk' # DIR_SLASH # 'abcd') == void); 44 | assert(> extensionOfPath('hijk/abcd') == void); 45 | assert(> extensionOfPath('hijk/abcd.efg') == '.efg'); 46 | assert(> extensionOfPath('hijk.lmn/abcd') == void); 47 | assert(> extensionOfPath('hijk.lmn/abcd.efg') == '.efg'); 48 | assert(> extensionOfPath('hijk.lmn/abcd.efg.xyz') == '.xyz'); 49 | assert(function { splitPath('abcd', @dir, @name, @ext); dir == void && name == 'abcd' && ext == void } ); 50 | assert(function { splitPath('abcd.efg', @dir, @name, @ext); dir == void && name == 'abcd' && ext == '.efg' } ); 51 | assert(function { splitPath('hijk/', @dir, @name, @ext); dir == 'hijk/' && name == void && ext == void } ); 52 | assert(function { splitPath('hijk' # DIR_SLASH # 'abcd', @dir, @name, @ext); dir == 'hijk' # DIR_SLASH && name == 'abcd' && ext == void } ); 53 | assert(function { splitPath('hijk/abcd', @dir, @name, @ext); dir == 'hijk/' && name == 'abcd' && ext == void } ); 54 | assert(function { splitPath('hijk/abcd.efg', @dir, @name, @ext); dir == 'hijk/' && name == 'abcd' && ext == '.efg' } ); 55 | assert(function { splitPath('hijk.lmn/abcd', @dir, @name, @ext); dir == 'hijk.lmn/' && name == 'abcd' && ext == void } ); 56 | assert(function { splitPath('hijk.lmn/abcd.efg', @dir, @name, @ext); dir == 'hijk.lmn/' && name == 'abcd' && ext == '.efg' } ); 57 | assert(function { splitPath('hijk.lmn/abcd.efg.xyz', @dir, @name, @ext); dir == 'hijk.lmn/' && name == 'abcd.efg' && ext == '.xyz' } ); 58 | t = time(); 59 | print('2 seconds delay'); 60 | sleep(2); 61 | assert(>time() > t && time() < t + 5); 62 | testDir = TEMP_DIR # 'Batch Tools Test ' # time() # '/'; 63 | if (!pathExists(testDir)) makeDir(testDir); 64 | assert(> pathExists(testDir)); 65 | makeDir(testDir # 'oneDeep/twoDeep'); 66 | assert(> pathExists(testDir # 'oneDeep/twoDeep')); 67 | removeDir(testDir # 'oneDeep/twoDeep'); 68 | assert(> !pathExists(testDir # 'oneDeep/twoDeep')); 69 | assert(> pathExists(testDir # 'oneDeep')); 70 | removeDir(testDir # 'oneDeep'); 71 | assert(> !pathExists(testDir # 'oneDeep')); 72 | save(testDir # 'testfile1.txt', 'abracadabra'); 73 | s = load(testDir # 'testfile1.txt'); 74 | assert(> s == 'abracadabra'); 75 | assert(> pathExists(testDir # 'testfile1.txt')); 76 | eraseFile(testDir # 'testfile2.txt'); 77 | renameFile(testDir # 'testfile1.txt', 'testfile2.txt'); 78 | assert(> !pathExists(testDir # 'testfile1.txt')); 79 | assert(> pathExists(testDir # 'testfile2.txt')); 80 | y = 2463534242; 81 | for (i = 0; i < TEST_FILE_COUNT; ++i) { 82 | y ^= y << 13; 83 | y ^= y >> 17; 84 | y = y ^ (y << 5); 85 | fileIDs[i] = radix(y & 0xFFFFF, 16, 6); 86 | fileContents[i] = repeat(char(round(random(25)) + ordinal('a')), round(random(2000))); 87 | fileIDsReverse[fileIDs[i]] = i; 88 | }; 89 | print(bake('Creating {TEST_FILE_COUNT} test files (first {SLOW_FILE_COUNT} with 2 secs delay in between)...')); 90 | nt = time(); 91 | for (i = 0; i < TEST_FILE_COUNT; ++i) { 92 | save(testDir # 'testfile ' # fileIDs[i] # '.test', fileContents[i]); 93 | if (i < SLOW_FILE_COUNT) sleep(2); 94 | if ((t = time()) > nt) { 95 | nt = t + 1; 96 | print((i + 1) # '...'); 97 | } 98 | }; 99 | print(i # '!'); 100 | for (i = 0; i < TEST_FILE_COUNT; ++i) 101 | assert(> load(testDir # 'testfile ' # fileIDs[i] # '.test') == fileContents[i]); 102 | print('Checking that dir() finds all files...'); 103 | prune(@found); 104 | dir(testDir, >{ 105 | assert(upper($0) == 'TESTFILE2.TXT' || extensionOfPath($0) == '.test', "upper($0) == 'TESTFILE2.TXT' || extensionOfPath($0) == '.test'"); 106 | set(@found, upper($0)); 107 | }); 108 | for (i = 0; i < TEST_FILE_COUNT; ++i) 109 | assert(> exists(@found[upper('testfile ' # fileIDs[i] # '.test')])); 110 | prune(@found); 111 | dir(testDir # 'testfile*.test', >{ 112 | assert(extensionOfPath($0) == '.test', "extensionOfPath($0) == '.test'"); 113 | set(@found, upper($0)); 114 | }); 115 | for (i = 0; i < TEST_FILE_COUNT; ++i) 116 | assert(> exists(@found[upper('testfile ' # fileIDs[i] # '.test')])); 117 | prune(@found); 118 | count = 0; 119 | found = ''; 120 | dir(chop(testDir, 1), >{ ++count; found = $0; }); 121 | assert(> count == 1); 122 | assert(> right(found, 1) === '/'); 123 | assert(> upper(removeDirSlash(found)) === upper(filenameOfPath(removeDirSlash(testDir)))); 124 | print("Checking that sort-order 'name' works..."); 125 | last = void; 126 | dir(testDir # 'testfile*.test', >{ 127 | assert((last == void || $0 > last), '(last == void || $0 > last)'); 128 | last = $0; 129 | }, 'name', false); 130 | last = void; 131 | dir(testDir # 'testfile*.test', >{ 132 | assert((last == void || $0 < last), '(last == void || $0 < last)'); 133 | last = $0; 134 | }, 'name', true); 135 | print("Checking that sort-order 'time' works..."); 136 | i = 0; 137 | dir(testDir # 'testfile*.test', >{ 138 | name = upper($0); 139 | assert(> i >= SLOW_FILE_COUNT || name == upper('testfile ' # fileIDs[i] # '.test')); 140 | i++; 141 | }, 'time', false); 142 | assert(i == TEST_FILE_COUNT); 143 | dir(testDir # 'testfile*.test', >{ 144 | name = upper($0); 145 | --i; 146 | assert(> i >= SLOW_FILE_COUNT || name == upper('testfile ' # fileIDs[i] # '.test')); 147 | }, 'time', true); 148 | assert(i == 0); 149 | print("Checking that sort-order 'size' works..."); 150 | last = 0; 151 | dir(testDir # 'testfile*.test', >{ 152 | success = wildmatch($0, 'testfile {[0-9a-fA-F]??????}.test', @id); 153 | assert(> success); 154 | l = length(fileContents[fileIDsReverse[id]]); 155 | assert(> l >= last); 156 | last = l; 157 | }, 'size', false); 158 | dir(testDir # 'testfile*.test', >{ 159 | success = wildmatch($0, 'testfile {[0-9a-fA-F]??????}.test', @id); 160 | assert(> success); 161 | l = length(fileContents[fileIDsReverse[id]]); 162 | assert(> l <= last); 163 | last = l; 164 | }, 'size', true); 165 | print('Erasing all test files...'); 166 | // for (i = 0; i < TEST_FILE_COUNT; ++i) eraseFile(testDir # 'testfile ' # fileIDs[i] # '.test'); 167 | eraseFile(testDir # 'testfile *.test'); 168 | copyFile(testDir # 'testfile2.txt', testDir # 'testfile3.txt'); 169 | assert(> load(testDir # 'testfile3.txt') == 'abracadabra'); 170 | try(>makeDir(testDir # 'sub')); 171 | assert(> pathExists(testDir # 'sub')); 172 | copyFile(testDir # 'testfile2.txt', testDir # 'sub/testfile4.txt'); 173 | assert(> load(testDir # 'sub/testfile4.txt') == 'abracadabra'); 174 | moveFile(testDir # 'sub/testfile4.txt', testDir # 'testfile5.txt'); 175 | assert(> !pathExists(testDir # 'sub/testfile4.txt')); 176 | assert(> pathExists(testDir # 'testfile5.txt')); 177 | moveFile(testDir # 'testfile5.txt', testDir # 'sub/testfile4.txt'); 178 | assert(> pathExists(testDir # 'sub/testfile4.txt')); 179 | assert(> !pathExists(testDir # 'testfile5.txt')); 180 | print('Another 2 seconds delay'); 181 | sleep(2); 182 | save(testDir # 'sub/testfile6.txt', 'hocuspocus'); 183 | concatFiles(testDir # 'testfile2.txt', testDir # 'sub/testfile6.txt', testDir # 'testfile2.txt' 184 | , testDir # 'concatted'); 185 | assert(> load(testDir # 'concatted') == 'abracadabrahocuspocusabracadabra'); 186 | eraseFile(testDir # 'concatted'); 187 | print('Time of testfile2.txt: ' # fileTime(testDir # 'testfile2.txt')); 188 | print('Time of testfile6.txt: ' # fileTime(testDir # 'sub/testfile6.txt')); 189 | print('Size of testfile2.txt: ' # fileSize(testDir # 'testfile2.txt')); 190 | print('Size of testfile6.txt: ' # fileSize(testDir # 'sub/testfile6.txt')); 191 | assert(> isFileNewer(testDir # 'sub/testfile6.txt', testDir # 'sub/testfile4.txt')); 192 | assert(> isFileNewer(testDir # 'sub/testfile6.txt', testDir # 'sub/notexisting.txt')); 193 | assert(> !isFileNewer(testDir # 'sub/testfile4.txt', testDir # 'sub/testfile6.txt')); 194 | assert(> !isFileNewer(testDir # 'sub/notexisting.txt', testDir # 'sub/testfile4.txt')); 195 | eraseFile(testDir # 'testfile2.txt'); 196 | eraseFile(testDir # 'testfile3.txt'); 197 | eraseFile(testDir # 'sub/testfile4.txt'); 198 | eraseFile(testDir # 'sub/testfile6.txt'); 199 | assert(> !pathExists(testDir # 'testfile2.txt')); 200 | assert(> !pathExists(testDir # 'testfile3.txt')); 201 | assert(> !pathExists(testDir # 'sub/testfile4.txt')); 202 | removeDir(testDir # 'sub'); 203 | dir(testDir # 'testfile*.test', >assert(false)); 204 | removeDir(testDir); 205 | print('OK!'); 206 | }(); 207 | -------------------------------------------------------------------------------- /documentation/htmlify.pika: -------------------------------------------------------------------------------- 1 | /* 2 | Known bugs: 3 | 4 | - Htmlify is sensitive for trailing spaces. They even matter on seemingly empty lines. E.g., a preformatted section 5 | is broken into two sections on an empty line without spaces, while an empty line with a few invisible spaces 6 | might combine the sections into one. 7 | 8 | Future features: 9 | 10 | - make html links directly for http asterix: '* http://xxx' and / or 'google (http://www.google.com)' 11 | 12 | - output table of contents so you can paste it into your source text file 13 | */ 14 | 15 | prune(@::HTML_XLATE_PAIRS); 16 | prune(@::HEADERS); 17 | prune(@::STD_PATTERNS); 18 | 19 | map(@::HTML_XLATE_PAIRS, ' ',' ' , "\n","
\n" , '<','<' , '>','>' , '&','&'); 20 | map(@::HEADERS, '#','h1' , '=','h2' , '-','h3'); 21 | 22 | ::STD_PATTERN_SUFFIX = "{[.!?*)]*[,:;]~[ \n][]*}"; 23 | 24 | // Patterns are located between {*[ \n][(]*}{[^(]?[]*} and {[.!?*)]*[,:;]~[ \n][]*}, meaning that they begin and end on 25 | // word boundaries according to some sophisticated definitions. LF is prefixed and suffixed so that you can match all 26 | // line starts and ends with "\n". {$1} and up contains the captured strings. The standard suffix is optional, but the 27 | // prefix is not for performance reasons. You can add patterns after you've loaded htmlify.pika by mapping new entries 28 | // to the ::STD_PATTERN map. 29 | 30 | map(@::STD_PATTERNS 31 | , '{http[s]~://[a-zA-Z0-9./?&;%-=#]?*}' # STD_PATTERN_SUFFIX, '{$1}' 32 | , "[*]{[a-zA-Z0-9(][]*[^ \n]}[*]" # STD_PATTERN_SUFFIX, '{$1}' 33 | , "[*]{[a-zA-Z0-9(]}[*]" # STD_PATTERN_SUFFIX, '{$1}' 34 | , "/{[a-zA-Z0-9(][]*[^ \n]}/" # STD_PATTERN_SUFFIX, '{$1}' 35 | , "/{[a-zA-Z0-9(]}/" # STD_PATTERN_SUFFIX, '{$1}' 36 | , "_{[a-zA-Z0-9(][]*[^ \n]}_" # STD_PATTERN_SUFFIX, '{$1}' 37 | , "_{[a-zA-Z0-9(]}_" # STD_PATTERN_SUFFIX, '{$1}' 38 | , '`{?*}`' # STD_PATTERN_SUFFIX, '{$1}' 39 | , '[[]{*.jpg}]' # STD_PATTERN_SUFFIX, '' 40 | , '[[]{*.png}]' # STD_PATTERN_SUFFIX, '' 41 | , '[[]{*.gif}]' # STD_PATTERN_SUFFIX, '' 42 | , "{[^?%*|\"<> \n]?*}.txt" # STD_PATTERN_SUFFIX, '{$1}' 43 | , "{{[^?%*|\"<> \n]?*}.html#[a-zA-Z0-9&;%-=_]?*}" # STD_PATTERN_SUFFIX, '{$2}' 44 | , "{[^?%*|\"<> \n]?*}.html" # STD_PATTERN_SUFFIX, '{$1}' 45 | , "{[^ \n]?*}^{[^ \n]?*}{[.!?*)]*[,:;]~[-+*/% \n][]*}", '{$1}{$2}' 46 | , "{[^ \n]?*}^({[^\n]?*}){[.!?*)]*[,:;]~[-+*/% \n][]*}", '{$1}{$2}' 47 | , "{[^ \n*]?*}{[*]?*}{[.!?)]*[,:;]~[ \n][]*}", '{$1}{$2}' 48 | ); 49 | 50 | ::html = function { 51 | args(@in); 52 | for (out = ''; in !== '';) { 53 | out #= in{:i = find(in, HTML_XLATE_CHARS)}; 54 | if ((in = in{i:}) !== '') { out #= HTML_XLATE_PAIRS[in{0}]; in = in{1:} } 55 | }; 56 | out 57 | }; 58 | 59 | ::urlEncode = function { 60 | args(@in); 61 | for (out = ''; in !== '';) { 62 | if (!wildmatch(in, "{*}{[^0-9a-zA-Z$-_.+!*'(),]?*}{[]*}", @left, @middle, @right)) { 63 | out #= in; 64 | in = ''; 65 | } else { 66 | out #= left; 67 | for (; middle !== ''; middle = middle{1:}) out #= '%' # radix(ordinal(middle{0}), 16, 2); 68 | in = right; 69 | } 70 | }; 71 | 72 | out 73 | }; 74 | 75 | ::wildEscape = function { 76 | args(@in); 77 | for (out = ''; in !== '';) { 78 | out #= in{:i = find(in, '*?~[{')}; 79 | if ((in = in{i:}) !== '') { out #= '[' # in{0} # ']'; in = in{1:} } 80 | }; 81 | out 82 | }; 83 | 84 | ::expandTabs = function { 85 | args(@in, @tabWidth); 86 | for ({ out = ''; x = 0 }; in !== '';) { 87 | x += (i = find(in, "\t\n")); 88 | out #= in{:i}; 89 | in = in{i:}; 90 | if (in{0} === "\t") { spaces = tabWidth - x % tabWidth; out #= repeat(' ', spaces); x += spaces } 91 | else if (in{0} === "\n") { out #= LF; x = 0 }; 92 | in = in{1:}; 93 | }; 94 | out 95 | }; 96 | 97 | ::htmlify = function { 98 | args(@src); 99 | 100 | clone(@::STD_PATTERNS, @patterns); 101 | ::HTML_XLATE_CHARS = ''; 102 | foreach(@::HTML_XLATE_PAIRS, >::HTML_XLATE_CHARS #= $1); 103 | 104 | footnotes.next = 0; 105 | footnote => { 106 | if (!exists(r = @footnotes[length($0)])) [r] = ++footnotes.next; 107 | 'fn' # radix([r], 10, 4) 108 | }; 109 | 110 | findHeader => { 111 | args(@line0, @line1); 112 | found = void; 113 | foreach(@::HEADERS, >if (line1 === repeat($1, length(line0))) found = $2); 114 | found 115 | }; 116 | 117 | isInside => { 118 | args(@captured); 119 | inside = false; 120 | foreach(@insideHeaders, >if ($2 === captured) inside = true); 121 | inside 122 | }; 123 | 124 | format => { 125 | args(@in); 126 | 127 | in = LF # html(in) # LF; 128 | for (out = ''; in !== '';) { 129 | // find next word-break 130 | $i += span(in{$i += span(in{$i = find(in, " \n"):}, " \n"):}, '('); 131 | out #= in{:$i}; in = in{$i:}; 132 | 133 | if (in !== '') { 134 | matched = false; 135 | foreach(@patterns, >{ 136 | resetQueue(@$cq); 137 | if (!matched && wildfind(in, $1, 0, 0, @$cq) == 0) { 138 | $capt.n = 0; 139 | append(@$capt, $2); 140 | for (; queueSize(@$cq) > 0;) { 141 | $offset = popFront(@$cq); 142 | $length = popFront(@$cq); 143 | append(@$capt, in{$offset:$length}); 144 | }; 145 | matched = true; 146 | out #= invoke('', >bake($0), @$capt); 147 | in = $capt[$capt.n - 1]; 148 | } 149 | }) 150 | } 151 | }; 152 | 153 | out{1:length(out) - 2} 154 | }; 155 | 156 | doList => { 157 | args(@$d, @$i); 158 | $brk = '
'; 159 | for (; lineIndex < lines.n && { 160 | $l = $l{$spaces = span($l = lines[lineIndex], ' '):}; 161 | if (wildmatch($l, '{{[0-9*]?*})[ ]*}{[^ ]?[]*}', @$lead, @$bullet, @rest) 162 | || wildmatch($l, '{{-}[ ]?*}{[^ ]?[]*}', @$lead, @$bullet, @rest)) { 163 | if ($spaces > $d) { // sub-list 164 | if ($d >= 0) body #= '
'; 165 | body #= LF # (if ($bullet{0} === '*' || $bullet{0} === '-') '
    ' else '
      ') # LF; 166 | body #= '
    1. ' # format(rest); 167 | ++lineIndex; 168 | doList($spaces, $spaces + length($lead)); 169 | body #= '
    2. ' # LF; 170 | body #= (if ($bullet{0} === '*' || $bullet{0} === '-') '
' else '') # LF; 171 | $brk = ''; // swallow next leading break cause the end of list causes automatic break 172 | } else if ($spaces == $d) { // new list item 173 | if ($d >= 0) body #= $brk; 174 | body #= bake('{LF}
  • {format(rest)}'); 175 | $i = $spaces + length($lead); 176 | ++lineIndex; 177 | }; 178 | $spaces >= $d; 179 | } else { 180 | if ($spaces > $d) { 181 | if ($l === '') { body #= $brk; $i =$d; } else { 182 | if ($spaces < $i) body #= ' ' else { body #= $brk; $i = $spaces }; 183 | body #= format($l) # LF 184 | }; 185 | $brk = '
    '; 186 | ++lineIndex; 187 | }; 188 | $spaces > $d; 189 | } 190 | }; ) 191 | }; 192 | 193 | src = expandTabs(src, 4); 194 | 195 | body = ''; 196 | if (right(src, 1) === "\n") src = chop(src, 1); 197 | 198 | // Find headers 199 | // Fix : either save the sections here for later processing, or make a subroutine of this split 200 | 201 | for (xsrc = src; xsrc !== '';) { 202 | section = xsrc{:search(xsrc, "\n\n")}; 203 | xsrc = xsrc{length(section):}; 204 | xsrc = xsrc{span(xsrc, "\n"):}; 205 | lines.n = 0; 206 | tokenize(section, >append(@lines, $0)); 207 | if (lines.n == 2 && (foundHeader = findHeader(lines[0], lines[1])) !== void) { 208 | head = html(lines[0]); 209 | pattern = '{' # wildEscape(head) # '}' # STD_PATTERN_SUFFIX; 210 | patterns[pattern] = "{if (isInside($1)) $1 else bake('{$1}')}" 211 | } 212 | }; 213 | 214 | // Process ... 215 | 216 | for (; src !== '';) { 217 | section = src{:search(src, "\n\n")}; 218 | src = src{length(section):}; 219 | src = src{span(src, "\n"):}; 220 | lines.n = 0; 221 | 222 | tokenize(section, >append(@lines, $0)); 223 | leadingSpaces = 0; 224 | if (lines.n == 2 && (foundHeader = findHeader(lines[0], lines[1])) !== void) { 225 | head = html(lines[0]); 226 | body #= bake('<{foundHeader}>{head}{LF}'); 227 | print('Processing ' # head); 228 | insideHeaders[foundHeader] = head; 229 | } else if (wildmatch(lines[0], '{[ ]?*}[^ ]?[]*', @s) && (leadingSpaces = length(s)) >= 4) { 230 | body #= '
    ';
    231 | 			for (i = 0; i < lines.n; ++i) body #= html(lines[i]{leadingSpaces:}) # '
    '; 232 | body #= '
    ' # LF 233 | } else if (wildmatch(lines[0], '[ ]*[0-9*]?*)[ ]*[^ ]?[]*') || wildmatch(lines[0], '[ ]*-[ ]?*[^ ]?[]*')) { 234 | lineIndex = 0; 235 | doList(-1, -1); 236 | } else if (wildmatch(LF # section, "*[^ \n][ ]??*[]*[^ ]?[]*")) { 237 | prune(@cells); 238 | prune(@tabs); 239 | for (i = 0; i < lines.n; ++i) { 240 | for (p = 0; p < length(lines[i]); p += l) { 241 | p += span(lines[i]{p:}, ' '); 242 | l = search(lines[i]{p:}, ' '); 243 | cells[i][p] = lines[i]{p:l}; 244 | tabs[p] = true; 245 | } 246 | }; 247 | prune(@columns); 248 | foreach(@tabs, >append(@columns, $1)); 249 | sort(@columns); 250 | body #= '' # LF; 251 | headCol = true; 252 | headRow = true; 253 | foreach(@cells[1], >if (!exists(cell = @cells[0][$1]) || $2 !== repeat('-', length([cell]))) headRow = false); 254 | if (columns.n > 0) { 255 | for (y = (if (headRow) 2 else 0); headCol && y < lines.n; ++y) { 256 | if (exists(cell = @cells[y][columns[1]]) && [cell] !== ':') headCol = false; 257 | } 258 | }; 259 | for (y = 0; y < lines.n; ++y) { 260 | if (!headRow || y != 1) { 261 | body #= '' # LF; 262 | for (x = 0; x < columns.n; ++x) { 263 | if (!headCol || x != 1) { 264 | td = (if ((headRow && y == 0) || (headCol && x == 0)) 'th' else 'td'); 265 | if (!exists(cell = @cells[y][p = columns[x]])) body #= '' 266 | else { 267 | for (colspan = 1; x + 1 < columns.n && p + length([cell]) >= columns[x + 1]; ++x) ++colspan; 268 | body #= bake("<{td}{if (colspan > 1) (' colspan=' # colspan) else ''}>{format([cell])}"); 269 | } 270 | } 271 | }; 272 | body #= LF # '' # LF; 273 | } 274 | }; 275 | body #= '
     
    ' # LF; 276 | } else if (lines.n == 1 && wildmatch(lines[0], '==========[=]*')) { 277 | body #= '
    ' # LF; 278 | } else { 279 | if (leadingSpaces < 1) { 280 | s = format(section); 281 | } else { 282 | // FIX : Q & D solution 283 | s = replace(replace(replace(section{leadingSpaces:}, "\n ", "\0"), "\n", " "), "\0", "\n"); 284 | s = format(s); 285 | }; 286 | if (wildmatch(s, "{[*]?*}{ *}", @stars, @rest)) { 287 | if (!exists(r = @footnotes[length(stars)])) { 288 | print('Warning! Unreferenced or multiple defined footnote: ' # escape(section{leadingSpaces:})); 289 | body #= bake('

    {stars}{rest}

    {LF}') 290 | } else { 291 | fn = 'fn' # radix([r], 10, 4); 292 | delete(r); 293 | body #= bake('

    {stars}{rest}

    {LF}') 294 | } 295 | } else { 296 | body #= bake('

    {s}

    {LF}') 297 | } 298 | } 299 | }; 300 | 301 | foreach(@footnotes, >if ($1 !== 'next') { delete($0); print('Warning! Undefined footnote: ' # repeat('*', $1)) }); 302 | 303 | body 304 | }; 305 | 306 | void 307 | -------------------------------------------------------------------------------- /Symbiosis.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 42; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; }; 11 | F7652557130E01BF00E6D484 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7652556130E01BF00E6D484 /* Cocoa.framework */; }; 12 | F7A902661311D9390062CEF8 /* Symbiosis.mm in Sources */ = {isa = PBXBuildFile; fileRef = F7A902651311D9390062CEF8 /* Symbiosis.mm */; }; 13 | F7D698E60909606000040FB7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7D698E50909606000040FB7 /* AudioUnit.framework */; }; 14 | F7D698F70909606B00040FB7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7D698F60909606B00040FB7 /* AudioToolbox.framework */; }; 15 | F7FA8F2F10EC1E5300FA9980 /* CompileSymbiosisRsrc.command in Resources */ = {isa = PBXBuildFile; fileRef = F7FA8F2E10EC1E5300FA9980 /* CompileSymbiosisRsrc.command */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 20 | 32BAE0B30371A71500C91783 /* Symbiosis_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Symbiosis_Prefix.pch; sourceTree = ""; }; 21 | F713E73C10EC2062004C57D8 /* Symbiosis.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Symbiosis.component; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | F7652556130E01BF00E6D484 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 23 | F7A902651311D9390062CEF8 /* Symbiosis.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Symbiosis.mm; sourceTree = ""; }; 24 | F7D698E50909606000040FB7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; 25 | F7D698F60909606B00040FB7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; 26 | F7D69A5F09096C9F00040FB7 /* Symbiosis.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; path = Symbiosis.r; sourceTree = ""; }; 27 | F7FA8F2E10EC1E5300FA9980 /* CompileSymbiosisRsrc.command */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = CompileSymbiosisRsrc.command; sourceTree = ""; }; 28 | /* End PBXFileReference section */ 29 | 30 | /* Begin PBXFrameworksBuildPhase section */ 31 | 8D01CCCD0486CAD60068D4B7 /* Frameworks */ = { 32 | isa = PBXFrameworksBuildPhase; 33 | buildActionMask = 2147483647; 34 | files = ( 35 | 8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */, 36 | F7D698E60909606000040FB7 /* AudioUnit.framework in Frameworks */, 37 | F7D698F70909606B00040FB7 /* AudioToolbox.framework in Frameworks */, 38 | F7652557130E01BF00E6D484 /* Cocoa.framework in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 089C166AFE841209C02AAC07 /* Symbiosis */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | F7D698F60909606B00040FB7 /* AudioToolbox.framework */, 49 | F7D698E50909606000040FB7 /* AudioUnit.framework */, 50 | 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */, 51 | F7652556130E01BF00E6D484 /* Cocoa.framework */, 52 | F7FA8F2E10EC1E5300FA9980 /* CompileSymbiosisRsrc.command */, 53 | F713E73D10EC2062004C57D8 /* Products */, 54 | F7A902651311D9390062CEF8 /* Symbiosis.mm */, 55 | F7D69A5F09096C9F00040FB7 /* Symbiosis.r */, 56 | 32BAE0B30371A71500C91783 /* Symbiosis_Prefix.pch */, 57 | ); 58 | name = Symbiosis; 59 | sourceTree = ""; 60 | }; 61 | F713E73D10EC2062004C57D8 /* Products */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | F713E73C10EC2062004C57D8 /* Symbiosis.component */, 65 | ); 66 | name = Products; 67 | sourceTree = ""; 68 | }; 69 | /* End PBXGroup section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | 8D01CCC60486CAD60068D4B7 /* Symbiosis */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = F7D698300909427700040FB7 /* Build configuration list for PBXNativeTarget "Symbiosis" */; 75 | buildPhases = ( 76 | F73B1CE3140D3B6E00D2724C /* ShellScript */, 77 | 8D01CCC90486CAD60068D4B7 /* Resources */, 78 | 8D01CCCB0486CAD60068D4B7 /* Sources */, 79 | 8D01CCCD0486CAD60068D4B7 /* Frameworks */, 80 | F7FA8F4C10EC1F5D00FA9980 /* ShellScript */, 81 | ); 82 | buildRules = ( 83 | ); 84 | dependencies = ( 85 | ); 86 | name = Symbiosis; 87 | productInstallPath = "$(HOME)/Library/Bundles"; 88 | productName = Symbiosis; 89 | productReference = F713E73C10EC2062004C57D8 /* Symbiosis.component */; 90 | productType = "com.apple.product-type.bundle"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | 089C1669FE841209C02AAC07 /* Project object */ = { 96 | isa = PBXProject; 97 | buildConfigurationList = F7D698340909427700040FB7 /* Build configuration list for PBXProject "Symbiosis" */; 98 | compatibilityVersion = "Xcode 2.4"; 99 | developmentRegion = English; 100 | hasScannedForEncodings = 1; 101 | knownRegions = ( 102 | English, 103 | Japanese, 104 | French, 105 | German, 106 | ); 107 | mainGroup = 089C166AFE841209C02AAC07 /* Symbiosis */; 108 | productRefGroup = F713E73D10EC2062004C57D8 /* Products */; 109 | projectDirPath = ""; 110 | projectRoot = ""; 111 | targets = ( 112 | 8D01CCC60486CAD60068D4B7 /* Symbiosis */, 113 | ); 114 | }; 115 | /* End PBXProject section */ 116 | 117 | /* Begin PBXResourcesBuildPhase section */ 118 | 8D01CCC90486CAD60068D4B7 /* Resources */ = { 119 | isa = PBXResourcesBuildPhase; 120 | buildActionMask = 2147483647; 121 | files = ( 122 | F7FA8F2F10EC1E5300FA9980 /* CompileSymbiosisRsrc.command in Resources */, 123 | ); 124 | runOnlyForDeploymentPostprocessing = 0; 125 | }; 126 | /* End PBXResourcesBuildPhase section */ 127 | 128 | /* Begin PBXShellScriptBuildPhase section */ 129 | F73B1CE3140D3B6E00D2724C /* ShellScript */ = { 130 | isa = PBXShellScriptBuildPhase; 131 | buildActionMask = 2147483647; 132 | files = ( 133 | ); 134 | inputPaths = ( 135 | ); 136 | outputPaths = ( 137 | ); 138 | runOnlyForDeploymentPostprocessing = 0; 139 | shellPath = /bin/sh; 140 | shellScript = "date \"+#define SY_CLASS_PREFIX netnuedgesymbiosis%Y%m%d%H%M%S\" >${SOURCE_ROOT}/SymbiosisClassPrefix.h\n"; 141 | }; 142 | F7FA8F4C10EC1F5D00FA9980 /* ShellScript */ = { 143 | isa = PBXShellScriptBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | ); 147 | inputPaths = ( 148 | ); 149 | outputPaths = ( 150 | ); 151 | runOnlyForDeploymentPostprocessing = 0; 152 | shellPath = /bin/sh; 153 | shellScript = "cp $PROJECT_DIR/Symbiosis.plist $TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH/Info.plist\ncp $PROJECT_DIR/Symbiosis.r $TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH/Resources/\necho \"Put a copy or an alias to your .vst in this folder\" >$TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH/Resources/put\\ .vst\\ here\\ ...\n"; 154 | }; 155 | /* End PBXShellScriptBuildPhase section */ 156 | 157 | /* Begin PBXSourcesBuildPhase section */ 158 | 8D01CCCB0486CAD60068D4B7 /* Sources */ = { 159 | isa = PBXSourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | F7A902661311D9390062CEF8 /* Symbiosis.mm in Sources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXSourcesBuildPhase section */ 167 | 168 | /* Begin XCBuildConfiguration section */ 169 | F76E337D0919684F00E4400B /* Beta */ = { 170 | isa = XCBuildConfiguration; 171 | buildSettings = { 172 | }; 173 | name = Beta; 174 | }; 175 | F76E337E0919684F00E4400B /* Beta */ = { 176 | isa = XCBuildConfiguration; 177 | buildSettings = { 178 | ARCHS = ( 179 | i386, 180 | x86_64, 181 | ppc, 182 | ); 183 | COPY_PHASE_STRIP = YES; 184 | DEPLOYMENT_LOCATION = NO; 185 | DSTROOT = /; 186 | GCC_DYNAMIC_NO_PIC = ""; 187 | GCC_ENABLE_FIX_AND_CONTINUE = NO; 188 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 189 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 190 | GCC_PREFIX_HEADER = Symbiosis_Prefix.pch; 191 | GCC_PREPROCESSOR_DEFINITIONS = ""; 192 | GENERATE_PKGINFO_FILE = YES; 193 | HEADER_SEARCH_PATHS = ( 194 | VST2300, 195 | VST2400, 196 | ); 197 | INFOPLIST_EXPAND_BUILD_SETTINGS = NO; 198 | INFOPLIST_FILE = Symbiosis.plist; 199 | INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; 200 | MACOSX_DEPLOYMENT_TARGET = 10.4; 201 | OTHER_REZFLAGS = "-d ppc_$(ppc) -d i386_$(i386) -d x86_64_$(x86_64)"; 202 | PRODUCT_NAME = Symbiosis; 203 | SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 204 | STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; 205 | WRAPPER_EXTENSION = component; 206 | ZERO_LINK = NO; 207 | }; 208 | name = Beta; 209 | }; 210 | F7D698310909427700040FB7 /* Development */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | }; 214 | name = Development; 215 | }; 216 | F7D698320909427700040FB7 /* Deployment */ = { 217 | isa = XCBuildConfiguration; 218 | buildSettings = { 219 | }; 220 | name = Deployment; 221 | }; 222 | F7D698350909427700040FB7 /* Development */ = { 223 | isa = XCBuildConfiguration; 224 | buildSettings = { 225 | ARCHS = ( 226 | i386, 227 | x86_64, 228 | ppc, 229 | ); 230 | COPY_PHASE_STRIP = NO; 231 | DEPLOYMENT_LOCATION = NO; 232 | DSTROOT = /; 233 | GCC_DYNAMIC_NO_PIC = ""; 234 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 235 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 236 | GCC_OPTIMIZATION_LEVEL = 0; 237 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 238 | GCC_PREFIX_HEADER = Symbiosis_Prefix.pch; 239 | GENERATE_PKGINFO_FILE = YES; 240 | HEADER_SEARCH_PATHS = ( 241 | VST2300, 242 | VST2400, 243 | ); 244 | INFOPLIST_EXPAND_BUILD_SETTINGS = NO; 245 | INFOPLIST_FILE = Symbiosis.plist; 246 | INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; 247 | MACOSX_DEPLOYMENT_TARGET = 10.4; 248 | OTHER_REZFLAGS = "-d ppc_$(ppc) -d i386_$(i386) -d x86_64_$(x86_64)"; 249 | PRODUCT_NAME = Symbiosis; 250 | SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 251 | STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; 252 | WRAPPER_EXTENSION = component; 253 | ZERO_LINK = YES; 254 | }; 255 | name = Development; 256 | }; 257 | F7D698360909427700040FB7 /* Deployment */ = { 258 | isa = XCBuildConfiguration; 259 | buildSettings = { 260 | ARCHS = ( 261 | i386, 262 | x86_64, 263 | ppc, 264 | ); 265 | COPY_PHASE_STRIP = YES; 266 | DEPLOYMENT_LOCATION = NO; 267 | DSTROOT = /; 268 | GCC_DYNAMIC_NO_PIC = ""; 269 | GCC_ENABLE_FIX_AND_CONTINUE = NO; 270 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 271 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 272 | GCC_PREFIX_HEADER = Symbiosis_Prefix.pch; 273 | GCC_PREPROCESSOR_DEFINITIONS = NDEBUG; 274 | GENERATE_PKGINFO_FILE = YES; 275 | HEADER_SEARCH_PATHS = ( 276 | VST2300, 277 | VST2400, 278 | ); 279 | INFOPLIST_EXPAND_BUILD_SETTINGS = NO; 280 | INFOPLIST_FILE = Symbiosis.plist; 281 | INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/"; 282 | MACOSX_DEPLOYMENT_TARGET = 10.4; 283 | OTHER_REZFLAGS = "-d ppc_$(ppc) -d i386_$(i386) -d x86_64_$(x86_64)"; 284 | PRODUCT_NAME = Symbiosis; 285 | SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 286 | STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; 287 | WRAPPER_EXTENSION = component; 288 | ZERO_LINK = NO; 289 | }; 290 | name = Deployment; 291 | }; 292 | /* End XCBuildConfiguration section */ 293 | 294 | /* Begin XCConfigurationList section */ 295 | F7D698300909427700040FB7 /* Build configuration list for PBXNativeTarget "Symbiosis" */ = { 296 | isa = XCConfigurationList; 297 | buildConfigurations = ( 298 | F7D698310909427700040FB7 /* Development */, 299 | F7D698320909427700040FB7 /* Deployment */, 300 | F76E337D0919684F00E4400B /* Beta */, 301 | ); 302 | defaultConfigurationIsVisible = 0; 303 | defaultConfigurationName = Development; 304 | }; 305 | F7D698340909427700040FB7 /* Build configuration list for PBXProject "Symbiosis" */ = { 306 | isa = XCConfigurationList; 307 | buildConfigurations = ( 308 | F7D698350909427700040FB7 /* Development */, 309 | F7D698360909427700040FB7 /* Deployment */, 310 | F76E337E0919684F00E4400B /* Beta */, 311 | ); 312 | defaultConfigurationIsVisible = 0; 313 | defaultConfigurationName = Development; 314 | }; 315 | /* End XCConfigurationList section */ 316 | }; 317 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 318 | } 319 | -------------------------------------------------------------------------------- /documentation/PikaCmdSource/systools.pika: -------------------------------------------------------------------------------- 1 | /* 2 | systools.pika v0.942 3 | 4 | PikaScript is released under the "New Simplified BSD License". http://www.opensource.org/licenses/bsd-license.php 5 | 6 | Copyright (c) 2009-2013, NuEdge Development / Magnus Lidstroem 7 | All rights reserved. 8 | */ 9 | /* 10 | include('filename') 11 | 12 | Improved 'include' that looks for include files in a list of search paths. Use 'include.addSearchPath()' or the 13 | environment variable PIKAINCLUDE to define search paths. Include files will also be searched for first in the 14 | same directory as the currently executing .pika. The global '::run.root' will contain this directory path. 15 | 16 | run('filename') 17 | 18 | Augmented to support the ::run.root variable. 19 | 20 | 'pathSlash' = appendDirSlash('path') 21 | 22 | Appends '/' to 'path' if the its last character is not already '/', '\' or ':'. 23 | 24 | 'path' = removeDirSlash('pathSlash') 25 | 26 | Removes last character from 'pathSlash' if it is '/', '\' or ':'. You can use it to climb a path upwards like 27 | this: { parent = dirOfPath(removeDirSlash('/abc/def/ghi')) } 28 | 29 | 'dir' = dirOfPath('path') 30 | 31 | Extracts the directory of 'path' (including trailing '/' etc). 32 | 33 | 'name' = basenameOfPath('path') 34 | 35 | Extracts the base name (i.e. filename without extension) of 'path' 36 | 37 | 'name' = filenameOfPath('path') 38 | 39 | Extracts the filename (incl. any extension) of 'path'. 40 | 41 | '.ext' = extensionOfPath('path') 42 | 43 | Extracts the extension of 'path', including the leading '.'. Returns void if no extension. 44 | 45 | splitPath('path', @dir, @name, @extension) 46 | 47 | Splits a full path into directory, base name and extension. 48 | 49 | 'output' = pipe('command', [throwOnError = true]) 50 | 51 | Executes a shell command, captures its output and returns it. Optionally throws exception if command exits with 52 | a non-zero return code. 53 | 54 | eraseFile('path') 55 | 56 | Erases file(s). 'path' can contain wildcard characters. 57 | 58 | moveFile('fromPath', 'toPath') 59 | 60 | Moves / renames file(s). 'fromPath' can contain wildcard characters. 'toPath' may or may not contain a filename. 61 | 62 | copyFile('fromPath', 'toPath') 63 | 64 | Copies file(s). 'fromPath' can contain wildcard characters. 'toPath' may or may not contain a filename. 65 | 66 | makeDir('path') 67 | 68 | Creates a dir (and any intermediate dirs as necessary). Throws if dir already exists. 69 | 70 | removeDir('path') 71 | 72 | Removes a dir. Throws if dir is not empty. 73 | 74 | renameFile('path', 'newName') 75 | 76 | Renames a file. 'newName' should not contain directory. 77 | 78 | concatFiles(['sources', ...], 'toPath') 79 | 80 | Concatenates all sources and replaces 'toPath'. 'toPath' must not be one of 'sources'. 81 | 82 | 'path' = fromNativePath('nativePath') 83 | 84 | Converts a path in native representation (e.g. using '\' as director separator instead of '/') to platform- 85 | normalized representation. 86 | 87 | 'nativePath' = toNativePath('path') 88 | 89 | Converts a path in platform-normalized representation (e.g. always using '/' as director separator) to native 90 | representation. 91 | 92 | 'path' = currentDir() 93 | 94 | Returns the current working dir. (Notice: there is no way to set the current working dir.) 95 | 96 | dir('files', >action, ['order' = void], [?descending = false]) 97 | 98 | Lists files in a directory (or files that matches a wildcard specifier) and executes >action for each file. 99 | 'order' can be void (for undefined), 'name', 'time' or 'size'. 100 | 101 | 'yyyy-mm-dd hh:mm:ss' = fileTime('path') 102 | 103 | Returns the time of a file in ISO format. Time accuracy may not include seconds, in which case they will always 104 | be zero. 105 | 106 | +bytes = fileSize('path') 107 | 108 | Returns file size in bytes. 109 | 110 | ?found = pathExists('path') 111 | 112 | Returns true if path exists. 113 | 114 | ?newer = isFileNewer('comparePath', 'toPath') 115 | 116 | Returns true if 'comparePath' is newer than 'toPath' or 'comparePath' exists and 'toPath' does not. 117 | 118 | sleep(+secs) 119 | 120 | Pauses for a specific number of seconds. Timing accuracy may vary. 121 | */ 122 | 123 | include('stdlib.pika'); 124 | 125 | appendDirSlash = function { $0 # (if (span(right($0, 1), '/\:') == 0) '/') }; 126 | removeDirSlash = function { if (span(right($0, 1), '/\:') != 0) chop($0, 1) else $0 }; 127 | dirOfPath = function { $0{:rfind($0, '/\:') + 1} }; 128 | basenameOfPath = function { fn = $0{rfind($0, '/\:') + 1:}; ( if ((i = rfind(fn, '.')) >= 0) fn{:i} else fn ) }; 129 | filenameOfPath = function { $0{rfind($0, '/\:') + 1:} }; 130 | extensionOfPath = function { ext = $0{rfind($0, '/\:.'):}; (if (ext{0} == '.') ext else void) }; 131 | splitPath = function { 132 | args(@full, @dir, @name, @extension); 133 | if (!wildmatch(full, '{*}{[^<>:"/\|?*]*}{.[^<>:"/\|?*.]*}', dir, name, extension)) { 134 | [extension] = void; 135 | if (!wildmatch(full, '{*}{[^<>:"/\|?*]*}', dir, name)) throw("Invalid path") 136 | } 137 | }; 138 | pipe.dir = void; 139 | pipe.newTempPath = function { 140 | if (::pipe.dir == void) { 141 | ::pipe.dir = bake('{TEMP_DIR}PikaPipes/'); 142 | system(bake('{MKDIR_COMMAND} {toNativePath(pipe.dir)} {DIRECT_ALL_TO_NULL}')); 143 | }; 144 | bake('{pipe.dir}{radix(trunc(random(65536 * 65536) + time()), 16)}'); 145 | }; 146 | pipe.stdOutPath = void; 147 | pipe.stdErrPath = void; 148 | pipe = function { 149 | vargs(@command,, @throwOnError); 150 | defaults(@throwOnError, true); 151 | commandExe = command{:i = find(command, ' ')}; 152 | commandArgs = command{i:}; 153 | commandLine = toNativePath(commandExe) # ' ' # commandArgs; 154 | 155 | if (::pipe.stdOutPath == void) ::pipe.stdOutPath = pipe.newTempPath(); 156 | if (::pipe.stdErrPath == void) ::pipe.stdErrPath = pipe.newTempPath(); 157 | 158 | err = void; 159 | rc = system(bake('({commandLine}) 1>{toNativePath(pipe.stdOutPath)} 2>{toNativePath(pipe.stdErrPath)}')); 160 | if (rc != 0) { 161 | err = bake('Error executing {escape(command)}'); 162 | if (try(>e = load(pipe.stdErrPath)) == void && e != '') { 163 | e = replace(e, "\t\r\n", ' ', find, 1); 164 | if (length(e) > 80) e = e{:80 - 3} # '...'; 165 | err #= ': ' # e; 166 | }; 167 | }; 168 | o = load(pipe.stdOutPath); 169 | system(bake('{DEL_COMMAND} {toNativePath(pipe.stdOutPath)} {DIRECT_ALL_TO_NULL}')); 170 | system(bake('{DEL_COMMAND} {toNativePath(pipe.stdErrPath)} {DIRECT_ALL_TO_NULL}')); 171 | if (err != void && throwOnError) throw(err); 172 | ( trim(o, void) ) 173 | }; 174 | eraseFile = function { pipe(bake('{DEL_COMMAND} {toNativePath($0)}')) }; 175 | moveFile = function { pipe(bake('{MOVE_COMMAND} {toNativePath($0)} {toNativePath($1)}')) }; 176 | copyFile = function { pipe(bake('{COPY_COMMAND} {toNativePath($0)} {toNativePath($1)}')) }; 177 | makeDir = function { pipe(bake('{MKDIR_COMMAND} {toNativePath($0)}')) }; // Error if already exists 178 | removeDir = function { pipe(bake('{RMDIR_COMMAND} {toNativePath($0)}')) }; 179 | 180 | if (PLATFORM == 'UNIX') { 181 | 182 | fromNativePath = function { replace($0, '\ ', ' ') }; 183 | toNativePath = function { replace($0, ' ', '\ ') }; 184 | currentDir = function { appendDirSlash(pipe('pwd -L')) }; 185 | 186 | renameFile = function { 187 | assert(dirOfPath($1) == void, 'Can only rename files in the same directory'); 188 | pipe(bake('mv -i {toNativePath($0)} {toNativePath(dirOfPath($0) # $1)} n > 1); 197 | cmd = 'cat'; 198 | for (i = 0; i < n - 1; ++i) { cmd #= ' ' # toNativePath(p = $[i]); assert(> gotPaths[undotify(p)] = true); }; 199 | cmd #= ' 1>' # toNativePath(d = $[n - 1]) # ' 2>/dev/null'; 200 | assert(> !exists(@gotPaths[undotify(d)]) 201 | , 'the destination file must not be one of the source files for concatFiles()'); 202 | if (system(cmd) != 0) throw('Error concatenating files with command: ' # cmd); 203 | }; 204 | 205 | dir = function { 206 | vargs(@files, @action,, @order, @descending); 207 | defaults(@order,void , @descending,false); 208 | if (right(files, 1) == '/') files #= '*'; 209 | options = dir.ORDER_OPTIONS[order][descending{0}]; 210 | tokenize(pipe(bake('ls -kp1d{options} {toNativePath(files)}'), false), >action($0{rfind(chop($0, 1), '/') + 1:})); 211 | ( void ) 212 | }; 213 | 214 | fileTime.statOptions = ''; 215 | 216 | discoverStatOptions = function { 217 | if (::fileTime.statOptions == '') { 218 | if (system('stat -c%y . 1>/dev/null 2>&1') == 0) { 219 | ::fileTime.statOptions = '-c%y'; 220 | ::fileSize.statOptions = '-c%s'; 221 | } else { 222 | ::fileTime.statOptions = '-f%Sm -t"%F %T"'; 223 | ::fileSize.statOptions = '-f%z'; 224 | } 225 | } 226 | }; 227 | 228 | fileTime = function { 229 | discoverStatOptions(); 230 | r = pipe(bake('stat {fileTime.statOptions} {toNativePath($0)}')); 231 | if (r == void) throw('Unable to obtain file time for ' # $0); 232 | ( r{:19} ) 233 | }; 234 | 235 | fileSize = function { 236 | discoverStatOptions(); 237 | r = pipe(bake('stat {fileSize.statOptions} {toNativePath($0)}')); 238 | if (r == void) throw('Unable to obtain file size for ' # $0); 239 | ( r ) 240 | }; 241 | 242 | pathExists = function { (system(bake('test -e {toNativePath($0)}')) == 0) }; 243 | 244 | isFileNewer = function { 245 | p0 = toNativePath($0); 246 | p1 = toNativePath($1); 247 | ( system(bake('test -e {p0} -a ! -e {p1} -o {p0} -nt {p1}')) == 0 ) 248 | }; 249 | 250 | sleep = function { pipe(bake('sleep {$0}')); }; 251 | 252 | DIR_SLASH = '/'; 253 | DEL_COMMAND = 'rm -f'; 254 | MOVE_COMMAND = 'mv'; 255 | COPY_COMMAND = 'cp -f'; 256 | MKDIR_COMMAND = 'mkdir -p'; 257 | RMDIR_COMMAND = 'rmdir'; 258 | DEV_NULL = '/dev/null'; 259 | DIRECT_ALL_TO_NULL = '1>/dev/null 2>&1'; 260 | TEMP_DIR = appendDirSlash(coalesce(getenv('TMPDIR'), '/tmp/')); 261 | 262 | } else if (PLATFORM == 'WINDOWS') { 263 | 264 | toNativePath = function { $0 = replace($0, '/', '\'); if (span(' ', $0) == 1) $0 = '"' # $0 # '"'; ( $0 ) }; 265 | fromNativePath = function { replace($0, '\', '/') }; 266 | currentDir = function { appendDirSlash(fromNativePath(pipe('cd'))) }; 267 | renameFile = function { pipe(bake('ren {toNativePath($0)} {toNativePath($1)}')) }; 268 | 269 | map(@dir.ORDER_OPTIONS, '.f','' , '.t','' , 'name.f','/ON' , 'name.t','/O-N' , 'size.f','/OS' , 'size.t','/O-S' 270 | , 'time.f','/OD' , 'time.t','/O-D'); 271 | 272 | concatFiles = function { 273 | n = $n; 274 | assert(> n > 1); 275 | cmd = 'COPY /Y /B '; 276 | for (i = 0; i < n - 1; ++i) { 277 | cmd #= (if (i > 0) ' + ') # toNativePath(p = $[i]); 278 | assert(> gotPaths[undotify(p)] = true); 279 | }; 280 | cmd #= ' ' # toNativePath(d = $[n - 1]); 281 | assert(> !exists(@gotPaths[undotify(d)]) 282 | , 'the destination file must not be one of the source files for concatFiles()'); 283 | pipe(cmd); 284 | }; 285 | 286 | dir = function { 287 | vargs(@files, @action,, @order, @descending); 288 | defaults(@order,'' , @descending,false); 289 | singleFile = void; 290 | dirs = true; 291 | if (span('*', files) == 0 && find(right(files, 1), '/\:') != 0) { 292 | singleFile = lower(filenameOfPath(files)); 293 | files #= '*' 294 | }; 295 | options = dir.ORDER_OPTIONS[order][descending{0}]; 296 | tokenize(pipe(bake( 297 | 'SET DIRCMD=&DIR /B /AD-H {toNativePath(files)}&ECHO \&&DIR /B {options} {toNativePath(files)}') 298 | , false), >{ 299 | if ($0 == '\') dirs = false 300 | else if (dirs) dirs[undotify($0)] = true 301 | else if (singleFile == void || lower($0) == singleFile) action($0 # (if (exists(@dirs[undotify($0)])) '/')); 302 | }); 303 | }; 304 | 305 | pathExists = function { (system(bake('IF NOT EXIST {toNativePath($0)} EXIT 1')) == 0) }; 306 | 307 | dirSingleFile = function { 308 | s = pipe(bake('SET DIRCMD=&DIR /TW /4 /-C {toNativePath($0)}')); 309 | for (; s != '' && span(s{0}, '0123456789') == 0; s = s{find(s, LF) + 1:}) ; 310 | if (s == '') throw('Unable to obtain file info for ' # $0); 311 | ( s ) 312 | }; 313 | 314 | fileTime.dateFormat = ''; 315 | fileTime = function { 316 | if (::fileTime.dateFormat == '') { 317 | system(bake('ECHO >{DEV_NULL}')); // In case NUL is not supported. 318 | s = lower(pipe(bake('date <{DEV_NULL}'), false)); 319 | yi = search(s, 'yy'); 320 | mi = search(s, 'mm'); 321 | di = search(s, 'dd'); 322 | if (yi < mi && yi < di) ::fileTime.dateFormat = (if (mi < di) 'YMD' else 'YDM') 323 | else if (yi > mi && yi > di) ::fileTime.dateFormat = (if (mi < di) 'MDY' else 'DMY') 324 | }; 325 | 326 | df = fileTime.dateFormat; 327 | if (!wildmatch(dirSingleFile($0) 328 | , (if (df{0} == 'Y') '{[0-9]????}[^0-9]{[0-9]??}[^0-9]{[0-9]??}' 329 | else '{[0-9]??}[^0-9]{[0-9]??}[^0-9]{[0-9]????}') # ' {[0-9]??}[^0-9]{[0-9]??} {*}' 330 | , @a[df{0}], @a[df{1}], @a[df{2}], @h, @m, @r)) 331 | throw('Unable to obtain file time for ' # $0); 332 | if (upper(r{0}) == 'P' && (h # m) != '1200') h = trim(h, '0', void) + 12 333 | else if (upper(r{0}) == 'A' && (h # m) == '1200') h = 0; 334 | ( bake("{a.Y}-{a.M}-{a.D} {h}:{m}:00") ) 335 | }; 336 | 337 | fileSize = function { 338 | if (!wildmatch(dirSingleFile($0){30:}, '[ ]*{[0-9]?*} *', @n)) throw('Unable to obtain file size for ' # $0); 339 | ( n ) 340 | }; 341 | 342 | isFileNewer = function { 343 | if ($0 == $1) ( false ) 344 | else { 345 | assert(dirOfPath($0) == dirOfPath($1), 'Can only compare files in the same directory'); 346 | s = pipe(bake('DIR /B /O-D {toNativePath($0)} {toNativePath($1)}')); 347 | ( s{:find(s, LF)} == $0{rfind($0, '/\:') + 1:} ) 348 | } 349 | }; 350 | 351 | compose(@sleep.COMMANDS, 'TIMEOUT /T {s}', 'CHOICE /T {s} /D y'); 352 | 353 | sleep.command = 0; 354 | 355 | sleep = function { 356 | for (s = $0; 357 | if (sleep.command < sleep.COMMANDS.n) 358 | ( system(bake(sleep.COMMANDS[sleep.command] # ' {DIRECT_ALL_TO_NULL}')) != 0 ) 359 | else { 360 | for (et = time() + round(s); time() < et;) 361 | system(bake('PING 123.45.67.89 -n 1 -w {round((et - time()) * 500)} {DIRECT_ALL_TO_NULL}')); 362 | ( false ) 363 | }; ++::sleep.command); 364 | }; 365 | 366 | TEMP_DIR = appendDirSlash(fromNativePath(coalesce(getenv('TEMP'), '\temp'))); 367 | DEV_NULL = 'NUL'; 368 | if (system('ECHO >NUL') != 0) // "Windows Fundamental" does not have NULL.SYS 369 | DEV_NULL = toNativePath(bake('{TEMP_DIR}devnul')); 370 | DIR_SLASH = '\'; 371 | DEL_COMMAND = 'DEL /Q'; 372 | MOVE_COMMAND = 'MOVE'; 373 | COPY_COMMAND = 'COPY /Y'; 374 | MKDIR_COMMAND = 'MKDIR'; 375 | RMDIR_COMMAND = 'RMDIR /Q'; 376 | DIRECT_ALL_TO_NULL = bake('1>{DEV_NULL} 2>&1'); 377 | 378 | } else { 379 | throw("Unsupported platform"); 380 | }; 381 | 382 | // --- Improved 'include' and 'run' --- 383 | 384 | run.runThis = function { 385 | args(@path, @source, @frame); 386 | if (source{:2} == '#!') source = source{find(source, LF):}; 387 | lastRoot = ::run.root; 388 | ::run.root = path{:rfind(path, '/\:') + 1}; 389 | x = try(>evaluate(source, frame)); 390 | ::run.root = lastRoot; 391 | if (x != void) throw(x); 392 | }; 393 | run = >{ 394 | function { 395 | fn = $0; 396 | if (run.root == void || try(>source = load(path = run.root # fn)) != void) source = load(path = fn); 397 | run.runThis(path, source, @^$); 398 | }($0) 399 | }; 400 | run.root = (if (exists(@::$0)) ::$0{:rfind(::$0, '/\:') + 1} else ''); 401 | 402 | include = >{ 403 | function { 404 | fn = $0; 405 | for (i = (if (run.root == void) 0 else -1); { 406 | if (i >= include.searchPaths.n) throw(err) 407 | else if (exists(@::included[(path = (if (i < 0) run.root else include.searchPaths[i]) # fn)])) ( false ) 408 | else if ((x = try(>source = load(path))) != void) { err = coalesce(@err, x); ( true ) } 409 | else { run.runThis(path, source, @^$); ::included[path] = true; ( false ) } 410 | }; ++i) 411 | }($0) 412 | }; 413 | compose(@include.searchPaths, ''); 414 | include.addSearchPath = >append(@include.searchPaths, $0 # (if (right($0, 1) != '/') '/')); 415 | if (exists(@::getenv)) tokenize(getenv('PIKAINCLUDE'), include.addSearchPath, ';,'); 416 | 417 | ( void ) 418 | -------------------------------------------------------------------------------- /Symbiosis.xcodeproj/magnus.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 089C1669FE841209C02AAC07 /* Project object */ = { 4 | activeBuildConfigurationName = Beta; 5 | activeExecutable = F7A900E813116F760062CEF8 /* Logic */; 6 | activeTarget = 8D01CCC60486CAD60068D4B7 /* Symbiosis */; 7 | addToTargets = ( 8 | 8D01CCC60486CAD60068D4B7 /* Symbiosis */, 9 | ); 10 | breakpoints = ( 11 | F747D22716E0D2C6004C779E /* Symbiosis.mm:735 */, 12 | ); 13 | codeSenseManager = F7D698390909427700040FB7 /* Code sense */; 14 | executables = ( 15 | F7D3E4EE091BE7B900501C1B /* AUVal */, 16 | F7A900E813116F760062CEF8 /* Logic */, 17 | ); 18 | perUserDictionary = { 19 | "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147" = { 20 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 21 | PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID; 22 | PBXFileTableDataSourceColumnWidthsKey = ( 23 | 20, 24 | 20, 25 | 210, 26 | 20, 27 | 110, 28 | 109, 29 | 20, 30 | ); 31 | PBXFileTableDataSourceColumnsKey = ( 32 | PBXBreakpointsDataSource_ActionID, 33 | PBXBreakpointsDataSource_TypeID, 34 | PBXBreakpointsDataSource_BreakpointID, 35 | PBXBreakpointsDataSource_UseID, 36 | PBXBreakpointsDataSource_LocationID, 37 | PBXBreakpointsDataSource_ConditionID, 38 | PBXBreakpointsDataSource_ContinueID, 39 | ); 40 | }; 41 | PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = { 42 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 43 | PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID; 44 | PBXFileTableDataSourceColumnWidthsKey = ( 45 | 200, 46 | 200, 47 | 657.5835, 48 | ); 49 | PBXFileTableDataSourceColumnsKey = ( 50 | PBXBookmarksDataSource_LocationID, 51 | PBXBookmarksDataSource_NameID, 52 | PBXBookmarksDataSource_CommentsID, 53 | ); 54 | }; 55 | PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { 56 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 57 | PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID; 58 | PBXFileTableDataSourceColumnWidthsKey = ( 59 | 20, 60 | 300, 61 | 643, 62 | ); 63 | PBXFileTableDataSourceColumnsKey = ( 64 | PBXErrorsWarningsDataSource_TypeID, 65 | PBXErrorsWarningsDataSource_MessageID, 66 | PBXErrorsWarningsDataSource_LocationID, 67 | ); 68 | }; 69 | PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { 70 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 71 | PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; 72 | PBXFileTableDataSourceColumnWidthsKey = ( 73 | 22, 74 | 300, 75 | 616.58349609375, 76 | ); 77 | PBXFileTableDataSourceColumnsKey = ( 78 | PBXExecutablesDataSource_ActiveFlagID, 79 | PBXExecutablesDataSource_NameID, 80 | PBXExecutablesDataSource_CommentsID, 81 | ); 82 | }; 83 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 84 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 85 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 86 | PBXFileTableDataSourceColumnWidthsKey = ( 87 | 20, 88 | 962, 89 | 20, 90 | 48, 91 | 43, 92 | 43, 93 | 20, 94 | ); 95 | PBXFileTableDataSourceColumnsKey = ( 96 | PBXFileDataSource_FiletypeID, 97 | PBXFileDataSource_Filename_ColumnID, 98 | PBXFileDataSource_Built_ColumnID, 99 | PBXFileDataSource_ObjectSize_ColumnID, 100 | PBXFileDataSource_Errors_ColumnID, 101 | PBXFileDataSource_Warnings_ColumnID, 102 | PBXFileDataSource_Target_ColumnID, 103 | ); 104 | }; 105 | PBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = { 106 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 107 | PBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID; 108 | PBXFileTableDataSourceColumnWidthsKey = ( 109 | 200, 110 | 120, 111 | ); 112 | PBXFileTableDataSourceColumnsKey = ( 113 | PBXFindDataSource_MessageID, 114 | PBXFindDataSource_LocationID, 115 | ); 116 | }; 117 | PBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = { 118 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 119 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 120 | PBXFileTableDataSourceColumnWidthsKey = ( 121 | 20, 122 | 20, 123 | 824, 124 | 20, 125 | 48, 126 | 43, 127 | 43, 128 | 20, 129 | ); 130 | PBXFileTableDataSourceColumnsKey = ( 131 | PBXFileDataSource_SCM_ColumnID, 132 | PBXFileDataSource_FiletypeID, 133 | PBXFileDataSource_Filename_ColumnID, 134 | PBXFileDataSource_Built_ColumnID, 135 | PBXFileDataSource_ObjectSize_ColumnID, 136 | PBXFileDataSource_Errors_ColumnID, 137 | PBXFileDataSource_Warnings_ColumnID, 138 | PBXFileDataSource_Target_ColumnID, 139 | ); 140 | }; 141 | PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { 142 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 143 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 144 | PBXFileTableDataSourceColumnWidthsKey = ( 145 | 20, 146 | 762, 147 | 60, 148 | 20, 149 | 48, 150 | 43, 151 | 43, 152 | ); 153 | PBXFileTableDataSourceColumnsKey = ( 154 | PBXFileDataSource_FiletypeID, 155 | PBXFileDataSource_Filename_ColumnID, 156 | PBXTargetDataSource_PrimaryAttribute, 157 | PBXFileDataSource_Built_ColumnID, 158 | PBXFileDataSource_ObjectSize_ColumnID, 159 | PBXFileDataSource_Errors_ColumnID, 160 | PBXFileDataSource_Warnings_ColumnID, 161 | ); 162 | }; 163 | PBXPerProjectTemplateStateSaveDate = 388319035; 164 | PBXWorkspaceStateSaveDate = 388319035; 165 | }; 166 | perUserProjectItems = { 167 | F73C00D013A6376800944871 = F73C00D013A6376800944871 /* PBXTextBookmark */; 168 | F73ED3DD1461F2A4006B48F4 = F73ED3DD1461F2A4006B48F4 /* PBXTextBookmark */; 169 | F747D25E16E0DA8A004C779E = F747D25E16E0DA8A004C779E /* PBXTextBookmark */; 170 | F747D25F16E0DA8A004C779E = F747D25F16E0DA8A004C779E /* PBXTextBookmark */; 171 | F747D26016E0DA8A004C779E = F747D26016E0DA8A004C779E /* PBXTextBookmark */; 172 | F747D27E16E0DF35004C779E = F747D27E16E0DF35004C779E /* PBXTextBookmark */; 173 | F747D27F16E0DF35004C779E = F747D27F16E0DF35004C779E /* PBXTextBookmark */; 174 | F76E64701421979A00933FB2 = F76E64701421979A00933FB2 /* PBXTextBookmark */; 175 | F76E64721421979A00933FB2 = F76E64721421979A00933FB2 /* PBXTextBookmark */; 176 | F76E64741421979A00933FB2 = F76E64741421979A00933FB2 /* PBXTextBookmark */; 177 | F7F673291725473E00C8E0F8 /* PBXTextBookmark */ = F7F673291725473E00C8E0F8 /* PBXTextBookmark */; 178 | F7F6732F1725481200C8E0F8 /* PBXTextBookmark */ = F7F6732F1725481200C8E0F8 /* PBXTextBookmark */; 179 | F7F673301725481200C8E0F8 /* PBXBookmark */ = F7F673301725481200C8E0F8 /* PBXBookmark */; 180 | F7F673311725481200C8E0F8 /* PBXTextBookmark */ = F7F673311725481200C8E0F8 /* PBXTextBookmark */; 181 | }; 182 | sourceControlManager = F7D698380909427700040FB7 /* Source Control */; 183 | userBuildSettings = { 184 | OBJROOT = "~/temp"; 185 | }; 186 | }; 187 | 32BAE0B30371A71500C91783 /* Symbiosis_Prefix.pch */ = { 188 | uiCtxt = { 189 | sepNavIntBoundsRect = "{{0, 0}, {919, 645}}"; 190 | sepNavSelRange = "{618, 0}"; 191 | sepNavVisRange = "{0, 618}"; 192 | sepNavVisRect = "{{0, 0}, {1046, 645}}"; 193 | }; 194 | }; 195 | 8D01CCC60486CAD60068D4B7 /* Symbiosis */ = { 196 | activeExec = 0; 197 | }; 198 | F73C00D013A6376800944871 /* PBXTextBookmark */ = { 199 | isa = PBXTextBookmark; 200 | fRef = F73C00D113A6376800944871 /* NuxScript.cpp */; 201 | name = "NuxScript.cpp: 326"; 202 | rLen = 0; 203 | rLoc = 16335; 204 | rType = 0; 205 | vrLen = 2975; 206 | vrLoc = 14501; 207 | }; 208 | F73C00D113A6376800944871 /* NuxScript.cpp */ = { 209 | isa = PBXFileReference; 210 | lastKnownFileType = sourcecode.cpp.cpp; 211 | name = NuxScript.cpp; 212 | path = /Users/magnus/projects/lab/ScriptLab/NuXScript/NuxScript.cpp; 213 | sourceTree = ""; 214 | }; 215 | F73ED3DD1461F2A4006B48F4 /* PBXTextBookmark */ = { 216 | isa = PBXTextBookmark; 217 | fRef = F7D69A5F09096C9F00040FB7 /* Symbiosis.r */; 218 | name = "Symbiosis.r: 112"; 219 | rLen = 0; 220 | rLoc = 3664; 221 | rType = 0; 222 | vrLen = 1346; 223 | vrLoc = 1835; 224 | }; 225 | F747D1CD16E0C308004C779E /* BuildWrappers.command */ = { 226 | isa = PBXFileReference; 227 | lastKnownFileType = text.script.sh; 228 | name = BuildWrappers.command; 229 | path = "/Users/magnus/projects/symbiosis-au-vst/BuildWrappers.command"; 230 | sourceTree = ""; 231 | }; 232 | F747D21A16E0D16F004C779E /* Symbiosis Documentation.txt */ = { 233 | isa = PBXFileReference; 234 | lastKnownFileType = text; 235 | name = "Symbiosis Documentation.txt"; 236 | path = "/Users/magnus/projects/symbiosis-au-vst/documentation/Symbiosis Documentation.txt"; 237 | sourceTree = ""; 238 | }; 239 | F747D22016E0D18E004C779E /* Doxyfile */ = { 240 | isa = PBXFileReference; 241 | lastKnownFileType = text; 242 | name = Doxyfile; 243 | path = "/Users/magnus/projects/symbiosis-au-vst/documentation/Doxyfile"; 244 | sourceTree = ""; 245 | }; 246 | F747D22716E0D2C6004C779E /* Symbiosis.mm:735 */ = { 247 | isa = PBXFileBreakpoint; 248 | actions = ( 249 | ); 250 | breakpointStyle = 0; 251 | continueAfterActions = 0; 252 | countType = 0; 253 | delayBeforeContinue = 0; 254 | fileReference = F7A902651311D9390062CEF8 /* Symbiosis.mm */; 255 | hitCount = 0; 256 | ignoreCount = 0; 257 | lineNumber = 735; 258 | modificationTime = 383832776.038452; 259 | originalNumberOfMultipleMatches = 0; 260 | state = 2; 261 | }; 262 | F747D25416E0D961004C779E /* BuildDocs.command */ = { 263 | isa = PBXFileReference; 264 | lastKnownFileType = text.script.sh; 265 | name = BuildDocs.command; 266 | path = "/Users/magnus/projects/symbiosis-au-vst/BuildDocs.command"; 267 | sourceTree = ""; 268 | }; 269 | F747D25E16E0DA8A004C779E /* PBXTextBookmark */ = { 270 | isa = PBXTextBookmark; 271 | fRef = F747D1CD16E0C308004C779E /* BuildWrappers.command */; 272 | name = "BuildWrappers.command: 17"; 273 | rLen = 0; 274 | rLoc = 643; 275 | rType = 0; 276 | vrLen = 807; 277 | vrLoc = 0; 278 | }; 279 | F747D25F16E0DA8A004C779E /* PBXTextBookmark */ = { 280 | isa = PBXTextBookmark; 281 | fRef = F747D21A16E0D16F004C779E /* Symbiosis Documentation.txt */; 282 | name = "Symbiosis Documentation.txt: 356"; 283 | rLen = 0; 284 | rLoc = 19934; 285 | rType = 0; 286 | vrLen = 2492; 287 | vrLoc = 17911; 288 | }; 289 | F747D26016E0DA8A004C779E /* PBXTextBookmark */ = { 290 | isa = PBXTextBookmark; 291 | fRef = F747D22016E0D18E004C779E /* Doxyfile */; 292 | name = "Doxyfile: 253"; 293 | rLen = 0; 294 | rLoc = 11187; 295 | rType = 0; 296 | vrLen = 2350; 297 | vrLoc = 10091; 298 | }; 299 | F747D27E16E0DF35004C779E /* PBXTextBookmark */ = { 300 | isa = PBXTextBookmark; 301 | fRef = F747D25416E0D961004C779E /* BuildDocs.command */; 302 | name = "BuildDocs.command: 16"; 303 | rLen = 0; 304 | rLoc = 343; 305 | rType = 0; 306 | vrLen = 429; 307 | vrLoc = 0; 308 | }; 309 | F747D27F16E0DF35004C779E /* PBXTextBookmark */ = { 310 | isa = PBXTextBookmark; 311 | fRef = F747D28016E0DF35004C779E /* BuildDocs.command */; 312 | name = "BuildDocs.command: 16"; 313 | rLen = 0; 314 | rLoc = 343; 315 | rType = 0; 316 | vrLen = 429; 317 | vrLoc = 0; 318 | }; 319 | F747D28016E0DF35004C779E /* BuildDocs.command */ = { 320 | isa = PBXFileReference; 321 | lastKnownFileType = text.script.sh; 322 | name = BuildDocs.command; 323 | path = "/Users/magnus/projects/symbiosis-au-vst/BuildDocs.command"; 324 | sourceTree = ""; 325 | uiCtxt = { 326 | sepNavIntBoundsRect = "{{0, 0}, {1152, 744}}"; 327 | sepNavSelRange = "{343, 0}"; 328 | sepNavVisRange = "{0, 429}"; 329 | }; 330 | }; 331 | F76E64701421979A00933FB2 /* PBXTextBookmark */ = { 332 | isa = PBXTextBookmark; 333 | fRef = F76E64711421979A00933FB2 /* AUComponent.h */; 334 | name = "AUComponent.h: 656"; 335 | rLen = 20; 336 | rLoc = 29250; 337 | rType = 0; 338 | vrLen = 1949; 339 | vrLoc = 28178; 340 | }; 341 | F76E64711421979A00933FB2 /* AUComponent.h */ = { 342 | isa = PBXFileReference; 343 | lastKnownFileType = sourcecode.c.h; 344 | name = AUComponent.h; 345 | path = /System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AUComponent.h; 346 | sourceTree = ""; 347 | }; 348 | F76E64721421979A00933FB2 /* PBXTextBookmark */ = { 349 | isa = PBXTextBookmark; 350 | fRef = F7714BD513C6953100372C78 /* AudioUnitProperties.h */; 351 | name = "AudioUnitProperties.h: 1522"; 352 | rLen = 20; 353 | rLoc = 71992; 354 | rType = 0; 355 | vrLen = 1877; 356 | vrLoc = 70980; 357 | }; 358 | F76E64741421979A00933FB2 /* PBXTextBookmark */ = { 359 | isa = PBXTextBookmark; 360 | fRef = F76E64751421979A00933FB2 /* AudioUnitProperties.h */; 361 | name = "AudioUnitProperties.h: 120"; 362 | rLen = 32; 363 | rLoc = 4694; 364 | rType = 0; 365 | vrLen = 2490; 366 | vrLoc = 23568; 367 | }; 368 | F76E64751421979A00933FB2 /* AudioUnitProperties.h */ = { 369 | isa = PBXFileReference; 370 | lastKnownFileType = sourcecode.c.h; 371 | name = AudioUnitProperties.h; 372 | path = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AudioUnitProperties.h; 373 | sourceTree = ""; 374 | }; 375 | F7714BD513C6953100372C78 /* AudioUnitProperties.h */ = { 376 | isa = PBXFileReference; 377 | lastKnownFileType = sourcecode.c.h; 378 | name = AudioUnitProperties.h; 379 | path = /System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AudioUnitProperties.h; 380 | sourceTree = ""; 381 | }; 382 | F7A900E813116F760062CEF8 /* Logic */ = { 383 | isa = PBXExecutable; 384 | activeArgIndices = ( 385 | ); 386 | argumentStrings = ( 387 | ); 388 | autoAttachOnCrash = 1; 389 | breakpointsEnabled = 1; 390 | configStateDict = { 391 | "PBXLSLaunchAction-0" = { 392 | PBXLSLaunchAction = 0; 393 | PBXLSLaunchStartAction = 1; 394 | PBXLSLaunchStdioStyle = 2; 395 | PBXLSLaunchStyle = 0; 396 | class = PBXLSRunLaunchConfig; 397 | commandLineArgs = ( 398 | ); 399 | displayName = "Executable Runner"; 400 | environment = { 401 | }; 402 | identifier = com.apple.Xcode.launch.runConfig; 403 | remoteHostInfo = ""; 404 | startActionInfo = ""; 405 | }; 406 | }; 407 | customDataFormattersEnabled = 1; 408 | dataTipCustomDataFormattersEnabled = 1; 409 | dataTipShowTypeColumn = 1; 410 | dataTipSortType = 0; 411 | debuggerPlugin = GDBDebugging; 412 | disassemblyDisplayState = 0; 413 | dylibVariantSuffix = ""; 414 | enableDebugStr = 1; 415 | environmentEntries = ( 416 | ); 417 | executableSystemSymbolLevel = 0; 418 | executableUserSymbolLevel = 0; 419 | launchableReference = F7A900E913116F760062CEF8 /* Logic Pro.app */; 420 | libgmallocEnabled = 0; 421 | name = Logic; 422 | savedGlobals = { 423 | }; 424 | showTypeColumn = 0; 425 | sourceDirectories = ( 426 | ); 427 | variableFormatDictionary = { 428 | }; 429 | }; 430 | F7A900E913116F760062CEF8 /* Logic Pro.app */ = { 431 | isa = PBXFileReference; 432 | lastKnownFileType = wrapper.application; 433 | name = "Logic Pro.app"; 434 | path = "/Applications/Logic Pro.app"; 435 | sourceTree = ""; 436 | }; 437 | F7A902651311D9390062CEF8 /* Symbiosis.mm */ = { 438 | uiCtxt = { 439 | sepNavIntBoundsRect = "{{0, 0}, {1152, 69537}}"; 440 | sepNavSelRange = "{108, 0}"; 441 | sepNavVisRange = "{0, 2211}"; 442 | sepNavWindowFrame = "{{19, 0}, {1099, 778}}"; 443 | }; 444 | }; 445 | F7D3E4EE091BE7B900501C1B /* AUVal */ = { 446 | isa = PBXExecutable; 447 | activeArgIndices = ( 448 | YES, 449 | ); 450 | argumentStrings = ( 451 | "-v aufx ???? ????", 452 | ); 453 | autoAttachOnCrash = 1; 454 | breakpointsEnabled = 1; 455 | configStateDict = { 456 | "PBXLSLaunchAction-0" = { 457 | PBXLSLaunchAction = 0; 458 | PBXLSLaunchStartAction = 1; 459 | PBXLSLaunchStdioStyle = 2; 460 | PBXLSLaunchStyle = 0; 461 | class = PBXLSRunLaunchConfig; 462 | commandLineArgs = ( 463 | ); 464 | displayName = "Executable Runner"; 465 | environment = { 466 | }; 467 | identifier = com.apple.Xcode.launch.runConfig; 468 | remoteHostInfo = ""; 469 | startActionInfo = ""; 470 | }; 471 | }; 472 | customDataFormattersEnabled = 1; 473 | dataTipCustomDataFormattersEnabled = 1; 474 | dataTipShowTypeColumn = 1; 475 | dataTipSortType = 0; 476 | debuggerPlugin = GDBDebugging; 477 | disassemblyDisplayState = 0; 478 | dylibVariantSuffix = ""; 479 | enableDebugStr = 1; 480 | environmentEntries = ( 481 | ); 482 | executableSystemSymbolLevel = 0; 483 | executableUserSymbolLevel = 0; 484 | launchableReference = F7D3E4EF091BE7B900501C1B /* auval */; 485 | libgmallocEnabled = 0; 486 | name = AUVal; 487 | savedGlobals = { 488 | }; 489 | showTypeColumn = 0; 490 | sourceDirectories = ( 491 | ); 492 | variableFormatDictionary = { 493 | }; 494 | }; 495 | F7D3E4EF091BE7B900501C1B /* auval */ = { 496 | isa = PBXFileReference; 497 | explicitFileType = "compiled.mach-o.executable"; 498 | name = auval; 499 | path = /usr/bin/auval; 500 | sourceTree = ""; 501 | }; 502 | F7D698380909427700040FB7 /* Source Control */ = { 503 | isa = PBXSourceControlManager; 504 | fallbackIsa = XCSourceControlManager; 505 | isSCMEnabled = 1; 506 | scmConfiguration = { 507 | SubversionToolPath = /usr/local/bin/svn; 508 | repositoryName = ""; 509 | repositoryNamesForRoots = { 510 | "" = svn; 511 | }; 512 | }; 513 | scmType = scm.subversion; 514 | }; 515 | F7D698390909427700040FB7 /* Code sense */ = { 516 | isa = PBXCodeSenseManager; 517 | indexTemplatePath = ""; 518 | }; 519 | F7D69A5F09096C9F00040FB7 /* Symbiosis.r */ = { 520 | uiCtxt = { 521 | sepNavIntBoundsRect = "{{0, 0}, {1034, 1950}}"; 522 | sepNavSelRange = "{3664, 0}"; 523 | sepNavVisRange = "{1835, 1346}"; 524 | sepNavVisRect = "{{0, 0}, {1046, 645}}"; 525 | sepNavWindowFrame = "{{19, 0}, {1230, 778}}"; 526 | }; 527 | }; 528 | F7F673291725473E00C8E0F8 /* PBXTextBookmark */ = { 529 | isa = PBXTextBookmark; 530 | fRef = F747D28016E0DF35004C779E /* BuildDocs.command */; 531 | name = "BuildDocs.command: 16"; 532 | rLen = 0; 533 | rLoc = 343; 534 | rType = 0; 535 | vrLen = 429; 536 | vrLoc = 0; 537 | }; 538 | F7F6732F1725481200C8E0F8 /* PBXTextBookmark */ = { 539 | isa = PBXTextBookmark; 540 | fRef = F747D28016E0DF35004C779E /* BuildDocs.command */; 541 | name = "BuildDocs.command: 16"; 542 | rLen = 0; 543 | rLoc = 343; 544 | rType = 0; 545 | vrLen = 429; 546 | vrLoc = 0; 547 | }; 548 | F7F673301725481200C8E0F8 /* PBXBookmark */ = { 549 | isa = PBXBookmark; 550 | fRef = F7A902651311D9390062CEF8 /* Symbiosis.mm */; 551 | }; 552 | F7F673311725481200C8E0F8 /* PBXTextBookmark */ = { 553 | isa = PBXTextBookmark; 554 | fRef = F7A902651311D9390062CEF8 /* Symbiosis.mm */; 555 | name = "Symbiosis.mm: 8"; 556 | rLen = 0; 557 | rLoc = 108; 558 | rType = 0; 559 | vrLen = 2211; 560 | vrLoc = 0; 561 | }; 562 | F7FA8F2E10EC1E5300FA9980 /* CompileSymbiosisRsrc.command */ = { 563 | uiCtxt = { 564 | sepNavIntBoundsRect = "{{0, 0}, {919, 645}}"; 565 | sepNavSelRange = "{0, 0}"; 566 | sepNavVisRange = "{0, 120}"; 567 | sepNavVisRect = "{{0, 0}, {1191, 649}}"; 568 | sepNavWindowFrame = "{{29, -271}, {1230, 778}}"; 569 | }; 570 | }; 571 | } 572 | -------------------------------------------------------------------------------- /examples/Sinoplex/Sinoplex.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 42; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; }; 11 | F74920FD0C87B0390057A327 /* audioeffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F74920C30C87B0380057A327 /* audioeffect.cpp */; }; 12 | F74920FE0C87B0390057A327 /* audioeffectx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F74920C50C87B0380057A327 /* audioeffectx.cpp */; }; 13 | F74921A20C87BC160057A327 /* Symbiosis.mm in Sources */ = {isa = PBXBuildFile; fileRef = F74921A10C87BC160057A327 /* Symbiosis.mm */; }; 14 | F74921C70C87BC270057A327 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F74921C50C87BC270057A327 /* AudioUnit.framework */; }; 15 | F74921C80C87BC270057A327 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F74921C60C87BC270057A327 /* AudioToolbox.framework */; }; 16 | F74922890C87BECF0057A327 /* Sinoplex.r in Rez */ = {isa = PBXBuildFile; fileRef = F74921790C87BB340057A327 /* Sinoplex.r */; }; 17 | F74922C80C87C05F0057A327 /* 3Molo.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922B80C87C03B0057A327 /* 3Molo.aupreset */; }; 18 | F74922C90C87C05F0057A327 /* Add Chirps And Serve.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922B90C87C03B0057A327 /* Add Chirps And Serve.aupreset */; }; 19 | F74922CA0C87C05F0057A327 /* AM dot klimax.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922BA0C87C03B0057A327 /* AM dot klimax.aupreset */; }; 20 | F74922CB0C87C05F0057A327 /* Bleep Me.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922BB0C87C03B0057A327 /* Bleep Me.aupreset */; }; 21 | F74922CC0C87C05F0057A327 /* Doing Doing Doing.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922BC0C87C03B0057A327 /* Doing Doing Doing.aupreset */; }; 22 | F74922CD0C87C05F0057A327 /* Eat Ma Hi Fi.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922BD0C87C03B0057A327 /* Eat Ma Hi Fi.aupreset */; }; 23 | F74922CE0C87C05F0057A327 /* Hi Freek.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922BE0C87C03B0057A327 /* Hi Freek.aupreset */; }; 24 | F74922CF0C87C05F0057A327 /* Play Duck.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922BF0C87C03B0057A327 /* Play Duck.aupreset */; }; 25 | F74922D00C87C05F0057A327 /* Rice In Sun.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922C00C87C03B0057A327 /* Rice In Sun.aupreset */; }; 26 | F74922D10C87C05F0057A327 /* Stop Whining.aupreset in Resources */ = {isa = PBXBuildFile; fileRef = F74922C10C87C03B0057A327 /* Stop Whining.aupreset */; }; 27 | F74922D20C87C05F0057A327 /* SYFactoryPresets.txt in Resources */ = {isa = PBXBuildFile; fileRef = F74922C20C87C03B0057A327 /* SYFactoryPresets.txt */; }; 28 | F74922D30C87C05F0057A327 /* SYParameters.txt in Resources */ = {isa = PBXBuildFile; fileRef = F74922C30C87C03B0057A327 /* SYParameters.txt */; }; 29 | F7A920940903D63C009996D9 /* Sinoplex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7A920930903D63C009996D9 /* Sinoplex.cpp */; }; 30 | F7A9FF96131153140062CEF8 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7A9FF95131153140062CEF8 /* Cocoa.framework */; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 35 | 32BAE0B30371A71500C91783 /* Sinoplex_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sinoplex_Prefix.pch; sourceTree = ""; }; 36 | 8D01CCD20486CAD60068D4B7 /* Sinoplex.vst */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Sinoplex.vst; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | F74920C30C87B0380057A327 /* audioeffect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audioeffect.cpp; path = public.sdk/source/vst2.x/audioeffect.cpp; sourceTree = ""; }; 38 | F74920C40C87B0380057A327 /* audioeffect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = audioeffect.h; path = public.sdk/source/vst2.x/audioeffect.h; sourceTree = ""; }; 39 | F74920C50C87B0380057A327 /* audioeffectx.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audioeffectx.cpp; path = public.sdk/source/vst2.x/audioeffectx.cpp; sourceTree = ""; }; 40 | F74920C60C87B0380057A327 /* audioeffectx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = audioeffectx.h; path = public.sdk/source/vst2.x/audioeffectx.h; sourceTree = ""; }; 41 | F74921790C87BB340057A327 /* Sinoplex.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = Sinoplex.r; sourceTree = ""; }; 42 | F74921990C87BBC80057A327 /* Sinoplex.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Sinoplex.plist; sourceTree = ""; }; 43 | F74921A10C87BC160057A327 /* Symbiosis.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = Symbiosis.mm; path = ../../Symbiosis.mm; sourceTree = SOURCE_ROOT; }; 44 | F74921C50C87BC270057A327 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; 45 | F74921C60C87BC270057A327 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; 46 | F74922B80C87C03B0057A327 /* 3Molo.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = 3Molo.aupreset; sourceTree = ""; }; 47 | F74922B90C87C03B0057A327 /* Add Chirps And Serve.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Add Chirps And Serve.aupreset"; sourceTree = ""; }; 48 | F74922BA0C87C03B0057A327 /* AM dot klimax.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "AM dot klimax.aupreset"; sourceTree = ""; }; 49 | F74922BB0C87C03B0057A327 /* Bleep Me.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Bleep Me.aupreset"; sourceTree = ""; }; 50 | F74922BC0C87C03B0057A327 /* Doing Doing Doing.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Doing Doing Doing.aupreset"; sourceTree = ""; }; 51 | F74922BD0C87C03B0057A327 /* Eat Ma Hi Fi.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Eat Ma Hi Fi.aupreset"; sourceTree = ""; }; 52 | F74922BE0C87C03B0057A327 /* Hi Freek.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Hi Freek.aupreset"; sourceTree = ""; }; 53 | F74922BF0C87C03B0057A327 /* Play Duck.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Play Duck.aupreset"; sourceTree = ""; }; 54 | F74922C00C87C03B0057A327 /* Rice In Sun.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Rice In Sun.aupreset"; sourceTree = ""; }; 55 | F74922C10C87C03B0057A327 /* Stop Whining.aupreset */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Stop Whining.aupreset"; sourceTree = ""; }; 56 | F74922C20C87C03B0057A327 /* SYFactoryPresets.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SYFactoryPresets.txt; sourceTree = ""; }; 57 | F74922C30C87C03B0057A327 /* SYParameters.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SYParameters.txt; sourceTree = ""; }; 58 | F7A920930903D63C009996D9 /* Sinoplex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sinoplex.cpp; sourceTree = ""; }; 59 | F7A9FF95131153140062CEF8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 8D01CCCD0486CAD60068D4B7 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */, 68 | F74921C70C87BC270057A327 /* AudioUnit.framework in Frameworks */, 69 | F74921C80C87BC270057A327 /* AudioToolbox.framework in Frameworks */, 70 | F7A9FF96131153140062CEF8 /* Cocoa.framework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 089C166AFE841209C02AAC07 /* Sinoplex */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | F74921C50C87BC270057A327 /* AudioUnit.framework */, 81 | F74921C60C87BC270057A327 /* AudioToolbox.framework */, 82 | 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */, 83 | F7A9FF95131153140062CEF8 /* Cocoa.framework */, 84 | F74922B70C87C03B0057A327 /* SYResources */, 85 | 19C28FB4FE9D528D11CA2CBB /* Products */, 86 | F7A920930903D63C009996D9 /* Sinoplex.cpp */, 87 | F74921990C87BBC80057A327 /* Sinoplex.plist */, 88 | F74921790C87BB340057A327 /* Sinoplex.r */, 89 | 32BAE0B30371A71500C91783 /* Sinoplex_Prefix.pch */, 90 | F74921A10C87BC160057A327 /* Symbiosis.mm */, 91 | F749207C0C87B0370057A327 /* VST2400 */, 92 | ); 93 | name = Sinoplex; 94 | sourceTree = ""; 95 | }; 96 | 19C28FB4FE9D528D11CA2CBB /* Products */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 8D01CCD20486CAD60068D4B7 /* Sinoplex.vst */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | F749207C0C87B0370057A327 /* VST2400 */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | F74920C30C87B0380057A327 /* audioeffect.cpp */, 108 | F74920C40C87B0380057A327 /* audioeffect.h */, 109 | F74920C50C87B0380057A327 /* audioeffectx.cpp */, 110 | F74920C60C87B0380057A327 /* audioeffectx.h */, 111 | ); 112 | name = VST2400; 113 | path = ../../VST2400; 114 | sourceTree = ""; 115 | }; 116 | F74922B70C87C03B0057A327 /* SYResources */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | F74922B80C87C03B0057A327 /* 3Molo.aupreset */, 120 | F74922B90C87C03B0057A327 /* Add Chirps And Serve.aupreset */, 121 | F74922BA0C87C03B0057A327 /* AM dot klimax.aupreset */, 122 | F74922BB0C87C03B0057A327 /* Bleep Me.aupreset */, 123 | F74922BC0C87C03B0057A327 /* Doing Doing Doing.aupreset */, 124 | F74922BD0C87C03B0057A327 /* Eat Ma Hi Fi.aupreset */, 125 | F74922BE0C87C03B0057A327 /* Hi Freek.aupreset */, 126 | F74922BF0C87C03B0057A327 /* Play Duck.aupreset */, 127 | F74922C00C87C03B0057A327 /* Rice In Sun.aupreset */, 128 | F74922C10C87C03B0057A327 /* Stop Whining.aupreset */, 129 | F74922C20C87C03B0057A327 /* SYFactoryPresets.txt */, 130 | F74922C30C87C03B0057A327 /* SYParameters.txt */, 131 | ); 132 | path = SYResources; 133 | sourceTree = ""; 134 | }; 135 | /* End PBXGroup section */ 136 | 137 | /* Begin PBXNativeTarget section */ 138 | 8D01CCC60486CAD60068D4B7 /* Sinoplex */ = { 139 | isa = PBXNativeTarget; 140 | buildConfigurationList = F7A9205C0903D3A3009996D9 /* Build configuration list for PBXNativeTarget "Sinoplex" */; 141 | buildPhases = ( 142 | F7FDD5F4140DA01400F4533F /* ShellScript */, 143 | 8D01CCCB0486CAD60068D4B7 /* Sources */, 144 | 8D01CCCD0486CAD60068D4B7 /* Frameworks */, 145 | F74922720C87BEAA0057A327 /* Rez */, 146 | F74922C40C87C0500057A327 /* Resources */, 147 | F74922580C87BD8B0057A327 /* ShellScript */, 148 | ); 149 | buildRules = ( 150 | ); 151 | dependencies = ( 152 | ); 153 | name = Sinoplex; 154 | productInstallPath = "$(HOME)/Library/Bundles"; 155 | productName = Sinoplex; 156 | productReference = 8D01CCD20486CAD60068D4B7 /* Sinoplex.vst */; 157 | productType = "com.apple.product-type.bundle"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | 089C1669FE841209C02AAC07 /* Project object */ = { 163 | isa = PBXProject; 164 | buildConfigurationList = F7A920600903D3A3009996D9 /* Build configuration list for PBXProject "Sinoplex" */; 165 | compatibilityVersion = "Xcode 2.4"; 166 | developmentRegion = English; 167 | hasScannedForEncodings = 1; 168 | knownRegions = ( 169 | English, 170 | Japanese, 171 | French, 172 | German, 173 | ); 174 | mainGroup = 089C166AFE841209C02AAC07 /* Sinoplex */; 175 | projectDirPath = ""; 176 | projectRoot = ""; 177 | targets = ( 178 | 8D01CCC60486CAD60068D4B7 /* Sinoplex */, 179 | ); 180 | }; 181 | /* End PBXProject section */ 182 | 183 | /* Begin PBXResourcesBuildPhase section */ 184 | F74922C40C87C0500057A327 /* Resources */ = { 185 | isa = PBXResourcesBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | F74922C80C87C05F0057A327 /* 3Molo.aupreset in Resources */, 189 | F74922C90C87C05F0057A327 /* Add Chirps And Serve.aupreset in Resources */, 190 | F74922CA0C87C05F0057A327 /* AM dot klimax.aupreset in Resources */, 191 | F74922CB0C87C05F0057A327 /* Bleep Me.aupreset in Resources */, 192 | F74922CC0C87C05F0057A327 /* Doing Doing Doing.aupreset in Resources */, 193 | F74922CD0C87C05F0057A327 /* Eat Ma Hi Fi.aupreset in Resources */, 194 | F74922CE0C87C05F0057A327 /* Hi Freek.aupreset in Resources */, 195 | F74922CF0C87C05F0057A327 /* Play Duck.aupreset in Resources */, 196 | F74922D00C87C05F0057A327 /* Rice In Sun.aupreset in Resources */, 197 | F74922D10C87C05F0057A327 /* Stop Whining.aupreset in Resources */, 198 | F74922D20C87C05F0057A327 /* SYFactoryPresets.txt in Resources */, 199 | F74922D30C87C05F0057A327 /* SYParameters.txt in Resources */, 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | }; 203 | /* End PBXResourcesBuildPhase section */ 204 | 205 | /* Begin PBXRezBuildPhase section */ 206 | F74922720C87BEAA0057A327 /* Rez */ = { 207 | isa = PBXRezBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | F74922890C87BECF0057A327 /* Sinoplex.r in Rez */, 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | }; 214 | /* End PBXRezBuildPhase section */ 215 | 216 | /* Begin PBXShellScriptBuildPhase section */ 217 | F74922580C87BD8B0057A327 /* ShellScript */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 12; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | outputPaths = ( 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | shellPath = /bin/sh; 228 | shellScript = "set -e\ncd $TARGET_BUILD_DIR/../Components\nrm -f -R $PRODUCT_NAME.component\ncp -R $TARGET_BUILD_DIR/$WRAPPER_NAME $PRODUCT_NAME.component\n"; 229 | }; 230 | F7FDD5F4140DA01400F4533F /* ShellScript */ = { 231 | isa = PBXShellScriptBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | ); 235 | inputPaths = ( 236 | ); 237 | outputPaths = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | shellPath = /bin/sh; 241 | shellScript = ""; 242 | }; 243 | /* End PBXShellScriptBuildPhase section */ 244 | 245 | /* Begin PBXSourcesBuildPhase section */ 246 | 8D01CCCB0486CAD60068D4B7 /* Sources */ = { 247 | isa = PBXSourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | F7A920940903D63C009996D9 /* Sinoplex.cpp in Sources */, 251 | F74920FD0C87B0390057A327 /* audioeffect.cpp in Sources */, 252 | F74920FE0C87B0390057A327 /* audioeffectx.cpp in Sources */, 253 | F74921A20C87BC160057A327 /* Symbiosis.mm in Sources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | /* End PBXSourcesBuildPhase section */ 258 | 259 | /* Begin XCBuildConfiguration section */ 260 | F7A9205D0903D3A3009996D9 /* Development */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | DEPLOYMENT_LOCATION = YES; 264 | DSTROOT = /; 265 | INSTALL_PATH = "/Library/Audio/Plug-Ins/VST/"; 266 | }; 267 | name = Development; 268 | }; 269 | F7A9205E0903D3A3009996D9 /* Deployment */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | DEPLOYMENT_LOCATION = YES; 273 | DSTROOT = /; 274 | INSTALL_PATH = "/Library/Audio/Plug-Ins/VST/"; 275 | }; 276 | name = Deployment; 277 | }; 278 | F7A920610903D3A3009996D9 /* Development */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; 282 | ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; 283 | COPY_PHASE_STRIP = NO; 284 | GCC_DYNAMIC_NO_PIC = NO; 285 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 286 | GCC_OPTIMIZATION_LEVEL = 0; 287 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 288 | GCC_PREFIX_HEADER = Sinoplex_Prefix.pch; 289 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 290 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 291 | GENERATE_PKGINFO_FILE = YES; 292 | HEADER_SEARCH_PATHS = ../../VST2400; 293 | INFOPLIST_FILE = Sinoplex.plist; 294 | OTHER_REZFLAGS = "-d ppc_$(ppc) -d i386_$(i386) -d x86_64_$(x86_64)"; 295 | PRODUCT_NAME = Sinoplex; 296 | WRAPPER_EXTENSION = vst; 297 | ZERO_LINK = YES; 298 | }; 299 | name = Development; 300 | }; 301 | F7A920620903D3A3009996D9 /* Deployment */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; 305 | ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; 306 | COPY_PHASE_STRIP = YES; 307 | EXPORTED_SYMBOLS_FILE = SinoplexExports; 308 | GCC_ENABLE_FIX_AND_CONTINUE = NO; 309 | GCC_FAST_MATH = YES; 310 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 311 | GCC_OPTIMIZATION_LEVEL = 3; 312 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 313 | GCC_PREFIX_HEADER = Sinoplex_Prefix.pch; 314 | GCC_PREPROCESSOR_DEFINITIONS = NDEBUG; 315 | GCC_SYMBOLS_PRIVATE_EXTERN = YES; 316 | GCC_UNROLL_LOOPS = YES; 317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 318 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 319 | GENERATE_PKGINFO_FILE = YES; 320 | HEADER_SEARCH_PATHS = ../../VST2400; 321 | INFOPLIST_FILE = Sinoplex.plist; 322 | OTHER_REZFLAGS = "-d ppc_$(ppc) -d i386_$(i386) -d x86_64_$(x86_64)"; 323 | PRODUCT_NAME = Sinoplex; 324 | STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; 325 | WRAPPER_EXTENSION = vst; 326 | ZERO_LINK = NO; 327 | }; 328 | name = Deployment; 329 | }; 330 | /* End XCBuildConfiguration section */ 331 | 332 | /* Begin XCConfigurationList section */ 333 | F7A9205C0903D3A3009996D9 /* Build configuration list for PBXNativeTarget "Sinoplex" */ = { 334 | isa = XCConfigurationList; 335 | buildConfigurations = ( 336 | F7A9205D0903D3A3009996D9 /* Development */, 337 | F7A9205E0903D3A3009996D9 /* Deployment */, 338 | ); 339 | defaultConfigurationIsVisible = 0; 340 | defaultConfigurationName = Development; 341 | }; 342 | F7A920600903D3A3009996D9 /* Build configuration list for PBXProject "Sinoplex" */ = { 343 | isa = XCConfigurationList; 344 | buildConfigurations = ( 345 | F7A920610903D3A3009996D9 /* Development */, 346 | F7A920620903D3A3009996D9 /* Deployment */, 347 | ); 348 | defaultConfigurationIsVisible = 0; 349 | defaultConfigurationName = Development; 350 | }; 351 | /* End XCConfigurationList section */ 352 | }; 353 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 354 | } 355 | -------------------------------------------------------------------------------- /documentation/PikaCmdSource/unittests.pika: -------------------------------------------------------------------------------- 1 | /* 2 | unittests.pika v0.941 3 | 4 | PikaScript is released under the "New Simplified BSD License". http://www.opensource.org/licenses/bsd-license.php 5 | 6 | Copyright (c) 2009-2013, NuEdge Development / Magnus Lidstroem 7 | All rights reserved. 8 | */ 9 | 10 | include('stdlib.pika'); 11 | include('help.pika'); 12 | 13 | defaults(@MORE_TESTS, false); 14 | report = coalesce(@report, print); 15 | test = function { 16 | ////////////////////////// 17 | 18 | report("TESTING PARSER"); 19 | 20 | { a = /* inline comment here /* // */ 1 ; 21 | b= 2;c=3;//end of line comment here 22 | ;{d=4} ; ;; ;truelse=true;falsecond=truelse 23 | }; 24 | 25 | ////////////////////////// 26 | 27 | report("TESTING ASSERT"); 28 | 29 | assert(a == 1); 30 | assert(> b == 2); 31 | assert(b == 2); 32 | assert(>c == 3); 33 | assert(d == 4); 34 | if (try(>assert(a == 0)) == void) throw("Broken assert"); 35 | if (try(>assert(> b == 1)) == void) throw("Broken assert"); 36 | 37 | ////////////////////////// 38 | 39 | report("TESTING VOIDS"); 40 | 41 | assert(> classify(void) === "void" ); 42 | assert(> { } === void ); 43 | assert(> { 1; { } } !== void ); /* { } will not affect the last result (1) here. */ 44 | assert(> { 1; { } } == 1 ); /* { } will not affect the last result (1) here. */ 45 | assert(> { 1; { 2 } } == 2 ); 46 | assert(> void === void ); 47 | 48 | ////////////////////////// 49 | 50 | report("TESTING BOOLEANS"); 51 | assert(> !false ); 52 | b = false; 53 | assert(> classify(b) === "boolean" ); 54 | assert(> !b ); 55 | assert(> b || true ); 56 | c = true; 57 | assert(> b || c ); 58 | assert(> !(b && c) ); 59 | assert(> b || false || c ); 60 | assert(> c && true && !b ); 61 | d = false; 62 | assert(> !(b && (d = true)) ); 63 | assert(> !d ); 64 | assert(> c || (d = true) ); 65 | assert(> !d ); 66 | 67 | ////////////////////////// 68 | 69 | report("TESTING NUMBERS"); 70 | 71 | n = 0; 72 | assert(> classify(n) === "number" ); 73 | assert(> n == 0 ); 74 | assert(> n + 1 == 1 ); 75 | assert(> ++n == 1 ); 76 | assert(> n++ == 1 ); 77 | assert(> n == 2 ); 78 | assert(> n-- == 2 ); 79 | assert(> n == 1 ); 80 | assert(> -n == -1 ); 81 | assert(> --n == 0 ); 82 | assert(> n == 0 ); 83 | assert(> (n += 10) == 10 ); 84 | assert(> (n -= 10) == 0 ); 85 | assert(> n == 0.0 ); 86 | assert(> (n += 1234.5678) == "1234.5678" ); 87 | assert(> (n - 1001.1001) == "233.4677" ); 88 | assert(> n * 2 == "2469.1356" ); 89 | assert(> (n *= 2) == "2469.1356" ); 90 | assert(> n / 2 == "1234.5678" ); 91 | assert(> (n /= 2) == "1234.5678" ); 92 | assert(> (n %= 358) == "160.5678" ); 93 | assert(> (n % 123.123) == "37.4448" ); 94 | assert(> 0xFF == 255 ); 95 | /* FIX : must decide how this should work 96 | assert(> 0xFFFFFFFFFFFFFFFF == 0xFFFFFFFF ); 97 | if (0x100000000 == 0xFFFFFFFF) { 98 | assert(> 0x80000000 == (-0x80000000 & -1) ); 99 | } else { 100 | assert(> 0x8000000000000000 == -0x8000000000000000 ); 101 | }; 102 | */ 103 | compose(@tests, 0.0, "0", 0.000000000000000000000001, "1e-24", 1.000000000000000000000001, "1" 104 | , 1.0e-400, "0", 1.0e-250, "1e-250", 1.0e+250, "1e+250", 0.09999999999999995, "0.1", 999999999999999, "1e+15" 105 | , 0.99999999999999, "0.99999999999999", 9.99999999999995, "10", 0.9999999999999999999999999999999, "1" 106 | , 1.2345678901234, "1.2345678901234", 1.23456789012344, "1.2345678901234", 1.23456789012346, "1.2345678901235" 107 | , 1.2345678901234e3, "1234.5678901234", 1.2345678901234e-3, "0.0012345678901234" 108 | , 1.23456789012346e10, "12345678901.235", 1.234567890123444e100, "1.234567890123e+100" 109 | , 1.234567890123464e-10, "1.2345678901235e-10", 1.234567890123444e-100, "1.234567890123e-100"); 110 | for (i = 0; i < tests.n; i += 2) { 111 | assert(> tests[i + 0] == tests[i + 1] , tests[i + 0] # ' == ' # tests[i + 1]); 112 | assert(> -tests[i + 0] == "-" # tests[i + 1] ); 113 | assert(> !(tests[i + 0] < tests[i + 0]) ); 114 | assert(> +tests[i + 0] == tests[i + 0] ); 115 | assert(> +tests[i + 1] == tests[i + 1] ); 116 | }; 117 | assert(> precision(1, 5) === "1" ); 118 | assert(> precision(-1, 5) === "-1" ); 119 | assert(> precision(0.009, 1) === "0.009" ); 120 | assert(> precision(0.0099, 1) === "0.01" ); 121 | assert(> precision(0.1, 1) === "0.1" ); 122 | assert(> precision(1.1, 1) === "1" ); 123 | assert(> precision(10.1, 1) === "1e+1" ); 124 | assert(> precision(12345, 5) === "12345" ); 125 | assert(> precision(123456, 5) === "1.2346e+5" ); 126 | assert(> precision(0.0012345, 5) === "0.0012345" ); 127 | assert(> precision(0.00123456, 5) === "0.0012346" ); 128 | assert(> precision(0.000000123456, 5) === "1.2346e-7" ); 129 | 130 | assert(> +'0' == 0 ); 131 | assert(> +'0.0' == 0 ); 132 | assert(> +'0e0' == 0 ); 133 | assert(> +'0.0e0' == 0 ); 134 | assert(> +'1.1e+1' == 11 ); 135 | assert(> +'-1.1e-1' == -0.11 ); 136 | 137 | assert(> try(> +'.') !== void ); 138 | assert(> try(> +'-') !== void ); 139 | assert(> try(> +'-.') !== void ); 140 | assert(> try(> +'-X') !== void ); 141 | assert(> try(> +'0.') !== void ); 142 | assert(> try(> +'.0') !== void ); 143 | assert(> try(> +'-.0') !== void ); 144 | assert(> try(> +'00') !== void ); 145 | assert(> try(> +'01') !== void ); 146 | assert(> try(> +'1.') !== void ); 147 | assert(> try(> +'.1') !== void ); 148 | assert(> try(> +'.X') !== void ); 149 | assert(> try(> +'1.X') !== void ); 150 | assert(> try(> +'-1.X') !== void ); 151 | assert(> try(> +'e') !== void ); 152 | assert(> try(> +'-e') !== void ); 153 | assert(> try(> +'e0') !== void ); 154 | assert(> try(> +'-e0') !== void ); 155 | assert(> try(> +'e+0') !== void ); 156 | assert(> try(> +'e-0') !== void ); 157 | assert(> try(> +'.e+0') !== void ); 158 | assert(> try(> +'1.e+0') !== void ); 159 | assert(> try(> +'.1e+0') !== void ); 160 | assert(> try(> +'1.1e') !== void ); 161 | assert(> try(> +'1.1e+') !== void ); 162 | assert(> try(> +'1.1e-') !== void ); 163 | assert(> try(> +'1.1eX') !== void ); 164 | 165 | ////////////////////////// 166 | 167 | report("TESTING STRINGS"); 168 | 169 | s = "abcd"; 170 | assert(> classify(s) === 'string' ); 171 | s = ''; 172 | assert(> classify(s) === 'void' ); 173 | assert(> s === '' ); assert(> (s #= "abcd") === "abcd" ); assert(> ( s = s # "ghij" ) === "abcdghij" ); 174 | assert(> s{:2} === "ab" ); assert(> s{2:2} === "cd" ); assert(> s{4:} === "ghij" ); 175 | s = '"'; 176 | assert(>s === '"'); assert(> s === "\"" ); 177 | s = 'xxx"xxx'; 178 | t = "xxx\"xxx"; 179 | assert(> s === t ); 180 | s = 'xxx"xxx' # char(10); 181 | t = "xxx\"xxx\n"; 182 | assert(> s === t ); 183 | s = "\10\11\12\13\14\15\x10\x11\x12\x13\x14\u0015"; 184 | for (i = 0; i < length(s); ++i) assert(> ordinal(s{i}) == 10 + i ); 185 | 186 | assert(> '0' == '-0'); assert(> '0' !== '-0'); 187 | assert(> '0' == '0.0'); assert(> '0' !== '0.0'); 188 | assert(> '1' == '1e0'); assert(> '1' !== '1e0'); 189 | assert(> '10' == '1e1'); assert(> '10' !== '1e1'); 190 | assert(> '0.1' == '1e-1'); assert(> '0.1' !== '1e-1'); 191 | assert(> '-1' == '-1e0'); assert(> '-1' !== '-1e0'); 192 | assert(> '-10' == '-1e1'); assert(> '-10' !== '-1e1'); 193 | assert(> '-0.1' == '-1e-1'); assert(> '-0.1' !== '-1e-1'); 194 | assert(> '01' != '1'); assert(> '01' !== '1'); 195 | assert(> '01' == '01'); assert(> '01' === '01' ); 196 | assert(> '0' < 'A' ); 197 | assert(> 'A' < 'AA' ); 198 | assert(> 'AA' < 'AB' ); 199 | assert(> 'A' < 'a' ); 200 | assert(> 'a' < 'aa' ); 201 | assert(> 'aa' < 'ab' ); 202 | assert(> '0' < ' ' ); 203 | assert(> '0' < '00' ); 204 | assert(> ' ' < '00' ); 205 | assert(> '0' < '1' ); 206 | assert(> '0.1' < '1' ); 207 | assert(> '1' < '10' ); 208 | assert(> '2' < '10' ); 209 | assert(> '2e1' < '1e10' ); 210 | assert(> '-2' < '0' ); 211 | assert(> '-20' < '10' ); 212 | 213 | ////////////////////////// 214 | 215 | report("TESTING FLOW CONTROL"); 216 | 217 | // FIX : move parse testing up 218 | // Just testing parsing 219 | dummy = function { for(;;) }; 220 | dummy = function { for(;;){} }; 221 | dummy = function { for (;;) { }; }; 222 | dummy = function { for ( ; ; ) ; }; 223 | dummy = function { if (false) { }; }; 224 | dummy = function { if ( false ) { } ; }; 225 | dummy = function { if(false) 1 }; 226 | dummy = function { if (false) 1 ; }; 227 | dummy = function { if ( false ) 1 ; }; 228 | dummy = function { if(false){}else 1 }; 229 | dummy = function { if (false) { } else 1; }; 230 | dummy = function { if ( false ) { } else 1; }; 231 | dummy = function { if(false) 1 else{} }; 232 | dummy = function { if (false) 1 else { }; }; 233 | dummy = function { if ( false ) 1 else { } ; }; 234 | dummy = function { if(false) 1 else 2 }; 235 | dummy = function { if (false) 1 else 2; }; 236 | dummy = function { if ( false ) 1 else 2 ; }; 237 | i = 0; 238 | for ( ; i < 10 ; ) ++ i ; 239 | assert(> i == 10 ); 240 | for ( { j = 0 ; i = 0 ; } ; i < 10 ; ) { ++ i ; j += i ; }; 241 | assert(> i == 10 ); 242 | assert(> j == 55 ); 243 | for ( ; false ; ) ; 244 | for(;false;) ++i; 245 | assert(>i == 10 ); 246 | assert(>(3+{0; if (false) 5}) == 3); 247 | assert(>('a'#(if(false)'b')#(if(true)'c')#if(false)'d'else'e') === 'ace'); 248 | assert(>({3; for(i=0;i<10;++i)'g'}) === 'g'); 249 | assert(>({3; for(i=0;i<10;++i)}) == 3); 250 | assert(>({3; for(i=5;i<-1;++i)'g'}) == 3); 251 | assert(>({3; for(;false;) 7}) == 3); 252 | 253 | ////////////////////////// 254 | 255 | report("TESTING CLOSURES"); 256 | 257 | ::gv = lv = 789; 258 | ::gf = function { lv = 123; assert(> lv == 123); assert(> ^lv == 789); }; 259 | lf = function { lv = 456; assert(> lv == 456); assert(> ^lv == 789); }; 260 | gf(); 261 | lf(); 262 | ::gf = function { 263 | lf = function { lv = 1111; assert(> lv == 1111); assert(> ^lv == 2222); assert(> ^^lv == 789); }; 264 | lv = 2222; 265 | lf(); 266 | assert(> lv == 2222); 267 | }; 268 | gf(); 269 | ::gf = function { 270 | lf = function { [$0] = [$1]; }; 271 | lb = 999; 272 | lf(@la, @lb); assert(> la == 999); 273 | lf(@la, @^lv); assert(> la == 789); 274 | lf(@::gb, @::gv); assert(> gb == 789); 275 | lf($0, $1); 276 | }; 277 | lb = 10101; 278 | gf(@ga, @lb); 279 | assert(> ga == 10101); 280 | ::gf = function { lv = 'yo'; $0($1, @lv) }; 281 | gf(>lv=$0, 'yeah'); 282 | assert(> lv === 'yeah'); 283 | gf(>lv=[$1], 'yeah'); 284 | assert(> lv === 'yo'); 285 | ::gf = function { >print("Not valid no") }; 286 | ::gv = gf(); 287 | assert(> try(> gv()) !== void); 288 | lf = function { x = 1234; lambda => ::gv = x; lambda(); assert(> x == 1234); }; 289 | lf(); 290 | 291 | ////////////////////////// 292 | 293 | report("TESTING OPERATORS"); 294 | 295 | assert(> { a = b = 3; (a == 3 && b == 3 && a == b); }); 296 | assert(> true || false); 297 | assert(> false || true); 298 | assert(> true || true); 299 | assert(> !(false || false)); 300 | assert(> !(true && false)); 301 | assert(> !(false && true)); 302 | assert(> true && true); 303 | assert(> !(false && false)); 304 | assert(> (0x8000 | 0x800 | 0x80 | 0x8) == 0x8888); 305 | assert(> (0x8000 | 0x8800 | 0x880 | 0x88 | 0x8) == 0x8888); 306 | assert(> (0x8000 ^ 0x8800 ^ 0x880 ^ 0x88 ^ 0x8) == 0); 307 | assert(> (0x8000 & 0x800 & 0x80 & 0x8) == 0); 308 | assert(> (0x8000 & 0x8800 & 0x880 & 0x88 & 0x8) == 0); 309 | assert(> (0x8888 & 0x0880) == 0x0880); 310 | assert(> 3 != 2); 311 | assert(> '' != 'x'); 312 | assert(> 3 !== '3.0'); 313 | assert(> 3 == '3.0'); 314 | assert(> 3 === 3); 315 | assert(> 4 > 3); 316 | assert(> !(3 > 3)); 317 | assert(> 4 >= 3); 318 | assert(> 3 >= 3); 319 | assert(> 3 <= 3); 320 | assert(> 2 <= 3); 321 | assert(> !(3 < 3)); 322 | assert(> 2 < 3); 323 | assert(> 'd' > 3); 324 | assert(> !(3 > 3)); 325 | assert(> 'd' >= 'c'); 326 | assert(> 'c' >= 'c'); 327 | assert(> 'c' <= 'c'); 328 | assert(> 'b' <= 'c'); 329 | assert(> !('c' < 'c')); 330 | assert(> 'b' < 'c'); 331 | assert(> 'aaaa' >= 'aaa'); 332 | assert(> 'aaa' >= 'aaa'); 333 | assert(> 'aaa' <= 'aaa'); 334 | assert(> 'aa' <= 'aaa'); 335 | assert(> !('aaa' < 'aaa')); 336 | assert(> 'aa' < 'aaa'); 337 | assert(> 3000 < void); 338 | assert(> 3000 < '!'); 339 | assert(> 3000 < '0300'); 340 | assert(> !(3000 < '300')); 341 | assert(> void # void # 'xy' # 'zzy' # void === 'xyzzy'); 342 | assert(> (1 << 8) == 256); 343 | assert(> (256 >> 8) == 1); 344 | assert(> (0xFFFFFFFF >> 16) == 0xFFFF); 345 | assert(> 101 - 99 == 2); 346 | assert(> 99 - 101 == -2); 347 | assert(> 101 + 99 == 200); 348 | assert(> 99 + 101 == 200); 349 | assert(> 101 + -99 == 2); 350 | assert(> 101 % 99 == 2); 351 | assert(> 101 / 99 * 99 == 101); 352 | assert(> (101 / 99) * 99 == 101); 353 | assert(> 101 * 99 == 9999); 354 | assert(> 101 * 99 / 101 == 99); 355 | assert(> (107 \ 31) * 31 + (107 % 31) == 107); 356 | assert(> (-107 \ 31) * 31 + (-107 % 31) == -107); 357 | assert(> (107 \ -31) * -31 + (107 % -31) == 107); 358 | assert(> (-107 \ -31) * -31 + (-107 % -31) == -107); 359 | assert(> { b = 3; --b } == 2); 360 | assert(> { b = 3; ++b } == 4); 361 | assert(> -(3) == -3); 362 | assert(> +(3) == +3); 363 | assert(> (~1 & 0xFFFFFFFF) == 0xFFFFFFFE); 364 | assert(> (~0xAAAAAAAA & 0xFFFFFFFF) == 0x55555555); 365 | assert(> !false == true); 366 | assert(> !true == false); 367 | assert(> @b == @[void] # 'b'); 368 | assert(> { b = 3; b-- } == 3 && b == 2); 369 | assert(> { b = 3; b++ } == 3 && b == 4); 370 | assert(> 'abcdefgh'{3} == 'd'); 371 | assert(> 'abcdefgh'{3:2} == 'de'); 372 | assert(> 'abcdefgh'{:2} == 'ab'); 373 | assert(> 'abcdefgh'{3:} == 'defgh'); 374 | assert(> 'abcdefgh'{3:-1} == ''); 375 | assert(> 'abcdefgh'{-1:2} == 'a'); 376 | assert(> 'abcdefgh'{3:58} == 'defgh'); 377 | assert(> 'abcdefgh'{-58:2} == ''); 378 | assert(> 'abcdefgh'{-58:193} == 'abcdefgh'); 379 | assert(> { a[3] = 7; a[2+1] == 7 }); 380 | assert(> { a[2+1] = 5; a.3 == 5 }); 381 | 382 | assert(> (0xFF00 | 0x00FF ^ 0x0080 & 0x0080) == (0xFF00 | (0x00FF ^ (0x0080 & 0x0080)))); 383 | assert(> (1 # 8 >> 1 << 3 - 1) == (1 # ((8 >> 1) << (3 - 1)))); 384 | assert(> (5 + 9 % 5 / 2 * 11) == (5 + (((9 % 5) / 2) * 11))); 385 | assert(> (false || false && true) == (false || (false && true))); 386 | assert(> (true && false || true) == ((true && false) || true)); 387 | assert(> (false && true || true) == ((false && true) || true)); 388 | 389 | ////////////////////////// 390 | 391 | report("TESTING STANDARD LIBRARY"); 392 | 393 | assertn = function { for (i = 0; i < $n; ++i) assert($[i]) }; 394 | assertn(> trunc(acos(cos(0.858)),10) == "0.858", > cos(0) == "1", > cos(PI) == "-1", > sin(PI/2) == "1" ); 395 | assertn(> trunc(asin(sin(0.349)),10) == "0.349", > cosh(1.0) == "1.5430806348152", > trunc(atan(tan(0.94)),10) == "0.94" ); 396 | assertn(> ordinal('A') == 65, > char(65) === 'A', > ordinal(char(96)) == 96, > ordinal(char(230)) == 230 ); 397 | assertn(> ceil(0.79) == "1", > ceil(-1.79) == "-1" ); 398 | assertn(> exp(1) == "2.718281828459", > trunc(exp(-1),10) == trunc(1.0/exp(1),10) ); 399 | assertn(> length("") == 0, > length("abcd") == 4 ); 400 | /* FIX : the rest */ 401 | 402 | ::begone = void; 403 | ::hurray[1972] = void; 404 | ::aglobal = void; 405 | ::users['magnus lidstrom'] = void; 406 | compose(@::myArray, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); 407 | compose(@::breakMe, 'first', 'second', 'third', 'fourth', 'fifth', 'sixth'); 408 | compose(@::outputArray, void); 409 | compose(@::sourceArray1, 1, 3, 5, 7); 410 | compose(@::sourceArray2, 'a', 'b', 'c'); 411 | resetQueue(@::dq); 412 | pushBack(@::dq, 'one'); 413 | pushBack(@::dq, 'two'); 414 | compose(@::removeNumberThree, 0, 1, 2, 3, 4, 5, 6); 415 | compose(@::drop1and2, 0, 1, 2, 3, 4, 5, 6); 416 | compose(@::firstArray, 'a', 'b', 'c', 'd'); 417 | clone(@::firstArray, @::secondArray); 418 | ::username = 'magnus'; 419 | ::days = 77; 420 | set(@::skiptests 421 | , 'name = input("What''s your name? ")' 422 | , "throw('Does not compute')" 423 | , "bake('Welcome back {username}. It has been {days} days since your last visit.')" 424 | , 'args(@x, @y)' 425 | , "coalesce(maybeVoid, perhapsThisAintVoid, 'nowIAmDefinitelyNotVoid')" 426 | , "invoke('max', , @values)" 427 | , "invoke('(callback)', $0, @$, 1, 4)" 428 | , "data = load('myfolder/myfile.txt')" 429 | , 'qsort(0, myArray.n, >myArray[$0] - myArray[$1], >swap(@myArray[$0], @myArray[$1]))' 430 | , 'qsort(0, scrambleMe.n, >random(2) - 1, >swap(@scrambleMe[$0], @scrambleMe[$1]))' 431 | , "run('chess.pika')" 432 | , "save('myfolder/myfile.txt', 'No, sir, away! A papaya war is on!')" 433 | , "save('AllGlobals.pika', sourceFor(@::))" 434 | , 'swap(@master, @slave)' 435 | , 'elapsed = time() - lastcheck' 436 | , 'vargs(@required1, @required2, , @optional1, @optional2)' 437 | , "htmlCode = run('makeHTML.pika', 'Make This Text HTML')" 438 | ); 439 | testHelpExamples = function { 440 | args(@category); 441 | foreach(@::help._categories[category], >{ 442 | $page = $1; 443 | if (exists(@::help[$page].examples)) { 444 | tokenize(::help[$page].examples, >{ 445 | expr = $0; 446 | if (!exists(@::skiptests[expr])) { 447 | //print('Testing: ' # expr); 448 | x = try(>v = evaluate(expr, @::)); 449 | if (x !== void) report("FAILED : " # escape(expr)) 450 | else if (classify(v) === 'boolean') assert(v, expr); 451 | } 452 | }); 453 | }; 454 | }); 455 | }; 456 | wasPrint = ::print; 457 | //::print = function { }; 458 | testHelpExamples('#arrays'); 459 | testHelpExamples('#containers'); 460 | testHelpExamples('#queues'); 461 | testHelpExamples('#math'); 462 | testHelpExamples('#strings'); 463 | testHelpExamples('#utils'); 464 | //::print = wasPrint; 465 | assert(> equal(sort(compose(@a, 1.1, 10.3, -5, 1.5, 17, 0x10, 'xyzzy', 'abc', 'def', 'abc')) 466 | , compose(@b, -5, 1.1, 1.5, 10.3, 0x10, 17, 'abc', 'abc', 'def', 'xyzzy'))); 467 | if (MORE_TESTS) { 468 | a.n = 0; 469 | for (i = 0; i < 100000; ++i) a[i] = random; 470 | sort(@a); 471 | for (i = 1; i < 100000; ++i) assert(> a[i] >= a[i - 1]); 472 | rsort(@a); 473 | for (i = 1; i < 100000; ++i) assert(> a[i] <= a[i - 1]); 474 | }; 475 | 476 | ////////////////////////// 477 | 478 | report("TESTING WILDMATCH"); 479 | 480 | assert(>wildmatch('x', 'x')); 481 | assert(>wildmatch('X', 'X')); 482 | assert(>!wildmatch('x', 'X')); 483 | assert(>!wildmatch('X', 'x')); 484 | assert(>!wildmatch('xx', 'x')); 485 | assert(>!wildmatch('', 'x')); 486 | assert(>wildmatch('magnus', 'magnus')); 487 | assert(>!wildmatch('magnus', 'mognus')); 488 | assert(>!wildmatch('mognus', 'magnus')); 489 | assert(>wildmatch('magnus', 'm?gnus')); 490 | assert(>wildmatch('magnus', 'm??nus')); 491 | assert(>wildmatch('magnus', 'm*nus')); 492 | assert(>wildmatch('magnus', '*')); 493 | assert(>wildmatch('magnus', '*magnus')); 494 | assert(>wildmatch('magnus', 'magnus*')); 495 | assert(>wildmatch('magnus', '*magnus*')); 496 | assert(>!wildmatch('magnus', '*mognus*')); 497 | assert(>!wildmatch('magnus', 'mAgnus')); 498 | assert(>!wildmatch('Magnus', 'magnus')); 499 | assert(>wildmatch('mAgnus', 'mAgnus')); 500 | assert(>wildmatch('magnus', 'magn[u]s')); 501 | assert(>!wildmatch('magns', 'magn[u]s')); 502 | assert(>wildmatch('[magnus]', '[[]magnus[]]')); 503 | assert(>wildmatch('magnus', 'magn~s')); 504 | assert(>wildmatch('magns', 'magn~s')); 505 | assert(>wildmatch('magnus', 'magn~~s')); 506 | assert(>wildmatch('magns', 'magn~~s')); 507 | assert(>wildmatch('magnus', 'magn?~s')); 508 | assert(>wildmatch('magnuus', 'magn?~s')); 509 | assert(>wildmatch('g', '[magnus]')); 510 | assert(>wildmatch('g', '[magnus')); 511 | assert(>wildmatch('magnus', '[magnus]*')); 512 | assert(>wildmatch('magnus', '[magnus]??????')); 513 | assert(>wildmatch('sungam', '[magnus]??????')); 514 | assert(>!wildmatch('magnus', '[magnu]??????')); 515 | assert(>wildmatch('magnus', '[magnu]?????[]?')); 516 | assert(>wildmatch('magnus', '[magnus]~~~~~~')); 517 | assert(>wildmatch('magnus', '[magnus]~~~~~~~')); 518 | assert(>!wildmatch('magnus', '[magnus]~~~~~')); 519 | assert(>wildmatch('magnus', '[magnus]???~~~')); 520 | assert(>!wildmatch('magnuus', '[magnus]???~~~')); 521 | assert(>wildmatch('mag', '[magnus]???~~~')); 522 | assert(>!wildmatch('ma', '[magnus]???~~~')); 523 | assert(>wildmatch('magnus', '[magnus]???*')); 524 | assert(>wildmatch('mag', '[magnus]???*')); 525 | assert(>!wildmatch('ma', '[magnus]???*')); 526 | assert(>!wildmatch('magnus', '[^s]???????')); 527 | assert(>wildmatch('magnus', '[^s]?????[^magnu]*')); 528 | assert(>wildmatch('abcdefgh', '[a-d]????[c-ehgf]????')); 529 | assert(>wildmatch('abcdefgh', '[a-d]????[c-ehgf]????')); 530 | assert(>wildmatch('---', '[-]???')); 531 | assert(>wildmatch('x-x', '[x-]???')); 532 | assert(>wildmatch('x-x', '[-x]???')); 533 | assert(>wildmatch('xyz', '[]???')); 534 | assert(>wildmatch(']]]', '[]]???')); 535 | assert(>wildmatch('^^^', '[^]???')); 536 | assert(>!wildmatch('xyz', '[^]???')); 537 | assert(>wildmatch('^]^', '[]^]???')); 538 | assert(>!wildmatch('xyz', '[]^]???')); 539 | assert(>!wildmatch('^]^', '[^]]???')); 540 | assert(>wildmatch('^^^', '[^]]???')); 541 | assert(>wildmatch('xxxx', '*xxxx')); 542 | assert(>wildmatch('xxxxx', '*xxxx')); 543 | assert(>wildmatch('xxxxxxxxxxxxxxxxxxxxxx', '*xxxx')); 544 | assert(>wildmatch('xxxx', 'x*?x')); 545 | assert(>wildmatch('xxxx', 'x?*x')); 546 | assert(>!wildmatch('x____yzzy', 'x{[a]*}yzzy')); 547 | assert(>wildmatch('xxxx', '?*{[x]*}x', @a) && a === 'xx'); 548 | assert(>wildmatch('y', '[x]*y')); 549 | assert(>wildmatch('xxyyxx', '*{[y]*}[x]*', @a) && a === 'yy'); 550 | assert(>wildmatch('word1_word2', '{*}_{*}', @w1, @w2) && w1 === 'word1' && w2 === 'word2'); 551 | assert(>wildmatch('word1_word2', '{*}[^word12]{*}', @w1, @w2) && w1 === 'word1' && w2 === 'word2'); 552 | assert(>wildmatch('word1_word2', '{?????}_{?????}', @w1, @w2) && w1 === 'word1' && w2 === 'word2'); 553 | assert(>wildmatch('word1_word2', '{[a-zA-Z0-9]*}[^a-zA-Z0-9]{[a-zA-Z0-9]*}', @w1, @w2) && w1 === 'word1' && w2 === 'word2'); 554 | assert(>wildmatch('word1_word2', '{[a-zA-Z0-9]*}[^a-zA-Z0-9][]~{[a-zA-Z0-9]*}', @w1, @w2) && w1 === 'word1' && w2 === 'word2'); 555 | assert(>wildmatch('word1_word2', '{[a-zA-Z0-9]*}[^a-zA-Z0-9][X]*{[a-zA-Z0-9]*}', @w1, @w2) && w1 === 'word1' && w2 === 'word2'); 556 | assert(>wildmatch('word1_word2', '{[^_]*}[_]?{*}', @w1, @w2) && w1 === 'word1' && w2 === 'word2'); 557 | assert(>wildmatch('xxxx', 'x*{?}x', @a) && a === 'x'); 558 | assert(>wildmatch('xxxx', 'x{?}*x', @a) && a === 'x'); 559 | assert(>wildmatch('xxxx', 'x{??}x', @a) && a === 'xx'); 560 | assert(>wildmatch('xxxx', 'x{*}*{*}x', @a, @b) && a === '' && b === 'xx'); 561 | assert(>wildmatch('xxxx', 'x{[]*}[]*{[]*}x', @a, @b) && a === '' && b === 'xx'); 562 | assert(>wildmatch('xxxx', 'x{[]*}[]*{[]*}x', @a, @b) && a === '' && b === 'xx'); 563 | assert(>wildmatch('xxxx', 'x{[]*}[y]*{[]*}x', @a, @b) && a === '' && b === 'xx'); 564 | assert(>wildmatch('xxxx', 'x{[]*}[]*{[y]*}x', @a, @b) && a === '' && b === ''); 565 | assert(>wildmatch('xxxx', 'x{[y]*}[]*{[]*}x', @a, @b) && a === '' && b === 'xx'); 566 | assert(>wildmatch('xxxx', 'x{[]*}[y]*{[y]*}x', @a, @b) && a === 'xx' && b === ''); 567 | assert(>wildmatch('1234____5678', '*{[0-9]?*}[^0-9]*', @a) && a === '5678'); 568 | assert(>wildmatch('____1234____5678', '*{[0-9]?*}[^0-9]*', @a) && a === '5678'); 569 | assert(>wildmatch('____1234____5678____', '*{[0-9]?*}[^0-9]*', @a) && a === '5678'); 570 | assert(>wildmatch('1234____5678', '*{[0-9]?*}[^0-9][]*', @a) && a === '1234'); 571 | assert(>wildmatch('____1234____5678', '*{[0-9]?*}[^0-9][]*', @a) && a === '1234'); 572 | assert(>wildmatch('____1234____5678____', '*{[0-9]?*}[^0-9][]*', @a) && a === '1234'); 573 | 574 | ////////////////////////// 575 | 576 | report("MISC TESTS"); 577 | 578 | concat = function { s = ""; for (i = 0; i < $n; ++i) s #= coalesce(@$[i]) # '|'; s }; 579 | assertn(> concat() === "", > concat(,) === "||", > concat( , ) === "||", > concat("one") === "one|" 580 | , > concat("one","two") === "one|two|", > concat( "one", , "two") === "one||two|", > concat(, "one" , ,"two" ,) === "|one||two||" ); 581 | 582 | count = function { args(@n, @array, @func); sum = 0; for (i = 0; i < n; ++i) if (func([array][i])) ++sum; sum }; 583 | compose(@a, 1, 2, 3, 2, 2, 3, 1, 2, 2); 584 | c = count(9, @a, > $0 == 1 ); 585 | assert(>c == 2); 586 | c = count(9, @a, > $0 == 2 ); 587 | assert(>c == 5); 588 | c = count(9, @a, > $0 >= 2 ); 589 | assert(>c == 7); 590 | 591 | ////////////////////////// 592 | 593 | report("REGRESSION TESTS"); 594 | 595 | // 0.94 -> 0.941 596 | 597 | assert(> try(>unescape('"\')) != void); // Crash bug: access outside end of string. 598 | assert(> try(>unescape('"\+"')) != void); // Syntax bug: accepted + only as a number 599 | assert(> try(>evaluate("a=3e;")) != void); // Syntax bug: accepted non-existing number after e. 600 | assert(> try(>evaluate("a=3e+(3)")) != void); // - " - 601 | assert(> try(>{a="3e+";+a}) != void); // - " - 602 | 603 | ////////////////////////// 604 | 605 | report("DONE!"); 606 | }; 607 | 608 | if (!exists(@::assert) || ::assert == function { }) run('debug.pika'); 609 | // run('help.pika'); 610 | test(); 611 | traceErrors(); 612 | -------------------------------------------------------------------------------- /documentation/Symbiosis Documentation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Symbiosis 7 | 13 | 14 | 15 |

    16 |

    Symbiosis v1.3

    17 |

    Table of Contents

    18 | 19 | 43 |

    What Is Symbiosis?

    44 |

    Symbiosis is a developer tool for adapting Mac OS X VST plug-ins to the Audio Unit (AU) standard. It essentially consists of a single C++ file that you can compile into your VST project to make the plug-in compatible with the Audio Unit protocol. Optionally, you may choose to use a pre-built "wrapper plug-in" for adapting your existing VST plug-in to the AU standard without even having to recompile any source code.

    45 |

    How Does It Work?

    46 |

    Although the VST and Audio Unit SDKs differ greatly in implementation, the purpose and functions of the two standards are virtually identical. Both protocols provide means for querying plug-in info and capabilities, processing floating- point audio, reading and writing automation parameters, serializing the plug-in state for total recall and managing GUI interaction.

    47 |

    The close affinity of the two standards makes it possible to create a "wrapper" that works on "binary level", meaning that it translates messages to and from the AU host and VST plug-in in real-time.

    48 |

    The translation works transparently for perhaps 90% of the Audio Unit functionality. Where the AU and VST standards differ greatly or where the former offers valuable features not found in the latter, Symbiosis offer configuration files and optional code extensions that allow you to create feature-complete Audio Units, true to the philosophies and principles of the architecture.

    49 |

    You can also configure Symbiosis to automatically convert preset files it discovers from the VST format (".fxb" and ".fxp" files) to the AU format (".aupreset" files).

    50 |

    Who Is It For?

    51 |

    This is a tool for developers. It was not designed to be used by end-users. The idea is that Symbiosis is packaged into the final product, either compiled into the product on source-code level or as a "wrapper" that bridges to your VST.

    52 |

    Symbiosis will be of great interest to you if you already have a VST plug-in running under Mac OS X and you now wish to support the Audio Unit format. With Symbiosis, there is no need to master and implement the Audio Unit interface yourself. Although plenty of documentation and examples are available for learning the art of Audio Unit coding, it is far from trivial to understand all aspects and details of this fairly complex API. Add to this the continuous work of supporting and maintaining the source code for two different plug-in interfaces and the advantage of using Symbiosis should be obvious.

    53 |

    The availability of Symbiosis may also makes VST a good choice as a first plug-in format for the beginner Mac developer who one day plan to port his / her plug-in to the VST-dominant environment of Windows.

    54 |

    What Does It Cost?

    55 |

    Nothing. Symbiosis is released as open source under the BSD license form (see Copyrights and Trademarks).

    56 |

    I (Magnus Lidström) developed Symbiosis partly because I needed such a tool for my own use, but also because I felt that all developers would benefit from a unified plug-in world with a single standard API. We will probably never be able to change the fact that certain hosts only work with certain plug-in formats, but at least, Symbiosis will make it feasible to support two of these formats with a minimal amount of overhead in code, work and continuous maintenance.

    57 |

    My only request if you find this tool useful is that you spread the word, preferably by adding an acknowledgment in your product documentation, "about box" or any other promotional material. For example, "Audio Unit version implemented using Symbiosis from NuEdge Development."

    58 |

    My dear friends over at Bitplant (http://www.bitplant.com/) have also designed a very stylish logo that I would be thrilled if you used. You can find it (and other related logotypes) at http://fogbugz.nuedge.net/default.asp?W101.

    59 |

    What Are the Prerequisites?

    60 |

    The minimum requirement is that you have the Apple OS X development tools and the CoreAudio SDK installed. (Configuring Symbiosis for your product requires at least using the "Rez" tool in order to compile the required AU "component resources".)

    61 |

    If you wish to compile the Symbiosis "wrapper plug-in" project, you will need XCode 2.5 or later. The VST SDK from Steinberg is required to compile Symbiosis as well, but due to licensing restrictions, the source files from this SDK are not included in this distribution but must be obtained separately from Steinberg and added to the project manually.

    62 |

    What Are the Major Differences Between VST and AU?

    63 |

    In case you are new to Audio Units but familiar with VST, the following list is provided as a crash course on the differences between the two formats.

    64 | 65 |
      66 |
    • AUs are component resources, scanned and indexed by OS X unlike VSTs which are scanned by each VST host individually. 67 |
    • 68 |
    69 | 70 |
      71 |
    • AU parameters are identified with arbitrary 32-bit IDs (instead of incrementally indexed from 0 and up).
    • 72 |
    73 | 74 |
      75 |
    • AU parameters have more meta info (ranges, types and even string arrays for discrete parameter choices).
    • 76 |
    77 | 78 |
      79 |
    • There is no concept like the VST "program slots" in AU, but AUs may provide a list of read-only factory presets.
    • 80 |
    81 | 82 |
      83 |
    • AUs can convert arbitrary parameter values to and from strings at any given time. (VSTs can only convert the currently assigned parameter values.) 84 |
    • 85 |
    86 | 87 |
      88 |
    • AUs have silent buffer optimizations.
    • 89 |
    90 | 91 |
      92 |
    • AU inputs and outputs are grouped into buses and the same AU plug-in can provide a number of input and output configurations. 93 |

    • 94 |
    • AU GUIs must be implemented with HIViews. (This has become the standard for VSTs too, but previously VSTs had a different user input / window drawing mechanism.) 95 |
    • 96 |
    97 |

    Symbiosis supports all unique AU features mentioned above.

    98 |

    Wrapping Alternatives

    99 |

    So, you have a VST plug-in that you want to metamorphose into an Audio Unit? How do you begin? First, you need to decide how you wish to wrap your VST.

    100 | 101 |
      102 |
    1. Using the pre-built wrapper AU component and placing an alias to your VST inside the wrapper bundle

      The advantage of this solution is that the same physical binary is used for both the VST and AU version. This means 103 | that your plug-in will be smaller to download and will take up less space on the user's disk once it has been 104 | installed. It also simplifies version handling as you will only need to build and update one single binary for both 105 | formats. 106 |

      The disadvantage is that the AU-version is not 100% self-contained and the end-user can break it if he / she 107 | uninstalls or throws away the VST. (Nevertheless, this approach may be the best choice during development even if you 108 | choose to wrap the final product using one of the other solutions.) 109 |

      110 |


    2. 111 |
    3. Using the pre-built wrapper AU component and placing a copy of your VST inside the wrapper bundle

      This approach is almost identical to alternative number 1 except that the VST bundle is "physically" duplicated 112 | inside the AU bundle. The advantage of choosing this solution is that the AU-version becomes self-contained. If your 113 | plug-in is small, this alternative should be preferred to alternative number 1, at least when you are packaging the 114 | final product. 115 |

      116 |


    4. 117 |
    5. Adding the Symbiosis sources to your VST project and copy + change extension

      By simply adding the Symbiosis source code and a few libraries and resource files to your VST project, the compiled 118 | VST binary becomes compatible with both the VST and the AU standards simultaneously. How cool is that? All you need 119 | to do is copy the final .vst bundle to the "Components folder" and rename it to .component. The advantages and 120 | disadvantages of choosing this solution are practically the same as for alternative number 2. The difference is that 121 | the Symbiosis wrapper gets compiled into the product binary (with the same build options etc as your own code). 122 |

      123 |


    6. 124 |
    7. Adding the Symbiosis sources to your project and place an alias to your VST in the "Components folder"

      Apparently, the AU scanning in OS X resolves any aliases it encounters, so the components don't have to actually 125 | reside in the "Component folder". All you need to do is make an alias of your .vst, give the alias a .component 126 | extension and place the alias in the "Components folder". The advantages and disadvantages is the same as for 127 | alternative number 1. E.g., it takes up less space on disk, but the AU will not work if the user removes the VST etc. 128 |

      Also, this solution depends on an undocumented OS X feature (support for aliases in the "Components folder"). No 129 | guarantees that it will work under all circumstances for all future. 130 |

      131 |


    8. 132 |
    9. Creating a specific build target for the Audio Unit version

      This alternative is identical to number 3, but instead of having a single "unisex" target you create specific 133 | targets for the VST and the AU versions and include the Symbiosis source code only to the AU target. The disadvantage 134 | is that the build-time practically doubles if you wish to build both formats. The only reason for choosing this 135 | alternative over number 3 is if you need to treat the AU version differently on source code level (for instance with 136 | preprocessor macros). 137 |

      I would recommend avoiding this solution though. Keeping the number of different binary versions down to a minimum 138 | is always good for build times, debugging, testing and maintenance. If you need to treat the AU differently from the 139 | VST in run-time you can always check if the VST host is "Symbiosis" through the getHostProductString VST call. 140 |

      141 |
    10. 142 |
    143 |

    Wrapping the VST Using Alternatives 1 or 2

    144 |

    If you have chosen wrapping alternative 1 or 2 (using a pre-built wrapper) the first step is to duplicate one of the pre-built wrappers (Symbiosis.component) from the zip-file PreBuiltWrappers.zip. The "development" and "beta" versions contain tracing and assertions that are written to the standard console.log (which you can observe with the "Console" application)*. The "beta" and "release" versions are compiled with optimizations and are faster than the "development" version, although they may be harder to debug. All pre-built wrappers are built as universal binaries for x86 (32 and 64-bit) and PPC. First time around you should choose the "development" or "beta" builds.

    145 |

    Rename your wrapper to whatever you wish to call your plug-in and add an alias (or copy) your VST plug-in to the bundle. The VST file or alias should be put under Contents/Resources/ in the wrapper bundle.

    146 |

    Audio Units are based on the component API (as used by QuickTime) and components are identified by the operating system using classic Mac resources. Therefore, the next step is to edit and recompile these resources for your AU. Open the sample .rez`-file (`Symbiosis.r) that is included in the distribution under Contents/Resources/ and modify it according to the instructions inside (don't rename the file!).

    147 |

    You then need to compile Symbiosis.r into Symbiosis.rsrc by using the "Rez" tool. There is a script included in the distribution called CompileSymbiosisRsrc.command that helps you with this step. Locate the script next to your modified Symbiosis.r file and double-click it (if you can't run the script you may need to perform a chmod +x on the script file from a shell prompt). Now look for Symbiosis.rsrc. Found it? Excellent!

    148 |

    Finally, you also need to edit the OS X Info.plist and fill out the standard bundle version info plus choose a few Symbiosis specific configuration options. Info.plist is located inside your wrapper bundle under Contents/. It contains comments with further instructions. (You may need to open Info.plist with a text-editor like TextEdit to see the comments.)

    149 |

    Move on to Running Your AU for the First Time.

    150 |

    * Notice that the standard assertion handling in C++ simply terminates the entire application if something fails. If the application terminates during beta testing, always check console.log for the reason. If you build your own wrapper you may want to use a custom assertion mechanism. See Preprocessor Defines for more info.

    151 |

    Wrapping the VST Using Alternatives 3, 4 or 5

    152 |

    If you have chosen one of the latter wrapping alternative (i.e. including the Symbiosis source in your project) you should first make sure that you have a "Build ResourceManager Resources" Build Phase for your target. If there is no such Phase, create one by choosing "New Build Phase -> New Build ResourceManager Resources Build Phase" from the "Project" menu. Now you can copy and add the following files to your VST project:

    153 | 154 |
      155 |
    • Symbiosis.mm
    • 156 |
    • Symbiosis.r (make sure it also appears under the "Build ResourceManager Resources" Build Phase)
    • 157 |
    • AudioUnit.framework (from /System/Library/Frameworks/)
    • 158 |
    • AudioToolbox.framework (from /System/Library/Frameworks/)
    • 159 |
    160 |

    Edit your copy of Symbiosis.r according to the instructions inside. Next, add the Symbiosis specific configuration options found in Symbiosis.plist to the Info.plist file that should already exist for your VST project (you may have called it something else though). You will find more instructions in the Symbiosis.plist file. (You may need to open Symbiosis.plist with a text-editor like TextEdit to see the comments.)

    161 |

    If you have a custom "exported symbols file" for your project, you need to add these entries to it:

    162 | 163 |
      164 |
    • _SymbiosisEntry
    • 165 |
    • _SymbiosisViewEntry.
    • 166 |
    167 |

    That's about it. Just make sure to build your plug-in without the NDEBUG setting the first time around as explained in the next section.

    168 |

    Running Your AU for the First Time

    169 |

    Now let us fire up the engines and take your AU for a spin. A good idea for the first tour is to make sure your plug-in passes the "AU validation tests" by using the "AUVal" tool from Apple ("AUVal" should come preinstalled with OS X or with the development tools). If it does not pass, some hosts will not load your Audio Unit. Although Symbiosis will do its best to assure that your adapted VST passes validation, there is no guarantee that your VST code is 100% compatible without modification. (For example, there are a few tweakable configuration settings and vendor-specific VST extensions that may affect the outcome of the validation.)

    170 |

    First, put your AU component in Library/Audio/Plug-Ins/Components/ either in the root (system-wide) or your home dir (local). Next, open up the terminal application and type auval -a. Look for your unique AU signature (the one you chose for your .r file). If you cannot see it, you may need to restart the computer for the OS to discover the new AU. If this still fails, something has gone seriously wrong with your wrapping. Start over from square 1 and try a different wrapping alternative as a test.

    171 |

    Now run auval -v <type> <subtype> <signature> where <type>, <subtype> and <signature> should be the ones defined in the .r file. (<type> is typically one of aufx, aumu or aumf for "instrument", "effect" and "effect with MIDI"). Hold your breath and pray for your plug-in to pass the tests.

    172 |

    Important! When you run the development or beta build of your AU for the first time, the wrapper automatically creates a few important configuration files inside your component bundle under Contents/Resources/ as well as ".aupresets" files for the default / initial VST program bank. You should distribute your Audio Units with these files pre-created, even if you do not modify them. Otherwise they will be created on the end-user's computer on the first run and in case the user doesn't have sufficient write privileges for the directory in question, this can prevent the Audio Unit from loading. The release build (when NDEBUG is defined) will never attempt to create these files. See Advanced Porting Options for more info on these files.

    173 |

    Advanced Porting Options

    174 |

    Symbiosis creates two configuration files inside your AU bundle the first time it is launched. SYParameters.txt and SYFactoryPresets.txt. It will also create .aupreset files for all the VST programs in the initial startup bank. All these files are created directly under Contents/Resources/ in your bundle.

    175 |

    It is a good idea to edit at least SYParameters.txt and you should include all the created files in the final distribution of your Audio Unit. (Please read an important note concerning this under Running Your AU for the First Time.) If you are using wrapping alternative 3, 4 or 5 (including Symbiosis.mm etc into your VST project) you can simply drop the files into your project and they will be copied in the build process.

    176 |

    Finally, if you are serious about creating a fully featured Audio Unit you might want to look into supporting Symbiosis' optional Vendor-Specific Extensions below.

    177 |

    SYParameters.txt

    178 |

    This file is a tab separated table with parameter information. One line per parameter with an extra header line at the top. You may choose to exclude certain parameters from the AU version by simply removing the corresponding lines from this file.

    179 |

    The columns in this file are as follows:

    180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 |
    ColumnDescription
    vst param #The VST parameter number (zero based), which is also the unique identifier for the parameter.*
    nameThe parameter name as shown to the end user.**
    minThe minimum parameter value.***
    maxThe maximum parameter value.***
    displayA string that defines how the parameter is displayed to the end user. Use one of the following:
     = for linear scaling (within the min to max range).
     b for boolean switch (0 is off, 1 is on)
     i for integer (scaled from min to max)
     a|b|c|d for discrete parameter settings, e.g. sine|tri|saw|pulse
     ? to convert the value with the Vendor-Specific Extensions (described below).
    unitThe parameter suffix / unit.
    defaultThe initial default setting. (Scaled according to min and max range.)
    221 |

    * If changes to this parameter will automatically modify other parameters you need to suffix this column with +. This information is important for AU hosts.

    222 |

    ** You may wish to edit this column as AU can handle longer parameter names than VST.

    223 |

    *** VST parameter values are always between 0 and 1, but AU parameters have arbitrary range. The min and max values are used to scale and normalize the AU parameter range from / to the 0 and 1 range. For discrete parameters (those having | -delimited lists in the display column) the min value must be 0 and the max value should be the count of discrete options minus one, e.g. 3 if there are four choices.

    224 |

    SYFactoryPresets.txt

    225 |

    This file simply contains a list of factory preset files (one file name per row). You can edit this file to remove or add factory presets. Symbiosis expects to find the factory preset files under Contents/Resources/ (as always).

    226 |

    Vendor-Specific Extensions

    227 |

    For the full AU end-user experience, the VST standard lacks just a few minor functions, namely text conversion to and from arbitrary parameter values (and not just from the currently assigned settings) and silent buffer detection (for CPU optimization). Luckily there is a method in the VST SDK for custom extensions that allows Symbiosis to support these features if you should choose to implement the required support on your side. The method is vendorSpecific and it receives two generic integers, one void pointer and a float. Symbiosis uses the first integer (lArg1) as a 32-bit four-character value to indicate which function it expects you to perform. These are the functions:

    228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 |
    lArg1DescriptionlArg2ptrArgReturn
    'sHi!'Do you support these extensions?  1
    'sI00'Is input for the next processing call silent or not (all zeroes).*1 if silent 1
    'sO00'Is your output from the last processing call silent (all zeroes)?*  1 if silent
    'sV2S'Convert parameter value to string.VST param #float & string pointer**1
    'sS2V'Convert parameter string to value.VST param #string & float pointer**1
    248 |

    * The silent flags should be considered as hints only. The input and output data is expected to be fully zeroed if the flag is set.

    249 |

    ** ptrArg will point to a buffer of a sufficiently large size to store both input and output of the conversion. On value to string conversion, ptrArg will point to a floating point value on input and expects you to copy a zero- terminated string to this pointer on output (and vice versa for string to value conversion).

    250 |

    As always, the best explanation is an example. This is from the example plug-in "Sinoplex" that is provided with Symbiosis.

    251 |
    VstIntPtr Sinoplex::vendorSpecific(VstInt32 lArg1, VstIntPtr lArg2, void* ptrArg, float floatArg) {
    switch (lArg1) {
    case 'sHi!': return 1; // Can we speak Symbiosian?
    case 'sI00': inputIsSilent = (lArg2 != 0); return 1; // Is input silent?
    case 'sO00': return outputIsSilent; // Is output silent?

    case 'sV2S': { // Parameter value to string conversion.
    float value = *reinterpret_cast<float*>(ptrArg);
    SinoplexProgram::Parameter param = static_cast<SinoplexProgram::Parameter>(lArg2);
    currentProgram->convertParameterValueToString(param, value, reinterpret_cast<char*>(ptrArg));
    return 1;
    }

    case 'sS2V': { // String to parameter value conversion.
    SinoplexProgram::Parameter param = static_cast<SinoplexProgram::Parameter>(lArg2);
    float value = currentProgram->convertParameterStringToValue(param, reinterpret_cast<char*>(ptrArg));
    *reinterpret_cast<float*>(ptrArg) = value;
    return 1;
    }

    default: return AudioEffectX::hostVendorSpecific(lArg1, lArg2, ptrArg, floatArg);
    }
    }
    252 |

    Preprocessor Defines

    253 |

    These are the preprocessor macros used to configure Symbiosis.mm.

    254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 |
    MacroDescriptionAlternativesDefault
    SY_USE_VST_VERSIONVST SDK version to include2300, 24002400 or automatically detected if the VST SDK is included in the precompiled headers.
    SY_DO_ASSERTEnable assertion checks0, 11 or 0 if NDEBUG is defined
    SY_STD_ASSERTUse standard C assert()0, 11
    SY_ASSERT(x)Macro for asserts without details assert() if SY_STD_ASSERT == 1
    SY_ASSERT0..n(x, d, ...)Macros for asserts with details first trace out the details, then assert
    SY_DO_TRACETracing "master switch"0, 11 or 0 if NDEBUG is defined
    SY_TRACE_EXCEPTIONSTrace caught exceptions0, 11
    SY_TRACE_AUTrace AU messages / calls0, 11
    SY_TRACE_VSTTrace VST messages / calls0, 11
    SY_TRACE_FREQUENTTrace frequent calls (e.g. render)0, 10
    SY_TRACE_MISCTrace misc0, 10
    SY_STD_TRACETrace to stderr0, 11
    SY_TRACE(c, s)Macro for tracing a string prints to stderr if SY_STD_TRACE == 1
    SY_TRACE1..nMacros for tracing with arguments - " -
    SY_INCLUDE_GUI_SUPPORTInclude support for custom GUI0, 11
    SY_INCLUDE_CONFIG_GENInclude config file generation0, 11 or 0 if NDEBUG is defined
    SY_USE_COCOA_GUIUse Cocoa Views for GUI0, 10 in 32-bit, 1 in 64-bit
    310 |

    Most of these can be overridden by redefining them in your build settings or in a "prefix header file".

    311 |

    Copyrights and Trademarks

    312 |

    Symbiosis is released under the "New Simplified BSD License".
    313 | http://www.opensource.org/licenses/bsd-license.php

    314 |

    Copyright (c) 2009-2013, NuEdge Development / Magnus Lidström
    315 | All rights reserved.

    316 | 317 |
      318 |
    • Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 319 |
    • 320 |
    321 | 322 |
      323 |
    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 324 |
    • 325 |
    326 | 327 |
      328 |
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 329 |
    • 330 |
    331 | 332 |
      333 |
    • Neither the name of the NuEdge Development nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 334 |
    • 335 |
    336 |

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    337 |

    The HTML version of this document was created with PikaScript, (c) 2011 NuEdge Development.
    338 |
    339 | Apple, Audio Units and OS X are trademarks of Apple Inc., registered in the U.S. and other countries. VST is a trademark of Steinberg Media Technologies GmbH. All other trademarks and brand identities are used for descriptive purposes only and remain the property of their respective owners.

    340 | 341 | 342 | 343 | --------------------------------------------------------------------------------