├── .gitignore ├── .gitmodules ├── AppUI.png ├── FMOscillator ├── AudioKit.framework │ ├── AudioKit │ ├── Headers │ ├── Modules │ ├── Resources │ └── Versions │ │ ├── A │ │ ├── AudioKit │ │ ├── Headers │ │ │ ├── AK4AudioUnitBase.h │ │ │ ├── AK4DspBase.hpp │ │ │ ├── AKAmplitudeEnvelopeAudioUnit.h │ │ │ ├── AKAmplitudeTrackerAudioUnit.h │ │ │ ├── AKAudioUnit.h │ │ │ ├── AKAutoWahAudioUnit.h │ │ │ ├── AKBalancerAudioUnit.h │ │ │ ├── AKBandPassButterworthFilterAudioUnit.h │ │ │ ├── AKBandRejectButterworthFilterAudioUnit.h │ │ │ ├── AKBankAudioUnit.h │ │ │ ├── AKBitCrusherAudioUnit.h │ │ │ ├── AKBoosterAudioUnit.h │ │ │ ├── AKBrownianNoiseAudioUnit.h │ │ │ ├── AKChowningReverbAudioUnit.h │ │ │ ├── AKClarinetAudioUnit.h │ │ │ ├── AKClipperAudioUnit.h │ │ │ ├── AKCombFilterReverbAudioUnit.h │ │ │ ├── AKConvolutionAudioUnit.h │ │ │ ├── AKCostelloReverbAudioUnit.h │ │ │ ├── AKDCBlockAudioUnit.h │ │ │ ├── AKDripAudioUnit.h │ │ │ ├── AKDynaRageCompressorAudioUnit.h │ │ │ ├── AKDynamicRangeCompressorAudioUnit.h │ │ │ ├── AKEqualizerFilterAudioUnit.h │ │ │ ├── AKFMOscillatorAudioUnit.h │ │ │ ├── AKFMOscillatorBankAudioUnit.h │ │ │ ├── AKFlatFrequencyResponseReverbAudioUnit.h │ │ │ ├── AKFluteAudioUnit.h │ │ │ ├── AKFormantFilterAudioUnit.h │ │ │ ├── AKFrequencyTrackerAudioUnit.h │ │ │ ├── AKHighPassButterworthFilterAudioUnit.h │ │ │ ├── AKHighShelfParametricEqualizerFilterAudioUnit.h │ │ │ ├── AKKorgLowPassFilterAudioUnit.h │ │ │ ├── AKLazyTap.h │ │ │ ├── AKLowPassButterworthFilterAudioUnit.h │ │ │ ├── AKLowShelfParametricEqualizerFilterAudioUnit.h │ │ │ ├── AKMandolinAudioUnit.h │ │ │ ├── AKMetalBarAudioUnit.h │ │ │ ├── AKMicrophoneTrackerEngine.h │ │ │ ├── AKModalResonanceFilterAudioUnit.h │ │ │ ├── AKMoogLadderAudioUnit.h │ │ │ ├── AKMorphingOscillatorAudioUnit.h │ │ │ ├── AKMorphingOscillatorBankAudioUnit.h │ │ │ ├── AKOfflineRenderAudioUnit.h │ │ │ ├── AKOperationEffectAudioUnit.h │ │ │ ├── AKOperationGeneratorAudioUnit.h │ │ │ ├── AKOscillatorAudioUnit.h │ │ │ ├── AKOscillatorBankAudioUnit.h │ │ │ ├── AKPWMOscillatorAudioUnit.h │ │ │ ├── AKPWMOscillatorBankAudioUnit.h │ │ │ ├── AKPannerAudioUnit.h │ │ │ ├── AKPeakingParametricEqualizerFilterAudioUnit.h │ │ │ ├── AKPhaseDistortionOscillatorAudioUnit.h │ │ │ ├── AKPhaseDistortionOscillatorBankAudioUnit.h │ │ │ ├── AKPhaseLockedVocoderAudioUnit.h │ │ │ ├── AKPhaserAudioUnit.h │ │ │ ├── AKPinkNoiseAudioUnit.h │ │ │ ├── AKPitchShifterAudioUnit.h │ │ │ ├── AKPluckedStringAudioUnit.h │ │ │ ├── AKPresetManager.h │ │ │ ├── AKRenderTap.h │ │ │ ├── AKResonantFilterAudioUnit.h │ │ │ ├── AKRhinoGuitarProcessorAudioUnit.h │ │ │ ├── AKRhodesPianoAudioUnit.h │ │ │ ├── AKRolandTB303FilterAudioUnit.h │ │ │ ├── AKSamplePlayerAudioUnit.h │ │ │ ├── AKSamplerMetronome.h │ │ │ ├── AKShakerAudioUnit.h │ │ │ ├── AKSporthStack.h │ │ │ ├── AKStereoFieldLimiterAudioUnit.h │ │ │ ├── AKStringResonatorAudioUnit.h │ │ │ ├── AKTanhDistortionAudioUnit.h │ │ │ ├── AKTesterAudioUnit.h │ │ │ ├── AKThreePoleLowpassFilterAudioUnit.h │ │ │ ├── AKTimeline.h │ │ │ ├── AKTimelineTap.h │ │ │ ├── AKToneComplementFilterAudioUnit.h │ │ │ ├── AKToneFilterAudioUnit.h │ │ │ ├── AKTremoloAudioUnit.h │ │ │ ├── AKTubularBellsAudioUnit.h │ │ │ ├── AKVariableDelayAudioUnit.h │ │ │ ├── AKVocalTractAudioUnit.h │ │ │ ├── AKWhiteNoiseAudioUnit.h │ │ │ ├── AKZitaReverbAudioUnit.h │ │ │ ├── AudioKit-Swift.h │ │ │ ├── AudioKit.h │ │ │ ├── EZAudio.h │ │ │ ├── EZAudioDevice.h │ │ │ ├── EZAudioFFT.h │ │ │ ├── EZAudioFile.h │ │ │ ├── EZAudioFileMarker.h │ │ │ ├── EZAudioFloatConverter.h │ │ │ ├── EZAudioFloatData.h │ │ │ ├── EZAudioPlayer.h │ │ │ ├── EZAudioUtilities.h │ │ │ ├── EZMicrophone.h │ │ │ ├── EZOutput.h │ │ │ ├── EZRecorder.h │ │ │ ├── GainEffectDsp.hpp │ │ │ ├── TPCircularBuffer+AudioBufferList.h │ │ │ ├── TPCircularBuffer+Unit.h │ │ │ └── TPCircularBuffer.h │ │ ├── Modules │ │ │ ├── AudioKit.swiftmodule │ │ │ │ ├── x86_64.swiftdoc │ │ │ │ └── x86_64.swiftmodule │ │ │ └── module.modulemap │ │ └── Resources │ │ │ ├── Info.plist │ │ │ ├── Skeleton.aupreset │ │ │ ├── fwavblnk.raw │ │ │ ├── mand1.raw │ │ │ ├── mand10.raw │ │ │ ├── mand11.raw │ │ │ ├── mand12.raw │ │ │ ├── mand2.raw │ │ │ ├── mand3.raw │ │ │ ├── mand4.raw │ │ │ ├── mand5.raw │ │ │ ├── mand6.raw │ │ │ ├── mand7.raw │ │ │ ├── mand8.raw │ │ │ ├── mand9.raw │ │ │ ├── mandpluk.raw │ │ │ └── sinewave.raw │ │ └── Current ├── FMOscillator.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── nicholasarner.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── FMOscillator.xcscheme │ │ └── xcschememanagement.plist ├── FMOscillator.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── FMOscillator.xcscmblueprint ├── FMOscillator │ ├── AppDelegate.swift │ ├── AudioKit.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── FMSynth.swift │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── MainViewController.swift │ └── SerialCommunicator.swift ├── FMOscillatorTests │ ├── FMOscillatorTests.swift │ └── Info.plist ├── Podfile ├── Podfile.lock └── Pods │ ├── Headers │ └── Private │ │ └── ORSSerialPort │ │ ├── ORSSerialBuffer.h │ │ ├── ORSSerialPacketDescriptor.h │ │ ├── ORSSerialPort.h │ │ ├── ORSSerialPortManager.h │ │ └── ORSSerialRequest.h │ ├── Manifest.lock │ ├── ORSSerialPort │ ├── LICENSE │ ├── README.md │ └── Source │ │ ├── ORSSerialBuffer.h │ │ ├── ORSSerialBuffer.m │ │ ├── ORSSerialPacketDescriptor.h │ │ ├── ORSSerialPacketDescriptor.m │ │ ├── ORSSerialPort.h │ │ ├── ORSSerialPort.m │ │ ├── ORSSerialPortManager.h │ │ ├── ORSSerialPortManager.m │ │ ├── ORSSerialRequest.h │ │ └── ORSSerialRequest.m │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── ORSSerialPort │ ├── Info.plist │ ├── ORSSerialPort-dummy.m │ ├── ORSSerialPort-prefix.pch │ ├── ORSSerialPort-umbrella.h │ ├── ORSSerialPort.modulemap │ └── ORSSerialPort.xcconfig │ └── Pods-FMOscillator │ ├── Info.plist │ ├── Pods-FMOscillator-acknowledgements.markdown │ ├── Pods-FMOscillator-acknowledgements.plist │ ├── Pods-FMOscillator-dummy.m │ ├── Pods-FMOscillator-frameworks.sh │ ├── Pods-FMOscillator-resources.sh │ ├── Pods-FMOscillator-umbrella.h │ ├── Pods-FMOscillator.debug.xcconfig │ ├── Pods-FMOscillator.modulemap │ └── Pods-FMOscillator.release.xcconfig ├── LICENSE ├── README.md ├── Schematic Files ├── AssembledCircuit.png ├── InputCircuit.fzz └── InputCircuit.png └── SearialInputReading └── SearialInputReading.ino /.gitignore: -------------------------------------------------------------------------------- 1 | # xcode noise 2 | build/ 3 | *.pyc 4 | *~.nib/ 5 | *.pbxuser 6 | *.perspective 7 | *.perspectivev3 8 | *.xcuserstate 9 | *.xccheckout 10 | project.xcworkspace/ 11 | xcuserdata/ 12 | 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "FMOscillator/Frameworks/AudioKit"] 2 | path = FMOscillator/Frameworks/AudioKit 3 | url = https://github.com/audiokit/AudioKit/tree/develop.git 4 | -------------------------------------------------------------------------------- /AppUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/AppUI.png -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/AudioKit: -------------------------------------------------------------------------------- 1 | Versions/Current/AudioKit -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Modules: -------------------------------------------------------------------------------- 1 | Versions/Current/Modules -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/AudioKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/AudioKit -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AK4AudioUnitBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioUnitBase.m 3 | // AudioKit 4 | // 5 | // Created by Andrew Voelkel on 11/19/16. 6 | // Copyright © 2016 AudioKit. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import 12 | #import 13 | #import 14 | #import "AK4DspBase.hpp" 15 | 16 | @interface AK4AudioUnitBase : AUAudioUnit 17 | 18 | /** 19 | This method should be overridden by the specific AU code, because it knows how to set up 20 | the DSP code. It should also be declared as public in the h file, but that causes problems 21 | because Swift wants to process as a bridging header, and it doesn't understand what a DspBase 22 | is. I'm not sure the standard way to deal with this. 23 | */ 24 | 25 | - (void*)initDspWithSampleRate:(double) sampleRate channelCount:(AVAudioChannelCount) count; 26 | 27 | /** 28 | Sets the parameter tree. The important piece here is that setting the parameter tree 29 | triggers the setup of the blocks for observer, provider, and string representation. See 30 | the .m file. There may be a better way to do what is needed here. 31 | */ 32 | 33 | - (void) setParameterTree: (AUParameterTree*) tree; 34 | 35 | - (float) getParameterWithAddress:(AUParameterAddress)address; 36 | - (void) setParameterWithAddress:(AUParameterAddress)address value:(AUValue)value; 37 | - (void) setParamWithAddressImmediate:(AUParameterAddress)address value:(AUValue)value; 38 | 39 | // Add for compatibility with AKAudioUnit 40 | 41 | - (void)start; 42 | - (void)stop; 43 | - (BOOL)isPlaying; 44 | - (BOOL)isSetUp; 45 | 46 | // These three properties are what are in the Apple example code. 47 | 48 | @property AUAudioUnitBus *outputBus; 49 | @property AUAudioUnitBusArray *inputBusArray; 50 | @property AUAudioUnitBusArray *outputBusArray; 51 | 52 | @end 53 | 54 | 55 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AK4DspBase.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // AK4DspBase.hpp 3 | // AudioKit 4 | // 5 | // Created by Andrew Voelkel on 9/9/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #ifdef __cplusplus 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | 17 | /** 18 | Base class for DSPKernels. Many of the methods are virtual, because the base AudioUnit class 19 | does not know the type of the subclass at compile time. 20 | */ 21 | 22 | struct AK4DspBase { 23 | 24 | protected: 25 | 26 | int _nChannels; /* From Apple Example code */ 27 | double _sampleRate; /* From Apple Example code */ 28 | AudioBufferList* _inBufferListPtr = nullptr; /* From Apple Example code */ 29 | AudioBufferList* _outBufferListPtr = nullptr; /* From Apple Example code */ 30 | 31 | // To support AKAudioUnit functions 32 | bool _initialized = true; 33 | bool _playing = true; 34 | int64_t _now; // current time in samples 35 | 36 | public: 37 | 38 | /** The Render function. */ 39 | virtual void process(uint32_t frameCount, uint32_t bufferOffset) = 0; 40 | 41 | /** Uses the ParameterAddress as a key */ 42 | virtual void setParameter(uint64_t address, float value, bool immediate = false) {} 43 | 44 | /** Uses the ParameterAddress as a key */ 45 | virtual float getParameter(uint64_t address) { return 0.0; } 46 | 47 | /** Get the DSP into initialized state */ 48 | virtual void reset() {} 49 | 50 | virtual void setBuffers(AudioBufferList* inBufs, AudioBufferList* outBufs) { 51 | _inBufferListPtr = inBufs; 52 | _outBufferListPtr = outBufs; 53 | } 54 | 55 | virtual void init(int nChannels, double sampleRate) { 56 | this->_nChannels = nChannels; this->_sampleRate = sampleRate; 57 | } 58 | 59 | // Add for compatibility with AKAudioUnit 60 | virtual void start() { _playing = true; } 61 | virtual void stop() { _playing = false; } 62 | virtual bool isPlaying() { return _playing; } 63 | virtual bool isSetup() { return _initialized; } 64 | 65 | 66 | /** 67 | Handles the event list processing and rendering loop. Should be called from AU renderBlock 68 | From Apple Example code 69 | */ 70 | void processWithEvents(AudioTimeStamp const *timestamp, AUAudioFrameCount frameCount, 71 | AURenderEvent const *events) { 72 | 73 | int64_t now = timestamp->mSampleTime; 74 | int64_t frameStartTime = now; 75 | AUAudioFrameCount framesRemaining = frameCount; 76 | AURenderEvent const *event = events; 77 | 78 | while (framesRemaining > 0) { 79 | // If there are no more events, we can process the entire remaining segment and exit. 80 | if (event == nullptr) { 81 | AUAudioFrameCount const bufferOffset = frameCount - framesRemaining; 82 | process(framesRemaining, bufferOffset); 83 | _now = frameStartTime; 84 | return; 85 | } 86 | 87 | // **** start late events late. 88 | auto timeZero = AUEventSampleTime(0); 89 | auto headEventTime = event->head.eventSampleTime; 90 | AUAudioFrameCount const framesThisSegment = AUAudioFrameCount(std::max(timeZero, headEventTime - now)); 91 | 92 | // Compute everything before the next event. 93 | if (framesThisSegment > 0) { 94 | AUAudioFrameCount const bufferOffset = frameCount - framesRemaining; 95 | process(framesThisSegment, bufferOffset); 96 | 97 | // Advance frames. 98 | framesRemaining -= framesThisSegment; 99 | // Advance time. 100 | now += framesThisSegment; 101 | } 102 | performAllSimultaneousEvents(now, event); 103 | } 104 | _now = frameStartTime; 105 | } 106 | 107 | private: 108 | 109 | /** From Apple Example code */ 110 | void handleOneEvent(AURenderEvent const *event) { 111 | switch (event->head.eventType) { 112 | case AURenderEventParameter: 113 | case AURenderEventParameterRamp: { 114 | // AUParameterEvent const& paramEvent = event->parameter; 115 | // startRamp(paramEvent.parameterAddress, paramEvent.value, paramEvent.rampDurationSampleFrames); 116 | break; 117 | } 118 | case AURenderEventMIDI: 119 | // handleMIDIEvent(event->MIDI); 120 | break; 121 | default: 122 | break; 123 | } 124 | } 125 | 126 | /** From Apple Example code */ 127 | void performAllSimultaneousEvents(AUEventSampleTime now, AURenderEvent const *&event) { 128 | do { 129 | handleOneEvent(event); 130 | event = event->head.next; 131 | // While event is not null and is simultaneous (or late). 132 | } while (event && event->head.eventSampleTime <= now); 133 | } 134 | 135 | }; 136 | 137 | #endif 138 | 139 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKAmplitudeEnvelopeAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKAmplitudeEnvelopeAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKAmplitudeEnvelopeAudioUnit : AKAudioUnit 13 | @property (nonatomic) float attackDuration; 14 | @property (nonatomic) float decayDuration; 15 | @property (nonatomic) float sustainLevel; 16 | @property (nonatomic) float releaseDuration; 17 | @end 18 | 19 | 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKAmplitudeTrackerAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKAmplitudeTrackerAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | typedef void (^AKThresholdCallback)(BOOL); 14 | 15 | @interface AKAmplitudeTrackerAudioUnit : AKAudioUnit 16 | @property (readonly) float leftAmplitude; 17 | @property (readonly) float rightAmplitude; 18 | @property (nonatomic) float threshold; 19 | //@property (nonatomic) float smoothness; //in development 20 | @property (nonatomic) AKThresholdCallback thresholdCallback; 21 | - (void)setHalfPowerPoint:(float)halfPowerPoint; 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | 12 | @protocol AKKernelUnit 13 | -(AUImplementorValueProvider)getter; 14 | -(AUImplementorValueObserver)setter; 15 | @end 16 | 17 | @interface AKAudioUnit : AUAudioUnit 18 | @property AUAudioUnitBus *outputBus; 19 | @property AUAudioUnitBusArray *inputBusArray; 20 | @property AUAudioUnitBusArray *outputBusArray; 21 | @property AVAudioFormat *defaultFormat; 22 | 23 | - (void)start; 24 | - (void)stop; 25 | - (BOOL)isPlaying; 26 | - (BOOL)isSetUp; 27 | 28 | @property double rampTime; 29 | 30 | -(AUImplementorValueProvider)getter; 31 | -(AUImplementorValueObserver)setter; 32 | 33 | @end 34 | 35 | //@protocol AUParameterCollection 36 | //- (AUValue)objectAtIndexedSubscript:(AUParameter *)idx; 37 | //- (void)setObject:(AUValue)obj atIndexedSubscript:(AUParameter *)idx; 38 | //@end 39 | 40 | @interface AUParameter(Ext) 41 | -(instancetype)init:(NSString *)identifier 42 | name:(NSString *)name 43 | address:(AUParameterAddress)address 44 | min:(AUValue)min 45 | max:(AUValue)max 46 | unit:(AudioUnitParameterUnit)unit; 47 | 48 | +(instancetype)parameter:(NSString *)identifier 49 | name:(NSString *)name 50 | address:(AUParameterAddress)address 51 | min:(AUValue)min 52 | max:(AUValue)max 53 | unit:(AudioUnitParameterUnit)unit; 54 | 55 | +(instancetype)frequency:(NSString *)identifier 56 | name:(NSString *)name 57 | address:(AUParameterAddress)address; 58 | 59 | @end 60 | 61 | @interface AUParameterTree(Ext) 62 | +(instancetype)tree:(NSArray *)children; 63 | @end 64 | 65 | @interface AVAudioNode(Ext) 66 | -(instancetype)initWithComponent:(AudioComponentDescription)component; 67 | @end 68 | 69 | 70 | #define standardKernelPassthroughs() \ 71 | - (void)start { _kernel.start(); } \ 72 | - (void)stop { _kernel.stop(); } \ 73 | - (BOOL)isPlaying { return _kernel.started; } \ 74 | - (BOOL)isSetUp { return _kernel.resetted; } \ 75 | - (void)setShouldBypassEffect:(BOOL)shouldBypassEffect { \ 76 | if (shouldBypassEffect) {\ 77 | _kernel.stop();\ 78 | } else {\ 79 | _kernel.start();\ 80 | }\ 81 | }\ 82 | 83 | #define standardSetup(str) \ 84 | self.rampTime = AKSettings.rampTime; \ 85 | self.defaultFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:AKSettings.sampleRate \ 86 | channels:AKSettings.numberOfChannels]; \ 87 | _kernel.init(self.defaultFormat.channelCount, self.defaultFormat.sampleRate); \ 88 | _inputBus.init(self.defaultFormat, 8); \ 89 | self.inputBusArray = [[AUAudioUnitBusArray alloc] initWithAudioUnit:self \ 90 | busType:AUAudioUnitBusTypeInput \ 91 | busses:@[_inputBus.bus]]; 92 | #define standardGeneratorSetup(str) \ 93 | self.rampTime = AKSettings.rampTime; \ 94 | self.defaultFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:AKSettings.sampleRate \ 95 | channels:AKSettings.numberOfChannels]; \ 96 | _kernel.init(self.defaultFormat.channelCount, self.defaultFormat.sampleRate); \ 97 | _outputBusBuffer.init(self.defaultFormat, 2); \ 98 | self.outputBus = _outputBusBuffer.bus; \ 99 | self.outputBusArray = [[AUAudioUnitBusArray alloc] initWithAudioUnit:self \ 100 | busType:AUAudioUnitBusTypeOutput \ 101 | busses:@[self.outputBus]]; 102 | #define parameterTreeBlock(str) \ 103 | __block AK##str##DSPKernel *blockKernel = &_kernel; \ 104 | self.parameterTree.implementorValueObserver = ^(AUParameter *param, AUValue value) { \ 105 | blockKernel->setParameter(param.address, value); \ 106 | }; \ 107 | self.parameterTree.implementorValueProvider = ^(AUParameter *param) { \ 108 | return blockKernel->getParameter(param.address); \ 109 | }; 110 | 111 | #define AUAudioUnitOverrides(str) \ 112 | \ 113 | - (BOOL)allocateRenderResourcesAndReturnError:(NSError **)outError { \ 114 | if (![super allocateRenderResourcesAndReturnError:outError]) { \ 115 | return NO; \ 116 | } \ 117 | if (self.outputBus.format.channelCount != _inputBus.bus.format.channelCount) { \ 118 | if (outError) { \ 119 | *outError = [NSError errorWithDomain:NSOSStatusErrorDomain \ 120 | code:kAudioUnitErr_FailedInitialization \ 121 | userInfo:nil]; \ 122 | } \ 123 | self.renderResourcesAllocated = NO; \ 124 | return NO; \ 125 | } \ 126 | _inputBus.allocateRenderResources(self.maximumFramesToRender); \ 127 | _kernel.init(self.outputBus.format.channelCount, self.outputBus.format.sampleRate); \ 128 | _kernel.reset(); \ 129 | return YES; \ 130 | } \ 131 | \ 132 | - (void)deallocateRenderResources { \ 133 | [super deallocateRenderResources]; \ 134 | _kernel.destroy(); \ 135 | _inputBus.deallocateRenderResources(); \ 136 | } \ 137 | \ 138 | - (AUInternalRenderBlock)internalRenderBlock { \ 139 | __block AK##str##DSPKernel *state = &_kernel; \ 140 | __block BufferedInputBus *input = &_inputBus; \ 141 | return ^AUAudioUnitStatus( \ 142 | AudioUnitRenderActionFlags *actionFlags, \ 143 | const AudioTimeStamp *timestamp, \ 144 | AVAudioFrameCount frameCount, \ 145 | NSInteger outputBusNumber, \ 146 | AudioBufferList *outputData, \ 147 | const AURenderEvent *realtimeEventListHead, \ 148 | AURenderPullInputBlock pullInputBlock) { \ 149 | AudioUnitRenderActionFlags pullFlags = 0; \ 150 | AUAudioUnitStatus err = input->pullInput(&pullFlags, timestamp, frameCount, 0, pullInputBlock); \ 151 | if (err != 0) { \ 152 | return err; \ 153 | } \ 154 | AudioBufferList *inAudioBufferList = input->mutableAudioBufferList; \ 155 | AudioBufferList *outAudioBufferList = outputData; \ 156 | if (outAudioBufferList->mBuffers[0].mData == nullptr) { \ 157 | for (UInt32 i = 0; i < outAudioBufferList->mNumberBuffers; ++i) { \ 158 | outAudioBufferList->mBuffers[i].mData = inAudioBufferList->mBuffers[i].mData; \ 159 | } \ 160 | } \ 161 | state->setBuffers(inAudioBufferList, outAudioBufferList); \ 162 | state->processWithEvents(timestamp, frameCount, realtimeEventListHead); \ 163 | return noErr; \ 164 | }; \ 165 | } 166 | 167 | #define AUAudioUnitGeneratorOverrides(str) \ 168 | \ 169 | - (BOOL)allocateRenderResourcesAndReturnError:(NSError **)outError { \ 170 | if (![super allocateRenderResourcesAndReturnError:outError]) { \ 171 | return NO; \ 172 | } \ 173 | _outputBusBuffer.allocateRenderResources(self.maximumFramesToRender); \ 174 | _kernel.init(self.outputBus.format.channelCount, self.outputBus.format.sampleRate); \ 175 | _kernel.reset(); \ 176 | return YES; \ 177 | } \ 178 | \ 179 | - (void)deallocateRenderResources { \ 180 | _outputBusBuffer.deallocateRenderResources(); \ 181 | [super deallocateRenderResources]; \ 182 | } \ 183 | \ 184 | - (AUInternalRenderBlock)internalRenderBlock { \ 185 | __block AK##str##DSPKernel *state = &_kernel; \ 186 | return ^AUAudioUnitStatus( \ 187 | AudioUnitRenderActionFlags *actionFlags, \ 188 | const AudioTimeStamp *timestamp, \ 189 | AVAudioFrameCount frameCount, \ 190 | NSInteger outputBusNumber, \ 191 | AudioBufferList *outputData, \ 192 | const AURenderEvent *realtimeEventListHead, \ 193 | AURenderPullInputBlock pullInputBlock) { \ 194 | _outputBusBuffer.prepareOutputBufferList(outputData, frameCount, true); \ 195 | state->setBuffer(outputData); \ 196 | state->processWithEvents(timestamp, frameCount, realtimeEventListHead); \ 197 | return noErr; \ 198 | }; \ 199 | } 200 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKAutoWahAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKAutoWahAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKAutoWahAudioUnit : AKAudioUnit 13 | @property (nonatomic) float wah; 14 | @property (nonatomic) float mix; 15 | @property (nonatomic) float amplitude; 16 | @end 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKBalancerAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKBalancerAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import 11 | 12 | @interface AKBalancerAudioUnit : AUAudioUnit 13 | - (void)start; 14 | - (void)stop; 15 | - (BOOL)isPlaying; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKBandPassButterworthFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKBandPassButterworthFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKBandPassButterworthFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float centerFrequency; 14 | @property (nonatomic) float bandwidth; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKBandRejectButterworthFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKBandRejectButterworthFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKBandRejectButterworthFilterAudioUnit : AKAudioUnit 14 | @property (nonatomic) float centerFrequency; 15 | @property (nonatomic) float bandwidth; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKBankAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKBankAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka on 8/15/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKBankAudioUnit : AKAudioUnit 14 | 15 | @property (nonatomic) float attackDuration; 16 | @property (nonatomic) float decayDuration; 17 | @property (nonatomic) float sustainLevel; 18 | @property (nonatomic) float releaseDuration; 19 | @property (nonatomic) float pitchBend; 20 | @property (nonatomic) float vibratoDepth; 21 | @property (nonatomic) float vibratoRate; 22 | 23 | - (void)startNote:(uint8_t)note velocity:(uint8_t)velocity; 24 | - (void)startNote:(uint8_t)note velocity:(uint8_t)velocity frequency:(float)frequency; 25 | - (void)stopNote:(uint8_t)note; 26 | 27 | @end 28 | 29 | #define numberOfBankEnumElements 7 30 | 31 | #define standardBankEnumElements() \ 32 | attackDurationAddress = 0, \ 33 | decayDurationAddress = 1, \ 34 | sustainLevelAddress = 2, \ 35 | releaseDurationAddress = 3, \ 36 | pitchBendAddress = 4, \ 37 | vibratoDepthAddress = 5, \ 38 | vibratoRateAddress = 6 39 | 40 | #define standardBankAUParameterList() \ 41 | attackDurationAUParameter, \ 42 | decayDurationAUParameter, \ 43 | sustainLevelAUParameter, \ 44 | releaseDurationAUParameter, \ 45 | pitchBendAUParameter, \ 46 | vibratoDepthAUParameter, \ 47 | vibratoRateAUParameter 48 | 49 | #define standardBankFunctions() \ 50 | - (BOOL)isSetUp { return _kernel.resetted; } \ 51 | - (void)setAttackDuration:(float)attackDuration { _kernel.setAttackDuration(attackDuration); } \ 52 | - (void)setDecayDuration:(float)decayDuration { _kernel.setDecayDuration(decayDuration); } \ 53 | - (void)setSustainLevel:(float)sustainLevel { _kernel.setSustainLevel(sustainLevel); } \ 54 | - (void)setReleaseDuration:(float)releaseDuration { _kernel.setReleaseDuration(releaseDuration); } \ 55 | - (void)setPitchBend:(float)pitchBend { _kernel.setPitchBend(pitchBend); } \ 56 | - (void)setVibratoDepth:(float)vibratoDepth { _kernel.setVibratoDepth(vibratoDepth); } \ 57 | - (void)setVibratoRate:(float)vibratoRate { _kernel.setVibratoRate(vibratoRate); } \ 58 | - (void)stopNote:(uint8_t)note { _kernel.stopNote(note); } \ 59 | - (void)startNote:(uint8_t)note velocity:(uint8_t)velocity { _kernel.startNote(note, velocity); } \ 60 | - (void)startNote:(uint8_t)note velocity:(uint8_t)velocity frequency:(float)frequency { \ 61 | _kernel.startNote(note, velocity, frequency); \ 62 | } 63 | 64 | #define standardBankParameters() \ 65 | AudioUnitParameterOptions flags = kAudioUnitParameterFlag_IsWritable | kAudioUnitParameterFlag_IsReadable | kAudioUnitParameterFlag_DisplayLogarithmic;\ 66 | AUParameter *attackDurationAUParameter = \ 67 | [AUParameterTree createParameterWithIdentifier:@"attackDuration" \ 68 | name:@"Attack" \ 69 | address:attackDurationAddress \ 70 | min:0 \ 71 | max:1 \ 72 | unit:kAudioUnitParameterUnit_Seconds \ 73 | unitName:nil \ 74 | flags:flags \ 75 | valueStrings:nil \ 76 | dependentParameters:nil]; \ 77 | AUParameter *decayDurationAUParameter = \ 78 | [AUParameterTree createParameterWithIdentifier:@"decayDuration" \ 79 | name:@"Decay" \ 80 | address:decayDurationAddress \ 81 | min:0 \ 82 | max:1 \ 83 | unit:kAudioUnitParameterUnit_Seconds \ 84 | unitName:nil \ 85 | flags:flags \ 86 | valueStrings:nil \ 87 | dependentParameters:nil]; \ 88 | AUParameter *sustainLevelAUParameter = \ 89 | [AUParameterTree createParameterWithIdentifier:@"sustainLevel" \ 90 | name:@"Sustain Level" \ 91 | address:sustainLevelAddress \ 92 | min:0 \ 93 | max:1 \ 94 | unit:kAudioUnitParameterUnit_Generic \ 95 | unitName:nil \ 96 | flags:flags \ 97 | valueStrings:nil \ 98 | dependentParameters:nil]; \ 99 | AUParameter *releaseDurationAUParameter = \ 100 | [AUParameterTree createParameterWithIdentifier:@"releaseDuration" \ 101 | name:@"Release" \ 102 | address:releaseDurationAddress \ 103 | min:0 \ 104 | max:1 \ 105 | unit:kAudioUnitParameterUnit_Seconds \ 106 | unitName:nil \ 107 | flags:flags \ 108 | valueStrings:nil \ 109 | dependentParameters:nil]; \ 110 | AUParameter *pitchBendAUParameter = \ 111 | [AUParameterTree createParameterWithIdentifier:@"pitchBend" \ 112 | name:@"Pitch Bend" \ 113 | address:pitchBendAddress \ 114 | min:-48 \ 115 | max:48 \ 116 | unit:kAudioUnitParameterUnit_RelativeSemiTones \ 117 | unitName:nil \ 118 | flags:0 \ 119 | valueStrings:nil \ 120 | dependentParameters:nil]; \ 121 | AUParameter *vibratoDepthAUParameter = \ 122 | [AUParameterTree createParameterWithIdentifier:@"vibratoDepth" \ 123 | name:@"Vibrato Depth" \ 124 | address:vibratoDepthAddress \ 125 | min:0 \ 126 | max:24 \ 127 | unit:kAudioUnitParameterUnit_RelativeSemiTones \ 128 | unitName:nil \ 129 | flags:0 \ 130 | valueStrings:nil \ 131 | dependentParameters:nil]; \ 132 | AUParameter *vibratoRateAUParameter = \ 133 | [AUParameterTree createParameterWithIdentifier:@"vibratoRate" \ 134 | name:@"Vibrato Rate" \ 135 | address:vibratoRateAddress \ 136 | min:0 \ 137 | max:600 \ 138 | unit:kAudioUnitParameterUnit_Hertz \ 139 | unitName:nil \ 140 | flags:0 \ 141 | valueStrings:nil \ 142 | dependentParameters:nil]; \ 143 | attackDurationAUParameter.value = 0.1; \ 144 | decayDurationAUParameter.value = 0.1; \ 145 | sustainLevelAUParameter.value = 1.0; \ 146 | releaseDurationAUParameter.value = 0.1; \ 147 | pitchBendAUParameter.value = 0; \ 148 | vibratoDepthAUParameter.value = 0; \ 149 | vibratoRateAUParameter.value = 0; \ 150 | _kernel.setParameter(attackDurationAddress, attackDurationAUParameter.value); \ 151 | _kernel.setParameter(decayDurationAddress, decayDurationAUParameter.value); \ 152 | _kernel.setParameter(sustainLevelAddress, sustainLevelAUParameter.value); \ 153 | _kernel.setParameter(releaseDurationAddress, releaseDurationAUParameter.value); \ 154 | _kernel.setParameter(pitchBendAddress, pitchBendAUParameter.value); \ 155 | _kernel.setParameter(vibratoDepthAddress, vibratoDepthAUParameter.value);\ 156 | _kernel.setParameter(vibratoRateAddress, vibratoRateAUParameter.value); 157 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKBitCrusherAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKBitCrusherAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKBitCrusherAudioUnit : AKAudioUnit 13 | @property (nonatomic) float bitDepth; 14 | @property (nonatomic) float sampleRate; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKBoosterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKBoosterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKBoosterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float leftGain; 14 | @property (nonatomic) float rightGain; 15 | @end 16 | 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKBrownianNoiseAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKBrownianNoiseAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKBrownianNoiseAudioUnit : AKAudioUnit 13 | @property (nonatomic) float amplitude; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKChowningReverbAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKChowningReverbAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AK4AudioUnitBase.h" 12 | 13 | @interface AKChowningReverbAudioUnit : AK4AudioUnitBase 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKClarinetAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKClarinetAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKClarinetAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float amplitude; 15 | 16 | - (void)triggerFrequency:(float)frequency amplitude:(float)amplitude; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKClipperAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKClipperAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKClipperAudioUnit : AKAudioUnit 13 | @property (nonatomic) float limit; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKCombFilterReverbAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKCombFilterReverbAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKCombFilterReverbAudioUnit : AKAudioUnit 13 | @property (nonatomic) float reverbDuration; 14 | - (void)setLoopDuration:(float)duration; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKConvolutionAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKConvolutionAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKConvolutionAudioUnit : AKAudioUnit 13 | - (void)setupAudioFileTable:(float *)data size:(UInt32)size; 14 | - (void)setPartitionLength:(int)partitionLength; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKCostelloReverbAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKCostelloReverbAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKCostelloReverbAudioUnit : AKAudioUnit 13 | @property (nonatomic) float feedback; 14 | @property (nonatomic) float cutoffFrequency; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKDCBlockAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKDCBlockAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKDCBlockAudioUnit : AKAudioUnit 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKDripAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKDripAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKDripAudioUnit : AKAudioUnit 13 | @property (nonatomic) float intensity; 14 | @property (nonatomic) float dampingFactor; 15 | @property (nonatomic) float energyReturn; 16 | @property (nonatomic) float mainResonantFrequency; 17 | @property (nonatomic) float firstResonantFrequency; 18 | @property (nonatomic) float secondResonantFrequency; 19 | @property (nonatomic) float amplitude; 20 | 21 | - (void)trigger; 22 | 23 | @end 24 | 25 | 26 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKDynaRageCompressorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKDynaRageCompressorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Mike Gazzaruso, revision history on Github. 6 | // Copyright © 2017 Mike Gazzaruso, Devoloop Srls. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKDynaRageCompressorAudioUnit : AKAudioUnit 13 | @property (nonatomic) float ratio; 14 | @property (nonatomic) float threshold; 15 | @property (nonatomic) float attackTime; 16 | @property (nonatomic) float releaseTime; 17 | @property (nonatomic) float rageAmount; 18 | @property (nonatomic) BOOL rageIsOn; 19 | @end 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKDynamicRangeCompressorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKDynamicRangeCompressorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKDynamicRangeCompressorAudioUnit : AKAudioUnit 13 | @property (nonatomic) float ratio; 14 | @property (nonatomic) float threshold; 15 | @property (nonatomic) float attackTime; 16 | @property (nonatomic) float releaseTime; 17 | @end 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKEqualizerFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKEqualizerFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKEqualizerFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float centerFrequency; 14 | @property (nonatomic) float bandwidth; 15 | @property (nonatomic) float gain; 16 | @end 17 | 18 | 19 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKFMOscillatorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKFMOscillatorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKFMOscillatorAudioUnit : AKAudioUnit 13 | @property (nonatomic) float baseFrequency; 14 | @property (nonatomic) float carrierMultiplier; 15 | @property (nonatomic) float modulatingMultiplier; 16 | @property (nonatomic) float modulationIndex; 17 | @property (nonatomic) float amplitude; 18 | 19 | - (void)setupWaveform:(int)size; 20 | - (void)setWaveformValue:(float)value atIndex:(UInt32)index; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKFMOscillatorBankAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKFMOscillatorBankAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKBankAudioUnit.h" 12 | 13 | @interface AKFMOscillatorBankAudioUnit : AKBankAudioUnit 14 | 15 | @property (nonatomic) float carrierMultiplier; 16 | @property (nonatomic) float modulatingMultiplier; 17 | @property (nonatomic) float modulationIndex; 18 | 19 | - (void)setupWaveform:(int)size; 20 | - (void)setWaveformValue:(float)value atIndex:(UInt32)index; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKFlatFrequencyResponseReverbAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKFlatFrequencyResponseReverbAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKFlatFrequencyResponseReverbAudioUnit : AKAudioUnit 13 | @property (nonatomic) float reverbDuration; 14 | - (void)setLoopDuration:(float)duration; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKFluteAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKFluteAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKFluteAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float amplitude; 15 | 16 | - (void)triggerFrequency:(float)frequency amplitude:(float)amplitude; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKFormantFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKFormantFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKFormantFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float x; 14 | @property (nonatomic) float y; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKFrequencyTrackerAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKFrequencyTrackerAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKFrequencyTrackerAudioUnit : AKAudioUnit 14 | @property (readonly) float amplitude; 15 | @property (readonly) float frequency; 16 | @end 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKHighPassButterworthFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKHighPassButterworthFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKHighPassButterworthFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float cutoffFrequency; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKHighShelfParametricEqualizerFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKHighShelfParametricEqualizerFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKHighShelfParametricEqualizerFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float centerFrequency; 14 | @property (nonatomic) float gain; 15 | @property (nonatomic) float q; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKKorgLowPassFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKKorgLowPassFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKKorgLowPassFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float cutoffFrequency; 14 | @property (nonatomic) float resonance; 15 | @property (nonatomic) float saturation; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKLazyTap.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKLazyTap.h 3 | // AudioKit 4 | // 5 | // Created by David O'Neill on 8/16/17. 6 | // Copyright © AudioKit. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import "AKRenderTap.h" 13 | 14 | @interface AKLazyTap : NSObject 15 | 16 | /*! 17 | * Initializes a tap by adding a render notify callback to the node's 18 | * underlying audioUnit. 19 | * 20 | * The render notify will be removed on dealloc. 21 | * 22 | * @param node The AVAudioNode that will the tap will pull buffers from. 23 | * @return An AKLazyTap if sucessful in adding the renderNotify. 24 | */ 25 | -(instancetype _Nullable)initWithNode:(AVAudioNode * _Nonnull)node; 26 | 27 | /*! 28 | * Initializes a tap by adding a render notify callback to the audioUnit. 29 | * 30 | * The render notify will be removed on dealloc. 31 | * 32 | * @param audioUnit The audioUnit that the tap will pull buffers from. 33 | * @return An AKLazyTap if sucessful in adding the renderNotify. 34 | */ 35 | -(instancetype _Nullable)initWithAudioUnit:(AudioUnit _Nonnull)audioUnit; 36 | 37 | /*! 38 | * Initializes a tap by adding a render notify callback to the node's 39 | * underlying audioUnit. 40 | * 41 | * The render notify will be removed on dealloc. 42 | * 43 | * @param node The AVAudioNode that will the tap will pull buffers from. 44 | * @param seconds Minumum seconds of audio that the tap will hold. 45 | * @return An AKLazyTap if sucessful in adding the renderNotify. 46 | */ 47 | -(instancetype _Nullable)initWithNode:(AVAudioNode * _Nonnull)node queueTime:(double)seconds; 48 | 49 | /*! 50 | * Initializes a tap by adding a render notify callback to the audioUnit. 51 | * 52 | * The render notify will be removed on dealloc. 53 | * 54 | * @param audioUnit The audioUnit that the tap will pull buffers from. 55 | * @param seconds Minumum seconds of audio that the tap will hold. 56 | * @return An AKLazyTap if sucessful in adding the renderNotify. 57 | */ 58 | -(instancetype _Nullable)initWithAudioUnit:(AudioUnit _Nonnull)audioUnit queueTime:(double)seconds NS_DESIGNATED_INITIALIZER; 59 | -(instancetype _Nonnull )init NS_UNAVAILABLE; 60 | 61 | /*! 62 | * Removes all audio held in the inernal buffer. 63 | */ 64 | -(void)clear; 65 | 66 | /*! 67 | * Will pull the next audioBufferlist from the queue and copy 68 | * it to bufferlistOut. 69 | * 70 | * @param bufferlistOut An audioBufferList that the audio will be copied 71 | * to, Should be allocated to store at least one render cylce of audio. 72 | * @param timeStamp On output, the timeStamp for the audioBufferlist. 73 | * @return True if audio was copied, false if no audio to copy. 74 | */ 75 | -(BOOL)copyNextBufferList:(AudioBufferList * _Nonnull)bufferlistOut timeStamp:(inout AudioTimeStamp * _Nullable)timeStamp; 76 | 77 | /*! 78 | * Will fill the suplied buffer with as much audio as it can hold or 79 | * as much audio as the internal buffer contains, whichever is less. 80 | * 81 | * @param buffer A buffer that will be filled with audio. 82 | * @param timeStamp On output, the timeStamp for the first sample of 83 | * audio in the buffer. 84 | * @return True if audio was copied, false if no audio to copy. 85 | */ 86 | -(BOOL)fillNextBuffer:(AVAudioPCMBuffer * _Nonnull)buffer timeStamp:(inout AudioTimeStamp * _Nullable)timeStamp; 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKLowPassButterworthFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKLowPassButterworthFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKLowPassButterworthFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float cutoffFrequency; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKLowShelfParametricEqualizerFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKLowShelfParametricEqualizerFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKLowShelfParametricEqualizerFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float cornerFrequency; 14 | @property (nonatomic) float gain; 15 | @property (nonatomic) float q; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKMandolinAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKMandolinAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKMandolinAudioUnit : AKAudioUnit 13 | @property (nonatomic) float detune; 14 | @property (nonatomic) float bodySize; 15 | 16 | - (void)setFrequency:(float)frequency course:(int)course; 17 | - (void)pluckCourse:(int)course position:(float)position velocity:(int)velocity; 18 | - (void)muteCourse:(int)course; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKMetalBarAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKMetalBarAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKMetalBarAudioUnit : AKAudioUnit 14 | @property (nonatomic) float leftBoundaryCondition; 15 | @property (nonatomic) float rightBoundaryCondition; 16 | @property (nonatomic) float decayDuration; 17 | @property (nonatomic) float scanSpeed; 18 | @property (nonatomic) float position; 19 | @property (nonatomic) float strikeVelocity; 20 | @property (nonatomic) float strikeWidth; 21 | 22 | - (void)trigger; 23 | 24 | @end 25 | 26 | 27 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKMicrophoneTrackerEngine.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKMicrophoneTrackerEngine.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka on 5/9/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "EZAudio.h" 12 | 13 | @interface AKMicrophoneTrackerEngine : NSObject 14 | @property float amplitude; 15 | @property float frequency; 16 | 17 | - (void)start; 18 | - (void)stop; 19 | @end 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKModalResonanceFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKModalResonanceFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKModalResonanceFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float qualityFactor; 15 | @end 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKMoogLadderAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKMoogLadderAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKMoogLadderAudioUnit : AKAudioUnit 13 | @property (nonatomic) float cutoffFrequency; 14 | @property (nonatomic) float resonance; 15 | @end 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKMorphingOscillatorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKMorphingOscillatorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKMorphingOscillatorAudioUnit : AKAudioUnit 14 | @property (nonatomic) float frequency; 15 | @property (nonatomic) float amplitude; 16 | @property (nonatomic) float index; 17 | @property (nonatomic) float detuningOffset; 18 | @property (nonatomic) float detuningMultiplier; 19 | 20 | - (void)setupWaveform:(UInt32)waveform size:(int)size; 21 | - (void)setWaveform:(UInt32)waveform withValue:(float)value atIndex:(UInt32)index; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKMorphingOscillatorBankAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKMorphingOscillatorBankAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKBankAudioUnit.h" 11 | 12 | @interface AKMorphingOscillatorBankAudioUnit : AKBankAudioUnit 13 | 14 | @property (nonatomic) float index; 15 | 16 | - (void)setupWaveform:(UInt32)waveform size:(int)size; 17 | - (void)setWaveform:(UInt32)waveform withValue:(float)value atIndex:(UInt32)index; 18 | - (void)reset; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKOfflineRenderAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKOfflineRenderAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by David O'Neill on 8/7/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | NS_DEPRECATED(10_10, 10_13, 8_0, 11_0) 13 | @interface AKOfflineRenderAudioUnit : AKAudioUnit 14 | @property BOOL internalRenderEnabled; // default = true; 15 | 16 | -(AVAudioPCMBuffer * _Nullable)renderToBuffer:(NSTimeInterval)seconds error:(NSError *_Nullable*__null_unspecified)outError; 17 | 18 | -(BOOL)renderToFile:(NSURL * _Nonnull)fileURL seconds:(double)seconds settings:(NSDictionary * _Nullable)settings error:(NSError * _Nullable * _Nullable)error; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKOperationEffectAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKOperationEffectAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @class AKCustomUgen; 14 | 15 | @interface AKOperationEffectAudioUnit : AKAudioUnit 16 | @property (nonatomic) NSArray *parameters; 17 | - (void)setSporth:(NSString *)sporth; 18 | - (void)addCustomUgen:(AKCustomUgen *)ugen; 19 | @end 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKOperationGeneratorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKOperationGeneratorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @class AKCustomUgen; 13 | 14 | @interface AKOperationGeneratorAudioUnit : AKAudioUnit 15 | @property (nonatomic) NSArray *parameters; 16 | - (void)setSporth:(NSString *)sporth; 17 | - (void)trigger:(int)trigger; 18 | - (void)addCustomUgen:(AKCustomUgen *)ugen; 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKOscillatorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKOscillatorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKOscillatorAudioUnit : AKAudioUnit 14 | @property (nonatomic) float frequency; 15 | @property (nonatomic) float amplitude; 16 | @property (nonatomic) float detuningOffset; 17 | @property (nonatomic) float detuningMultiplier; 18 | 19 | - (void)setupWaveform:(int)size; 20 | - (void)setWaveformValue:(float)value atIndex:(UInt32)index; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKOscillatorBankAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKOscillatorBankAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKBankAudioUnit.h" 12 | 13 | @interface AKOscillatorBankAudioUnit : AKBankAudioUnit 14 | 15 | - (void)setupWaveform:(int)size; 16 | - (void)setWaveformValue:(float)value atIndex:(UInt32)index; 17 | - (void)startNote:(uint8_t)note velocity:(uint8_t)velocity; 18 | - (void)startNote:(uint8_t)note velocity:(uint8_t)velocity frequency:(float)frequency; 19 | - (void)stopNote:(uint8_t)note; 20 | - (void)reset; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPWMOscillatorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPWMOscillatorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKPWMOscillatorAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float amplitude; 15 | @property (nonatomic) float pulseWidth; 16 | @property (nonatomic) float detuningOffset; 17 | @property (nonatomic) float detuningMultiplier; 18 | @end 19 | 20 | 21 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPWMOscillatorBankAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPWMOscillatorBankAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKBankAudioUnit.h" 12 | 13 | @interface AKPWMOscillatorBankAudioUnit : AKBankAudioUnit 14 | 15 | @property (nonatomic) float pulseWidth; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPannerAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPannerAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKPannerAudioUnit : AKAudioUnit 13 | @property (nonatomic) float pan; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPeakingParametricEqualizerFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPeakingParametricEqualizerFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKPeakingParametricEqualizerFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float centerFrequency; 14 | @property (nonatomic) float gain; 15 | @property (nonatomic) float q; 16 | @end 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPhaseDistortionOscillatorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPhaseDistortionOscillatorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKPhaseDistortionOscillatorAudioUnit : AKAudioUnit 14 | @property (nonatomic) float frequency; 15 | @property (nonatomic) float amplitude; 16 | @property (nonatomic) float phaseDistortion; 17 | @property (nonatomic) float detuningOffset; 18 | @property (nonatomic) float detuningMultiplier; 19 | 20 | - (void)setupWaveform:(int)size; 21 | - (void)setWaveformValue:(float)value atIndex:(UInt32)index; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPhaseDistortionOscillatorBankAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPhaseDistortionOscillatorBankAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKBankAudioUnit.h" 12 | 13 | @interface AKPhaseDistortionOscillatorBankAudioUnit : AKBankAudioUnit 14 | 15 | @property (nonatomic) float phaseDistortion; 16 | 17 | - (void)setupWaveform:(int)size; 18 | - (void)setWaveformValue:(float)value atIndex:(UInt32)index; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPhaseLockedVocoderAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPhaseLockedVocoderAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKPhaseLockedVocoderAudioUnit : AKAudioUnit 13 | @property (nonatomic) float position; 14 | @property (nonatomic) float amplitude; 15 | @property (nonatomic) float pitchRatio; 16 | 17 | - (void)setupAudioFileTable:(float *)data size:(UInt32)size; 18 | 19 | @end 20 | 21 | 22 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPhaserAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPhaserAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKPhaserAudioUnit : AKAudioUnit 13 | @property (nonatomic) float notchMinimumFrequency; 14 | @property (nonatomic) float notchMaximumFrequency; 15 | @property (nonatomic) float notchWidth; 16 | @property (nonatomic) float notchFrequency; 17 | @property (nonatomic) float vibratoMode; 18 | @property (nonatomic) float depth; 19 | @property (nonatomic) float feedback; 20 | @property (nonatomic) float inverted; 21 | @property (nonatomic) float lfoBPM; 22 | @end 23 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPinkNoiseAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPinkNoiseAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKPinkNoiseAudioUnit : AKAudioUnit 13 | @property (nonatomic) float amplitude; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPitchShifterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPitchShifterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKPitchShifterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float shift; 14 | @property (nonatomic) float windowSize; 15 | @property (nonatomic) float crossfade; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPluckedStringAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPluckedStringAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKPluckedStringAudioUnit : AKAudioUnit 14 | @property (nonatomic) float frequency; 15 | @property (nonatomic) float amplitude; 16 | 17 | - (void)triggerFrequency:(float)frequency amplitude:(float)amplitude; 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKPresetManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKPresetManager.h 3 | // 4 | // Created by David O'Neill on 1/8/17. 5 | // Copyright © 2017 AudioKit. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | 13 | 14 | /// AKPresetZone and AKPresetManager create AUPreset Dictionaries that can be loaded by 15 | /// an AUSampler or AVAudioUnitSampler. 16 | @interface AKPresetZone : NSObject 17 | @property BOOL enabled; 18 | @property BOOL loopEnabled; 19 | @property BOOL pitchTracking; 20 | @property int maxKey; 21 | @property int minKey; 22 | @property int rootKey; 23 | @property NSString * _Nonnull filePath; 24 | 25 | /// Initializes to a non pitch tracking sample (ie: for drums) 26 | -(instancetype _Nullable)initWithFilePath:(NSString * _Nonnull)filePath andKey:(int)key; 27 | 28 | /// Initializes to a non pitch tracking sample (ie: for drums) 29 | +(AKPresetZone * _Nullable)zoneWithFilePath:(NSString * _Nonnull)filePath andKey:(int)key; 30 | @end 31 | 32 | @interface AKPresetManager : NSObject 33 | 34 | /// This creates a preset where each file's note is set to it's index in the filePaths array. 35 | +(NSDictionary * _Nullable)presetWithFilePaths:(NSArray * _Nonnull)filePaths oneShot:(BOOL)oneShot; 36 | 37 | /// Creates a preset with an array of zones 38 | +(NSDictionary * _Nullable)presetWithZones:(NSArray * _Nonnull)presetZones oneShot:(BOOL)oneShot; 39 | 40 | /// Retrieve preset from a sampler audio unit. 41 | +(NSDictionary * _Nullable)samplerPreset:(AudioUnit _Nonnull)samplerUnit; 42 | 43 | /// Set thre preset for a sampler 44 | +(BOOL)setPreset:(NSDictionary * _Nonnull)preset forSampler:(AudioUnit _Nonnull)sampler error:(NSError *_Nullable * _Nullable)outError; 45 | @end 46 | 47 | /// Convenience methods for setting ang getting preset. 48 | @interface AVAudioUnitSampler (PresetLoading) 49 | @property NSDictionary * _Nullable preset; 50 | @end 51 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKRenderTap.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKRenderTap.h 3 | // AudioKit 4 | // 5 | // Created by David O'Neill on 8/16/17. 6 | // Copyright © AudioKit. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | /** 14 | * A block that will be called every pre and post render for an audio unit. 15 | * Will be called from the render thread, so no locks, Swift functions or 16 | * Objective-C messages from within this block. Make sure not to capture self. 17 | */ 18 | typedef void(^AKRenderNotifyBlock)(AudioUnitRenderActionFlags * _Nonnull ioActionFlags,const AudioTimeStamp * _Nonnull inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * _Nullable ioData); 19 | 20 | 21 | @interface AKRenderTap : NSObject 22 | 23 | /** 24 | * A block that will be called every pre and post render for an audio unit. 25 | * Will be called from the render thread, so no locks, Swift functions or 26 | * Objective-C messages from within this block. Make sure not to capture self. 27 | * If not initialize with a renderNotify block, then this should be implemented 28 | * by subclasses. 29 | */ 30 | @property (readonly) AKRenderNotifyBlock _Nullable renderNotifyBlock NS_SWIFT_UNAVAILABLE("No render code in Swift"); 31 | 32 | /*! 33 | * Initializes a renderTap, holds reference to audioUnit. 34 | * 35 | * @param audioUnit The audioUnit that will the tap notify on. 36 | * @param block The block tha will be called every pre and post render. 37 | * @return A renderTap ready to start. 38 | */ 39 | -(instancetype _Nullable )initWithAudioUnit:(AudioUnit _Nonnull)audioUnit renderNotify:(AKRenderNotifyBlock _Nullable )block NS_DESIGNATED_INITIALIZER NS_SWIFT_UNAVAILABLE("No render code in Swift"); 40 | 41 | /*! 42 | * Initializes a renderTap, holds reference to underlying audioUnit. 43 | * underlying audioUnit. 44 | * 45 | * @param node The AVAudioNode that will the tap will notify on. 46 | * @param block The block tha will be called every pre and post render. 47 | * @return A renderTap ready to start. 48 | */ 49 | -(instancetype _Nullable )initWithNode:(AVAudioNode * _Nonnull)node renderNotify:(AKRenderNotifyBlock _Nullable )block NS_SWIFT_UNAVAILABLE("No render code in Swift"); 50 | 51 | -(instancetype _Nonnull )init NS_UNAVAILABLE; 52 | 53 | @end 54 | 55 | 56 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKResonantFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKResonantFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKResonantFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float bandwidth; 15 | @end 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKRhinoGuitarProcessorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKRhinoGuitarProcessorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Mike Gazzaruso, revision history on Github. 6 | // Copyright © 2017 Mike Gazzaruso, Devoloop Srls. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKRhinoGuitarProcessorAudioUnit : AKAudioUnit 13 | @property (nonatomic) float preGain; 14 | @property (nonatomic) float postGain; 15 | @property (nonatomic) float lowGain; 16 | @property (nonatomic) float midGain; 17 | @property (nonatomic) float highGain; 18 | @property (nonatomic) float distType; 19 | @property (nonatomic) float distAmount; 20 | @end 21 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKRhodesPianoAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKRhodesPianoAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKRhodesPianoAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float amplitude; 15 | 16 | - (void)triggerFrequency:(float)frequency amplitude:(float)amplitude; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKRolandTB303FilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKRolandTB303FilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKRolandTB303FilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float cutoffFrequency; 14 | @property (nonatomic) float resonance; 15 | @property (nonatomic) float distortion; 16 | @property (nonatomic) float resonanceAsymmetry; 17 | @end 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKSamplePlayerAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKSamplePlayerAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | typedef void (^AKCCallback)(void); 13 | 14 | @interface AKSamplePlayerAudioUnit : AKAudioUnit 15 | @property (nonatomic) float startPoint; 16 | @property (nonatomic) float endPoint; 17 | @property (nonatomic) float rate; 18 | @property (nonatomic) float volume; 19 | @property (nonatomic) BOOL loop; 20 | @property (nonatomic) float loopStartPoint; 21 | @property (nonatomic) float loopEndPoint; 22 | @property (nonatomic) AKCCallback completionHandler; 23 | 24 | - (void)setupAudioFileTable:(UInt32)size; 25 | - (void)loadAudioData:(float *)data size:(UInt32)size; 26 | - (int)size; 27 | - (float)position; 28 | 29 | @end 30 | 31 | 32 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKSamplerMetronome.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKSamplerMetronome.h 3 | // AudioKit 4 | // 5 | // Created by David O'Neill on 8/24/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /// A Simple Metronome that can be syncronized precicesly. 12 | @interface AKSamplerMetronome : AVAudioUnitSampler 13 | 14 | /// Tempo in Beats Per Minute 15 | @property double tempo; 16 | 17 | /// The number of beats in the loop. 18 | @property int beatCount; 19 | 20 | /// The current playback position of the metronome, in beats. 21 | @property double beatTime; 22 | 23 | /// Is metronome playing. 24 | @property (readonly) BOOL isPlaying; 25 | 26 | ///The beat sound url. 27 | @property NSURL * _Nullable sound; 28 | 29 | ///The down beat sound url. 30 | @property NSURL * _Nullable downBeatSound; 31 | 32 | /** 33 | Initialize with metronome sound and downbeat sound. 34 | 35 | @param soundURL The sound URL 36 | @param downBeatSoundURL The down beat sound URL, will use soundURL for down beat if nil 37 | */ 38 | -(instancetype _Nonnull )initWithSound:(NSURL * _Nullable)soundURL downBeatSound:(NSURL * _Nullable)downBeatSoundURL NS_DESIGNATED_INITIALIZER; 39 | 40 | /** 41 | Initialize with metronome sound 42 | 43 | @param soundURL The sound URL 44 | */ 45 | -(instancetype _Nonnull )initWithSound:(NSURL * _Nullable)soundURL; 46 | 47 | /// Starts playback 48 | -(void)play; 49 | 50 | /// Stops playback 51 | -(void)stop; 52 | 53 | /** 54 | Starts playback so that the metronome's resting beatTime will align with audioTime when started. 55 | 56 | If time is in the future, playback will wait to start until that time, if in the past it will start 57 | immediately, but beatTime will be offset so that it still will align with audioTime. 58 | 59 | @param audioTime A time relative the audio render context, host time will be ignnored unless sampleTime is invalid. 60 | */ 61 | -(void)playAt:(AVAudioTime * _Nullable)audioTime; 62 | 63 | /** 64 | Sets the tempo, if audioTime is not nil and isPlaying, change will take place at audioTime. 65 | 66 | @param audioTime A time relative the audio render context, host time will be ignnored unless sampleTime is invalid. 67 | */ 68 | -(void)setTempo:(double)tempo atTime:(AVAudioTime * _Nullable)audioTime; 69 | 70 | /** 71 | Sets the beatCount, if audioTime is not nil and isPlaying, change will take place at audioTime. 72 | 73 | @param audioTime A time relative the audio render context, host time will be ignnored unless sampleTime is invalid. 74 | */ 75 | -(void)setBeatCount:(int)beatCount atTime:(AVAudioTime * _Nullable)audioTime; 76 | 77 | /** Sets the beatTime, if audioTime is not nil and isPlaying, change will take place at audioTime. 78 | 79 | @param audioTime A time relative the audio render context, host time will be ignnored unless sampleTime is invalid. 80 | */ 81 | -(void)setBeatTime:(double)beatTime atTime:(AVAudioTime * _Nullable)audioTime; 82 | 83 | /** 84 | Retrieves the beat time that aligns with audioTime when playing. 85 | 86 | @param audioTime A time relative the audio render context, host time will be ignnored unless sampleTime is invalid. 87 | */ 88 | -(double)beatTimeAtTime:(AVAudioTime * _Nullable)audioTime; 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKShakerAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKShakerAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKShakerAudioUnit : AKAudioUnit 13 | 14 | @property (nonatomic) UInt8 type; 15 | @property (nonatomic) float amplitude; 16 | 17 | - (void)triggerType:(UInt8)type Amplitude:(float)amplitude; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKSporthStack.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKSporthStack.h 3 | // AudioKit 4 | // 5 | // Created by Joseph Constantakis on 3/14/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import 12 | 13 | @interface AKSporthStack : NSObject 14 | - (const char *)popString; 15 | - (float)popFloat; 16 | 17 | - (void)pushFloat:(float)f; 18 | - (void)pushString:(char *)str; 19 | @end 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKStereoFieldLimiterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKStereoFieldLimiterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKStereoFieldLimiterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float amount; 14 | @end 15 | 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKStringResonatorAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKStringResonatorAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKStringResonatorAudioUnit : AKAudioUnit 13 | @property (nonatomic) float fundamentalFrequency; 14 | @property (nonatomic) float feedback; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKTanhDistortionAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKTanhDistortionAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import "AKAudioUnit.h" 12 | 13 | @interface AKTanhDistortionAudioUnit : AKAudioUnit 14 | @property (nonatomic) float pregain; 15 | @property (nonatomic) float postgain; 16 | @property (nonatomic) float postiveShapeParameter; 17 | @property (nonatomic) float negativeShapeParameter; 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKTesterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKTesterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKTesterAudioUnit : AKAudioUnit 13 | 14 | @property (readonly) NSString* md5; 15 | @property int samples; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKThreePoleLowpassFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKThreePoleLowpassFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKThreePoleLowpassFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float distortion; 14 | @property (nonatomic) float cutoffFrequency; 15 | @property (nonatomic) float resonance; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKTimelineTap.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKTimelineTap.h 3 | // AudioKit 4 | // 5 | // Created by David O'Neill on 8/28/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import "AKTimeline.h" 13 | 14 | 15 | @interface AKTimelineTap : NSObject { 16 | @public 17 | AKTimeline _timeline; 18 | } 19 | 20 | /** 21 | A block that will be called with timeline information. 22 | 23 | Will be called from the render thread, so no locks, Swift functions or 24 | Objective-C messages from within this block. Make sure not to capture self. 25 | 26 | @param timeline The AKTimeline. 27 | @param timeStamp A timestamp with mSampleTime representing position in a zero indexed timeline. 28 | @ param offset The number of samples from render start to timeStamp->mSampleTime. Will be 29 | non-zero when a render goes past the loop end and block is called twice in one render. 30 | frames The number of samples rendered. 31 | ioData The Audio buffer, may be invalid if preRender is true. 32 | */ 33 | typedef void(^AKTimelineBlock)( AKTimeline * _Nonnull timeline, 34 | AudioTimeStamp * _Nonnull timeStamp, 35 | UInt32 offset, 36 | UInt32 frames, 37 | AudioBufferList * _Nonnull ioData); 38 | 39 | 40 | /** 41 | A block that will be called with timeline information. 42 | Will be called from the render thread, so no locks, Swift functions or 43 | Objective-C messages from within this block. Make sure not to capture self. 44 | */ 45 | @property (readonly) AKTimelineBlock _Nullable timelineCallback NS_SWIFT_UNAVAILABLE("No render code in Swift"); 46 | 47 | /** 48 | Dictates if timelineCallback will be called pre-render or post-render, defaults to false (postRender). 49 | 50 | Pre-render is better for triggering MIDI as the sample offset is taken into consideration. Post-render 51 | is neccessary for ioData buffer manipulation as buffers' mData is NULL during pre-render. 52 | */ 53 | @property BOOL preRender; 54 | 55 | /** 56 | The underlying timeline. 57 | */ 58 | @property (readonly) AKTimeline * _Nonnull timeline; 59 | 60 | /** 61 | Initializes a timelineTap, holds reference to audioUnit. 62 | 63 | @param audioUnit The audioUnit that will the tap notify on. 64 | @param block The block tha will be called on render thread. 65 | @return A renderTap ready to start. 66 | */ 67 | -(instancetype _Nullable )initWithAudioUnit:(AudioUnit _Nonnull)audioUnit 68 | timelineBlock:(AKTimelineBlock _Nullable )block NS_DESIGNATED_INITIALIZER NS_SWIFT_UNAVAILABLE("No render code in Swift"); 69 | /** 70 | Initializes a renderTap, holds reference to underlying audioUnit. 71 | 72 | @param node The AVAudioNode that will the tap will notify on. 73 | @param block The block tha will be called on render thread. 74 | @return A renderTap ready to start, or NULL if node has no accessible audioUnit. 75 | */ 76 | -(instancetype _Nullable )initWithNode:(AVAudioNode * _Nonnull)node 77 | timelineBlock:(AKTimelineBlock _Nullable )block NS_SWIFT_UNAVAILABLE("No render code in Swift"); 78 | -(instancetype _Nonnull )init NS_UNAVAILABLE; 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKToneComplementFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKToneComplementFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKToneComplementFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float halfPowerPoint; 14 | @end 15 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKToneFilterAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKToneFilterAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKToneFilterAudioUnit : AKAudioUnit 13 | @property (nonatomic) float halfPowerPoint; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKTremoloAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKTremoloAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKTremoloAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float depth; 15 | 16 | - (void)setupWaveform:(int)size; 17 | - (void)setWaveformValue:(float)value atIndex:(UInt32)index; 18 | @end 19 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKTubularBellsAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKTubularBellsAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKTubularBellsAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float amplitude; 15 | 16 | - (void)triggerFrequency:(float)frequency amplitude:(float)amplitude; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKVariableDelayAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKVariableDelayAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKVariableDelayAudioUnit : AKAudioUnit 13 | @property (nonatomic) float time; 14 | @property (nonatomic) float feedback; 15 | @end 16 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKVocalTractAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKVocalTractAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKVocalTractAudioUnit : AKAudioUnit 13 | @property (nonatomic) float frequency; 14 | @property (nonatomic) float tonguePosition; 15 | @property (nonatomic) float tongueDiameter; 16 | @property (nonatomic) float tenseness; 17 | @property (nonatomic) float nasality; 18 | @end 19 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKWhiteNoiseAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKWhiteNoiseAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKWhiteNoiseAudioUnit : AKAudioUnit 13 | @property (nonatomic) float amplitude; 14 | @end 15 | 16 | 17 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AKZitaReverbAudioUnit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKZitaReverbAudioUnit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | #import "AKAudioUnit.h" 11 | 12 | @interface AKZitaReverbAudioUnit : AKAudioUnit 13 | @property (nonatomic) float predelay; 14 | @property (nonatomic) float crossoverFrequency; 15 | @property (nonatomic) float lowReleaseTime; 16 | @property (nonatomic) float midReleaseTime; 17 | @property (nonatomic) float dampingFrequency; 18 | @property (nonatomic) float equalizerFrequency1; 19 | @property (nonatomic) float equalizerLevel1; 20 | @property (nonatomic) float equalizerFrequency2; 21 | @property (nonatomic) float equalizerLevel2; 22 | @property (nonatomic) float dryWetMix; 23 | @end 24 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/AudioKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioKit.h 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka, revision history on Github. 6 | // Copyright © 2017 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #if !TARGET_OS_TV 12 | #import 13 | #endif 14 | 15 | //! Project version number for AudioKit. 16 | FOUNDATION_EXPORT double AudioKitVersionNumber; 17 | 18 | //! Project version string for AudioKit. 19 | FOUNDATION_EXPORT const unsigned char AudioKitVersionString[]; 20 | 21 | // Analysis 22 | #import "AKAmplitudeTrackerAudioUnit.h" 23 | #import "AKFrequencyTrackerAudioUnit.h" 24 | #if !TARGET_OS_TV 25 | #import "AKMicrophoneTrackerEngine.h" 26 | #endif 27 | 28 | // Effects 29 | #import "AKOperationEffectAudioUnit.h" 30 | #import "AKSporthStack.h" 31 | 32 | // Effects / Delay 33 | #import "AKVariableDelayAudioUnit.h" 34 | 35 | // Effects / Distortion 36 | #import "AKBitCrusherAudioUnit.h" 37 | #import "AKClipperAudioUnit.h" 38 | #import "AKTanhDistortionAudioUnit.h" 39 | 40 | // Effects / Dynamics 41 | #import "AKDynamicRangeCompressorAudioUnit.h" 42 | #import "AKDynaRageCompressorAudioUnit.h" 43 | 44 | // Effects / Envelopes 45 | #import "AKAmplitudeEnvelopeAudioUnit.h" 46 | #import "AKTremoloAudioUnit.h" 47 | 48 | // Efffects / Filters 49 | #import "AKAutoWahAudioUnit.h" 50 | #import "AKBandPassButterworthFilterAudioUnit.h" 51 | #import "AKBandRejectButterworthFilterAudioUnit.h" 52 | #import "AKCombFilterReverbAudioUnit.h" 53 | #import "AKDCBlockAudioUnit.h" 54 | #import "AKEqualizerFilterAudioUnit.h" 55 | #import "AKHighPassButterworthFilterAudioUnit.h" 56 | #import "AKHighShelfParametricEqualizerFilterAudioUnit.h" 57 | #import "AKKorgLowPassFilterAudioUnit.h" 58 | #import "AKLowPassButterworthFilterAudioUnit.h" 59 | #import "AKLowShelfParametricEqualizerFilterAudioUnit.h" 60 | #import "AKModalResonanceFilterAudioUnit.h" 61 | #import "AKMoogLadderAudioUnit.h" 62 | #import "AKPeakingParametricEqualizerFilterAudioUnit.h" 63 | #import "AKFormantFilterAudioUnit.h" 64 | #import "AKResonantFilterAudioUnit.h" 65 | #import "AKRolandTB303FilterAudioUnit.h" 66 | #import "AKStringResonatorAudioUnit.h" 67 | #import "AKThreePoleLowpassFilterAudioUnit.h" 68 | #import "AKToneComplementFilterAudioUnit.h" 69 | #import "AKToneFilterAudioUnit.h" 70 | 71 | // Effects / Guitar Processors 72 | #import "AKRhinoGuitarProcessorAudioUnit.h" 73 | 74 | // Effects / Phaser 75 | #import "AKPhaserAudioUnit.h" 76 | 77 | // Effects / Pitch Shifter 78 | #import "AKPitchShifterAudioUnit.h" 79 | 80 | // Effects / Reverb 81 | #import "AKChowningReverbAudioUnit.h" 82 | #import "AKConvolutionAudioUnit.h" 83 | #import "AKCostelloReverbAudioUnit.h" 84 | #import "AKFlatFrequencyResponseReverbAudioUnit.h" 85 | #import "AKZitaReverbAudioUnit.h" 86 | 87 | // Generators 88 | #import "AKOperationGeneratorAudioUnit.h" 89 | 90 | // Generators / Noise 91 | #import "AKBrownianNoiseAudioUnit.h" 92 | #import "AKPinkNoiseAudioUnit.h" 93 | #import "AKWhiteNoiseAudioUnit.h" 94 | 95 | // Generators / Oscillators 96 | #import "AKFMOscillatorAudioUnit.h" 97 | #import "AKFMOscillatorBankAudioUnit.h" 98 | #import "AKMorphingOscillatorAudioUnit.h" 99 | #import "AKMorphingOscillatorBankAudioUnit.h" 100 | #import "AKOscillatorAudioUnit.h" 101 | #import "AKOscillatorBankAudioUnit.h" 102 | #import "AKPhaseDistortionOscillatorAudioUnit.h" 103 | #import "AKPhaseDistortionOscillatorBankAudioUnit.h" 104 | #import "AKPWMOscillatorAudioUnit.h" 105 | #import "AKPWMOscillatorBankAudioUnit.h" 106 | 107 | // Generators / Physical Models 108 | #import "AKClarinetAudioUnit.h" 109 | #import "AKDripAudioUnit.h" 110 | #import "AKFluteAudioUnit.h" 111 | #import "AKMandolinAudioUnit.h" 112 | #import "AKMetalBarAudioUnit.h" 113 | #import "AKPluckedStringAudioUnit.h" 114 | #import "AKRhodesPianoAudioUnit.h" 115 | #import "AKShakerAudioUnit.h" 116 | #import "AKTubularBellsAudioUnit.h" 117 | #import "AKVocalTractAudioUnit.h" 118 | 119 | // Mixing 120 | #import "AKBalancerAudioUnit.h" 121 | #import "AKBoosterAudioUnit.h" 122 | #import "GainEffectDsp.hpp" 123 | #import "AKPannerAudioUnit.h" 124 | #import "AKStereoFieldLimiterAudioUnit.h" 125 | 126 | // Playback 127 | #import "AKPhaseLockedVocoderAudioUnit.h" 128 | #import "AKSamplePlayerAudioUnit.h" 129 | #import "AKPresetManager.h" 130 | 131 | // Testing 132 | #import "AKTesterAudioUnit.h" 133 | 134 | // EZAudio 135 | #import "EZAudio.h" 136 | 137 | // Offline 138 | #import "AKOfflineRenderAudioUnit.h" 139 | 140 | // Taps 141 | #import "AKRenderTap.h" 142 | #import "AKLazyTap.h" 143 | #import "AKTimelineTap.h" 144 | 145 | // Utilities 146 | #import "TPCircularBuffer.h" 147 | #import "TPCircularBuffer+Unit.h" 148 | #import "TPCircularBuffer+AudioBufferList.h" 149 | #import "AKTimeline.h" 150 | 151 | // Sequencer 152 | #import "AKSamplerMetronome.h" 153 | 154 | #ifdef JAZZY_HACK 155 | // Hack to get jazzy to see the UI classes, please ignore 156 | #import "EZPlot.h" 157 | #import "EZAudioDisplayLink.h" 158 | #import "EZAudioPlot.h" 159 | #import "EZAudioPlotGL.h" 160 | #endif 161 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/EZAudioDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // EZAudioDevice.h 3 | // EZAudio 4 | // 5 | // Created by Syed Haris Ali on 6/25/15. 6 | // Copyright (c) 2015 Syed Haris Ali. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | #import 28 | 29 | #if TARGET_OS_IPHONE 30 | #import 31 | #elif TARGET_OS_MAC 32 | #endif 33 | 34 | /** 35 | The EZAudioDevice provides an interface for getting the available input and output hardware devices on iOS and OSX. On iOS the EZAudioDevice uses the available devices found from the AVAudioSession, while on OSX the EZAudioDevice wraps the AudioHardware API to find any devices that are connected including the built-in devices (for instance, Built-In Microphone, Display Audio). Since the AVAudioSession and AudioHardware APIs are quite different the EZAudioDevice has different properties available on each platform. The EZMicrophone now supports setting any specific EZAudioDevice from the `inputDevices` function. 36 | */ 37 | @interface EZAudioDevice : NSObject 38 | 39 | //------------------------------------------------------------------------------ 40 | #pragma mark - Class Methods 41 | //------------------------------------------------------------------------------ 42 | 43 | //------------------------------------------------------------------------------ 44 | // @name Getting The Devices 45 | //------------------------------------------------------------------------------ 46 | 47 | /** 48 | Provides the current EZAudioDevice that is being used to pull input. 49 | @return An EZAudioDevice instance representing the currently selected input device. 50 | */ 51 | + (EZAudioDevice *)currentInputDevice; 52 | 53 | //------------------------------------------------------------------------------ 54 | 55 | /** 56 | Provides the current EZAudioDevice that is being used to output audio. 57 | @return An EZAudioDevice instance representing the currently selected ouotput device. 58 | */ 59 | + (EZAudioDevice *)currentOutputDevice; 60 | 61 | //------------------------------------------------------------------------------ 62 | 63 | /** 64 | Enumerates all the available input devices and returns the result in an NSArray of EZAudioDevice instances. 65 | @return An NSArray containing EZAudioDevice instances, one for each available input device. 66 | */ 67 | + (NSArray *)inputDevices; 68 | 69 | //------------------------------------------------------------------------------ 70 | 71 | /** 72 | Enumerates all the available output devices and returns the result in an NSArray of EZAudioDevice instances. 73 | @return An NSArray of output EZAudioDevice instances. 74 | */ 75 | + (NSArray *)outputDevices; 76 | 77 | #if TARGET_OS_IPHONE 78 | 79 | //------------------------------------------------------------------------------ 80 | 81 | /** 82 | Enumerates all the available input devices. 83 | - iOS only 84 | @param block When enumerating this block executes repeatedly for each EZAudioDevice found. It contains two arguments - first, the EZAudioDevice found, then a pointer to a stop BOOL to allow breaking out of the enumeration) 85 | */ 86 | + (void)enumerateInputDevicesUsingBlock:(void(^)(EZAudioDevice *device, 87 | BOOL *stop))block; 88 | 89 | //------------------------------------------------------------------------------ 90 | 91 | /** 92 | Enumerates all the available output devices. 93 | - iOS only 94 | @param block When enumerating this block executes repeatedly for each EZAudioDevice found. It contains two arguments - first, the EZAudioDevice found, then a pointer to a stop BOOL to allow breaking out of the enumeration) 95 | */ 96 | + (void)enumerateOutputDevicesUsingBlock:(void (^)(EZAudioDevice *device, 97 | BOOL *stop))block; 98 | 99 | #elif TARGET_OS_MAC 100 | 101 | /** 102 | Enumerates all the available devices and returns the result in an NSArray of EZAudioDevice instances. 103 | - OSX only 104 | @return An NSArray of input and output EZAudioDevice instances. 105 | */ 106 | + (NSArray *)devices; 107 | 108 | //------------------------------------------------------------------------------ 109 | 110 | /** 111 | Enumerates all the available devices. 112 | - OSX only 113 | @param block When enumerating this block executes repeatedly for each EZAudioDevice found. It contains two arguments - first, the EZAudioDevice found, then a pointer to a stop BOOL to allow breaking out of the enumeration) 114 | */ 115 | + (void)enumerateDevicesUsingBlock:(void(^)(EZAudioDevice *device, 116 | BOOL *stop))block; 117 | 118 | #endif 119 | 120 | //------------------------------------------------------------------------------ 121 | #pragma mark - Properties 122 | //------------------------------------------------------------------------------ 123 | 124 | /** 125 | An NSString representing a human-reable version of the device. 126 | */ 127 | @property (nonatomic, copy, readonly) NSString *name; 128 | 129 | #if TARGET_OS_IPHONE 130 | 131 | /** 132 | An AVAudioSessionPortDescription describing an input or output hardware port. 133 | - iOS only 134 | */ 135 | @property (nonatomic, strong, readonly) AVAudioSessionPortDescription *port; 136 | 137 | //------------------------------------------------------------------------------ 138 | 139 | /** 140 | An AVAudioSessionDataSourceDescription describing a specific data source for the `port` provided. 141 | - iOS only 142 | */ 143 | @property (nonatomic, strong, readonly) AVAudioSessionDataSourceDescription *dataSource; 144 | 145 | #elif TARGET_OS_MAC 146 | 147 | /** 148 | An AudioDeviceID representing the device in the AudioHardware API. 149 | - OSX only 150 | */ 151 | @property (nonatomic, assign, readonly) AudioDeviceID deviceID; 152 | 153 | //------------------------------------------------------------------------------ 154 | 155 | /** 156 | An NSString representing the name of the manufacturer of the device. 157 | - OSX only 158 | */ 159 | @property (nonatomic, copy, readonly) NSString *manufacturer; 160 | 161 | //------------------------------------------------------------------------------ 162 | 163 | /** 164 | An NSInteger representing the number of input channels available. 165 | - OSX only 166 | */ 167 | @property (nonatomic, assign, readonly) NSInteger inputChannelCount; 168 | 169 | //------------------------------------------------------------------------------ 170 | 171 | /** 172 | An NSInteger representing the number of output channels available. 173 | - OSX only 174 | */ 175 | @property (nonatomic, assign, readonly) NSInteger outputChannelCount; 176 | 177 | //------------------------------------------------------------------------------ 178 | 179 | /** 180 | An NSString representing the persistent identifier for the AudioDevice. 181 | - OSX only 182 | */ 183 | @property (nonatomic, copy, readonly) NSString *UID; 184 | 185 | #endif 186 | 187 | @end 188 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/EZAudioFileMarker.h: -------------------------------------------------------------------------------- 1 | // 2 | // EZAudioFileMarker 3 | // AudioKit 4 | // 5 | // Created by Ryan Francesconi, revision history on Github. 6 | // Copyright © 2016 AudioKit. All rights reserved. 7 | // 8 | // A simple Swift friendly wrapper around the following C struct: 9 | // see: https://developer.apple.com/reference/audiotoolbox/audiofilemarker 10 | // Used in EZAudioFile.markers 11 | 12 | #import 13 | 14 | @interface EZAudioFileMarker : NSObject 15 | 16 | @property (nonatomic, strong) NSString *name; 17 | @property (nonatomic) NSNumber *framePosition; 18 | @property (nonatomic, strong) NSNumber *markerID; 19 | @property (nonatomic, strong) NSNumber *type; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/EZAudioFloatConverter.h: -------------------------------------------------------------------------------- 1 | // 2 | // EZAudioFloatConverter.h 3 | // EZAudio 4 | // 5 | // Created by Syed Haris Ali on 6/23/15. 6 | // Copyright (c) 2015 Syed Haris Ali. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | #import 28 | 29 | //------------------------------------------------------------------------------ 30 | #pragma mark - Constants 31 | //------------------------------------------------------------------------------ 32 | 33 | FOUNDATION_EXPORT UInt32 const EZAudioFloatConverterDefaultPacketSize; 34 | 35 | //------------------------------------------------------------------------------ 36 | #pragma mark - EZAudioFloatConverter 37 | //------------------------------------------------------------------------------ 38 | 39 | @interface EZAudioFloatConverter : NSObject 40 | 41 | //------------------------------------------------------------------------------ 42 | #pragma mark - Class Methods 43 | //------------------------------------------------------------------------------ 44 | 45 | + (instancetype)converterWithInputFormat:(AudioStreamBasicDescription)inputFormat; 46 | 47 | //------------------------------------------------------------------------------ 48 | #pragma mark - Properties 49 | //------------------------------------------------------------------------------ 50 | 51 | @property (nonatomic, assign, readonly) AudioStreamBasicDescription inputFormat; 52 | @property (nonatomic, assign, readonly) AudioStreamBasicDescription floatFormat; 53 | 54 | //------------------------------------------------------------------------------ 55 | #pragma mark - Instance Methods 56 | //------------------------------------------------------------------------------ 57 | 58 | - (instancetype)initWithInputFormat:(AudioStreamBasicDescription)inputFormat; 59 | 60 | //------------------------------------------------------------------------------ 61 | 62 | - (void)convertDataFromAudioBufferList:(AudioBufferList *)audioBufferList 63 | withNumberOfFrames:(UInt32)frames 64 | toFloatBuffers:(float **)buffers; 65 | 66 | //------------------------------------------------------------------------------ 67 | 68 | - (void)convertDataFromAudioBufferList:(AudioBufferList *)audioBufferList 69 | withNumberOfFrames:(UInt32)frames 70 | toFloatBuffers:(float **)buffers 71 | packetDescriptions:(AudioStreamPacketDescription *)packetDescriptions; 72 | 73 | //------------------------------------------------------------------------------ 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/EZAudioFloatData.h: -------------------------------------------------------------------------------- 1 | // 2 | // EZAudioFloatData.h 3 | // EZAudio 4 | // 5 | // Created by Syed Haris Ali on 6/23/15. 6 | // Copyright (c) 2015 Syed Haris Ali. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | #import 27 | 28 | //------------------------------------------------------------------------------ 29 | #pragma mark - EZAudioFloatData 30 | //------------------------------------------------------------------------------ 31 | 32 | @interface EZAudioFloatData : NSObject 33 | 34 | //------------------------------------------------------------------------------ 35 | 36 | + (instancetype)dataWithNumberOfChannels:(int)numberOfChannels 37 | buffers:(float **)buffers 38 | bufferSize:(UInt32)bufferSize; 39 | 40 | //------------------------------------------------------------------------------ 41 | 42 | @property (nonatomic, assign, readonly) int numberOfChannels; 43 | @property (nonatomic, assign, readonly) float **buffers; 44 | @property (nonatomic, assign, readonly) UInt32 bufferSize; 45 | 46 | //------------------------------------------------------------------------------ 47 | 48 | - (float *)bufferForChannel:(int)channel; 49 | 50 | //------------------------------------------------------------------------------ 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/GainEffectDsp.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // GainEffectDsp.hpp 3 | // AudioKit 4 | // 5 | // Created by Andrew Voelkel on 9/23/17. 6 | // Copyright © 2017 AudioKit. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #import 12 | 13 | typedef NS_ENUM(int64_t, GainEffectParam) { 14 | GainEffectParamGain, 15 | GainEffectParamRampTime 16 | }; 17 | 18 | #ifndef __cplusplus 19 | 20 | void* createGainEffectDsp(int nChannels, double sampleRate); 21 | 22 | #else 23 | 24 | #import 25 | #import 26 | #import 27 | #import "AK4LinearParamRamp.hpp" 28 | 29 | /** 30 | A butt simple DSP kernel. Most of the plumbing is in the base class. All the code at this 31 | level has to do is supply the core of the rendering code. A less trivial example would probably 32 | need to coordinate the updating of DSP parameters, which would probably involve thread locks, 33 | etc. 34 | */ 35 | 36 | struct AK4GainEffectDsp : AK4DspBase { 37 | 38 | private: 39 | AK4LinearParamRamp gainRamp; 40 | 41 | public: 42 | 43 | AK4GainEffectDsp() { 44 | gainRamp.setTarget(1.0, 0); 45 | gainRamp.setDurationInSamples(10000); 46 | } 47 | 48 | /** Uses the ParameterAddress as a key */ 49 | void setParameter(uint64_t address, float value, bool immediate) override { 50 | switch (address) { 51 | case GainEffectParamGain: 52 | gainRamp.setTarget(value, _now, immediate); 53 | break; 54 | case GainEffectParamRampTime: 55 | gainRamp.setRampTime(value, _sampleRate); 56 | break; 57 | } 58 | } 59 | 60 | /** Uses the ParameterAddress as a key */ 61 | float getParameter(uint64_t address) override { 62 | switch (address) { 63 | case GainEffectParamGain: 64 | return gainRamp.getTarget(); 65 | case GainEffectParamRampTime: 66 | return gainRamp.getRampTime(_sampleRate); 67 | } 68 | return 0; 69 | } 70 | 71 | // Largely lifted from the example code, though this is simpler since the Apple code 72 | // implements a time varying filter 73 | 74 | void process(uint32_t frameCount, uint32_t bufferOffset) override { 75 | 76 | // For each sample. 77 | for (int frameIndex = 0; frameIndex < frameCount; ++frameIndex) { 78 | int frameOffset = int(frameIndex + bufferOffset); 79 | // do gain ramping every 8 samples 80 | if ((frameOffset & 0x7) == 0) { 81 | gainRamp.advanceTo(_now + frameOffset); 82 | } 83 | // do actual signal processing 84 | // After all this scaffolding, the only thing we are doing is scaling the input 85 | for (int channel = 0; channel < _nChannels; ++channel) { 86 | float* in = (float*)_inBufferListPtr->mBuffers[channel].mData + frameOffset; 87 | float* out = (float*)_outBufferListPtr->mBuffers[channel].mData + frameOffset; 88 | *out = gainRamp.getValue() * *in; 89 | } 90 | } 91 | } 92 | 93 | }; 94 | 95 | #endif 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/TPCircularBuffer+Unit.h: -------------------------------------------------------------------------------- 1 | // 2 | // TPCircularBuffer+Unit.h 3 | // 4 | // Created by David O'Neill on 8/21/17. 5 | // Copyright © 2017 O'Neill. All rights reserved. 6 | // 7 | 8 | #pragma once 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #import "TPCircularBuffer.h" 15 | 16 | /** 17 | * @brief Utilitiy functions for writing arbitrary sized values to a TPCircularBuffer. 18 | * 19 | * @discussion 20 | * TPCircularBufferUnitHead prepares the internal buffer using a header struct that store the 21 | * length and type, then returns a pointer to write to. TPCircularBufferUnitProduce 22 | * will advance the head by the length provided in the call to TPCircularBufferUnitHead plus 23 | * the length of the internal header struct. TPCircularBufferUnitTail will return the first 24 | * pointer that was produced, and TPCircularBufferUnitConsume will consume it. The type 25 | * arguments can be used to determine what kind of value is being written so that it can be 26 | * cast to the correct type when retrieved. It is important to use TPCircularBufferUnitProduce 27 | * only after a call to TPCircularBufferUnitHead, and to use TPCircularBufferUnitTail to retrieve 28 | * values that were written using TPCircularBufferUnitHead/TPCircularBufferUnitProduce. 29 | * TPCircularBufferUnitConsume can be called without calling TPCircularBufferUnitTail. 30 | */ 31 | 32 | /** 33 | * @brief Returns a pointer for writing. 34 | * 35 | * @discussion Should be followed by a call to TPCircularBufferUnitProduce. 36 | * 37 | * @param buffer The circular buffer. 38 | * @param type A pointer to a flag that can be retrieved using TPCircularBufferUnitTail. Can be NULL. 39 | * @param length the byteSize of the value that will be written to head. 40 | */ 41 | void *TPCircularBufferUnitHead(TPCircularBuffer *buffer, uint32_t *type, int length); 42 | 43 | /** 44 | * @brief Moves buffer head forward by length specified in TPCircularBufferUnitHead. 45 | * 46 | * @discussion Must be proceeded by a call to TPCircularBufferUnitHead. 47 | * 48 | * @param buffer The circular buffer. 49 | */ 50 | void TPCircularBufferUnitProduce(TPCircularBuffer *buffer); 51 | 52 | /** 53 | * @brief Returns a pointer for reading. 54 | * 55 | * @discussion Follow with TPCircularBufferUnitConsume to consume value read. 56 | * 57 | * @param buffer The circular buffer. 58 | * @param type On output, a flag that was set with TPCircularBufferUnitHead. Can be NULL. 59 | * @param length On output, the byteSize of the value that was read. Can be NULL. 60 | */ 61 | void *TPCircularBufferUnitTail(TPCircularBuffer *buffer, uint32_t *type, int *length); 62 | 63 | /** 64 | * @brief Consumes the next value in buffer. 65 | * 66 | * @discussion Does not have to be proceeded by TPCircularBufferUnitTail. 67 | * 68 | * @param buffer The circular buffer. 69 | */ 70 | void TPCircularBufferUnitConsume(TPCircularBuffer *buffer); 71 | 72 | /** 73 | @code 74 | 75 | typedef struct { 76 | float x; 77 | float y; 78 | }PointStruct; 79 | 80 | typedef struct { 81 | char name[20]; 82 | int age; 83 | }Person; 84 | 85 | TPCircularBuffer tpCircularBuffer; 86 | 87 | UInt32 pointType = 0; 88 | UInt32 personType = 1; 89 | UInt32 intsType = 2; 90 | 91 | TPCircularBufferInit(&tpCircularBuffer, 4096); 92 | 93 | 94 | Person jim = { 95 | .name = "Jimmy", 96 | .age = 123 97 | }; 98 | 99 | void *head = TPCircularBufferUnitHead(&tpCircularBuffer, &personType, sizeof(jim)); 100 | memcpy(head, &jim, sizeof(jim)); 101 | TPCircularBufferUnitProduce(&tpCircularBuffer); 102 | 103 | PointStruct *pointHead = TPCircularBufferUnitHead(&tpCircularBuffer, &pointType, sizeof(PointStruct)); 104 | pointHead->x = 12.34; 105 | pointHead->y = 56.789; 106 | TPCircularBufferUnitProduce(&tpCircularBuffer); 107 | 108 | int ints[7] = {8,6,7,5,3,0,9}; 109 | head = TPCircularBufferUnitHead(&tpCircularBuffer, &intsType, sizeof(ints)); 110 | memcpy(head, ints, sizeof(ints)); 111 | TPCircularBufferUnitProduce(&tpCircularBuffer); 112 | 113 | PointStruct point = {.x = 543, .y = 0.321 }; 114 | pointHead = TPCircularBufferUnitHead(&tpCircularBuffer, &pointType, sizeof(point)); 115 | *pointHead = point; 116 | TPCircularBufferUnitProduce(&tpCircularBuffer); 117 | 118 | UInt32 type; 119 | int length; 120 | void *tail = TPCircularBufferUnitTail(&tpCircularBuffer, &type, &length); 121 | 122 | while (tail != NULL) { 123 | if (type == pointType) { 124 | PointStruct *point = tail; 125 | printf("point - { x: %.3f, y: %.3f }\n", point->x, point->y); 126 | } 127 | else if (type == personType ) { 128 | Person *person = tail; 129 | printf("person - { name: %s, age: %i }\n", person->name, person->age); 130 | } 131 | else if (type == intsType) { 132 | int *ints = tail; 133 | int count = length / sizeof(int); 134 | printf("ints - ["); 135 | for (int i = 0; i < count; i++) { 136 | printf("%i",ints[i]); 137 | if (i != count - 1) printf(","); 138 | } 139 | printf("]\n"); 140 | } 141 | TPCircularBufferUnitConsume(&tpCircularBuffer); 142 | tail = TPCircularBufferUnitTail(&tpCircularBuffer, &type, &length); 143 | } 144 | TPCircularBufferCleanup(&tpCircularBuffer); 145 | 146 | @endCode 147 | */ 148 | 149 | #ifdef __cplusplus 150 | } 151 | #endif 152 | 153 | 154 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Headers/TPCircularBuffer.h: -------------------------------------------------------------------------------- 1 | // 2 | // TPCircularBuffer.h 3 | // Circular/Ring buffer implementation 4 | // 5 | // https://github.com/michaeltyson/TPCircularBuffer 6 | // 7 | // Created by Michael Tyson on 10/12/2011. 8 | // 9 | // 10 | // This implementation makes use of a virtual memory mapping technique that inserts a virtual copy 11 | // of the buffer memory directly after the buffer's end, negating the need for any buffer wrap-around 12 | // logic. Clients can simply use the returned memory address as if it were contiguous space. 13 | // 14 | // The implementation is thread-safe in the case of a single producer and single consumer. 15 | // 16 | // Virtual memory technique originally proposed by Philip Howard (http://vrb.slashusr.org/), and 17 | // adapted to Darwin by Kurt Revis (http://www.snoize.com, 18 | // http://www.snoize.com/Code/PlayBufferedSoundFile.tar.gz) 19 | // 20 | // 21 | // Copyright (C) 2012-2013 A Tasty Pixel 22 | // 23 | // This software is provided 'as-is', without any express or implied 24 | // warranty. In no event will the authors be held liable for any damages 25 | // arising from the use of this software. 26 | // 27 | // Permission is granted to anyone to use this software for any purpose, 28 | // including commercial applications, and to alter it and redistribute it 29 | // freely, subject to the following restrictions: 30 | // 31 | // 1. The origin of this software must not be misrepresented; you must not 32 | // claim that you wrote the original software. If you use this software 33 | // in a product, an acknowledgment in the product documentation would be 34 | // appreciated but is not required. 35 | // 36 | // 2. Altered source versions must be plainly marked as such, and must not be 37 | // misrepresented as being the original software. 38 | // 39 | // 3. This notice may not be removed or altered from any source distribution. 40 | // 41 | 42 | #pragma once 43 | 44 | #include 45 | #include 46 | #include 47 | 48 | #ifdef __cplusplus 49 | extern "C++" { 50 | #include 51 | typedef std::atomic_int atomicInt; 52 | #define atomicFetchAdd(a,b) std::atomic_fetch_add(a,b) 53 | } 54 | #else 55 | #include 56 | typedef atomic_int atomicInt; 57 | #define atomicFetchAdd(a,b) atomic_fetch_add(a,b) 58 | #endif 59 | 60 | #ifdef __cplusplus 61 | extern "C" { 62 | #endif 63 | 64 | typedef struct { 65 | void *buffer; 66 | int32_t length; 67 | int32_t tail; 68 | int32_t head; 69 | volatile atomicInt fillCount; 70 | bool atomic; 71 | } TPCircularBuffer; 72 | 73 | /*! 74 | * Initialise buffer 75 | * 76 | * Note that the length is advisory only: Because of the way the 77 | * memory mirroring technique works, the true buffer length will 78 | * be multiples of the device page size (e.g. 4096 bytes) 79 | * 80 | * If you intend to use the AudioBufferList utilities, you should 81 | * always allocate a bit more space than you need for pure audio 82 | * data, so there's room for the metadata. How much extra is required 83 | * depends on how many AudioBufferList structures are used, which is 84 | * a function of how many audio frames each buffer holds. A good rule 85 | * of thumb is to add 15%, or at least another 2048 bytes or so. 86 | * 87 | * @param buffer Circular buffer 88 | * @param length Length of buffer 89 | */ 90 | #define TPCircularBufferInit(buffer, length) \ 91 | _TPCircularBufferInit(buffer, length, sizeof(*buffer)) 92 | bool _TPCircularBufferInit(TPCircularBuffer *buffer, int32_t length, size_t structSize); 93 | 94 | /*! 95 | * Cleanup buffer 96 | * 97 | * Releases buffer resources. 98 | */ 99 | void TPCircularBufferCleanup(TPCircularBuffer *buffer); 100 | 101 | /*! 102 | * Clear buffer 103 | * 104 | * Resets buffer to original, empty state. 105 | * 106 | * This is safe for use by consumer while producer is accessing 107 | * buffer. 108 | */ 109 | void TPCircularBufferClear(TPCircularBuffer *buffer); 110 | 111 | /*! 112 | * Set the atomicity 113 | * 114 | * If you set the atomiticy to false using this method, the buffer will 115 | * not use atomic operations. This can be used to give the compiler a little 116 | * more optimisation opportunities when the buffer is only used on one thread. 117 | * 118 | * Important note: Only set this to false if you know what you're doing! 119 | * 120 | * The default value is true (the buffer will use atomic operations) 121 | * 122 | * @param buffer Circular buffer 123 | * @param atomic Whether the buffer is atomic (default true) 124 | */ 125 | void TPCircularBufferSetAtomic(TPCircularBuffer *buffer, bool atomic); 126 | 127 | // Reading (consuming) 128 | 129 | /*! 130 | * Access end of buffer 131 | * 132 | * This gives you a pointer to the end of the buffer, ready 133 | * for reading, and the number of available bytes to read. 134 | * 135 | * @param buffer Circular buffer 136 | * @param availableBytes On output, the number of bytes ready for reading 137 | * @return Pointer to the first bytes ready for reading, or NULL if buffer is empty 138 | */ 139 | static __inline__ __attribute__((always_inline)) void* TPCircularBufferTail(TPCircularBuffer *buffer, int32_t* availableBytes) { 140 | *availableBytes = buffer->fillCount; 141 | if ( *availableBytes == 0 ) return NULL; 142 | return (void*)((char*)buffer->buffer + buffer->tail); 143 | } 144 | 145 | /*! 146 | * Consume bytes in buffer 147 | * 148 | * This frees up the just-read bytes, ready for writing again. 149 | * 150 | * @param buffer Circular buffer 151 | * @param amount Number of bytes to consume 152 | */ 153 | static __inline__ __attribute__((always_inline)) void TPCircularBufferConsume(TPCircularBuffer *buffer, int32_t amount) { 154 | buffer->tail = (buffer->tail + amount) % buffer->length; 155 | if ( buffer->atomic ) { 156 | atomicFetchAdd(&buffer->fillCount, -amount); 157 | } else { 158 | buffer->fillCount -= amount; 159 | } 160 | assert(buffer->fillCount >= 0); 161 | } 162 | 163 | /*! 164 | * Access front of buffer 165 | * 166 | * This gives you a pointer to the front of the buffer, ready 167 | * for writing, and the number of available bytes to write. 168 | * 169 | * @param buffer Circular buffer 170 | * @param availableBytes On output, the number of bytes ready for writing 171 | * @return Pointer to the first bytes ready for writing, or NULL if buffer is full 172 | */ 173 | static __inline__ __attribute__((always_inline)) void* TPCircularBufferHead(TPCircularBuffer *buffer, int32_t* availableBytes) { 174 | *availableBytes = (buffer->length - buffer->fillCount); 175 | if ( *availableBytes == 0 ) return NULL; 176 | return (void*)((char*)buffer->buffer + buffer->head); 177 | } 178 | 179 | // Writing (producing) 180 | 181 | /*! 182 | * Produce bytes in buffer 183 | * 184 | * This marks the given section of the buffer ready for reading. 185 | * 186 | * @param buffer Circular buffer 187 | * @param amount Number of bytes to produce 188 | */ 189 | static __inline__ __attribute__((always_inline)) void TPCircularBufferProduce(TPCircularBuffer *buffer, int32_t amount) { 190 | buffer->head = (buffer->head + amount) % buffer->length; 191 | if ( buffer->atomic ) { 192 | atomicFetchAdd(&buffer->fillCount, amount); 193 | } else { 194 | buffer->fillCount += amount; 195 | } 196 | assert(buffer->fillCount <= buffer->length); 197 | } 198 | 199 | /*! 200 | * Helper routine to copy bytes to buffer 201 | * 202 | * This copies the given bytes to the buffer, and marks them ready for reading. 203 | * 204 | * @param buffer Circular buffer 205 | * @param src Source buffer 206 | * @param len Number of bytes in source buffer 207 | * @return true if bytes copied, false if there was insufficient space 208 | */ 209 | static __inline__ __attribute__((always_inline)) bool TPCircularBufferProduceBytes(TPCircularBuffer *buffer, const void* src, int32_t len) { 210 | int32_t space; 211 | void *ptr = TPCircularBufferHead(buffer, &space); 212 | if ( space < len ) return false; 213 | memcpy(ptr, src, len); 214 | TPCircularBufferProduce(buffer, len); 215 | return true; 216 | } 217 | 218 | /*! 219 | * Deprecated method 220 | */ 221 | static __inline__ __attribute__((always_inline)) __deprecated_msg("use TPCircularBufferSetAtomic(false) and TPCircularBufferConsume instead") 222 | void TPCircularBufferConsumeNoBarrier(TPCircularBuffer *buffer, int32_t amount) { 223 | buffer->tail = (buffer->tail + amount) % buffer->length; 224 | buffer->fillCount -= amount; 225 | assert(buffer->fillCount >= 0); 226 | } 227 | 228 | /*! 229 | * Deprecated method 230 | */ 231 | static __inline__ __attribute__((always_inline)) __deprecated_msg("use TPCircularBufferSetAtomic(false) and TPCircularBufferProduce instead") 232 | void TPCircularBufferProduceNoBarrier(TPCircularBuffer *buffer, int32_t amount) { 233 | buffer->head = (buffer->head + amount) % buffer->length; 234 | buffer->fillCount += amount; 235 | assert(buffer->fillCount <= buffer->length); 236 | } 237 | 238 | #ifdef __cplusplus 239 | } 240 | #endif 241 | 242 | 243 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Modules/AudioKit.swiftmodule/x86_64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Modules/AudioKit.swiftmodule/x86_64.swiftdoc -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Modules/AudioKit.swiftmodule/x86_64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Modules/AudioKit.swiftmodule/x86_64.swiftmodule -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module AudioKit { 2 | umbrella header "AudioKit.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | 8 | module AudioKit.Swift { 9 | header "AudioKit-Swift.h" 10 | requires objc 11 | } 12 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 16G1036 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | AudioKit 11 | CFBundleIdentifier 12 | io.audiokit.AudioKit 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | AudioKit 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 4.0.4 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 9B55 33 | DTPlatformVersion 34 | GM 35 | DTSDKBuild 36 | 17B41 37 | DTSDKName 38 | macosx10.13 39 | DTXcode 40 | 0910 41 | DTXcodeBuild 42 | 9B55 43 | NSHumanReadableCopyright 44 | Copyright © 2016 AudioKit. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/Skeleton.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AU version 6 | 1 7 | Instrument 8 | 9 | Layers 10 | 11 | 12 | trigger mode 13 | 11 14 | Amplifier 15 | 16 | ID 17 | 0 18 | enabled 19 | 20 | 21 | Connections 22 | 23 | 24 | ID 25 | 0 26 | control 27 | 0 28 | destination 29 | 816840704 30 | enabled 31 | 32 | inverse 33 | 34 | scale 35 | 12800 36 | source 37 | 300 38 | transform 39 | 1 40 | 41 | 42 | ID 43 | 1 44 | control 45 | 0 46 | destination 47 | 1343225856 48 | enabled 49 | 50 | inverse 51 | 52 | scale 53 | -96 54 | source 55 | 301 56 | transform 57 | 2 58 | 59 | 60 | ID 61 | 2 62 | control 63 | 0 64 | destination 65 | 1343225856 66 | enabled 67 | 68 | inverse 69 | 70 | scale 71 | -96 72 | source 73 | 7 74 | transform 75 | 2 76 | 77 | 78 | ID 79 | 3 80 | control 81 | 0 82 | destination 83 | 1343225856 84 | enabled 85 | 86 | inverse 87 | 88 | scale 89 | -96 90 | source 91 | 11 92 | transform 93 | 2 94 | 95 | 96 | ID 97 | 4 98 | control 99 | 0 100 | destination 101 | 1344274432 102 | enabled 103 | 104 | inverse 105 | 106 | max value 107 | 0.5080000162124634 108 | min value 109 | -0.5080000162124634 110 | source 111 | 10 112 | transform 113 | 1 114 | 115 | 116 | ID 117 | 7 118 | control 119 | 241 120 | destination 121 | 816840704 122 | enabled 123 | 124 | inverse 125 | 126 | max value 127 | 12800 128 | min value 129 | -12800 130 | source 131 | 224 132 | transform 133 | 1 134 | 135 | 136 | ID 137 | 8 138 | control 139 | 0 140 | destination 141 | 816840704 142 | enabled 143 | 144 | inverse 145 | 146 | max value 147 | 100 148 | min value 149 | -100 150 | source 151 | 242 152 | transform 153 | 1 154 | 155 | 156 | ID 157 | 6 158 | control 159 | 1 160 | destination 161 | 816840704 162 | enabled 163 | 164 | inverse 165 | 166 | max value 167 | 50 168 | min value 169 | -50 170 | source 171 | 268435456 172 | transform 173 | 1 174 | 175 | 176 | ID 177 | 5 178 | control 179 | 0 180 | destination 181 | 1343225856 182 | enabled 183 | 184 | inverse 185 | 186 | scale 187 | -96 188 | source 189 | 536870912 190 | transform 191 | 1 192 | 193 | 194 | Envelopes 195 | 196 | 197 | ID 198 | 0 199 | Stages 200 | 201 | 202 | curve 203 | 20 204 | stage 205 | 0 206 | time 207 | 0 208 | 209 | 210 | curve 211 | 22 212 | stage 213 | 1 214 | time 215 | 0 216 | 217 | 218 | curve 219 | 20 220 | stage 221 | 2 222 | time 223 | 0 224 | 225 | 226 | curve 227 | 20 228 | stage 229 | 3 230 | time 231 | 0 232 | 233 | 234 | level 235 | 1 236 | stage 237 | 4 238 | 239 | 240 | curve 241 | 20 242 | stage 243 | 5 244 | time 245 | 0 246 | 247 | 248 | curve 249 | 20 250 | stage 251 | 6 252 | time 253 | 0.004999999888241291 254 | 255 | 256 | enabled 257 | 258 | 259 | 260 | Filters 261 | 262 | ID 263 | 0 264 | cutoff 265 | 20000 266 | enabled 267 | 268 | resonance 269 | 0 270 | type 271 | 40 272 | 273 | ID 274 | 0 275 | LFOs 276 | 277 | 278 | ID 279 | 0 280 | enabled 281 | 282 | 283 | 284 | Oscillator 285 | 286 | ID 287 | 0 288 | enabled 289 | 290 | 291 | Zones 292 | 293 | 294 | 295 | name 296 | Default Instrument 297 | 298 | coarse tune 299 | 0 300 | data 301 | AAAAAAAAAAAAAAAEAAADhAAAAAAAAAOFAAAAAAAAA4YAAAAAAAADhwAAAAA= 302 | file-references 303 | 304 | fine tune 305 | 0 306 | gain 307 | 0 308 | manufacturer 309 | 1634758764 310 | name 311 | Skeleton 312 | output 313 | 0 314 | pan 315 | 0 316 | subtype 317 | 1935764848 318 | type 319 | 1635085685 320 | version 321 | 0 322 | voice count 323 | 64 324 | 325 | 326 | -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/fwavblnk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/fwavblnk.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand1.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand10.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand10.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand11.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand11.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand12.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand12.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand2.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand3.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand3.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand4.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand4.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand5.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand5.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand6.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand6.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand7.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand8.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand8.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mand9.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mand9.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/mandpluk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/mandpluk.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/A/Resources/sinewave.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/FMOscillator/AudioKit.framework/Versions/A/Resources/sinewave.raw -------------------------------------------------------------------------------- /FMOscillator/AudioKit.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /FMOscillator/FMOscillator.xcodeproj/xcuserdata/nicholasarner.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator.xcodeproj/xcuserdata/nicholasarner.xcuserdatad/xcschemes/FMOscillator.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator.xcodeproj/xcuserdata/nicholasarner.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FMOscillator.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | E45516A41B35ED4F00558CF8 16 | 17 | primary 18 | 19 | 20 | E45516B61B35ED4F00558CF8 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator.xcworkspace/xcshareddata/FMOscillator.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "D592CEA054C028F097EA3D3D8401D2A67A7962FD", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "D592CEA054C028F097EA3D3D8401D2A67A7962FD" : 0, 8 | "5D7AE6F26A6D7E393D8CA002FDE5D0D8ABCDAE62" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "25D7AC4D-D8ED-4247-AF3F-FC56AECF6537", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "D592CEA054C028F097EA3D3D8401D2A67A7962FD" : "Arduino-AudioKitOSX\/", 13 | "5D7AE6F26A6D7E393D8CA002FDE5D0D8ABCDAE62" : "Arduino-AudioKitOSX\/FMOscillator\/ThirdParty\/AudioKit\/" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "FMOscillator", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "FMOscillator\/FMOscillator.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/audiokit\/AudioKit.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5D7AE6F26A6D7E393D8CA002FDE5D0D8ABCDAE62" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/narner\/Arduino-AudioKitOSX", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "D592CEA054C028F097EA3D3D8401D2A67A7962FD" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /FMOscillator/FMOscillator/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FMOscillator 4 | // 5 | // Created by Nicholas Arner on 6/20/15. 6 | // Copyright (c) 2015 Nicholas Arner. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | 12 | @NSApplicationMain 13 | class AppDelegate: NSObject, NSApplicationDelegate { 14 | 15 | 16 | 17 | func applicationDidFinishLaunching(_ aNotification: Notification) { 18 | // Insert code here to initialize your application 19 | } 20 | 21 | func applicationWillTerminate(_ aNotification: Notification) { 22 | // Insert code here to tear down your application 23 | } 24 | 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator/AudioKit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AudioKit.swift 3 | // AudioKit 4 | // 5 | // Created by Aurelius Prochazka on 11/3/14. 6 | // Copyright (c) 2014 Aurelius Prochazka. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | func akp(num: Float) -> AKConstant { 12 | return AKConstant(float: num) 13 | } 14 | 15 | func akpi(num: Int) -> AKConstant { 16 | return AKConstant(integer: num) 17 | } 18 | 19 | func akps(str: String) -> AKConstant { 20 | return AKConstant(string: str) 21 | } 22 | 23 | func akpfn(file: String) -> AKConstant { 24 | return AKConstant(filename: file) 25 | } 26 | 27 | extension Int { 28 | var ak: AKConstant {return AKConstant(integer: self)} 29 | } 30 | 31 | extension Float { 32 | var ak: AKConstant {return AKConstant(float: self)} 33 | var midiratio: Float {return pow(2, self * 0.083333333333)} 34 | } 35 | 36 | extension Double { 37 | var ak: AKConstant {return AKConstant(float: Float(self))} 38 | var midiratio: Double {return pow(2, self * 0.083333333333)} 39 | } 40 | 41 | extension AKMultipleInputMathOperation { 42 | convenience init(inputs: AKParameter...) { 43 | self.init() 44 | self.inputs = inputs 45 | } 46 | } 47 | 48 | // Arithmetic operators 49 | 50 | func + (left: AKParameter, right: AKParameter) -> AKParameter { 51 | return left.plus(right) 52 | } 53 | 54 | func + (left: AKControl, right: AKControl) -> AKControl { 55 | return left.plus(right) 56 | } 57 | 58 | func + (left: AKConstant, right: AKConstant) -> AKConstant { 59 | return left.plus(right) 60 | } 61 | 62 | func - (left: AKParameter, right: AKParameter) -> AKParameter { 63 | return left.minus(right) 64 | } 65 | 66 | func - (left: AKControl, right: AKControl) -> AKControl { 67 | return left.minus(right) 68 | } 69 | 70 | func - (left: AKConstant, right: AKConstant) -> AKConstant { 71 | return left.minus(right) 72 | } 73 | 74 | func * (left: AKParameter, right: AKParameter) -> AKParameter { 75 | return left.scaledBy(right) 76 | } 77 | 78 | func * (left: AKControl, right: AKControl) -> AKControl { 79 | return left.scaledBy(right) 80 | } 81 | 82 | func * (left: AKConstant, right: AKConstant) -> AKConstant { 83 | return left.scaledBy(right) 84 | } 85 | 86 | func / (left: AKParameter, right: AKParameter) -> AKParameter { 87 | return left.dividedBy(right) 88 | } 89 | 90 | func / (left: AKControl, right: AKControl) -> AKControl { 91 | return left.dividedBy(right) 92 | } 93 | 94 | func / (left: AKConstant, right: AKConstant) -> AKConstant { 95 | return left.dividedBy(right) 96 | } -------------------------------------------------------------------------------- /FMOscillator/FMOscillator/FMSynth.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FMSynth.swift 3 | // FMOscillator 4 | // 5 | // Created by Nicholas Arner on 9/8/15. 6 | // Copyright (c) 2015 Nicholas Arner. All rights reserved. 7 | // 8 | 9 | import AudioKit 10 | 11 | open class FMSynth: NSObject { 12 | 13 | let fmOscillator = AKFMOscillator( 14 | waveform: AKTable(.sine), 15 | baseFrequency: 440, 16 | carrierMultiplier: 1, 17 | modulatingMultiplier: 1, 18 | modulationIndex: 1, 19 | amplitude: 0.2 20 | ) 21 | 22 | // INSTRUMENT DEFINITION =================================================== 23 | 24 | override init() { 25 | super.init() 26 | AudioKit.output = fmOscillator 27 | AudioKit.start() 28 | } 29 | 30 | 31 | open func startSound() { 32 | fmOscillator.start() 33 | } 34 | 35 | open func stopSound(){ 36 | fmOscillator.stop() 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /FMOscillator/FMOscillator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 Nicholas Arner. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator/MainViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.swift 3 | // FMOscillator 4 | // 5 | // Created by Nicholas Arner on 6/20/15. 6 | // Copyright (c) 2015 Nicholas Arner. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import ORSSerial 11 | 12 | 13 | class ViewController: NSViewController { 14 | 15 | let serialPortManager = ORSSerialPortManager.shared() 16 | let serialCommunicator = SerialCommunicator() 17 | 18 | @IBOutlet var statusLabel: NSTextField! 19 | @IBOutlet var frequencyLabel: NSTextField! 20 | @IBOutlet var modulationIndexLabel: NSTextField! 21 | 22 | @IBOutlet var frequencySlider: NSSlider! 23 | @IBOutlet var modulationIndexSlider: NSSlider! 24 | 25 | var fmSynth: FMSynth! 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | fmSynth = FMSynth() 30 | // Do any additional setup after loading the view, typically from a nib. 31 | 32 | let availablePorts = ORSSerialPortManager.shared().availablePorts 33 | if availablePorts.count == 0 { 34 | print("No connected serial ports found. Please connect your Arduino or turn on Bluetooth..\n") 35 | exit(EXIT_SUCCESS) 36 | } 37 | 38 | //NOTE: Update your own serial port value here 39 | let serialPort = ORSSerialPort(path: "/dev/tty.usbmodem1411") 40 | serialCommunicator.serialPort = serialPort 41 | 42 | //Receive notifications, and update potentiometer values and switch state 43 | NotificationCenter.default.addObserver(self, selector: #selector(ViewController.potOneValueChanged(_:)), name:NSNotification.Name(rawValue: "PotentiometerOneChanged"), object: nil) 44 | 45 | NotificationCenter.default.addObserver(self, selector: #selector(ViewController.potTwoValueChanged(_:)), name:NSNotification.Name(rawValue: "PotentiometerTwoChanged"), object: nil) 46 | 47 | NotificationCenter.default.addObserver(self, selector: #selector(ViewController.switchStateChanged(_:)), name:NSNotification.Name(rawValue: "SwitchStateChanged"), object: nil) 48 | } 49 | 50 | func potOneValueChanged(_ notification: Notification){ 51 | fmSynth.fmOscillator.baseFrequency = Double(serialCommunicator.potentiometerOneValue * 4) 52 | self.frequencyLabel.stringValue = "\(fmSynth.fmOscillator.baseFrequency)" 53 | self.frequencySlider.floatValue = Float(fmSynth.fmOscillator.baseFrequency) 54 | } 55 | 56 | func potTwoValueChanged(_ notification: Notification){ 57 | fmSynth.fmOscillator.modulationIndex = Double(serialCommunicator.potentiometerTwoValue / 4) 58 | self.modulationIndexLabel.stringValue = "\(fmSynth.fmOscillator.modulationIndex)" 59 | self.modulationIndexSlider.floatValue = Float(fmSynth.fmOscillator.modulationIndex) 60 | } 61 | 62 | func switchStateChanged(_ notification: Notification){ 63 | if serialCommunicator.switchState == true { 64 | fmSynth.startSound() 65 | self.statusLabel.stringValue = "Stop" 66 | } else { 67 | fmSynth.stopSound() 68 | self.statusLabel.stringValue = "Play Sound" 69 | } 70 | } 71 | 72 | override func viewWillDisappear() { 73 | super.viewWillDisappear() 74 | 75 | //Get rid of notification observers 76 | NotificationCenter.default.removeObserver(self) 77 | } 78 | 79 | override func viewDidDisappear() { 80 | super.viewDidDisappear() 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillator/SerialCommunicator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SerialCommunicator.swift 3 | // FMOscillator 4 | // 5 | // Created by Nicholas Arner on 8/11/15. 6 | 7 | // Based off of the `Request Response Demo` example in 8 | // the ORSSerialPort library from Andrew Madsen 9 | // https://github.com/armadsen/ORSSerialPort/tree/master/Examples/RequestResponseDemo 10 | 11 | import Foundation 12 | 13 | import ORSSerial 14 | 15 | class SerialCommunicator: NSObject, ORSSerialPortDelegate { 16 | 17 | deinit { 18 | self.serialPort = nil 19 | } 20 | 21 | enum SerialPortPacketType: Int { 22 | 23 | case potentiometerOne = 1; 24 | case potentiometerTwo = 2; 25 | case state = 3; 26 | } 27 | 28 | // MARK: - Properties 29 | 30 | dynamic fileprivate(set) var potentiometerOneValue: Int = 0 31 | dynamic fileprivate(set) var potentiometerTwoValue: Int = 0 32 | dynamic fileprivate(set) var switchState: Bool = false 33 | 34 | // MARK - ORSSerialPortDelegate 35 | 36 | func serialPortWasRemoved(fromSystem serialPort: ORSSerialPort) { 37 | self.serialPort = nil 38 | } 39 | 40 | func serialPort(_ serialPort: ORSSerialPort, didEncounterError error: Error) { 41 | print("Serial port \(serialPort) encountered an error: \(error)") 42 | } 43 | 44 | //When the serial port is opened, listen for the correct descriptors 45 | func serialPortWasOpened(_ serialPort: ORSSerialPort) { 46 | let descriptorPotOne = ORSSerialPacketDescriptor(prefixString: "!pos1", 47 | suffixString: ";", 48 | maximumPacketLength:9, 49 | userInfo: SerialPortPacketType.potentiometerOne.rawValue) 50 | let descriptorPotTwo = ORSSerialPacketDescriptor(prefixString: "!pos2", 51 | suffixString: ";", 52 | maximumPacketLength:9, 53 | userInfo: SerialPortPacketType.potentiometerTwo.rawValue) 54 | let descriptorState = ORSSerialPacketDescriptor(prefixString: "!state", 55 | suffixString: ";", 56 | maximumPacketLength:9, 57 | userInfo: SerialPortPacketType.state.rawValue) 58 | 59 | serialPort.startListeningForPackets(matching: descriptorPotOne) 60 | serialPort.startListeningForPackets(matching: descriptorPotTwo) 61 | serialPort.startListeningForPackets(matching: descriptorState) 62 | } 63 | 64 | fileprivate func potentiometerFromResponsePacket(_ data: Data) -> Int { 65 | let dataAsString = NSString(data: data, encoding: String.Encoding.ascii.rawValue)! 66 | let potentiometerString = dataAsString.substring(with: NSRange(location: 5, length: dataAsString.length-6)) 67 | return Int(potentiometerString)! 68 | } 69 | 70 | fileprivate func switchStateFromResponsePacket(_ data: Data) -> Bool { 71 | let dataAsString = NSString(data: data, encoding: String.Encoding.ascii.rawValue)! 72 | let switchState = dataAsString.substring(with: NSRange(location: 6, length: dataAsString.length-7)) 73 | return Int(switchState)! != 0 74 | } 75 | 76 | //Post a notification whenever the potentiometer values or switch state changes 77 | func serialPort(_ serialPort: ORSSerialPort, didReceivePacket packetData: Data, matching descriptor: ORSSerialPacketDescriptor) { 78 | let packetType = SerialPortPacketType(rawValue: descriptor.userInfo as! Int)! 79 | switch packetType { 80 | case .potentiometerOne: 81 | self.potentiometerOneValue = self.potentiometerFromResponsePacket(packetData) 82 | NotificationCenter.default.post(name: Notification.Name(rawValue: "PotentiometerOneChanged"), object: self.potentiometerOneValue) 83 | case .potentiometerTwo: 84 | self.potentiometerTwoValue = self.potentiometerFromResponsePacket(packetData) 85 | NotificationCenter.default.post(name: Notification.Name(rawValue: "PotentiometerTwoChanged"), object: self.potentiometerTwoValue) 86 | case .state: 87 | self.switchState = self.switchStateFromResponsePacket(packetData) 88 | NotificationCenter.default.post(name: Notification.Name(rawValue: "SwitchStateChanged"), object: self.switchState) 89 | } 90 | } 91 | 92 | 93 | dynamic var serialPort: ORSSerialPort? { 94 | willSet { 95 | if let port = serialPort { 96 | port.close() 97 | port.delegate = nil 98 | } 99 | } 100 | didSet { 101 | if let port = serialPort { 102 | port.baudRate = 57600 103 | port.delegate = self 104 | port.open() 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillatorTests/FMOscillatorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FMOscillatorTests.swift 3 | // FMOscillatorTests 4 | // 5 | // Created by Nicholas Arner on 6/20/15. 6 | // Copyright (c) 2015 Nicholas Arner. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import XCTest 11 | 12 | class FMOscillatorTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /FMOscillator/FMOscillatorTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FMOscillator/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '8.0' 3 | # Uncomment this line if you're using Swift 4 | use_frameworks! 5 | 6 | target 'FMOscillator' do 7 | pod "ORSSerialPort" 8 | end 9 | 10 | -------------------------------------------------------------------------------- /FMOscillator/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ORSSerialPort (2.0.2) 3 | 4 | DEPENDENCIES: 5 | - ORSSerialPort 6 | 7 | SPEC CHECKSUMS: 8 | ORSSerialPort: 3fb0d2404b7e8b99c4f1aa7e7314d63030cd54c3 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Headers/Private/ORSSerialPort/ORSSerialBuffer.h: -------------------------------------------------------------------------------- 1 | ../../../ORSSerialPort/Source/ORSSerialBuffer.h -------------------------------------------------------------------------------- /FMOscillator/Pods/Headers/Private/ORSSerialPort/ORSSerialPacketDescriptor.h: -------------------------------------------------------------------------------- 1 | ../../../ORSSerialPort/Source/ORSSerialPacketDescriptor.h -------------------------------------------------------------------------------- /FMOscillator/Pods/Headers/Private/ORSSerialPort/ORSSerialPort.h: -------------------------------------------------------------------------------- 1 | ../../../ORSSerialPort/Source/ORSSerialPort.h -------------------------------------------------------------------------------- /FMOscillator/Pods/Headers/Private/ORSSerialPort/ORSSerialPortManager.h: -------------------------------------------------------------------------------- 1 | ../../../ORSSerialPort/Source/ORSSerialPortManager.h -------------------------------------------------------------------------------- /FMOscillator/Pods/Headers/Private/ORSSerialPort/ORSSerialRequest.h: -------------------------------------------------------------------------------- 1 | ../../../ORSSerialPort/Source/ORSSerialRequest.h -------------------------------------------------------------------------------- /FMOscillator/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ORSSerialPort (2.0.2) 3 | 4 | DEPENDENCIES: 5 | - ORSSerialPort 6 | 7 | SPEC CHECKSUMS: 8 | ORSSerialPort: 3fb0d2404b7e8b99c4f1aa7e7314d63030cd54c3 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /FMOscillator/Pods/ORSSerialPort/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Andrew R. Madsen (andrew@openreelsoftware.com) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /FMOscillator/Pods/ORSSerialPort/Source/ORSSerialBuffer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSSerialBuffer.h 3 | // ORSSerialPort 4 | // 5 | // Created by Andrew Madsen on 9/6/15. 6 | // Copyright (c) 2015 Open Reel Software. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // Keep older versions of the compiler happy 12 | #ifndef NS_DESIGNATED_INITIALIZER 13 | #define NS_DESIGNATED_INITIALIZER 14 | #endif 15 | 16 | @interface ORSSerialBuffer : NSObject 17 | 18 | - (instancetype)initWithMaximumLength:(NSUInteger)maxLength NS_DESIGNATED_INITIALIZER; 19 | 20 | - (void)appendData:(NSData *)data; 21 | - (void)clearBuffer; 22 | 23 | @property (nonatomic, strong, readonly) NSData *data; 24 | @property (nonatomic, readonly) NSUInteger maximumLength; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /FMOscillator/Pods/ORSSerialPort/Source/ORSSerialBuffer.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORSSerialBuffer.m 3 | // ORSSerialPort 4 | // 5 | // Created by Andrew Madsen on 9/6/15. 6 | // Copyright (c) 2015 Open Reel Software. All rights reserved. 7 | // 8 | 9 | #import "ORSSerialBuffer.h" 10 | 11 | @interface ORSSerialBuffer () 12 | 13 | @property (nonatomic, strong) NSMutableData *internalBuffer; 14 | 15 | @end 16 | 17 | @implementation ORSSerialBuffer 18 | 19 | - (instancetype)init NS_UNAVAILABLE 20 | { 21 | [NSException raise:NSInternalInconsistencyException format:@"Use -[ORSSerialBuffer initWithMaximumLength:]"]; 22 | return nil; 23 | } 24 | 25 | - (instancetype)initWithMaximumLength:(NSUInteger)maxLength 26 | { 27 | self = [super init]; 28 | if (self) { 29 | _internalBuffer = [NSMutableData data]; 30 | _maximumLength = maxLength; 31 | } 32 | return self; 33 | } 34 | 35 | - (void)appendData:(NSData *)data 36 | { 37 | [self willChangeValueForKey:@"internalBuffer"]; 38 | [self.internalBuffer appendData:data]; 39 | if ([self.internalBuffer length] > self.maximumLength) { 40 | NSRange rangeToDelete = NSMakeRange(0, [self.internalBuffer length] - self.maximumLength); 41 | [self.internalBuffer replaceBytesInRange:rangeToDelete withBytes:NULL length:0]; 42 | } 43 | [self didChangeValueForKey:@"internalBuffer"]; 44 | } 45 | 46 | - (void)clearBuffer 47 | { 48 | self.internalBuffer = [NSMutableData data]; 49 | } 50 | 51 | #pragma mark - Properties 52 | 53 | + (NSSet *)keyPathsForValuesAffectingData { return [NSSet setWithObjects:@"internalData", nil]; } 54 | - (NSData *)data { return self.internalBuffer; } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /FMOscillator/Pods/ORSSerialPort/Source/ORSSerialPacketDescriptor.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORSSerialPacketDescriptor.m 3 | // ORSSerialPort 4 | // 5 | // Created by Andrew Madsen on 7/21/15. 6 | // Copyright (c) 2015 Open Reel Software. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the 10 | // "Software"), to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | #import "ORSSerialPacketDescriptor.h" 28 | 29 | @interface ORSSerialPacketDescriptor () 30 | 31 | @property (nonatomic, copy, readonly) ORSSerialPacketEvaluator responseEvaluator; 32 | 33 | @end 34 | 35 | @implementation ORSSerialPacketDescriptor 36 | 37 | - (instancetype)init NS_UNAVAILABLE 38 | { 39 | [NSException raise:NSInternalInconsistencyException format:@"You must initialize %@ with its designated initializers, or one of its convenience initializers.", NSStringFromClass([self class])]; 40 | return nil; 41 | } 42 | 43 | - (instancetype)initWithMaximumPacketLength:(NSUInteger)maxPacketLength 44 | userInfo:(id)userInfo 45 | responseEvaluator:(ORSSerialPacketEvaluator)responseEvaluator 46 | { 47 | self = [super init]; 48 | if (self) { 49 | _maximumPacketLength = maxPacketLength; 50 | _userInfo = userInfo; 51 | _responseEvaluator = [responseEvaluator ?: ^BOOL(NSData *d){ return [d length] > 0; } copy]; 52 | _uuid = [NSUUID UUID]; 53 | } 54 | return self; 55 | } 56 | 57 | - (instancetype)initWithPacketData:(NSData *)packetData userInfo:(nullable id)userInfo 58 | { 59 | self = [self initWithMaximumPacketLength:[packetData length] userInfo:userInfo responseEvaluator:^BOOL(NSData *inputData) { 60 | return [inputData isEqualToData:packetData]; 61 | }]; 62 | if (self) { 63 | _packetData = packetData; 64 | } 65 | return self; 66 | } 67 | 68 | - (instancetype)initWithPrefix:(NSData *)prefix 69 | suffix:(NSData *)suffix 70 | maximumPacketLength:(NSUInteger)maxPacketLength 71 | userInfo:(id)userInfo 72 | { 73 | self = [self initWithMaximumPacketLength:maxPacketLength userInfo:userInfo responseEvaluator:^BOOL(NSData *data) { 74 | if (prefix == nil && suffix == nil) { return NO; } 75 | if (prefix && [prefix length] > [data length]) { return NO; } 76 | if (suffix && [suffix length] > [data length]) { return NO; } 77 | 78 | for (NSUInteger i=0; i<[prefix length]; i++) { 79 | uint8_t prefixByte = ((uint8_t *)[prefix bytes])[i]; 80 | uint8_t dataByte = ((uint8_t *)[data bytes])[i]; 81 | if (prefixByte != dataByte) { return NO; } 82 | } 83 | 84 | for (NSUInteger i=0; i<[suffix length]; i++) { 85 | uint8_t suffixByte = ((uint8_t *)[suffix bytes])[([suffix length]-1-i)]; 86 | uint8_t dataByte = ((uint8_t *)[data bytes])[([data length]-1-i)]; 87 | if (suffixByte != dataByte) { return NO; } 88 | } 89 | 90 | return YES; 91 | }]; 92 | if (self) { 93 | _prefix = prefix; 94 | _suffix = suffix; 95 | } 96 | return self; 97 | } 98 | 99 | - (instancetype)initWithPrefixString:(NSString *)prefixString 100 | suffixString:(NSString *)suffixString 101 | maximumPacketLength:(NSUInteger)maxPacketLength 102 | userInfo:(id)userInfo; 103 | { 104 | NSData *prefixData = [prefixString dataUsingEncoding:NSUTF8StringEncoding]; 105 | NSData *suffixData = [suffixString dataUsingEncoding:NSUTF8StringEncoding]; 106 | return [self initWithPrefix:prefixData suffix:suffixData maximumPacketLength:maxPacketLength userInfo:userInfo]; 107 | } 108 | 109 | - (instancetype)initWithRegularExpression:(NSRegularExpression *)regex 110 | maximumPacketLength:(NSUInteger)maxPacketLength 111 | userInfo:(id)userInfo; 112 | { 113 | self = [self initWithMaximumPacketLength:maxPacketLength userInfo:userInfo responseEvaluator:^BOOL(NSData *data) { 114 | NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 115 | if (!string) return NO; 116 | 117 | return [regex numberOfMatchesInString:string options:NSMatchingAnchored range:NSMakeRange(0, [string length])] > 0; 118 | }]; 119 | if (self) { 120 | _regularExpression = regex; 121 | } 122 | return self; 123 | } 124 | 125 | - (BOOL)isEqual:(id)object 126 | { 127 | if (object == self) return YES; 128 | if (![object isKindOfClass:[ORSSerialPacketDescriptor class]]) return NO; 129 | return [[(ORSSerialPacketDescriptor *)object uuid] isEqual:self.uuid]; 130 | } 131 | 132 | - (NSUInteger)hash { return [self.uuid hash]; } 133 | 134 | - (BOOL)dataIsValidPacket:(NSData *)packetData 135 | { 136 | if (!self.responseEvaluator) return YES; 137 | return self.responseEvaluator(packetData); 138 | } 139 | 140 | - (NSData *)packetMatchingAtEndOfBuffer:(NSData *)buffer 141 | { 142 | for (NSUInteger i=1; i<=[buffer length]; i++) 143 | { 144 | NSData *window = [buffer subdataWithRange:NSMakeRange([buffer length]-i, i)]; 145 | if ([self dataIsValidPacket:window]) return window; 146 | } 147 | return nil; 148 | } 149 | 150 | @end 151 | -------------------------------------------------------------------------------- /FMOscillator/Pods/ORSSerialPort/Source/ORSSerialPortManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSSerialPortManager.h 3 | // ORSSerialPort 4 | // 5 | // Created by Andrew R. Madsen on 08/7/11. 6 | // Copyright (c) 2011-2014 Andrew R. Madsen (andrew@openreelsoftware.com) 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the 10 | // "Software"), to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | #import 28 | 29 | // Keep older versions of the compiler happy 30 | #ifndef NS_ASSUME_NONNULL_BEGIN 31 | #define NS_ASSUME_NONNULL_BEGIN 32 | #define NS_ASSUME_NONNULL_END 33 | #define nullable 34 | #define nonnullable 35 | #define __nullable 36 | #endif 37 | 38 | #ifndef NS_DESIGNATED_INITIALIZER 39 | #define NS_DESIGNATED_INITIALIZER 40 | #endif 41 | 42 | #ifndef ORSArrayOf 43 | #if __has_feature(objc_generics) 44 | #define ORSArrayOf(TYPE) NSArray 45 | #else 46 | #define ORSArrayOf(TYPE) NSArray 47 | #endif 48 | #endif // #ifndef ORSArrayOf 49 | 50 | NS_ASSUME_NONNULL_BEGIN 51 | 52 | /// Posted when a serial port is connected to the system 53 | extern NSString * const ORSSerialPortsWereConnectedNotification; 54 | 55 | /// Posted when a serial port is disconnected from the system 56 | extern NSString * const ORSSerialPortsWereDisconnectedNotification; 57 | 58 | /// Key for connected port in ORSSerialPortWasConnectedNotification userInfo dictionary 59 | extern NSString * const ORSConnectedSerialPortsKey; 60 | /// Key for disconnected port in ORSSerialPortWasDisconnectedNotification userInfo dictionary 61 | extern NSString * const ORSDisconnectedSerialPortsKey; 62 | 63 | @class ORSSerialPort; 64 | 65 | /** 66 | * `ORSSerialPortManager` is a singleton class (one instance per 67 | * application) that can be used to get a list of available serial ports. 68 | * It will also handle closing open serial ports when the Mac goes to 69 | * sleep, and reopening them automatically on wake. This prevents problems 70 | * I've seen with serial port drivers that can hang if the port is left 71 | * open when putting the machine to sleep. Note that using 72 | * `ORSSerialPortManager` is optional. It provides some nice functionality, 73 | * but only `ORSSerialPort` is necessary to simply send and received data. 74 | * 75 | * Using ORSSerialPortManager 76 | * -------------------------- 77 | * 78 | * To get the shared serial port 79 | * manager: 80 | * 81 | * ORSSerialPortManager *portManager = [ORSSerialPortManager sharedSerialPortManager]; 82 | * 83 | * To get a list of available ports: 84 | * 85 | * NSArray *availablePorts = portManager.availablePorts; 86 | * 87 | * Notifications 88 | * ------------- 89 | * 90 | * `ORSSerialPort` posts notifications when a port is added to or removed from the system. 91 | * `ORSSerialPortsWereConnectedNotification` is posted when one or more ports 92 | * are added to the system. `ORSSerialPortsWereDisconnectedNotification` is posted when 93 | * one ore more ports are removed from the system. The user info dictionary for each 94 | * notification contains the list of ports added or removed. The keys to access these array 95 | * are `ORSConnectedSerialPortsKey`, and `ORSDisconnectedSerialPortsKey` respectively. 96 | * 97 | * KVO Compliance 98 | * -------------- 99 | * 100 | * `ORSSerialPortManager` is Key-Value Observing (KVO) compliant for its 101 | * `availablePorts` property. This means that you can observe 102 | * `availablePorts` to be notified when ports are added to or removed from 103 | * the system. This also means that you can easily bind UI elements to the 104 | * serial port manager's `availablePorts` property using Cocoa-bindings. 105 | * This makes it easy to create a popup menu that displays available serial 106 | * ports and updates automatically, for example. 107 | * 108 | * Close-On-Sleep 109 | * -------------- 110 | * 111 | * `ORSSerialPortManager`'s close-on-sleep, reopen-on-wake functionality is 112 | * automatic. The only thing necessary to enable it is to make sure that 113 | * the singleton instance of `ORSSerialPortManager` has been created by 114 | * calling `+sharedSerialPortManager` at least once. Note that this 115 | * behavior is only available in Cocoa apps, and is disabled when 116 | * ORSSerialPort is used in a command-line only app. 117 | */ 118 | @interface ORSSerialPortManager : NSObject 119 | 120 | /** 121 | * Returns the shared (singleton) serial port manager object. 122 | * 123 | * @return The shared serial port manager. 124 | */ 125 | + (ORSSerialPortManager *)sharedSerialPortManager; 126 | 127 | /** 128 | * An array containing ORSSerialPort instances representing the 129 | * serial ports available on the system. (read-only) 130 | * 131 | * As explained above, this property is Key Value Observing 132 | * compliant, and can be bound to for example an NSPopUpMenu 133 | * to easily give the user a way to select an available port 134 | * on the system. 135 | */ 136 | @property (nonatomic, copy, readonly) ORSArrayOf(ORSSerialPort *) *availablePorts; 137 | 138 | @end 139 | 140 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /FMOscillator/Pods/ORSSerialPort/Source/ORSSerialRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORSSerialRequest.h 3 | // ORSSerialPort 4 | // 5 | // Created by Andrew Madsen on 4/21/14. 6 | // Copyright (c) 2014 Andrew Madsen. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the 10 | // "Software"), to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | #import 28 | #import "ORSSerialPacketDescriptor.h" 29 | 30 | // Keep older versions of the compiler happy 31 | #ifndef NS_ASSUME_NONNULL_BEGIN 32 | #define NS_ASSUME_NONNULL_BEGIN 33 | #define NS_ASSUME_NONNULL_END 34 | #define nullable 35 | #define nonnullable 36 | #define __nullable 37 | #endif 38 | 39 | #ifndef NS_DESIGNATED_INITIALIZER 40 | #define NS_DESIGNATED_INITIALIZER 41 | #endif 42 | 43 | NS_ASSUME_NONNULL_BEGIN 44 | 45 | /** 46 | * An ORSSerialRequest encapsulates a generic "request" command sent via the serial 47 | * port. 48 | * 49 | * An ORSSerialRequest includes data to be sent out via the serial port. 50 | * It also can contain a block which is used to evaluate received 51 | * data to determine if/when a valid response to the request has been received from 52 | * the device on the other end of the port. Arbitrary information can be 53 | * associated with the ORSSerialRequest via its userInfo property. 54 | */ 55 | @interface ORSSerialRequest : NSObject 56 | 57 | /** 58 | * Creates and initializes an ORSSerialRequest instance. 59 | * 60 | * @param dataToSend The data to be sent on the serial port. 61 | * @param userInfo An arbitrary userInfo object. 62 | * @param timeout The maximum amount of time in seconds to wait for a response. Pass -1.0 to wait indefinitely. 63 | * @param responseDescriptor A packet descriptor used to evaluate whether received data constitutes a valid response to the request. 64 | * May be nil. If responseDescriptor is nil, the request is assumed not to require a response, and the next request in the queue will 65 | * be sent immediately. 66 | * 67 | * @return An initialized ORSSerialRequest instance. 68 | */ 69 | + (instancetype)requestWithDataToSend:(NSData *)dataToSend 70 | userInfo:(nullable id)userInfo 71 | timeoutInterval:(NSTimeInterval)timeout 72 | responseDescriptor:(nullable ORSSerialPacketDescriptor *)responseDescriptor; 73 | 74 | /** 75 | * Initializes an ORSSerialRequest instance. 76 | * 77 | * @param dataToSend The data to be sent on the serial port. 78 | * @param userInfo An arbitrary userInfo object. 79 | * @param timeout The maximum amount of time in seconds to wait for a response. Pass -1.0 to wait indefinitely. 80 | * @param responseDescriptor A packet descriptor used to evaluate whether received data constitutes a valid response to the request. 81 | * May be nil. If responseDescriptor is nil, the request is assumed not to require a response, and the next request in the queue will 82 | * be sent immediately. 83 | * 84 | * @return An initialized ORSSerialRequest instance. 85 | */ 86 | - (instancetype)initWithDataToSend:(NSData *)dataToSend 87 | userInfo:(nullable id)userInfo 88 | timeoutInterval:(NSTimeInterval)timeout 89 | responseDescriptor:(nullable ORSSerialPacketDescriptor *)responseDescriptor; 90 | 91 | /** 92 | * Data to be sent on the serial port when the receiver is sent. 93 | */ 94 | @property (nonatomic, strong, readonly) NSData *dataToSend; 95 | 96 | /** 97 | * Arbitrary object (e.g. NSDictionary) used to store additional data 98 | * about the request. 99 | */ 100 | @property (nonatomic, strong, readonly, nullable) id userInfo; 101 | 102 | /** 103 | * The maximum amount of time to wait for a response before timing out. 104 | * Negative values indicate that serial port will wait forever for a response 105 | * without timing out. 106 | */ 107 | @property (nonatomic, readonly) NSTimeInterval timeoutInterval; 108 | 109 | /** 110 | * The descriptor describing the receiver's expected response. 111 | */ 112 | @property (nonatomic, strong, readonly, nullable) ORSSerialPacketDescriptor *responseDescriptor; 113 | 114 | /** 115 | * Unique identifier for the request. 116 | */ 117 | @property (nonatomic, strong, readonly) NSString *UUIDString; 118 | 119 | @end 120 | 121 | #pragma mark - Deprecated 122 | 123 | @interface ORSSerialRequest (Deprecated) 124 | 125 | /** 126 | * @deprecated Use +requestWithDataToSend:userInfo:timeoutInterval:responseDescriptor: instead. 127 | * 128 | * Creates and initializes an ORSSerialRequest instance. 129 | * 130 | * @param dataToSend The data to be sent on the serial port. 131 | * @param userInfo An arbitrary userInfo object. 132 | * @param timeout The maximum amount of time in seconds to wait for a response. Pass -1.0 to wait indefinitely. 133 | * @param responseEvaluator A block used to evaluate whether received data constitutes a valid response to the request. 134 | * May be nil. If responseEvaluator is nil, the request is assumed not to require a response, and the next request in the queue will 135 | * be sent immediately. 136 | * 137 | * @return An initialized ORSSerialRequest instance. 138 | */ 139 | + (instancetype)requestWithDataToSend:(NSData *)dataToSend 140 | userInfo:(nullable id)userInfo 141 | timeoutInterval:(NSTimeInterval)timeout 142 | responseEvaluator:(nullable ORSSerialPacketEvaluator)responseEvaluator DEPRECATED_ATTRIBUTE; 143 | 144 | /** 145 | * @deprecated Use -initWithDataToSend:userInfo:timeoutInterval:responseDescriptor: instead. 146 | * Initializes an ORSSerialRequest instance. 147 | * 148 | * @param dataToSend The data to be sent on the serial port. 149 | * @param userInfo An arbitrary userInfo object. 150 | * @param timeout The maximum amount of time in seconds to wait for a response. Pass -1.0 to wait indefinitely. 151 | * @param responseEvaluator A block used to evaluate whether received data constitutes a valid response to the request. 152 | * May be nil. If responseEvaluator is nil, the request is assumed not to require a response, and the next request in the queue will 153 | * be sent immediately. 154 | * 155 | * @return An initialized ORSSerialRequest instance. 156 | */ 157 | - (instancetype)initWithDataToSend:(NSData *)dataToSend 158 | userInfo:(nullable id)userInfo 159 | timeoutInterval:(NSTimeInterval)timeout 160 | responseEvaluator:(nullable ORSSerialPacketEvaluator)responseEvaluator DEPRECATED_ATTRIBUTE; 161 | 162 | /** 163 | * @deprecated Use the receiver's responseDescriptor object's -dataIsValidPacket: method instead. 164 | * Except in the special case where the response descriptor is nil, this method now simply calls 165 | * through to that. 166 | * 167 | * Can be used to determine if a block of data is a valid response to the request encapsulated 168 | * by the receiver. If the receiver doesn't have a response descriptor, this method 169 | * always returns YES. 170 | * 171 | * @param responseData Data received from a serial port. 172 | * 173 | * @return YES if the data is a valid response, NO otherwise. 174 | */ 175 | - (BOOL)dataIsValidResponse:(nullable NSData *)responseData DEPRECATED_ATTRIBUTE; 176 | 177 | @end 178 | 179 | NS_ASSUME_NONNULL_END 180 | 181 | -------------------------------------------------------------------------------- /FMOscillator/Pods/ORSSerialPort/Source/ORSSerialRequest.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORSSerialRequest.h 3 | // ORSSerialPort 4 | // 5 | // Created by Andrew Madsen on 4/21/14. 6 | // Copyright (c) 2014 Andrew Madsen. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the 10 | // "Software"), to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | #import "ORSSerialRequest.h" 28 | #import "ORSSerialPacketDescriptor.h" 29 | 30 | @interface ORSSerialRequest () 31 | 32 | @property (nonatomic, strong, readwrite) NSData *dataToSend; 33 | @property (nonatomic, strong, readwrite) id userInfo; 34 | @property (nonatomic, readwrite) NSTimeInterval timeoutInterval; 35 | @property (nonatomic, strong) ORSSerialPacketDescriptor *responseDescriptor; 36 | @property (nonatomic, strong, readwrite) NSString *UUIDString; 37 | 38 | @end 39 | 40 | @implementation ORSSerialRequest 41 | 42 | +(instancetype)requestWithDataToSend:(NSData *)dataToSend 43 | userInfo:(id)userInfo 44 | timeoutInterval:(NSTimeInterval)timeout 45 | responseDescriptor:(ORSSerialPacketDescriptor *)responseDescriptor 46 | { 47 | return [[self alloc] initWithDataToSend:dataToSend userInfo:userInfo timeoutInterval:timeout responseDescriptor:responseDescriptor]; 48 | } 49 | 50 | - (instancetype)initWithDataToSend:(NSData *)dataToSend 51 | userInfo:(id)userInfo 52 | timeoutInterval:(NSTimeInterval)timeout 53 | responseDescriptor:(ORSSerialPacketDescriptor *)responseDescriptor 54 | { 55 | self = [super init]; 56 | if (self) { 57 | _dataToSend = dataToSend; 58 | _userInfo = userInfo; 59 | _timeoutInterval = timeout; 60 | _responseDescriptor = responseDescriptor; 61 | CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); 62 | _UUIDString = CFBridgingRelease(CFUUIDCreateString(kCFAllocatorDefault, uuid)); 63 | CFRelease(uuid); 64 | } 65 | return self; 66 | } 67 | 68 | - (NSString *)description 69 | { 70 | return [NSString stringWithFormat:@"%@ data: %@ userInfo: %@ timeout interval: %f", [super description], self.dataToSend, self.userInfo, self.timeoutInterval]; 71 | } 72 | 73 | @end 74 | 75 | @implementation ORSSerialRequest (Deprecated) 76 | 77 | + (instancetype)requestWithDataToSend:(NSData *)dataToSend 78 | userInfo:(id)userInfo 79 | timeoutInterval:(NSTimeInterval)timeout 80 | responseEvaluator:(ORSSerialPacketEvaluator)responseEvaluator; 81 | { 82 | return [[self alloc] initWithDataToSend:dataToSend userInfo:userInfo timeoutInterval:timeout responseEvaluator:responseEvaluator]; 83 | } 84 | - (instancetype)initWithDataToSend:(NSData *)dataToSend 85 | userInfo:(id)userInfo 86 | timeoutInterval:(NSTimeInterval)timeout 87 | responseEvaluator:(ORSSerialPacketEvaluator)responseEvaluator; 88 | { 89 | ORSSerialPacketDescriptor *descriptor = [[ORSSerialPacketDescriptor alloc] initWithMaximumPacketLength:NSIntegerMax 90 | userInfo:nil 91 | responseEvaluator:responseEvaluator]; 92 | return [self initWithDataToSend:dataToSend userInfo:userInfo timeoutInterval:timeout responseDescriptor:descriptor]; 93 | } 94 | 95 | - (BOOL)dataIsValidResponse:(NSData *)responseData 96 | { 97 | if (!self.responseDescriptor) return YES; 98 | 99 | return [self.responseDescriptor dataIsValidPacket:responseData]; 100 | } 101 | 102 | @end -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/ORSSerialPort/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.0.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/ORSSerialPort/ORSSerialPort-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ORSSerialPort : NSObject 3 | @end 4 | @implementation PodsDummy_ORSSerialPort 5 | @end 6 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/ORSSerialPort/ORSSerialPort-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/ORSSerialPort/ORSSerialPort-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "ORSSerialPacketDescriptor.h" 4 | #import "ORSSerialPort.h" 5 | #import "ORSSerialPortManager.h" 6 | #import "ORSSerialRequest.h" 7 | 8 | FOUNDATION_EXPORT double ORSSerialVersionNumber; 9 | FOUNDATION_EXPORT const unsigned char ORSSerialVersionString[]; 10 | 11 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/ORSSerialPort/ORSSerialPort.modulemap: -------------------------------------------------------------------------------- 1 | framework module ORSSerial { 2 | umbrella header "ORSSerialPort-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | private header "ORSSerialBuffer.h" 8 | } 9 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/ORSSerialPort/ORSSerialPort.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ORSSerialPort" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "IOKit" 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ORSSerialPort 5 | 6 | Copyright (c) 2011-2012 Andrew R. Madsen (andrew@openreelsoftware.com) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | Generated by CocoaPods - http://cocoapods.org 14 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2011-2012 Andrew R. Madsen (andrew@openreelsoftware.com) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | Title 25 | ORSSerialPort 26 | Type 27 | PSGroupSpecifier 28 | 29 | 30 | FooterText 31 | Generated by CocoaPods - http://cocoapods.org 32 | Title 33 | 34 | Type 35 | PSGroupSpecifier 36 | 37 | 38 | StringsTable 39 | Acknowledgements 40 | Title 41 | Acknowledgements 42 | 43 | 44 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_FMOscillator : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_FMOscillator 5 | @end 6 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "Pods-FMOscillator/ORSSerial.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "Pods-FMOscillator/ORSSerial.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY="$(cd "${1%/*}" && pwd)" 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 63 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 66 | fi 67 | rm -f "$RESOURCES_TO_COPY" 68 | 69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 70 | then 71 | case "${TARGETED_DEVICE_FAMILY}" in 72 | 1,2) 73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 74 | ;; 75 | 1) 76 | TARGET_DEVICE_ARGS="--target-device iphone" 77 | ;; 78 | 2) 79 | TARGET_DEVICE_ARGS="--target-device ipad" 80 | ;; 81 | *) 82 | TARGET_DEVICE_ARGS="--target-device mac" 83 | ;; 84 | esac 85 | 86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 88 | while read line; do 89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 90 | XCASSET_FILES+=("$line") 91 | fi 92 | done <<<"$OTHER_XCASSETS" 93 | 94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | fi 96 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_FMOscillatorVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_FMOscillatorVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/ORSSerial.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "ORSSerial" 6 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-FMOscillator 7 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_FMOscillator { 2 | umbrella header "Pods-FMOscillator-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /FMOscillator/Pods/Target Support Files/Pods-FMOscillator/Pods-FMOscillator.release.xcconfig: -------------------------------------------------------------------------------- 1 | CODE_SIGN_IDENTITY = 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/ORSSerial.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "ORSSerial" 6 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-FMOscillator 7 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Schematic Files/AssembledCircuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/Schematic Files/AssembledCircuit.png -------------------------------------------------------------------------------- /Schematic Files/InputCircuit.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/Schematic Files/InputCircuit.fzz -------------------------------------------------------------------------------- /Schematic Files/InputCircuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narner/Arduino-AudioKitOSX/655bc48335ec3d0be265885c2a30893fb8e8e308/Schematic Files/InputCircuit.png -------------------------------------------------------------------------------- /SearialInputReading/SearialInputReading.ino: -------------------------------------------------------------------------------- 1 | /*This Arduino sketch will read teh values of two potentiometers and a 2 | toggle switch, which will be used to control the parameters of an oscillator 3 | made with Audio Kit */ 4 | 5 | //http://www.nickarner.com 6 | //http://www.audiokitio 7 | 8 | 9 | const int switchPin = 2; // the pin that the push-button is attached to 10 | 11 | int switchState = 0; // current state of the push-button 12 | int lastSwitchState = 0; // previous state of the push-button 13 | 14 | int lastPotentiometerOneValue = 0; 15 | int lastPotentiometerTwoValue = 0; 16 | 17 | void setup() { 18 | // initialize serial communication at 57600 bits per second: 19 | Serial.begin(57600); 20 | 21 | // initialize the switch pin as a input: 22 | pinMode(switchPin, INPUT); 23 | } 24 | 25 | void loop() { 26 | delay(10); 27 | readAndSendPotentiometerDataIfChanged(); 28 | readAndSendSwitchDataIfChanged(); 29 | } 30 | 31 | void readAndSendPotentiometerDataIfChanged(void) { 32 | 33 | //Potentiometer One 34 | int newPotentiometerOneValue = analogRead(A0) / 10.2; 35 | if (newPotentiometerOneValue != lastPotentiometerOneValue) { 36 | Serial.print("!pos1"); 37 | Serial.print(newPotentiometerOneValue); 38 | Serial.print(";"); 39 | lastPotentiometerOneValue = newPotentiometerOneValue; 40 | } 41 | 42 | //Potentiometer Two 43 | int newPotentiometerTwoValue = analogRead(A1) / 10.2; 44 | if (newPotentiometerTwoValue != lastPotentiometerTwoValue) { 45 | Serial.print("!pos2"); 46 | Serial.print(newPotentiometerTwoValue); 47 | Serial.print(";"); 48 | lastPotentiometerTwoValue = newPotentiometerTwoValue; 49 | } 50 | } 51 | 52 | void readAndSendSwitchDataIfChanged(void) { 53 | // read the switch input pin: 54 | switchState = digitalRead(switchPin); 55 | 56 | // Read the switch input pin: 57 | if (switchState != lastSwitchState) { 58 | // If the state has changed, increment the counter 59 | if (switchState == HIGH) { 60 | // If the current state is HIGH then the switch went from off to on: 61 | Serial.print("!state"); 62 | Serial.print("1"); 63 | Serial.print(";"); 64 | } else { 65 | // If the current state is LOW, then the switch went from on to off 66 | Serial.print("!state"); 67 | Serial.print("0"); 68 | Serial.print(";"); 69 | } 70 | // Delay a little bit to avoid bouncing 71 | delay(50); 72 | } 73 | //Save the current state as the last state, for next time through the loop 74 | lastSwitchState = switchState; 75 | } 76 | 77 | --------------------------------------------------------------------------------