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

#include <tapped_delay.hh>

+ Inheritance diagram for yase::TappedDelay:
+ Collaboration diagram for yase::TappedDelay:

Detailed Description

A linearly interpolated, tappable digital delay using a circular buffer.

This delay can have as many taps as you need. The taps can be specified by the amount of time to delay as a double, in seconds. When you add a new tap, you get a new output. The argument to the constructor is the total length of the delay and all tap positions must be less than that. For example,

TappedDelay delay(1.0); // Store 1 second of signal
auto tap = add_tap();
delay.set_input(tap, 0.5);
A linearly interpolated, tappable digital delay using a circular buffer.
Definition tapped_delay.hh:55
string add_tap()
Definition tapped_delay.cc:39

Later, you can connect things to the delay as in

container.connect(sound_source, delay)
.connect(delay, tap, sound_destination, "signal");

Since this is a linearly interpolated delay, the tap position can be smoothly moved around. So you can also do something like

container.connect(lfo, "signal", delay, tap);

to get neat effects.

Parameters
[in]signal,tap_0,tap_1,...
[out]tap_0,tap_1,...

Public Member Functions

 TappedDelay (double duration)
 
void init ()
 
void update ()
 
string add_tap ()
 
- 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 ()
 

Member Function Documentation

◆ add_tap()

string yase::TappedDelay::add_tap ( )

Add a new tap and return its name. The position of the tap can then set using the name. For example

auto tap = delay.add_tap();
delay.set_input(tap, 0.5);
Returns
The name of the tap

◆ init()

void yase::TappedDelay::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.

◆ update()

void yase::TappedDelay::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: