The OSP is a hackable, open source drum machine that accidentally got very, very close to the erica perkons hd-01, which is real beauty of instrument design that i truly love, except for its unhackable closed source nature. So, we new need gnu one.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
993 B

#include "instr_noise.hh"
#include "daisysp.h"
using namespace daisysp;
namespace Heck {
namespace Instrument {
void Noise::init(float samplerate)
{
noise.Init();
env.Init(samplerate);
env.SetTime(ADENV_SEG_ATTACK, .0001);
env.SetTime(ADENV_SEG_DECAY, .01);
env.SetMax(1);
env.SetMin(0);
}
void Noise::trigger()
{
env.Trigger();
}
void Noise::ctl(unsigned int ctl_nr, float val) noexcept {}
void Noise::switch_mode(unsigned int pos) noexcept {}
void Noise::swtich_variation(unsigned int pos) noexcept {}
void Noise::switch_filter(unsigned int pos) noexcept {}
float Noise::nextsample() noexcept
{
float snr_env_out = env.Process();
float sig = noise.Process();
sig *= snr_env_out;
return sig;
}
} // namespace Instrument
} // namespace Heck