/* Copyright (c) 2021 Alex Diener This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Alex Diener alex@ludobloom.com */ #ifndef __SynthPropertyController_H__ #define __SynthPropertyController_H__ #ifdef __cplusplus extern "C" { #endif typedef struct SynthPropertyController SynthPropertyController; #define SynthPropertyController_superclass SamplerObject #include "audiosynth/AudioSamplerParameters_generalSynth.h" #include "audiosynth/SamplerObject.h" #define SynthPropertyController_ivars \ SamplerObject_ivars \ \ SynthPropertyIdentifier propertyIdentifier; \ bool mute; \ bool solo; #define SynthPropertyController_vtable(self_type) \ SamplerObject_vtable(self_type) \ \ void (* setInitialValue)(self_type * self, float value); \ void (* remapRange)(self_type * self, float fromMin, float fromMax, float toMin, float toMax); \ void (* apply)(self_type * self, SamplerObject * samplerObject, SamplerObject_state * state, float relativeTime, float absoluteTime); stemobject_declare(SynthPropertyController) bool SynthPropertyController_init(SynthPropertyController * self, SynthPropertyIdentifier propertyIdentifier); void SynthPropertyController_dispose(SynthPropertyController * self); SynthPropertyController * SynthPropertyController_copy(SynthPropertyController * self); void SynthPropertyController_initCopy(SynthPropertyController * self, SynthPropertyController * original); bool SynthPropertyController_isEqual(SynthPropertyController * self, compat_type(SynthPropertyController *) compare); void SynthPropertyController_setInitialValue(SynthPropertyController * self, float value); void SynthPropertyController_remapRange(SynthPropertyController * self, float fromMin, float fromMax, float toMin, float toMax); void SynthPropertyController_apply(SynthPropertyController * self, SamplerObject * samplerObject, SamplerObject_state * state, float time, float timeDelta); #ifdef __cplusplus } #endif #endif