Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
/*****************************************************************************
VcvButton.cpp
Copyright (c) 2020 Raphael DINGE
*Tab=3***********************************************************************/
/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
#include "erb/vcvrack/VcvButton.h"
namespace erb
{
/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : ctor
==============================================================================
*/
VcvButton::VcvButton (VcvModule & module, const VcvPin & /* pin */)
: VcvParamBase (module)
{
}
/*
==============================================================================
Name : pressed
==============================================================================
*/
bool VcvButton::pressed () const
{
return _state.pressed ();
}
/*
==============================================================================
Name : held
==============================================================================
*/
bool VcvButton::held () const
{
return _state.held ();
}
/*
==============================================================================
Name : released
==============================================================================
*/
bool VcvButton::released () const
{
return _state.released ();
}
/*\\\ INTERNAL \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*
==============================================================================
Name : impl_notify_audio_buffer_start
==============================================================================
*/
void VcvButton::impl_notify_audio_buffer_start ()
{
VcvParamBase::impl_notify_audio_buffer_start ();
bool on_flag = norm_val () > 0.5f;
_state.process (on_flag);
}
/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
} // namespace erb
/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
b0e3865b6This file is pinned to the selected release. Download the original to open it in your design tool.