-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The src folder is from Omax for Max 6.1 branch as the sources for external objects had not changed since
- Loading branch information
Showing
761 changed files
with
41,485 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
find ./externals/ ./yin+\ \&\ co/ -name "*.xcodeproj" -exec xcodebuild -project {} -target "Max6" \; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
find ./externals/ ./yin+\ \&\ co/ -name "*.xcodeproj" -exec xcodebuild -project {} -target "Max6" clean \; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
/*--------------------------------- | ||
* Oracle.cpp | ||
* Created on 09/03/09 by BenCello | ||
*---------------------------------*/ | ||
|
||
#include <iostream> | ||
#include <fstream> | ||
#include <map> | ||
using namespace std; | ||
|
||
#include "Oracle_classes.hpp" | ||
#include "Oracle_label.hpp" | ||
#include "Oracle_data.hpp" | ||
#include "Oracle_learn.hpp" | ||
#include "virfun.h" | ||
|
||
// variable globale | ||
int modulo=1; | ||
|
||
int main (int argc, char * const argv[]) { | ||
O_oracle oracle; | ||
O_data data; | ||
|
||
/*O_char a ('a'); | ||
O_char b ('b'); | ||
O_char c ('c');*/ | ||
|
||
oracle.set_name("Pouet"); | ||
oracle.start(); | ||
data.start<O_MIDI_poly>(); | ||
|
||
O_learner build (oracle,data); | ||
|
||
O_MIDI_note C4 (60,100,1); | ||
O_MIDI_note D4 (62,80,1); | ||
O_MIDI_note F4 (65, 110, 1); | ||
O_MIDI_note F5 (77, 100, 1); | ||
O_MIDI_note E3 (52, 90, 1); | ||
O_MIDI_note E4 (64, 90, 1); | ||
O_MIDI_note E5 (76, 100, 1); | ||
|
||
float freqs[3]; | ||
float approxf=midi2freq_approx(0.5); | ||
O_MIDI_poly frame1; | ||
frame1.set_notes(&C4,NULL); | ||
//freqs[0]=midi2freq(C4.get_pitch()); | ||
//freqs[1]=midi2freq(D4.get_pitch()); | ||
//freqs[2]=midi2freq(F4.get_pitch()); | ||
//frame1.set_vpitch(rec_virfun(freqs, freqs+3, 0.1, freqs[0]*(1.0+approxf), approxf)); | ||
frame1.set_vpitch(60.); | ||
//cout<<frame1.get_vpitch()<<endl; | ||
O_MIDI_poly frame2; | ||
frame2.set_notes(&E4,NULL); | ||
//freqs[0]=midi2freq(F4.get_pitch()); | ||
//freqs[1]=midi2freq(D4.get_pitch()); | ||
//freqs[2]=midi2freq(F5.get_pitch()); | ||
//frame2.set_vpitch(rec_virfun(freqs, freqs+3, 0.1, freqs[0]*(1.0+approxf), approxf)); | ||
frame2.set_vpitch(40.); | ||
//cout<<frame2.get_vpitch()<<endl; | ||
O_MIDI_poly frame3; | ||
frame3.set_notes(&E5,NULL); | ||
//freqs[0]=midi2freq(F4.get_pitch()); | ||
//freqs[1]=midi2freq(E3.get_pitch()); | ||
//freqs[2]=midi2freq(C4.get_pitch()); | ||
//frame3.set_vpitch(rec_virfun(freqs, freqs+3, 0.1, freqs[0]*(1.0+approxf), approxf)); | ||
frame3.set_vpitch(40.); | ||
//cout<<frame3.get_vpitch()<<endl; | ||
|
||
build.add(frame1); | ||
build.add(frame2); | ||
build.add(frame3); | ||
build.add(frame1); | ||
build.add(frame2); | ||
build.add(frame3); | ||
build.add(frame3); | ||
build.add(frame1); | ||
build.add(frame1); | ||
build.add(frame2); | ||
build.add(frame2); | ||
build.add(frame3); | ||
build.add(frame1); | ||
build.add(frame1); | ||
build.add(frame3); | ||
build.add(frame2); | ||
|
||
|
||
/*cout<<frame1.set_mvelocity()<<endl; | ||
cout<<frame1; | ||
cout<<frame2; | ||
cout<<frame3; | ||
cout<<(frame1==frame2)<<endl; | ||
cout<<(frame3==frame2)<<endl;*/ | ||
|
||
cout<<oracle; | ||
|
||
/*O_oracle copy; | ||
O_data copy_data; | ||
copy.set_name("From"); | ||
O_learner buildfrom (copy,copy_data); | ||
int i; | ||
for (i = 3; i<8; i++) { | ||
cout << *(O_char*)data[i]<<" "; | ||
buildfrom.addfrom<O_char>((O_char*)data[i]); | ||
} | ||
cout<<endl;*/ | ||
|
||
|
||
//ofstream fout; | ||
//fout.open("Test.dot"); | ||
|
||
//cout<<copy; | ||
|
||
//fout.close(); | ||
//cout<<*(O_spectral*)data[7]; | ||
|
||
/*list<pair<O_state*,int> > * SLT = new list<pair<O_state*,int> >; | ||
SLT = oracle[0]->rec_sortSLT(SLT,3); | ||
list<pair<O_state*,int> >::iterator SLTit; | ||
for (SLTit=SLT->begin(); SLTit!=SLT->end(); SLTit++) { | ||
cout<<(*SLTit).first->get_statenb()<<" "<<(*SLTit).second<<endl; | ||
} | ||
cout<<endl; | ||
SLT = oracle[6]->sortedSLT(1,3); | ||
for (SLTit=SLT->begin(); SLTit!=SLT->end(); SLTit++) { | ||
cout<<(*SLTit).first->get_statenb()<<" "<<(*SLTit).second<<endl; | ||
}*/ | ||
|
||
//oracle.freestates(); | ||
//data.freestates<O_char>(); | ||
|
||
//sleep(2); | ||
|
||
/*float freqtest[5]; | ||
freqtest[0]=67.; | ||
freqtest[2]=517.; | ||
freqtest[3]=1313.; | ||
freqtest[1]=229.; | ||
freqtest[4]=4023.; | ||
freqtest[2]=110.;*/ | ||
//cout<<"approx : "<<frame1.midi2freq_approx(1.)<<endl; | ||
/*cout<<"fund : "<<frame1.get_vpitch()/12.<<endl; | ||
cout<<"fund : "<<frame1.get_vpitch()<<endl; | ||
cout<<"fund : "<<frame2.get_vpitch()<<endl; | ||
cout<<"fund : "<<frame3.get_vpitch()<<endl; | ||
cout<<"comp : "<<(frame1==frame2)<<endl;*/ | ||
|
||
return 0; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,237 @@ | ||
// !$*UTF8*$! | ||
{ | ||
archiveVersion = 1; | ||
classes = { | ||
}; | ||
objectVersion = 45; | ||
objects = { | ||
|
||
/* Begin PBXBuildFile section */ | ||
7B4C5D79127080B300BB3721 /* virfun.c in Sources */ = {isa = PBXBuildFile; fileRef = 7B4C5D78127080B300BB3721 /* virfun.c */; }; | ||
8DD76F650486A84900D96B5E /* Oracle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* Oracle.cpp */; settings = {ATTRIBUTES = (); }; }; | ||
FB3F7CD20F651D1D00F81945 /* Oracle_classes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB3F7CD10F651D1D00F81945 /* Oracle_classes.cpp */; }; | ||
FB3F7CD80F651DEB00F81945 /* Oracle_label.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB3F7CD70F651DEB00F81945 /* Oracle_label.cpp */; }; | ||
/* End PBXBuildFile section */ | ||
|
||
/* Begin PBXCopyFilesBuildPhase section */ | ||
8DD76F690486A84900D96B5E /* CopyFiles */ = { | ||
isa = PBXCopyFilesBuildPhase; | ||
buildActionMask = 8; | ||
dstPath = /usr/share/man/man1/; | ||
dstSubfolderSpec = 0; | ||
files = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 1; | ||
}; | ||
/* End PBXCopyFilesBuildPhase section */ | ||
|
||
/* Begin PBXFileReference section */ | ||
08FB7796FE84155DC02AAC07 /* Oracle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Oracle.cpp; sourceTree = "<group>"; }; | ||
7B4C5D78127080B300BB3721 /* virfun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = virfun.c; sourceTree = "<group>"; }; | ||
7B4C5DB11270826B00BB3721 /* virfun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = virfun.h; sourceTree = "<group>"; }; | ||
8DD76F6C0486A84900D96B5E /* OracleCPP */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = OracleCPP; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
FB3F7CAC0F65140500F81945 /* Oracle_classes.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Oracle_classes.hpp; sourceTree = "<group>"; }; | ||
FB3F7CD10F651D1D00F81945 /* Oracle_classes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Oracle_classes.cpp; sourceTree = "<group>"; }; | ||
FB3F7CD60F651DEB00F81945 /* Oracle_label.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Oracle_label.hpp; sourceTree = "<group>"; }; | ||
FB3F7CD70F651DEB00F81945 /* Oracle_label.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Oracle_label.cpp; sourceTree = "<group>"; }; | ||
FBF337AF0F76B68800C69F8E /* Oracle_data.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Oracle_data.hpp; sourceTree = "<group>"; }; | ||
FBF337B00F76B6AE00C69F8E /* Oracle_learn.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Oracle_learn.hpp; sourceTree = "<group>"; }; | ||
/* End PBXFileReference section */ | ||
|
||
/* Begin PBXFrameworksBuildPhase section */ | ||
8DD76F660486A84900D96B5E /* Frameworks */ = { | ||
isa = PBXFrameworksBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXFrameworksBuildPhase section */ | ||
|
||
/* Begin PBXGroup section */ | ||
08FB7794FE84155DC02AAC07 /* OracleCPP */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
FB3F7CA90F65130700F81945 /* Headers */, | ||
08FB7795FE84155DC02AAC07 /* Source */, | ||
1AB674ADFE9D54B511CA2CBB /* Products */, | ||
); | ||
name = OracleCPP; | ||
sourceTree = "<group>"; | ||
}; | ||
08FB7795FE84155DC02AAC07 /* Source */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
7B4C5D78127080B300BB3721 /* virfun.c */, | ||
08FB7796FE84155DC02AAC07 /* Oracle.cpp */, | ||
FB3F7CD70F651DEB00F81945 /* Oracle_label.cpp */, | ||
FB3F7CD10F651D1D00F81945 /* Oracle_classes.cpp */, | ||
); | ||
name = Source; | ||
sourceTree = "<group>"; | ||
}; | ||
1AB674ADFE9D54B511CA2CBB /* Products */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
8DD76F6C0486A84900D96B5E /* OracleCPP */, | ||
); | ||
name = Products; | ||
sourceTree = "<group>"; | ||
}; | ||
FB3F7CA90F65130700F81945 /* Headers */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
7B4C5DB11270826B00BB3721 /* virfun.h */, | ||
FBF337B00F76B6AE00C69F8E /* Oracle_learn.hpp */, | ||
FBF337AF0F76B68800C69F8E /* Oracle_data.hpp */, | ||
FB3F7CD60F651DEB00F81945 /* Oracle_label.hpp */, | ||
FB3F7CAC0F65140500F81945 /* Oracle_classes.hpp */, | ||
); | ||
name = Headers; | ||
sourceTree = "<group>"; | ||
}; | ||
/* End PBXGroup section */ | ||
|
||
/* Begin PBXNativeTarget section */ | ||
8DD76F620486A84900D96B5E /* OracleCPP */ = { | ||
isa = PBXNativeTarget; | ||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "OracleCPP" */; | ||
buildPhases = ( | ||
8DD76F640486A84900D96B5E /* Sources */, | ||
8DD76F660486A84900D96B5E /* Frameworks */, | ||
8DD76F690486A84900D96B5E /* CopyFiles */, | ||
); | ||
buildRules = ( | ||
); | ||
dependencies = ( | ||
); | ||
name = OracleCPP; | ||
productInstallPath = "$(HOME)/bin"; | ||
productName = OracleCPP; | ||
productReference = 8DD76F6C0486A84900D96B5E /* OracleCPP */; | ||
productType = "com.apple.product-type.tool"; | ||
}; | ||
/* End PBXNativeTarget section */ | ||
|
||
/* Begin PBXProject section */ | ||
08FB7793FE84155DC02AAC07 /* Project object */ = { | ||
isa = PBXProject; | ||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "OracleCPP" */; | ||
compatibilityVersion = "Xcode 3.1"; | ||
developmentRegion = English; | ||
hasScannedForEncodings = 1; | ||
knownRegions = ( | ||
English, | ||
Japanese, | ||
French, | ||
German, | ||
); | ||
mainGroup = 08FB7794FE84155DC02AAC07 /* OracleCPP */; | ||
projectDirPath = ""; | ||
projectRoot = ""; | ||
targets = ( | ||
8DD76F620486A84900D96B5E /* OracleCPP */, | ||
); | ||
}; | ||
/* End PBXProject section */ | ||
|
||
/* Begin PBXSourcesBuildPhase section */ | ||
8DD76F640486A84900D96B5E /* Sources */ = { | ||
isa = PBXSourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
8DD76F650486A84900D96B5E /* Oracle.cpp in Sources */, | ||
FB3F7CD20F651D1D00F81945 /* Oracle_classes.cpp in Sources */, | ||
FB3F7CD80F651DEB00F81945 /* Oracle_label.cpp in Sources */, | ||
7B4C5D79127080B300BB3721 /* virfun.c in Sources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXSourcesBuildPhase section */ | ||
|
||
/* Begin XCBuildConfiguration section */ | ||
1DEB923208733DC60010E9CD /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
COPY_PHASE_STRIP = NO; | ||
GCC_DYNAMIC_NO_PIC = NO; | ||
GCC_ENABLE_FIX_AND_CONTINUE = YES; | ||
GCC_MODEL_TUNING = G5; | ||
GCC_OPTIMIZATION_LEVEL = 0; | ||
GCC_PREPROCESSOR_DEFINITIONS = ( | ||
"_GLIBCXX_DEBUG=1", | ||
"_GLIBCXX_DEBUG_PEDANTIC=1", | ||
); | ||
INSTALL_PATH = /usr/local/bin; | ||
PRODUCT_NAME = OracleCPP; | ||
}; | ||
name = Debug; | ||
}; | ||
1DEB923308733DC60010E9CD /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
GCC_MODEL_TUNING = G5; | ||
INSTALL_PATH = /usr/local/bin; | ||
PRODUCT_NAME = OracleCPP; | ||
}; | ||
name = Release; | ||
}; | ||
1DEB923608733DC60010E9CD /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | ||
GCC_C_LANGUAGE_STANDARD = c99; | ||
GCC_INPUT_FILETYPE = sourcecode.cpp.cpp; | ||
GCC_OPTIMIZATION_LEVEL = 0; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES; | ||
GCC_WARN_PEDANTIC = NO; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
ONLY_ACTIVE_ARCH = YES; | ||
PREBINDING = NO; | ||
SDKROOT = macosx10.5; | ||
}; | ||
name = Debug; | ||
}; | ||
1DEB923708733DC60010E9CD /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; | ||
GCC_C_LANGUAGE_STANDARD = c99; | ||
GCC_INPUT_FILETYPE = sourcecode.cpp.cpp; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES; | ||
GCC_WARN_PEDANTIC = NO; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
ONLY_ACTIVE_ARCH = YES; | ||
PREBINDING = NO; | ||
SDKROOT = macosx10.5; | ||
}; | ||
name = Release; | ||
}; | ||
/* End XCBuildConfiguration section */ | ||
|
||
/* Begin XCConfigurationList section */ | ||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "OracleCPP" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
1DEB923208733DC60010E9CD /* Debug */, | ||
1DEB923308733DC60010E9CD /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "OracleCPP" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
1DEB923608733DC60010E9CD /* Debug */, | ||
1DEB923708733DC60010E9CD /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
/* End XCConfigurationList section */ | ||
}; | ||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; | ||
} |
Oops, something went wrong.