Commit f70306d9 authored by Dr-Dan's avatar Dr-Dan

First commit

parents
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
37E217E31BC7D9E700A59B1A /* maxi_emscr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37E217E11BC7D9E700A59B1A /* maxi_emscr.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
37E217D51BC7D92300A59B1A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
37E217D71BC7D92300A59B1A /* Maxi_Emscripten */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Maxi_Emscripten; sourceTree = BUILT_PRODUCTS_DIR; };
37E217E11BC7D9E700A59B1A /* maxi_emscr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = maxi_emscr.cpp; sourceTree = "<group>"; };
37E217E21BC7D9E700A59B1A /* maxi_emscr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maxi_emscr.h; sourceTree = "<group>"; };
37E217E41BC7DB7100A59B1A /* big_arrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = big_arrays.h; sourceTree = "<group>"; };
37E217E51BC7DBCB00A59B1A /* maxi_embind.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maxi_embind.h; sourceTree = "<group>"; };
37E217E61BC7E4FB00A59B1A /* Notes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Notes; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
37E217D41BC7D92300A59B1A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
37E217CE1BC7D92300A59B1A = {
isa = PBXGroup;
children = (
37E217D91BC7D92300A59B1A /* Maxi_Emscripten */,
37E217D81BC7D92300A59B1A /* Products */,
);
sourceTree = "<group>";
};
37E217D81BC7D92300A59B1A /* Products */ = {
isa = PBXGroup;
children = (
37E217D71BC7D92300A59B1A /* Maxi_Emscripten */,
);
name = Products;
sourceTree = "<group>";
};
37E217D91BC7D92300A59B1A /* Maxi_Emscripten */ = {
isa = PBXGroup;
children = (
37E217E11BC7D9E700A59B1A /* maxi_emscr.cpp */,
37E217E21BC7D9E700A59B1A /* maxi_emscr.h */,
37E217E51BC7DBCB00A59B1A /* maxi_embind.h */,
37E217E41BC7DB7100A59B1A /* big_arrays.h */,
37E217E61BC7E4FB00A59B1A /* Notes */,
);
path = Maxi_Emscripten;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
37E217D61BC7D92300A59B1A /* Maxi_Emscripten */ = {
isa = PBXNativeTarget;
buildConfigurationList = 37E217DE1BC7D92300A59B1A /* Build configuration list for PBXNativeTarget "Maxi_Emscripten" */;
buildPhases = (
37E217D31BC7D92300A59B1A /* Sources */,
37E217D41BC7D92300A59B1A /* Frameworks */,
37E217D51BC7D92300A59B1A /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = Maxi_Emscripten;
productName = Maxi_Emscripten;
productReference = 37E217D71BC7D92300A59B1A /* Maxi_Emscripten */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
37E217CF1BC7D92300A59B1A /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0630;
ORGANIZATIONNAME = "D J Clarke";
TargetAttributes = {
37E217D61BC7D92300A59B1A = {
CreatedOnToolsVersion = 6.3;
};
};
};
buildConfigurationList = 37E217D21BC7D92300A59B1A /* Build configuration list for PBXProject "Maxi_Emscripten" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 37E217CE1BC7D92300A59B1A;
productRefGroup = 37E217D81BC7D92300A59B1A /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
37E217D61BC7D92300A59B1A /* Maxi_Emscripten */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
37E217D31BC7D92300A59B1A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
37E217E31BC7D9E700A59B1A /* maxi_emscr.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
37E217DC1BC7D92300A59B1A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
37E217DD1BC7D92300A59B1A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
37E217DF1BC7D92300A59B1A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
37E217E01BC7D92300A59B1A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
37E217D21BC7D92300A59B1A /* Build configuration list for PBXProject "Maxi_Emscripten" */ = {
isa = XCConfigurationList;
buildConfigurations = (
37E217DC1BC7D92300A59B1A /* Debug */,
37E217DD1BC7D92300A59B1A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
37E217DE1BC7D92300A59B1A /* Build configuration list for PBXNativeTarget "Maxi_Emscripten" */ = {
isa = XCConfigurationList;
buildConfigurations = (
37E217DF1BC7D92300A59B1A /* Debug */,
37E217E01BC7D92300A59B1A /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 37E217CF1BC7D92300A59B1A /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Maxi_Emscripten.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "37E217D61BC7D92300A59B1A"
BuildableName = "Maxi_Emscripten"
BlueprintName = "Maxi_Emscripten"
ReferencedContainer = "container:Maxi_Emscripten.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "37E217D61BC7D92300A59B1A"
BuildableName = "Maxi_Emscripten"
BlueprintName = "Maxi_Emscripten"
ReferencedContainer = "container:Maxi_Emscripten.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "37E217D61BC7D92300A59B1A"
BuildableName = "Maxi_Emscripten"
BlueprintName = "Maxi_Emscripten"
ReferencedContainer = "container:Maxi_Emscripten.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "37E217D61BC7D92300A59B1A"
BuildableName = "Maxi_Emscripten"
BlueprintName = "Maxi_Emscripten"
ReferencedContainer = "container:Maxi_Emscripten.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Maxi_Emscripten.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>37E217D61BC7D92300A59B1A</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
NOTES:
Use embind js to c++ to create some encapsulated audioPlayer class as in ofxEmscripten. Or just steal that and use it.
- bring back the overrided play function!!! :
Module.play = function(){}?
Module.play(){
cooode....
}?
\ No newline at end of file
This diff is collapsed.
//
// maxi_embind.h
// Maxi_Emscripten
//
// Created by D J Clarke on 09/10/2015.
// Copyright (c) 2015 D J Clarke. All rights reserved.
//
#ifndef Maxi_Emscripten_maxi_embind_h
#define Maxi_Emscripten_maxi_embind_h
#include <emscripten/bind.h>
class vectorTools {
public:
//template <typename T>
static void clearVectorDbl(vector<double>& vecIn) {
vecIn.clear();
}
};
using namespace emscripten;
EMSCRIPTEN_BINDINGS(my_module) {
register_vector<int>("VectorInt");
register_vector<double>("VectorDouble");
// register_vector<float>("VectorFloat");
class_<vectorTools>("vectorTools")
.constructor<>()
.class_function("clearVectorDbl", &vectorTools::clearVectorDbl)
;
class_<maxiSettings>("maxiSettings")
.constructor<>()
.class_function("setup", &maxiSettings::setup)
;
class_<maxiOsc>("maxiOsc")
.constructor<>()
.function("sinewave", &maxiOsc::sinewave)
.function("coswave", &maxiOsc::coswave)
.function("phasor", select_overload<double(double)>(&maxiOsc::phasor))
.function("phasor", select_overload<double(double, double, double)>(&maxiOsc::phasor))
.function("saw", &maxiOsc::saw)
.function("triangle", &maxiOsc::triangle)
.function("square", &maxiOsc::square)
.function("pulse", &maxiOsc::pulse)
.function("noise", &maxiOsc::noise)
.function("sinebuf", &maxiOsc::sinebuf)
.function("sinebuf4", &maxiOsc::sinebuf4)
.function("sawn", &maxiOsc::sawn)
.function("rect", &maxiOsc::rect)
.function("phaseReset", &maxiOsc::phaseReset)
;
class_<maxiEnvelope>("maxiEnvelope")
.constructor<>()
.function("line", &maxiEnvelope::line)
.function("trigger", &maxiEnvelope::trigger)
.property("amplitude", &maxiEnvelope::GetAmplitude, &maxiEnvelope::SetAmplitude)
;
// class_<maxiDelayline>("maxiDelayline")
// .constructor<>()
// .function("dl", select_overload<double(double, int, double)>(&maxiDelayline::dl))
// .function("dl", select_overload<double(double, int, double, int)>(&maxiDelayline::dl))
// ;
//
class_<maxiFilter>("maxiFilter")
.constructor<>()
.function("lores", &maxiFilter::lores)
.function("hires", &maxiFilter::hires)
.function("bandpass", &maxiFilter::bandpass)
.function("lopass", &maxiFilter::lopass)
.function("hipass", &maxiFilter::hipass)
;
class_<maxiSample>("maxiSample")
.constructor<>()
.function("setSample", &maxiSample::setSample)
.function("getSummary", &maxiSample::getSummary)
.function("play", &maxiSample::play)
.function("trigger", &maxiSample::trigger)
.function("clear", &maxiSample::clear)
// .function("load", &maxiSample::load)
// .function("read", &maxiSample::read, allow_raw_pointers())
// .function("play", &maxiSample::play)
;
}
#endif
This diff is collapsed.
This diff is collapsed.
/Users/Dan/Documents/Programming/Emscripten/emsdk_portable/emscripten/tag-1.34.11/tests/maximilian/Maxi_Emscripten/build/Maxi_Emscripten.build/Debug/Maxi_Emscripten.build/Objects-normal/x86_64/maxi_emscr.o
#!/bin/bash
# My example bash script
# echo "Hello World"
../../emcc --bind -o web/maxiLib.js Maxi_Emscripten/Maxi_Emscripten/maxi_emscr.cpp
# --preload-file "test.wav"
\ No newline at end of file
#include "maximilian.h"
maxiOsc mySine;//let's create an oscillator and give it a name.
void setup() {//some inits
//nothing to go here this time
}
void play(double *output) {//this is where the magic happens. Very slow magic.
*output=mySine.sinewave(440);//simple as that!
}
#include "maximilian.h"
maxiOsc myCounter,mySwitchableOsc;//
int CurrentCount;//
double myOscOutput,myFilteredOutput;//
double myEnvelopeData[6] = {500,0,1000,500,0,500};//this data will be used to make an envelope. Value and time to value in ms.
maxiEnvelope myEnvelope;
maxiFilter myFilter;
void setup() {//some inits
myEnvelope.amplitude=myEnvelopeData[0]; //initialise the envelope
}
void play(double *output) {
CurrentCount=myCounter.phasor(1, 1, 9);//phasor can take three arguments; frequency, start value and end value.
if (CurrentCount<5)//simple if statement
myOscOutput=mySwitchableOsc.square(CurrentCount*100);
else if (CurrentCount>=5)//and the 'else' bit.
myOscOutput=mySwitchableOsc.saw(CurrentCount*50);//one osc object can produce whichever waveform you want.
if (CurrentCount==1)
myEnvelope.trigger(0,myEnvelopeData[0]); //trigger the envelope
myFilteredOutput=myFilter.lores(myOscOutput,(myEnvelope.line(6, myEnvelopeData)),10);//lores takes an audio input, a frequency and a resonance factor (1-100)
*output=myFilteredOutput;//point me at your speakers and fire.
}
#include "maximilian.h"
maxiOsc myCounter,mySwitchableOsc,myAutoPanner;//
int CurrentCount;//
double myOscOutput,myFilteredOutput,myPanPosition;//
double myStereoOutput[2];// we need an output for each channel.
double myEnvelopeData[6] = {500,0,1000,500,0,500};//this data will be used to make an envelope. Value and time to value in ms.
maxiEnvelope myEnvelope;
maxiFilter myFilter;
maxiMix myOutputs;//this is the stereo mixer channel.
void setup() {//some inits
myEnvelope.amplitude=myEnvelopeData[0]; //initialise the envelope
}
void play(double *output) {
CurrentCount=myCounter.phasor(1, 1, 9);//phasor can take three arguments; frequency, start value and end value.
if (CurrentCount<5)//simple if statement
myOscOutput=mySwitchableOsc.square(CurrentCount*100);
else if (CurrentCount>=5)//and the 'else' bit.
myOscOutput=mySwitchableOsc.saw(CurrentCount*50);//one osc object can produce whichever waveform you want.
if (CurrentCount==1)
myEnvelope.trigger(0,myEnvelopeData[0]); //trigger the envelope
myFilteredOutput=myFilter.lores(myOscOutput,(myEnvelope.line(6, myEnvelopeData)),10);//lores takes an audio input, a frequency and a resonance factor (1-100)
myPanPosition=myAutoPanner.sinewave(1);
myOutputs.stereo(myFilteredOutput,myStereoOutput,myPanPosition);//Stereo, Quad or 8 Channel. Specify the input to be mixed, the output[numberofchannels], and the pan (0-1,equal power).
output[0]=myStereoOutput[0];//When working with mixing, you need to specify the outputs explicityly
output[1]=myStereoOutput[1];//
}
#include "maximilian.h"
maxiSample beats; //We give our sample a name. It's called beats this time. We could have loads of them, but they have to have different names.
void setup() {//some inits
beats.load("/Users/username/somewhere/Maximilian/beat2.wav");//load in your samples. Provide the full path to a wav file.
printf("Summary:\n%s", beats.getSummary());//get info on samples if you like.
}
void play(double *output) {//this is where the magic happens. Very slow magic.
*output=beats.play();//just play the file. Looping is default for all play functions.
// *output=beats.play(0.69);//play the file with a speed setting. 1. is normal speed.
// *output=beats.play(0.5,0,44100);//linear interpolationplay with a frequency input, start point and end point. Useful for syncing.
// *output=beats.play4(0.5,0,44100);//cubic interpolation play with a frequency input, start point and end point. Useful for syncing.
}
#include "maximilian.h"
double outputs[2],moreoutputs[2]; //some track outputs
double filtered,patch1,patch2,tune,delayed,
mixed,ramp,filtered2,noise,pan,more;//a bunch of patch cables
int beat,lastbeat,morebeats,lastmorebeats;//some rhythmic elemts
double env[4]={200,0,0,50};//the kick drum pitch envelope data
double env2[6]={10000,0,9000,5,0,5};//the hi hat pitch envelope dat
double melody[14]={600,0,0,650,0,0,400,0,0,425,0,300,0,315};//the melody data
int rhythm1[16]={1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0};//another way of doing a rhythm
maxiOsc a,c,d,e,g,h,i,j,squarewave;//some oscillators
maxiEnvelope b,f;//two envelopers
maxiDelayline delay;//a delay line
maxiFilter myfilter,antia;// a FAT filter
maxiMix mymix,bobbins;//some panning busses
maxiSample beats;
void setup() {//some inits
b.amplitude=env[0];//starting value for envelope b
f.amplitude=env2[0];//same for f
beats.load("/Users/chris/src/Maximilian/beat2.wav");//put a path to a soundfile here. Wav format only.
printf("Summary:\n%s", beats.getSummary());//get info on samples if you like
}
void play(double *output) {//this is where the magic happens. Very slow magic.
beat=((int) c.phasor(8));//this oscillator is now a counter
morebeats=((int) e.phasor(0.5,0,16));//so is this one