本文整理汇总了C++中Delay::output方法的典型用法代码示例。如果您正苦于以下问题:C++ Delay::output方法的具体用法?C++ Delay::output怎么用?C++ Delay::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Delay
的用法示例。
在下文中一共展示了Delay::output方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void HelmEngine::init() {
static const Value* minutes_per_second = new Value(1.0 / 60.0);
#ifdef FE_DFL_DISABLE_SSE_DENORMS_ENV
fesetenv(FE_DFL_DISABLE_SSE_DENORMS_ENV);
#endif
Processor* beats_per_minute = createMonoModControl("beats_per_minute", false);
Multiply* beats_per_second = new Multiply();
beats_per_second->plug(beats_per_minute, 0);
beats_per_second->plug(minutes_per_second, 1);
addProcessor(beats_per_second);
// Voice Handler.
Processor* polyphony = createMonoModControl("polyphony", true);
voice_handler_ = new HelmVoiceHandler(beats_per_second);
addSubmodule(voice_handler_);
voice_handler_->setPolyphony(32);
voice_handler_->plug(polyphony, VoiceHandler::kPolyphony);
// Monophonic LFO 1.
Processor* lfo_1_waveform = createMonoModControl("mono_lfo_1_waveform", true);
Processor* lfo_1_free_frequency = createMonoModControl("mono_lfo_1_frequency", true, false);
Processor* lfo_1_free_amplitude = createMonoModControl("mono_lfo_1_amplitude", true);
Processor* lfo_1_frequency = createTempoSyncSwitch("mono_lfo_1", lfo_1_free_frequency,
beats_per_second, false);
lfo_1_ = new HelmLfo();
lfo_1_->plug(lfo_1_waveform, HelmLfo::kWaveform);
lfo_1_->plug(lfo_1_frequency, HelmLfo::kFrequency);
Multiply* scaled_lfo_1 = new Multiply();
scaled_lfo_1->setControlRate();
scaled_lfo_1->plug(lfo_1_, 0);
scaled_lfo_1->plug(lfo_1_free_amplitude, 1);
addProcessor(lfo_1_);
addProcessor(scaled_lfo_1);
mod_sources_["mono_lfo_1"] = scaled_lfo_1->output();
mod_sources_["mono_lfo_1_phase"] = lfo_1_->output(Oscillator::kPhase);
// Monophonic LFO 2.
Processor* lfo_2_waveform = createMonoModControl("mono_lfo_2_waveform", true);
Processor* lfo_2_free_frequency = createMonoModControl("mono_lfo_2_frequency", true, false);
Processor* lfo_2_free_amplitude = createMonoModControl("mono_lfo_2_amplitude", true);
Processor* lfo_2_frequency = createTempoSyncSwitch("mono_lfo_2", lfo_2_free_frequency,
beats_per_second, false);
lfo_2_ = new HelmLfo();
lfo_2_->plug(lfo_2_waveform, HelmLfo::kWaveform);
lfo_2_->plug(lfo_2_frequency, HelmLfo::kFrequency);
Multiply* scaled_lfo_2 = new Multiply();
scaled_lfo_2->setControlRate();
scaled_lfo_2->plug(lfo_2_, 0);
scaled_lfo_2->plug(lfo_2_free_amplitude, 1);
addProcessor(lfo_2_);
addProcessor(scaled_lfo_2);
mod_sources_["mono_lfo_2"] = scaled_lfo_2->output();
mod_sources_["mono_lfo_2_phase"] = lfo_2_->output(Oscillator::kPhase);
// Step Sequencer.
Processor* num_steps = createMonoModControl("num_steps", true);
Processor* step_smoothing = createMonoModControl("step_smoothing", true);
Processor* step_free_frequency = createMonoModControl("step_frequency", false, false);
Processor* step_frequency = createTempoSyncSwitch("step_sequencer", step_free_frequency,
beats_per_second, false);
step_sequencer_ = new StepGenerator(MAX_STEPS);
step_sequencer_->plug(num_steps, StepGenerator::kNumSteps);
step_sequencer_->plug(step_frequency, StepGenerator::kFrequency);
for (int i = 0; i < MAX_STEPS; ++i) {
std::stringstream stream;
stream << i;
std::string num = stream.str();
if (num.length() == 1)
num = "0" + num;
Processor* step = createBaseControl(std::string("step_seq_") + num);
step_sequencer_->plug(step, StepGenerator::kSteps + i);
}
SmoothFilter* smoothed_step_sequencer = new SmoothFilter();
smoothed_step_sequencer->plug(step_sequencer_, SmoothFilter::kTarget);
smoothed_step_sequencer->plug(step_smoothing, SmoothFilter::kHalfLife);
addProcessor(step_sequencer_);
addProcessor(smoothed_step_sequencer);
mod_sources_["step_sequencer"] = smoothed_step_sequencer->output();
mod_sources_["step_sequencer_step"] = step_sequencer_->output(StepGenerator::kStep);
// Arpeggiator.
Processor* arp_free_frequency = createMonoModControl("arp_frequency", true, false);
Processor* arp_frequency = createTempoSyncSwitch("arp", arp_free_frequency,
beats_per_second, false);
Processor* arp_octaves = createMonoModControl("arp_octaves", true);
Processor* arp_pattern = createMonoModControl("arp_pattern", true);
//.........这里部分代码省略.........