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

#include <fadable_delay.hh>

+ Inheritance diagram for yase::FadableDelay:
+ Collaboration diagram for yase::FadableDelay:

Detailed Description

A time modulatable delay.

This module contains two delays running at the same time. When the "duration" input changes, one of the delay's duration is reset, and the output fades from the old delay to the new one. This approach is inspired by the ddi method (Double Delay with Interpolation) in Faust.

Note that the duration is in samples. So to set up a control for a FadeDelay object that ranges from a milliscond to a second, you would do something like the following:

controls.control(
fadable_delay,
"duration",
0.001 * SAMPLE_RATE,
49);
#define SAMPLE_RATE
The sample rate of everything in yase.
Definition globals.hh:32

Where controls is a Controls object and "49" refers to a midi input id.

Parameters
[in]signal
[in]duration
[out]signal

Public Types

enum  STATE { NORMAL , RECORDING , FADING }
 

Public Member Functions

void init ()
 
void update ()
 
- Public Member Functions inherited from yase::Container
void init ()
 
void update ()
 
Containeradd (Module &module)
 
Containeradd_if_new (Module &module)
 
Containerpropagate_to (EventManager &em)
 
void run (int num_steps)
 
void run_again (int num_steps)
 
void stop ()
 
Containerconnect (Module &source, string output, Module &dest, string input)
 
Containerconnect (Module &source, string output, Module &dest, int input)
 
Containerconnect (AutoLoad &loader, string category, Module &module)
 
Containerconnect (Module &source, Module &dest)
 
Containerpath (Module &a, Module &b, Module &c)
 
Containerpath (Module &a, Module &b, Module &c, Module &d)
 
Containerpath (Module &a, Module &b, Module &c, Module &d, Module &e)
 
Containerdisconnect (Module &source, string output, Module &dest, string input)
 
bool connected (Module *module, string input_name)
 
Containerequate_input (string input, Module &sub_module, string sub_input)
 
Containerattach_inputs (std::vector< std::tuple< string, Module &, string > > attachments)
 
Containerequate_output (string output, Module &sub_module, string sub_output)
 
Containerattach_outputs (std::vector< std::tuple< string, Module &, string > > attachments)
 
Containerset_thread_number (int n)
 EXPERIMENTAL.
 
Containeradd (Module &module, int n)
 EXPERIMENTAL.
 
void run_threaded (int num_steps)
 EXPERIMENTAL.
 
void update_threaded ()
 EXPERIMENTAL.
 
void thread_loop (int i)
 EXPERIMENTAL.
 
- 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 ()
 
- Public Member Functions inherited from yase::EventManager
 EventManager ()
 Make a new event manager.
 
void process_events (vector< Module * > &modules)
 
void respond_to (const Event &event)
 
EventManagerlisten (int event_type, function< void(const Event &)> handler)
 
EventManagerlisten (int event_type, int port, function< void(const Event &)> handler)
 

Public Attributes

const double FADE_TIME = 0.1
 

Member Function Documentation

◆ init()

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

Reimplemented from yase::Container.

◆ update()

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

Reimplemented from yase::Container.


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