/* 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_sine_H__ #define __SynthPropertyController_sine_H__ #ifdef __cplusplus extern "C" { #endif typedef struct SynthPropertyController_sine SynthPropertyController_sine; #define SynthPropertyController_sine_superclass SynthPropertyController #include "audiosynth/SynthPropertyController.h" #define SynthPropertyController_sine_ivars \ SynthPropertyController_ivars \ \ float centerValue; \ float amplitude; \ float cycleCount; \ float startPhase; #define SynthPropertyController_sine_vtable(self_type) \ SynthPropertyController_vtable(self_type) stemobject_declare(SynthPropertyController_sine) SynthPropertyController_sine * SynthPropertyController_sine_create(SynthPropertyIdentifier propertyIdentifier, float centerValue, float amplitude, float cycleCount, float startPhase); bool SynthPropertyController_sine_init(SynthPropertyController_sine * self, SynthPropertyIdentifier propertyIdentifier, float centerValue, float amplitude, float cycleCount, float startPhase); void SynthPropertyController_sine_dispose(SynthPropertyController_sine * self); SynthPropertyController_sine * SynthPropertyController_sine_copy(SynthPropertyController_sine * self); void SynthPropertyController_sine_initCopy(SynthPropertyController_sine * self, SynthPropertyController_sine * original); bool SynthPropertyController_sine_isEqual(SynthPropertyController_sine * self, compat_type(SynthPropertyController_sine *) compareUntyped); uint32_t SynthPropertyController_sine_hash(SynthPropertyController_sine * self, uint32_t initval); void SynthPropertyController_sine_setInitialValue(SynthPropertyController_sine * self, float value); void SynthPropertyController_sine_remapRange(SynthPropertyController_sine * self, float fromMin, float fromMax, float toMin, float toMax); float SynthPropertyController_sine_sample(SynthPropertyController_sine * self, SamplerObject_state * state, float phase, float phaseDelta, float time, float timeDelta); #ifdef __cplusplus } #endif #endif