Yet Another Synthesizer Engine
 
Loading...
Searching...
No Matches
yase::Delay Class Reference

#include <delay.hh>

+ Inheritance diagram for yase::Delay:
+ Collaboration diagram for yase::Delay:

Detailed Description

A pure digital delay using a doubled ended queue.

This module is good for a fixed delay. If you want a modulatable delay, use FadeDelay, which has a "duration" input.

Parameters
[in]signal
[out]signal

Public Member Functions

 Delay (int duration)
 
void init ()
 
void update ()
 
void clear ()
 Clear the delay buffer.
 
void set (int new_duration)
 
bool is_full ()
 
- Public Member Functions inherited from yase::Module
virtual void init ()=0
 
virtual void update ()=0
 
int add_input (string name)
 
int add_output (string name)
 
int get_input_index (string name) const
 
string get_input_name (int index) const
 
string get_output_name (int index) const
 
int get_output_index (string name) const
 
void set_input (string name, double value)
 
void set_input (int index, double value)
 
double get_input (int index) const
 
double get_input (string name) const
 
double get_output (string name) const
 
double get_output (int index) const
 
void set_output (int index, double value)
 
void copy_inputs (const Module &source)
 
void copy_outputs (Module &destination) const
 
void configure (std::vector< std::tuple< string, double > > assignments)
 
int num_inputs () const
 
int num_outputs () const
 
void emit (Event e)
 
void set_ts (double s)
 
double get_ts ()
 

Constructor & Destructor Documentation

◆ Delay()

yase::Delay::Delay ( int  duration)

Construct a new delay with the given duration (in steps)

Parameters
durationThe number of steps

Member Function Documentation

◆ init()

void yase::Delay::init ( )
virtual

This method should be overridden by derived classes. It will usually be called once, after all modules and connections objects have been added to a synthesizer, but before the synthesizer starts running.

Implements yase::Module.

◆ is_full()

bool yase::Delay::is_full ( )

Check if the buffer is full

Returns
True if the buffer size equals the duration

◆ set()

void yase::Delay::set ( int  new_duration)

Set the desired delay.

Parameters
new_duration

◆ update()

void yase::Delay::update ( )
virtual

This method should be overridden by derived classes. It will be called repeatedly by a synthesizer at a frequency determined by SAMPLE_RATE.

Implements yase::Module.


The documentation for this class was generated from the following files: