This GitLab instance reached the end of its service life. It won't be possible to create new users or projects.

Please read the deprecation notice for more information concerning the deprecation timeline

Visit migration.git.tu-berlin.de to import your old projects to the new GitLab platform 📥

Commit edff16e1 by Henrik von Coler

Added modulation examples!

parent 4f9145e5
// am-ringmod.dsp
//
//
//
// Henrik von Coler
// 2020-05-11
import("stdfaust.lib");
f_x = hslider("Signal Frequency",100,0.01,1000,0.1);
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
m_off = hslider("Modulator Offset",0,0,0.5,0.01);
am(fx, fm) = os.osc(fx) * ((1-m_off) * os.osc(fm) + m_off);
// generate a single sine and apply the arfe envelope
// the attack time is set to 0.01
process = am(f_x,f_m) <: _,_;
\ No newline at end of file
// am-ringmod.dsp
//
//
//
// Henrik von Coler
// 2020-05-11
import("stdfaust.lib");
f_x = hslider("Signal Frequency",100,0.01,1000,0.1);
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
m_off = hslider("Modulator Offset",0,0,0.5,0.01);
am(fx, fm) = os.osc(fx) * ((1-m_off) * os.osc(fm) + m_off);
process = am(f_x,f_m) <: _,_;
\ No newline at end of file
// fm-simple.dsp
//
//
//
// Henrik von Coler
// 2020-05-11
import("stdfaust.lib");
/////////////////////////////////////////////////////////
// UI ELEMENTS
/////////////////////////////////////////////////////////
trigger = button("Trigger");
f_1 = hslider("OP 1 Frequency",100,0.01,1000,0.1);
f_2 = hslider("OP 2 Frequency",100,0.01,1000,0.1);
ind_1 = hslider("Modulation Index",0,0,1000,0.1);
// a slider for the first release time
r1 = hslider("Release 1",0.5,0.01,5,0.01);
// a slider for the second release time
r2 = hslider("Release 2",0.5,0.01,5,0.01);
/////////////////////////////////////////////////////////
// FM Function
/////////////////////////////////////////////////////////
am(f1, f2, t1, r1, r2) = gain * os.osc(f1 + (os.osc(f2) * ind_1)* index1)
with
{
gain = en.arfe(0.01, r2, 0,t1);
index1 = en.arfe(0.01, r1, 0,t1);
};
/////////////////////////////////////////////////////////
// processing
/////////////////////////////////////////////////////////
process = am(f_1,f_2, trigger, r1 ,r2) <: _,_;
\ No newline at end of file
// ringmod-input.dsp
//
// Ringmodulator for audio input
//
// - fader for controlling modulator frequency
// - fader for controlling mix of ringmod
//
// Henrik von Coler
// 2020-05-12
import("stdfaust.lib");
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
mix = hslider("Modulation Mix",0.5,0,1,0.01);
am(x, fm) = (1-mix) * x + mix * x * os.osc(fm);
process(x) = am(x,f_m) <: _,_;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment