197 lines
10 KiB
C++
197 lines
10 KiB
C++
/**
|
|
* Copyright (c) 2021 Enzien Audio, Ltd.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
* are permitted provided that the following conditions are met:
|
|
*
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
* this list of conditions, and the following disclaimer.
|
|
*
|
|
* 2. Redistributions in binary form must reproduce the phrase "powered by heavy",
|
|
* the heavy logo, and a hyperlink to https://enzienaudio.com, all in a visible
|
|
* form.
|
|
*
|
|
* 2.1 If the Application is distributed in a store system (for example,
|
|
* the Apple "App Store" or "Google Play"), the phrase "powered by heavy"
|
|
* shall be included in the app description or the copyright text as well as
|
|
* the in the app itself. The heavy logo will shall be visible in the app
|
|
* itself as well.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*
|
|
*/
|
|
|
|
#ifndef _HEAVY_CONTEXT_ARP_DELAY_ENV_HPP_
|
|
#define _HEAVY_CONTEXT_ARP_DELAY_ENV_HPP_
|
|
|
|
// object includes
|
|
#include "HeavyContext.hpp"
|
|
#include "HvSignalLine.h"
|
|
#include "HvControlSystem.h"
|
|
#include "HvSignalTabwrite.h"
|
|
#include "HvSignalPhasor.h"
|
|
#include "HvTable.h"
|
|
#include "HvMath.h"
|
|
#include "HvControlVar.h"
|
|
#include "HvSignalVar.h"
|
|
#include "HvControlCast.h"
|
|
#include "HvControlDelay.h"
|
|
#include "HvSignalTabread.h"
|
|
#include "HvControlSlice.h"
|
|
#include "HvControlBinop.h"
|
|
|
|
class Heavy_arp_delay_env : public HeavyContext {
|
|
|
|
public:
|
|
Heavy_arp_delay_env(double sampleRate, int poolKb=10, int inQueueKb=2, int outQueueKb=0);
|
|
~Heavy_arp_delay_env();
|
|
|
|
const char *getName() override { return "arp_delay_env"; }
|
|
int getNumInputChannels() override { return 0; }
|
|
int getNumOutputChannels() override { return 2; }
|
|
|
|
int process(float **inputBuffers, float **outputBuffer, int n) override;
|
|
int processInline(float *inputBuffers, float *outputBuffer, int n) override;
|
|
int processInlineInterleaved(float *inputBuffers, float *outputBuffer, int n) override;
|
|
|
|
int getParameterInfo(int index, HvParameterInfo *info) override;
|
|
struct Parameter {
|
|
struct In {
|
|
enum ParameterIn : hv_uint32_t {
|
|
ARP_PITCH = 0x40ADE322, // Arp_Pitch
|
|
ARP_SPEED = 0x234E72EF, // Arp_Speed
|
|
DELAY_REPEATS = 0x53767352, // Delay_Repeats
|
|
DELAY_TIME = 0xEE78D101, // Delay_Time
|
|
};
|
|
};
|
|
};
|
|
|
|
private:
|
|
HvTable *getTableForHash(hv_uint32_t tableHash) override;
|
|
void scheduleMessageForReceiver(hv_uint32_t receiverHash, HvMessage *m) override;
|
|
|
|
// static sendMessage functions
|
|
static void cVar_QpNfcxTV_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSwitchcase_JEjQ8389_onMessage(HeavyContextInterface *, void *, int letIn, const HvMessage *const, void *);
|
|
static void cCast_zerZuBAj_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSwitchcase_MAHWLSLi_onMessage(HeavyContextInterface *, void *, int letIn, const HvMessage *const, void *);
|
|
static void cDelay_TiC320ze_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cCast_hpcdUgv0_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_nEreHrAN_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSystem_f2BGea9a_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cVar_BG8d1bMD_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_EIFIlHRW_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_N9H9NawL_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_IvE42sSb_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_aL2oj1zg_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_fVpsf0EY_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSystem_qdiBBSrT_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cDelay_XSmTcSC1_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cDelay_pDIGPhjJ_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_a6xP9f6r_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void hTable_RQkgAERq_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_L8kmBApX_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_D578FYDj_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_8Jd91u4J_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cCast_TyQ72s6o_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_jjqDeWpg_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cVar_SEZ4VjpC_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cVar_W0akXWRy_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cVar_fQgeYZ23_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cVar_VnBDaCLo_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_AusRai4k_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSystem_1GtyEzxF_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cVar_XMZRreVm_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSystem_NStX9wYa_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_D7aI6oLJ_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_u7DQ67Ug_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_dhfHyNRX_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cVar_wcCP0NJi_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSlice_Fw1uajNs_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSlice_YW3QKnTq_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cSlice_AfFvCgf9_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_BY849OFM_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_Pt69l6DW_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_x27TkP5A_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_oimVaEsO_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_Y0D08wrf_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_hesyA8Yg_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_qVR4M6qt_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_A0C5qwHZ_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_6yCKZYJD_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_fDDSBI42_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_86yU2trO_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_XJFOKNQO_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_g5DX3UAM_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_b7c8uTvL_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_exCKzhjC_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_QamkPGUu_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cBinop_rnkTCEOE_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_5K6Ff69g_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cMsg_T2Vn5l1r_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cCast_xyQ6QCqj_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cCast_79XmGDKd_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cReceive_mK4YUsJl_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cReceive_eXrF3UlG_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cReceive_GkgEZDwE_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cReceive_XUCgPiDD_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cReceive_EcfMX78P_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
static void cReceive_4Kzf4FZT_sendMessage(HeavyContextInterface *, int, const HvMessage *);
|
|
|
|
// objects
|
|
SignalLine sLine_5Jrovr0w;
|
|
SignalTabhead sTabhead_5flIzcsR;
|
|
SignalTabread sTabread_3ztnQBI7;
|
|
SignalTabread sTabread_Va5jECJY;
|
|
SignalPhasor sPhasor_deMq4ELY;
|
|
SignalLine sLine_tLkWSR92;
|
|
SignalTabwrite sTabwrite_lra5KFKD;
|
|
ControlVar cVar_QpNfcxTV;
|
|
ControlDelay cDelay_TiC320ze;
|
|
ControlVar cVar_BG8d1bMD;
|
|
ControlBinop cBinop_N9H9NawL;
|
|
ControlBinop cBinop_IvE42sSb;
|
|
ControlBinop cBinop_aL2oj1zg;
|
|
ControlDelay cDelay_XSmTcSC1;
|
|
ControlDelay cDelay_pDIGPhjJ;
|
|
ControlBinop cBinop_a6xP9f6r;
|
|
HvTable hTable_RQkgAERq;
|
|
ControlBinop cBinop_D578FYDj;
|
|
ControlVar cVar_SEZ4VjpC;
|
|
ControlVar cVar_W0akXWRy;
|
|
ControlVar cVar_fQgeYZ23;
|
|
ControlVar cVar_VnBDaCLo;
|
|
ControlVar cVar_XMZRreVm;
|
|
ControlBinop cBinop_D7aI6oLJ;
|
|
ControlBinop cBinop_dhfHyNRX;
|
|
SignalVarf sVarf_1XPUT766;
|
|
SignalVarf sVarf_Puoj2QPe;
|
|
SignalVarf sVarf_b7By7QIh;
|
|
ControlVar cVar_wcCP0NJi;
|
|
ControlSlice cSlice_Fw1uajNs;
|
|
ControlSlice cSlice_YW3QKnTq;
|
|
ControlSlice cSlice_AfFvCgf9;
|
|
ControlBinop cBinop_BY849OFM;
|
|
ControlBinop cBinop_Pt69l6DW;
|
|
ControlBinop cBinop_x27TkP5A;
|
|
ControlBinop cBinop_oimVaEsO;
|
|
ControlBinop cBinop_hesyA8Yg;
|
|
SignalVarf sVarf_7lIBPjgU;
|
|
ControlBinop cBinop_86yU2trO;
|
|
ControlBinop cBinop_b7c8uTvL;
|
|
ControlBinop cBinop_exCKzhjC;
|
|
ControlBinop cBinop_QamkPGUu;
|
|
ControlBinop cBinop_rnkTCEOE;
|
|
};
|
|
|
|
#endif // _HEAVY_CONTEXT_ARP_DELAY_ENV_HPP_
|