mirror of https://github.com/AxioDL/amuse.git
initial driver entry point
This commit is contained in:
parent
6e692c7a89
commit
2b7dc66c2a
|
@ -57,3 +57,8 @@ add_library(amuse
|
||||||
${SOURCES}
|
${SOURCES}
|
||||||
${HEADERS}
|
${HEADERS}
|
||||||
${EXTRAS})
|
${EXTRAS})
|
||||||
|
|
||||||
|
if(TARGET boo)
|
||||||
|
add_executable(amusetool driver/main.cpp)
|
||||||
|
target_link_libraries(amusetool amuse boo ${BOO_SYS_LIBS} logvisor)
|
||||||
|
endif()
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
#include "amuse/amuse.hpp"
|
||||||
|
#include "amuse/BooBackend.hpp"
|
||||||
|
#include "boo/audiodev/IAudioVoiceEngine.hpp"
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
std::unique_ptr<boo::IAudioVoiceEngine> voxEngine = boo::NewAudioVoiceEngine();
|
||||||
|
amuse::BooBackendVoiceAllocator booBackend(*voxEngine);
|
||||||
|
amuse::Engine engine(booBackend);
|
||||||
|
|
||||||
|
amuse::Voice* vox = engine.fxStart(1, 1.f, 0.f);
|
||||||
|
|
||||||
|
for (int f=0 ; f<500 ; ++f)
|
||||||
|
{
|
||||||
|
engine.pumpEngine();
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(15));
|
||||||
|
}
|
||||||
|
|
||||||
|
vox->keyOff();
|
||||||
|
|
||||||
|
for (int f=0 ; f<120 ; ++f)
|
||||||
|
{
|
||||||
|
engine.pumpEngine();
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(15));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -7,7 +7,8 @@ namespace amuse
|
||||||
{
|
{
|
||||||
|
|
||||||
/** Reverb effect with configurable reflection filtering and channel-crosstalk */
|
/** Reverb effect with configurable reflection filtering and channel-crosstalk */
|
||||||
class EffectReverbHi : public EffectBase
|
template <typename T>
|
||||||
|
class EffectReverbHi : public EffectBase<T>
|
||||||
{
|
{
|
||||||
float m_coloration; /**< [0.0, 1.0] influences filter coefficients to define surface characteristics of a room */
|
float m_coloration; /**< [0.0, 1.0] influences filter coefficients to define surface characteristics of a room */
|
||||||
float m_mix; /**< [0.0, 1.0] dry/wet mix factor of reverb effect */
|
float m_mix; /**< [0.0, 1.0] dry/wet mix factor of reverb effect */
|
||||||
|
|
|
@ -7,7 +7,8 @@ namespace amuse
|
||||||
{
|
{
|
||||||
|
|
||||||
/** Reverb effect with configurable reflection filtering */
|
/** Reverb effect with configurable reflection filtering */
|
||||||
class EffectReverbStd : public EffectBase
|
template <typename T>
|
||||||
|
class EffectReverbStd : public EffectBase<T>
|
||||||
{
|
{
|
||||||
float m_coloration; /**< [0.0, 1.0] influences filter coefficients to define surface characteristics of a room */
|
float m_coloration; /**< [0.0, 1.0] influences filter coefficients to define surface characteristics of a room */
|
||||||
float m_mix; /**< [0.0, 1.0] dry/wet mix factor of reverb effect */
|
float m_mix; /**< [0.0, 1.0] dry/wet mix factor of reverb effect */
|
||||||
|
|
|
@ -187,8 +187,8 @@ class SoundMacroState
|
||||||
|
|
||||||
float m_lfoPeriods[2]; /**< time-periods for LFO1 and LFO2 */
|
float m_lfoPeriods[2]; /**< time-periods for LFO1 and LFO2 */
|
||||||
|
|
||||||
/** Used to store LFO-reference parameters for compatible state systems */
|
/** Used to build a multi-component formula for overriding controllers */
|
||||||
struct LFOSel
|
struct Evaluator
|
||||||
{
|
{
|
||||||
enum class Combine : uint8_t
|
enum class Combine : uint8_t
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ class SoundMacroState
|
||||||
Var
|
Var
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Represents one term of the LFO formula assembled via *_SELECT commands */
|
/** Represents one term of the formula assembled via *_SELECT commands */
|
||||||
struct Component
|
struct Component
|
||||||
{
|
{
|
||||||
uint8_t m_midiCtrl;
|
uint8_t m_midiCtrl;
|
||||||
|
@ -215,32 +215,32 @@ class SoundMacroState
|
||||||
};
|
};
|
||||||
std::vector<Component> m_comps; /**< Components built up by the macro */
|
std::vector<Component> m_comps; /**< Components built up by the macro */
|
||||||
|
|
||||||
/** Combine additional component(s) to LFO calcuation */
|
/** Combine additional component(s) to formula */
|
||||||
void addComponent(uint8_t midiCtrl, float scale,
|
void addComponent(uint8_t midiCtrl, float scale,
|
||||||
Combine combine, VarType varType);
|
Combine combine, VarType varType);
|
||||||
|
|
||||||
/** Calculate current scaled LFO value */
|
/** Calculate value */
|
||||||
float evaluate(Voice& vox, const SoundMacroState& st);
|
float evaluate(Voice& vox, const SoundMacroState& st);
|
||||||
|
|
||||||
/** Determine if this LFOSel is valid to use */
|
/** Determine if able to use */
|
||||||
operator bool() const {return m_comps.size() != 0;}
|
operator bool() const {return m_comps.size() != 0;}
|
||||||
};
|
};
|
||||||
|
|
||||||
LFOSel m_volumeSel;
|
Evaluator m_volumeSel;
|
||||||
LFOSel m_panSel;
|
Evaluator m_panSel;
|
||||||
LFOSel m_pitchWheelSel;
|
Evaluator m_pitchWheelSel;
|
||||||
LFOSel m_modWheelSel;
|
Evaluator m_modWheelSel;
|
||||||
LFOSel m_pedalSel;
|
Evaluator m_pedalSel;
|
||||||
LFOSel m_portamentoSel;
|
Evaluator m_portamentoSel;
|
||||||
LFOSel m_reverbSel;
|
Evaluator m_reverbSel;
|
||||||
LFOSel m_preAuxASel;
|
Evaluator m_preAuxASel;
|
||||||
LFOSel m_preAuxBSel;
|
Evaluator m_preAuxBSel;
|
||||||
LFOSel m_auxAFxSel;
|
Evaluator m_auxAFxSel;
|
||||||
LFOSel m_auxBFxSel;
|
Evaluator m_auxBFxSel;
|
||||||
LFOSel m_postAuxB;
|
Evaluator m_postAuxB;
|
||||||
LFOSel m_spanSel;
|
Evaluator m_spanSel;
|
||||||
LFOSel m_dopplerSel;
|
Evaluator m_dopplerSel;
|
||||||
LFOSel m_tremoloSel;
|
Evaluator m_tremoloSel;
|
||||||
|
|
||||||
int32_t m_variables[256]; /**< 32-bit variables set with relevant commands */
|
int32_t m_variables[256]; /**< 32-bit variables set with relevant commands */
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,22 @@
|
||||||
#ifndef __AMUSE_AMUSE_HPP__
|
#ifndef __AMUSE_AMUSE_HPP__
|
||||||
#define __AMUSE_AMUSE_HPP__
|
#define __AMUSE_AMUSE_HPP__
|
||||||
|
|
||||||
namespace amuse
|
#include "AudioGroup.hpp"
|
||||||
{
|
#include "AudioGroupData.hpp"
|
||||||
|
#include "AudioGroupPool.hpp"
|
||||||
|
#include "AudioGroupProject.hpp"
|
||||||
}
|
#include "AudioGroupSampleDirectory.hpp"
|
||||||
|
#include "EffectChorus.hpp"
|
||||||
|
#include "EffectDelay.hpp"
|
||||||
|
#include "EffectReverbStd.hpp"
|
||||||
|
#include "EffectReverbHi.hpp"
|
||||||
|
#include "Emitter.hpp"
|
||||||
|
#include "Engine.hpp"
|
||||||
|
#include "Envelope.hpp"
|
||||||
|
#include "Listener.hpp"
|
||||||
|
#include "Sequencer.hpp"
|
||||||
|
#include "SoundMacroState.hpp"
|
||||||
|
#include "Submix.hpp"
|
||||||
|
#include "Voice.hpp"
|
||||||
|
|
||||||
#endif // __AMUSE_AMUSE_HPP__
|
#endif // __AMUSE_AMUSE_HPP__
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "amuse/AudioGroupProject.hpp"
|
||||||
|
|
||||||
|
namespace amuse
|
||||||
|
{
|
||||||
|
|
||||||
|
AudioGroupProject::AudioGroupProject(const unsigned char* data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -25,4 +25,8 @@ void AudioGroupSampleDirectory::ADPCMParms::swapBig()
|
||||||
m_coefs[i] = SBig(m_coefs[i]);
|
m_coefs[i] = SBig(m_coefs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AudioGroupSampleDirectory::AudioGroupSampleDirectory(const unsigned char* data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,7 +343,7 @@ void EffectChorus<T>::applyEffect(T* audio, size_t frameCount, const ChannelMap&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
audio = outBuf;
|
audio += bs * chanMap.m_channelCount;
|
||||||
remFrames -= bs;
|
remFrames -= bs;
|
||||||
|
|
||||||
size_t chanPitch = m_blockSamples * AMUSE_CHORUS_NUM_BLOCKS;
|
size_t chanPitch = m_blockSamples * AMUSE_CHORUS_NUM_BLOCKS;
|
||||||
|
|
|
@ -46,6 +46,9 @@ void EffectDelay<T>::_update()
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void EffectDelay<T>::applyEffect(T* audio, size_t frameCount, const ChannelMap& chanMap)
|
void EffectDelay<T>::applyEffect(T* audio, size_t frameCount, const ChannelMap& chanMap)
|
||||||
{
|
{
|
||||||
|
if (m_dirty)
|
||||||
|
_update();
|
||||||
|
|
||||||
for (size_t f=0 ; f<frameCount ;)
|
for (size_t f=0 ; f<frameCount ;)
|
||||||
{
|
{
|
||||||
for (int c=0 ; c<chanMap.m_channelCount ; ++c)
|
for (int c=0 ; c<chanMap.m_channelCount ; ++c)
|
||||||
|
|
|
@ -9,4 +9,28 @@ Emitter::Emitter(Engine& engine, const AudioGroup& group, Voice& vox)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Emitter::setPos(const Vector3f& pos)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Emitter::setDir(const Vector3f& dir)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Emitter::setMaxDist(float maxDist)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Emitter::setMaxVol(float maxVol)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Emitter::setMinVol(float minVol)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Emitter::setFalloff(float falloff)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,13 @@ void SoundMacroState::Command::swapBig()
|
||||||
words[1] = SBig(words[1]);
|
words[1] = SBig(words[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundMacroState::LFOSel::addComponent(uint8_t midiCtrl, float scale,
|
void SoundMacroState::Evaluator::addComponent(uint8_t midiCtrl, float scale,
|
||||||
Combine combine, VarType varType)
|
Combine combine, VarType varType)
|
||||||
{
|
{
|
||||||
m_comps.push_back({midiCtrl, scale, combine, varType});
|
m_comps.push_back({midiCtrl, scale, combine, varType});
|
||||||
}
|
}
|
||||||
|
|
||||||
float SoundMacroState::LFOSel::evaluate(Voice& vox, const SoundMacroState& st)
|
float SoundMacroState::Evaluator::evaluate(Voice& vox, const SoundMacroState& st)
|
||||||
{
|
{
|
||||||
float value = 0.f;
|
float value = 0.f;
|
||||||
|
|
||||||
|
@ -978,8 +978,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_volumeSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_volumeSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -988,8 +988,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_panSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_panSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -998,8 +998,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_pitchWheelSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_pitchWheelSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1008,8 +1008,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_modWheelSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_modWheelSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1018,8 +1018,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_pedalSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_pedalSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1028,8 +1028,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_portamentoSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_portamentoSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1038,8 +1038,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_reverbSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_reverbSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1048,8 +1048,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_spanSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_spanSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1058,8 +1058,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_dopplerSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_dopplerSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1068,8 +1068,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_tremoloSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_tremoloSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1078,8 +1078,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_preAuxASel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_preAuxASel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1088,8 +1088,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_preAuxBSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_preAuxBSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1098,8 +1098,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_postAuxB.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_postAuxB.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1108,8 +1108,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_auxAFxSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_auxAFxSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
@ -1118,8 +1118,8 @@ bool SoundMacroState::advance(Voice& vox, float dt)
|
||||||
{
|
{
|
||||||
uint8_t ctrl = cmd.m_data[0];
|
uint8_t ctrl = cmd.m_data[0];
|
||||||
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
int16_t perc = *reinterpret_cast<int16_t*>(&cmd.m_data[1]);
|
||||||
LFOSel::Combine combine = LFOSel::Combine(cmd.m_data[3]);
|
Evaluator::Combine combine = Evaluator::Combine(cmd.m_data[3]);
|
||||||
LFOSel::VarType vtype = LFOSel::VarType(cmd.m_data[4]);
|
Evaluator::VarType vtype = Evaluator::VarType(cmd.m_data[4]);
|
||||||
uint8_t fine = cmd.m_data[5];
|
uint8_t fine = cmd.m_data[5];
|
||||||
m_auxBFxSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
m_auxBFxSel.addComponent(ctrl, (perc + fine / 100.f) / 100.f, combine, vtype);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -17,4 +17,20 @@ Submix::Submix(Engine& engine, Submix* smx)
|
||||||
m_submix->m_activeSubmixes.insert(this);
|
m_submix->m_activeSubmixes.insert(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Submix::canApplyEffect() const
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Submix::applyEffect(int16_t* audio, const ChannelMap& chanMap, double sampleRate) const
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Submix::applyEffect(int32_t* audio, const ChannelMap& chanMap, double sampleRate) const
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Submix::applyEffect(float* audio, const ChannelMap& chanMap, double sampleRate) const
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,20 @@ bool Voice::loadSoundMacro(ObjectId macroId, int macroStep, bool pushPc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Voice::keyOff()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Voice::message(int32_t val)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Voice::setVolume(float vol)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Voice::setPanning(float pan)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue