Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
7b41c4c52This 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;
}