Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
047125fa6This file is pinned to the selected release. Download the original to open it in your design tool.
/*****************************************************************************
VoiceTransient.cpp
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "VoiceTransient.h"
#include <cmath>
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : trigger
==============================================================================
*/
void VoiceTransient::trigger ()
{
_active_flag = true;
_pos = 0;
_ramp.reset (1.f);
}
/*
==============================================================================
Name : stop
==============================================================================
*/
void VoiceTransient::stop ()
{
_ramp = 0.f;
}
/*
==============================================================================
Name : set_speed
==============================================================================
*/
void VoiceTransient::set_speed (float step_spl)
{
_step_spl = step_spl;
}