_id
stringlengths
64
64
repository
stringlengths
7
61
name
stringlengths
5
45
content
stringlengths
0
943k
download_url
stringlengths
94
213
language
stringclasses
1 value
comments
stringlengths
0
20.9k
code
stringlengths
0
943k
25a9074cd20e4725ad42023a051edff079bc6f329498641f49102a509a4be876
TER-M1/crosscompilation-wasm
testBernard.dsp
import("stdfaust.lib"); declare name "freeverb"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c) GRAME 2006 and MoForte Inc. 2017"; declare reference "https://ccrma.stanford.edu/~jos/pasp/Freeverb.html"; //====================================================== // // Freeverb // Faster version using fixed delays (20% gain) // //====================================================== // Constant Parameters //-------------------- fixedgain = 0.015; //value of the gain of fxctrl scalewet = 3.0; scaledry = 2.0; scaledamp = 0.4; scaleroom = 0.28; offsetroom = 0.7; initialroom = 0.5; initialdamp = 0.5; initialwet = 1.0/scalewet; initialdry = 0; initialwidth= 1.0; initialmode = 0.0; freezemode = 0.5; stereospread= 23; allpassfeed = 0.5; //feedback of the delays used in allpass filters // Filter Parameters //------------------ combtuningL1 = 1116; combtuningL2 = 1188; combtuningL3 = 1277; combtuningL4 = 1356; combtuningL5 = 1422; combtuningL6 = 1491; combtuningL7 = 1557; combtuningL8 = 1617; allpasstuningL1 = 556; allpasstuningL2 = 441; allpasstuningL3 = 341; allpasstuningL4 = 225; // Control Sliders //-------------------- // Damp : filters the high frequencies of the echoes (especially active for great values of RoomSize) // RoomSize : size of the reverberation room // Dry : original signal // Wet : reverberated signal dampSlider = rkg(vslider("Damp [midi:ctrl 3] [style:knob]",0.5, 0, 1, 0.025))*scaledamp; roomsizeSlider = rkg(vslider("RoomSize [midi:ctrl 4] [style:knob]", 0.5, 0, 1, 0.025))*scaleroom + offsetroom; wetSlider = rkg(vslider("Wet [midi:ctrl 2] [style:knob]", 0.3333, 0, 1, 0.025)); combfeed = roomsizeSlider; // Comb and Allpass filters //------------------------- allpass(dt,fb) = (_,_ <: (*(fb),_:+:@(dt)), -) ~ _ : (!,_); comb(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb)); // Reverb components //------------------ monoReverb(fb1, fb2, damp, spread) = _ <: comb(combtuningL1+spread, fb1, damp), comb(combtuningL2+spread, fb1, damp), comb(combtuningL3+spread, fb1, damp), comb(combtuningL4+spread, fb1, damp), comb(combtuningL5+spread, fb1, damp), comb(combtuningL6+spread, fb1, damp), comb(combtuningL7+spread, fb1, damp), comb(combtuningL8+spread, fb1, damp) +> allpass (allpasstuningL1+spread, fb2) : allpass (allpasstuningL2+spread, fb2) : allpass (allpasstuningL3+spread, fb2) : allpass (allpasstuningL4+spread, fb2) ; monoReverbToStereo(fb1, fb2, damp, spread) = + <: monoReverb(fb1, fb2, damp, 0) <: _,_; stereoReverb(fb1, fb2, damp, spread) = + <: monoReverb(fb1, fb2, damp, 0), monoReverb(fb1, fb2, damp, spread); monoToStereoReverb(fb1, fb2, damp, spread) = _ <: monoReverb(fb1, fb2, damp, 0), monoReverb(fb1, fb2, damp, spread); // fxctrl : add an input gain and a wet-dry control to a stereo FX //---------------------------------------------------------------- fxctrl(g,w,Fx) = _,_ <: (*(g),*(g) : Fx : *(w),*(w)), *(1-w), *(1-w) +> _,_; rbp = 1 - int(rsg(checkbox("[0] Enable [midi:ctrl 105]"))); // Freeverb //--------- //JOS:freeverb = fxctrl(fixedgain, wetSlider, stereoReverb(combfeed, allpassfeed, dampSlider, stereospread)); freeverb = fxctrl(fixedgain, wetSlider, monoReverbToStereo(combfeed, allpassfeed, dampSlider, stereospread)); process = ba.bypass2(rbp,freeverb); // This layout loosely follows the MiniMoog-V // Arturia-only features are labeled // Original versions also added where different // Need vrocker and hrocker toggle switches in Faust! // Need orange and blue color choices // Orange => Connect modulation sources to their destinations // Blue => Turn audio sources On and Off // - and later - // White => Turn performance features On and Off // Black => Select between modulation sources // Julius Smith for Analog Devices 3/1/2017 vrocker(x) = checkbox("%%x [style:vrocker]"); hrocker(x) = checkbox("%%x [style:hrocker]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); // USAGE: vrockerorange("[0] ModulationEnable"); hrockerblue(x) = checkbox("%%x [style:hrocker] [color:blue]"); vrockerred(x) = checkbox("%%x [style:vrocker] [color:red]"); hrockerred(x) = checkbox("%%x [style:hrocker] [color:red]"); declare designer "Robert A. Moog"; mmg(x) = hgroup("",x); // Minimoog + Effects synthg(x) = mmg(vgroup("[0] Minimoog",x)); fxg(x) = mmg(hgroup("[1] Effects",x)); mg(x) = synthg(hgroup("[0]",x)); cg(x) = mg(vgroup("[0] Controllers",x)); // Formerly named "Modules" but "Minimoog" group-title is enough vg(x) = cg(hgroup("[0] Master Volume", x)); dg(x) = cg(hgroup("[1] Oscillator Tuning & Switching", x)); // Tune knob = master tune dsg(x) = dg(vgroup("[1] Switches", x)); // Oscillator Modulation HrockerRed => apply Modulation Mix output to osc1&2 pitches // [MOVED here from osc3 group] Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 gmmg(x) = cg(hgroup("[2] Glide and ModMix", x)); // Glide knob [0:10] = portamento speed // Modulation Mix knob [0:10] (between Osc3 and Noise) = mix of noise and osc3 modulating osc1&2 pitch and/or VCF freq og(x) = mg(vgroup("[1] Oscillator Bank", x)); osc1(x) = og(hgroup("[1] Oscillator 1", x)); // UNUSED Control switch (for alignment) - Could put Oscillator Modulation switch there // Range rotary switch: LO (slow pulses or rhythm), 32', 16', 8', 4', 2' // Frequency <something> switch: LED to right // Waveform rotary switch: tri, impulse/bent-triangle, saw, pulseWide, pulseMed, pulseNarrow osc2(x) = og(hgroup("[2] Oscillator 2", x)); // UNUSED (originall) or Osc 2 Control VrockerRed // Range rotary switch: LO, 32', 16', 8', 4', 2' // Detuning knob: -7 to 7 [NO SWITCH] // Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow osc3(x) = og(hgroup("[3] Oscillator 3", x)); // Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 // Range rotary switch: LO, 32', 16', 8', 4', 2' // Detuning knob: -7 to 7 [NO SWITCH] // Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow mixg(x) = mg(vgroup("[2] Mixer", x)); // Each row 5 slots to maintain alignment and include red rockers joining VCF area: mr1(x) = mixg(hgroup("[0] Osc1", x)); // mixer row 1 = // Osc1 Volume and Osc1 HrockerBlue & _ & _ & Filter Modulation HrockerRed // Filter Modulation => Modulation Mix output to VCF freq mr2(x) = mixg(hgroup("[1] Ext In, KeyCtl", x)); // row 2 = Ext In HrockerBlue and Vol and Overload LED and Keyboard Ctl HrockerRed 1 mr3(x) = mixg(hgroup("[2] Osc2", x)); // = Osc2 Volume and Osc2 HrockerBlue and Keyboard Ctl HrockerRed 2 // Keyboard Control Modulation 1&2 => 0, 1/3, 2/3, all of Keyboard Control Signal ("gate?") applied to VCF freq mr4(x) = mixg(hgroup("[3] Noise", x)); // = Noise HrockerBlue and Volume and Noise Type VrockerBlue mr4cbg(x) = mr4(vgroup("[1]", x)); // = Noise Off and White/Pink selection // two rockers mr5(x) = mixg(hgroup("[4] Osc3", x)); // Osc3 Volume and Osc3 HrockerBlue modg(x) = mg(vgroup("[3] Modifiers", x)); vcfg(x) = modg(vgroup("[0] Filter", x)); vcf1(x) = vcfg(hgroup("[0] [tooltip:freq, Q, ContourScale]", x)); vcf1cbg(x) = vcf1(vgroup("[0] [tooltip:two checkboxes]", x)); // Filter Modulation switch // VCF Off switch // Corner Frequency knob // Filter Emphasis knob // Amount of Contour knob vcf2(x) = vcfg(hgroup("[1] Filter Contour [tooltip:AttFilt, DecFilt, Sustain Level for Filter Contour]", x)); // Attack Time knob // Decay Time knob // Sustain Level knob ng(x) = modg(hgroup("[1] Loudness Contour", x)); // Attack Time knob // Decay Time knob // Sustain Level knob echog(x) = fxg(hgroup("[4] Echo",x)); ekg(x) = echog(vgroup("[0] Knobs",x)); esg(x) = echog(vgroup("[1] Switches",x)); flg(x) = fxg(hgroup("[5] Flanger",x)); flkg(x) = flg(vgroup("[0] Knobs",x)); flsg(x) = flg(vgroup("[1] Switches",x)); chg(x) = fxg(hgroup("[6] Chorus",x)); ckg(x) = chg(vgroup("[0] Knobs",x)); csg(x) = chg(vgroup("[1] Switches",x)); rg(x) = fxg(hgroup("[7] Reverb",x)); rkg(x) = rg(vgroup("[0] Knobs",x)); rsg(x) = rg(vgroup("[1] Switches",x)); outg(x) = fxg(vgroup("[8] Output", x)); volg(x) = outg(hgroup("[0] Volume Main Output", x)); // Volume knob [0-10] // Unison switch (Arturia) or Output connect/disconnect switch (original) // When set, all voices are stacked and instrument is in mono mode tunerg(x) = outg(hgroup("[1] A-440 Switch", x)); vdtpolyg(x) = outg(hgroup("[2] Voice Detune / Poly", x)); // Voice Detune knob [0-10] (Arturia) or // Polyphonic switch [red LED below] (Arturia) // When set, instrument is in polyphonic mode with one oscillator per key clipg(x) = fxg(vgroup("[9] Soft Clip", x)); // Soft Clipping switch [red LED above] kg(x) = synthg(hgroup("[1] Keyboard Group", x)); // Keyboard was 3 1/2 octaves ws(x) = kg(vgroup("[0] Wheels and Switches", x)); s1g(x) = ws(hgroup("[0] Jacks and Rockers", x)); jg(x) = s1g(vgroup("[0] MiniJacks",x)); gdlg(x) = s1g(vgroup("[1] Glide/Decay/Legato Enables",x)); // Arturia // Glide Hrocker (see original Button version below) // Decay Hrocker (see original Button version below) => Sets Release (R) of ADSR to either 0 or Decay (R) // Legato Hrocker (not in original) s2g(x) = ws(hgroup("[1] [tooltip:Wheels+]", x)); bg(x) = s2g(vgroup("[0] [tooltip:Bend Enable and Range]", x)); wg(x) = s2g(hgroup("[1] [tooltip:Bend and Mod Wheels]", x)); // Using Glide/Decay/Legato enables above following Arturia: // dg(x) = s2g(hgroup("[2] Glide and Decay momentary pushbuttons", x)); // Glide Button injects portamento as set by Glide knob // Decay Button uses decay of Loudness Contour (else 0) keys(x) = kg(hgroup("[1] [tooltip:Keys]", x)); gg(x) = keys(hgroup("[0] [tooltip: Gates]",x)); // leave slot 1 open for sustain (below)
https://raw.githubusercontent.com/TER-M1/crosscompilation-wasm/43d7c6f31d29f0512688359e3e6cbf0bcc0a98e6/example3-wasm-audio-port/plugins/testBern/testBernard.dsp
faust
====================================================== Freeverb Faster version using fixed delays (20% gain) ====================================================== Constant Parameters -------------------- value of the gain of fxctrl feedback of the delays used in allpass filters Filter Parameters ------------------ Control Sliders -------------------- Damp : filters the high frequencies of the echoes (especially active for great values of RoomSize) RoomSize : size of the reverberation room Dry : original signal Wet : reverberated signal Comb and Allpass filters ------------------------- Reverb components ------------------ fxctrl : add an input gain and a wet-dry control to a stereo FX ---------------------------------------------------------------- Freeverb --------- JOS:freeverb = fxctrl(fixedgain, wetSlider, stereoReverb(combfeed, allpassfeed, dampSlider, stereospread)); This layout loosely follows the MiniMoog-V Arturia-only features are labeled Original versions also added where different Need vrocker and hrocker toggle switches in Faust! Need orange and blue color choices Orange => Connect modulation sources to their destinations Blue => Turn audio sources On and Off - and later - White => Turn performance features On and Off Black => Select between modulation sources Julius Smith for Analog Devices 3/1/2017 USAGE: vrockerorange("[0] ModulationEnable"); Minimoog + Effects Formerly named "Modules" but "Minimoog" group-title is enough Tune knob = master tune Oscillator Modulation HrockerRed => apply Modulation Mix output to osc1&2 pitches [MOVED here from osc3 group] Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 Glide knob [0:10] = portamento speed Modulation Mix knob [0:10] (between Osc3 and Noise) = mix of noise and osc3 modulating osc1&2 pitch and/or VCF freq UNUSED Control switch (for alignment) - Could put Oscillator Modulation switch there Range rotary switch: LO (slow pulses or rhythm), 32', 16', 8', 4', 2' Frequency <something> switch: LED to right Waveform rotary switch: tri, impulse/bent-triangle, saw, pulseWide, pulseMed, pulseNarrow UNUSED (originall) or Osc 2 Control VrockerRed Range rotary switch: LO, 32', 16', 8', 4', 2' Detuning knob: -7 to 7 [NO SWITCH] Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 Range rotary switch: LO, 32', 16', 8', 4', 2' Detuning knob: -7 to 7 [NO SWITCH] Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow Each row 5 slots to maintain alignment and include red rockers joining VCF area: mixer row 1 = Osc1 Volume and Osc1 HrockerBlue & _ & _ & Filter Modulation HrockerRed Filter Modulation => Modulation Mix output to VCF freq row 2 = Ext In HrockerBlue and Vol and Overload LED and Keyboard Ctl HrockerRed 1 = Osc2 Volume and Osc2 HrockerBlue and Keyboard Ctl HrockerRed 2 Keyboard Control Modulation 1&2 => 0, 1/3, 2/3, all of Keyboard Control Signal ("gate?") applied to VCF freq = Noise HrockerBlue and Volume and Noise Type VrockerBlue = Noise Off and White/Pink selection two rockers Osc3 Volume and Osc3 HrockerBlue Filter Modulation switch VCF Off switch Corner Frequency knob Filter Emphasis knob Amount of Contour knob Attack Time knob Decay Time knob Sustain Level knob Attack Time knob Decay Time knob Sustain Level knob Volume knob [0-10] Unison switch (Arturia) or Output connect/disconnect switch (original) When set, all voices are stacked and instrument is in mono mode Voice Detune knob [0-10] (Arturia) or Polyphonic switch [red LED below] (Arturia) When set, instrument is in polyphonic mode with one oscillator per key Soft Clipping switch [red LED above] Keyboard was 3 1/2 octaves Arturia Glide Hrocker (see original Button version below) Decay Hrocker (see original Button version below) => Sets Release (R) of ADSR to either 0 or Decay (R) Legato Hrocker (not in original) Using Glide/Decay/Legato enables above following Arturia: dg(x) = s2g(hgroup("[2] Glide and Decay momentary pushbuttons", x)); Glide Button injects portamento as set by Glide knob Decay Button uses decay of Loudness Contour (else 0) leave slot 1 open for sustain (below)
import("stdfaust.lib"); declare name "freeverb"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c) GRAME 2006 and MoForte Inc. 2017"; declare reference "https://ccrma.stanford.edu/~jos/pasp/Freeverb.html"; scalewet = 3.0; scaledry = 2.0; scaledamp = 0.4; scaleroom = 0.28; offsetroom = 0.7; initialroom = 0.5; initialdamp = 0.5; initialwet = 1.0/scalewet; initialdry = 0; initialwidth= 1.0; initialmode = 0.0; freezemode = 0.5; stereospread= 23; combtuningL1 = 1116; combtuningL2 = 1188; combtuningL3 = 1277; combtuningL4 = 1356; combtuningL5 = 1422; combtuningL6 = 1491; combtuningL7 = 1557; combtuningL8 = 1617; allpasstuningL1 = 556; allpasstuningL2 = 441; allpasstuningL3 = 341; allpasstuningL4 = 225; dampSlider = rkg(vslider("Damp [midi:ctrl 3] [style:knob]",0.5, 0, 1, 0.025))*scaledamp; roomsizeSlider = rkg(vslider("RoomSize [midi:ctrl 4] [style:knob]", 0.5, 0, 1, 0.025))*scaleroom + offsetroom; wetSlider = rkg(vslider("Wet [midi:ctrl 2] [style:knob]", 0.3333, 0, 1, 0.025)); combfeed = roomsizeSlider; allpass(dt,fb) = (_,_ <: (*(fb),_:+:@(dt)), -) ~ _ : (!,_); comb(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb)); monoReverb(fb1, fb2, damp, spread) = _ <: comb(combtuningL1+spread, fb1, damp), comb(combtuningL2+spread, fb1, damp), comb(combtuningL3+spread, fb1, damp), comb(combtuningL4+spread, fb1, damp), comb(combtuningL5+spread, fb1, damp), comb(combtuningL6+spread, fb1, damp), comb(combtuningL7+spread, fb1, damp), comb(combtuningL8+spread, fb1, damp) +> allpass (allpasstuningL1+spread, fb2) : allpass (allpasstuningL2+spread, fb2) : allpass (allpasstuningL3+spread, fb2) : allpass (allpasstuningL4+spread, fb2) ; monoReverbToStereo(fb1, fb2, damp, spread) = + <: monoReverb(fb1, fb2, damp, 0) <: _,_; stereoReverb(fb1, fb2, damp, spread) = + <: monoReverb(fb1, fb2, damp, 0), monoReverb(fb1, fb2, damp, spread); monoToStereoReverb(fb1, fb2, damp, spread) = _ <: monoReverb(fb1, fb2, damp, 0), monoReverb(fb1, fb2, damp, spread); fxctrl(g,w,Fx) = _,_ <: (*(g),*(g) : Fx : *(w),*(w)), *(1-w), *(1-w) +> _,_; rbp = 1 - int(rsg(checkbox("[0] Enable [midi:ctrl 105]"))); freeverb = fxctrl(fixedgain, wetSlider, monoReverbToStereo(combfeed, allpassfeed, dampSlider, stereospread)); process = ba.bypass2(rbp,freeverb); vrocker(x) = checkbox("%%x [style:vrocker]"); hrocker(x) = checkbox("%%x [style:hrocker]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); hrockerblue(x) = checkbox("%%x [style:hrocker] [color:blue]"); vrockerred(x) = checkbox("%%x [style:vrocker] [color:red]"); hrockerred(x) = checkbox("%%x [style:hrocker] [color:red]"); declare designer "Robert A. Moog"; synthg(x) = mmg(vgroup("[0] Minimoog",x)); fxg(x) = mmg(hgroup("[1] Effects",x)); mg(x) = synthg(hgroup("[0]",x)); vg(x) = cg(hgroup("[0] Master Volume", x)); dg(x) = cg(hgroup("[1] Oscillator Tuning & Switching", x)); dsg(x) = dg(vgroup("[1] Switches", x)); gmmg(x) = cg(hgroup("[2] Glide and ModMix", x)); og(x) = mg(vgroup("[1] Oscillator Bank", x)); osc1(x) = og(hgroup("[1] Oscillator 1", x)); osc2(x) = og(hgroup("[2] Oscillator 2", x)); osc3(x) = og(hgroup("[3] Oscillator 3", x)); mixg(x) = mg(vgroup("[2] Mixer", x)); modg(x) = mg(vgroup("[3] Modifiers", x)); vcfg(x) = modg(vgroup("[0] Filter", x)); vcf1(x) = vcfg(hgroup("[0] [tooltip:freq, Q, ContourScale]", x)); vcf1cbg(x) = vcf1(vgroup("[0] [tooltip:two checkboxes]", x)); vcf2(x) = vcfg(hgroup("[1] Filter Contour [tooltip:AttFilt, DecFilt, Sustain Level for Filter Contour]", x)); ng(x) = modg(hgroup("[1] Loudness Contour", x)); echog(x) = fxg(hgroup("[4] Echo",x)); ekg(x) = echog(vgroup("[0] Knobs",x)); esg(x) = echog(vgroup("[1] Switches",x)); flg(x) = fxg(hgroup("[5] Flanger",x)); flkg(x) = flg(vgroup("[0] Knobs",x)); flsg(x) = flg(vgroup("[1] Switches",x)); chg(x) = fxg(hgroup("[6] Chorus",x)); ckg(x) = chg(vgroup("[0] Knobs",x)); csg(x) = chg(vgroup("[1] Switches",x)); rg(x) = fxg(hgroup("[7] Reverb",x)); rkg(x) = rg(vgroup("[0] Knobs",x)); rsg(x) = rg(vgroup("[1] Switches",x)); outg(x) = fxg(vgroup("[8] Output", x)); volg(x) = outg(hgroup("[0] Volume Main Output", x)); tunerg(x) = outg(hgroup("[1] A-440 Switch", x)); vdtpolyg(x) = outg(hgroup("[2] Voice Detune / Poly", x)); clipg(x) = fxg(vgroup("[9] Soft Clip", x)); ws(x) = kg(vgroup("[0] Wheels and Switches", x)); s1g(x) = ws(hgroup("[0] Jacks and Rockers", x)); jg(x) = s1g(vgroup("[0] MiniJacks",x)); s2g(x) = ws(hgroup("[1] [tooltip:Wheels+]", x)); bg(x) = s2g(vgroup("[0] [tooltip:Bend Enable and Range]", x)); wg(x) = s2g(hgroup("[1] [tooltip:Bend and Mod Wheels]", x)); keys(x) = kg(hgroup("[1] [tooltip:Keys]", x)); gg(x) = keys(hgroup("[0] [tooltip: Gates]",x));
f1181174c8e3a63e0a7696ba9319e9f62d8dd73b289be5c1b5395c1d567e1ea7
orchidas/Music-256A
chorus.dsp
import("stdfaust.lib"); level = hslider("level", 0.5, 0, 1, 0.01) : si.smoo; //control this parameter freq freq = hslider("freq", 2, 0, 10, 0.01) : si.smoo; dtime = hslider("delay", 0.025, 0, 0.2, 0.001) : si.smoo; depth = hslider("depth", 0.02, 0, 1, 0.001) : si.smoo; gain = hslider("gain",1,0,1,0.01) : si.smoo; gate = button("gate"); tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wave,i&(n-1)) + d*rdtable(n,wave,(i+1)&(n-1)) with { wave = ba.time*(2.0*ma.PI)/n : f; decimal = _ <: - ( floor ); phase = freq/ma.SR : (+ : decimal) ~ _; modphase = decimal(phase+mod/(2*ma.PI))*n; i = int(floor(modphase)); d = decimal(modphase); }; chorus(d,freq,depth) = de.fdelay(1<<16, t) with { t = ma.SR*d/2*(1+depth*tblosc(1<<16, sin, freq, 0)); }; process = hgroup("chorus", (c, c) : *(gain * gate), *(gain*gate)) with { c(x) = x+level*chorus(dtime,freq,depth,x); };
https://raw.githubusercontent.com/orchidas/Music-256A/46c465a3f004a00723088f918106a854af863d08/ofEffectsChain/src/faust/chorus.dsp
faust
control this parameter freq
import("stdfaust.lib"); level = hslider("level", 0.5, 0, 1, 0.01) : si.smoo; freq = hslider("freq", 2, 0, 10, 0.01) : si.smoo; dtime = hslider("delay", 0.025, 0, 0.2, 0.001) : si.smoo; depth = hslider("depth", 0.02, 0, 1, 0.001) : si.smoo; gain = hslider("gain",1,0,1,0.01) : si.smoo; gate = button("gate"); tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wave,i&(n-1)) + d*rdtable(n,wave,(i+1)&(n-1)) with { wave = ba.time*(2.0*ma.PI)/n : f; decimal = _ <: - ( floor ); phase = freq/ma.SR : (+ : decimal) ~ _; modphase = decimal(phase+mod/(2*ma.PI))*n; i = int(floor(modphase)); d = decimal(modphase); }; chorus(d,freq,depth) = de.fdelay(1<<16, t) with { t = ma.SR*d/2*(1+depth*tblosc(1<<16, sin, freq, 0)); }; process = hgroup("chorus", (c, c) : *(gain * gate), *(gain*gate)) with { c(x) = x+level*chorus(dtime,freq,depth,x); };
62afccaec689b6301757c8812c5a591e5a393cdbb72677dcb1eb5af7b963f43a
OceanSwift/Faust-Course-Examples
Shred It Strum Example.dsp
import("stdfaust.lib"); string(f) = hgroup("String[0]",+~(de.fdelay4(maxDelLength,delLength-1) : dispersionFilter : *(damping))) with{ freq = f; damping = hslider("[1]Damp[style:knob]",0.99,0,1,0.01); maxDelLength = 1024; dispersionFilter = _ <: _,_' :> /(2); delLength = ma.SR/freq; }; pluck = hgroup("[1]Pluck",gate : ba.impulsify*gain) with{ gain = hslider("[0]Gain[style:knob]",1,0,1,0.01); }; freqSlider = hslider("Freq",110,50,1000,1); // nStrings = hslider("Strings",6,1,12,1); nStrings = 6; strum = hgroup("[3]",hslider("[0]Strum",0,0,nStrings-1,1) <: par(i,nStrings,(_==i : ba.impulsify : string((i+1)*freqSlider*interval))) :> _) with{ interval = hslider("[0]Interval[style:knob]",0.5,0,1,0.01); }; myEcho = hgroup("[4]Delay",ef.echo(2,delayTime,delayFb)) with{ delayTime = hslider("[0]Time[style:knob]",0.3,0,2,0.01); delayFb = hslider("[1]Feedback[style:knob]",0.5,0,1,0.01); }; myReverb = hgroup("[5]Reverb", dm.zita_light); process = vgroup("Karplus Strong",strum : myEcho <: myReverb);
https://raw.githubusercontent.com/OceanSwift/Faust-Course-Examples/c3c779ab8257fae9563de4bc09ee71c5346bb1cd/Shred%20It%20Strum%20Example.dsp
faust
nStrings = hslider("Strings",6,1,12,1);
import("stdfaust.lib"); string(f) = hgroup("String[0]",+~(de.fdelay4(maxDelLength,delLength-1) : dispersionFilter : *(damping))) with{ freq = f; damping = hslider("[1]Damp[style:knob]",0.99,0,1,0.01); maxDelLength = 1024; dispersionFilter = _ <: _,_' :> /(2); delLength = ma.SR/freq; }; pluck = hgroup("[1]Pluck",gate : ba.impulsify*gain) with{ gain = hslider("[0]Gain[style:knob]",1,0,1,0.01); }; freqSlider = hslider("Freq",110,50,1000,1); nStrings = 6; strum = hgroup("[3]",hslider("[0]Strum",0,0,nStrings-1,1) <: par(i,nStrings,(_==i : ba.impulsify : string((i+1)*freqSlider*interval))) :> _) with{ interval = hslider("[0]Interval[style:knob]",0.5,0,1,0.01); }; myEcho = hgroup("[4]Delay",ef.echo(2,delayTime,delayFb)) with{ delayTime = hslider("[0]Time[style:knob]",0.3,0,2,0.01); delayFb = hslider("[1]Feedback[style:knob]",0.5,0,1,0.01); }; myReverb = hgroup("[5]Reverb", dm.zita_light); process = vgroup("Karplus Strong",strum : myEcho <: myReverb);
1aef8cce7f4c2485610043686ab9173d56d7e32b0801b346f8fb21a009d923e0
grame-cncm/faustdoc
exfaust12.dsp
import("stdfaust.lib"); process = dm.cubicnl_demo : // distortion dm.wah4_demo <: // wah pedal dm.phaser2_demo : // stereo phaser dm.compressor_demo : // stereo compressor dm.zita_light; // stereo reverb
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/quick-start/exfaust12/exfaust12.dsp
faust
distortion wah pedal stereo phaser stereo compressor stereo reverb
import("stdfaust.lib"); process =
2d2fb384ce650abc930479fa042d882bc0ab189e9c12385543006866e785249f
dblanchemain/MultiSpace3D
Auro91.dsp
declare name "objMatrixAuro91.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.002; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.016; tabSpeakerX(2)=0.595; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.178; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=0.812; tabSpeakerZ(5)=0.500; tabSpeakerD(5)=1.382; tabSpeakerX(6)=1.000; tabSpeakerY(6)=0.812; tabSpeakerZ(6)=0.500; tabSpeakerD(6)=1.382; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=0.812; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.631; tabSpeakerX(8)=1.000; tabSpeakerY(8)=0.812; tabSpeakerZ(8)=-1.000; tabSpeakerD(8)=1.631; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,9); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,9);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/Auro91.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.002; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.016; tabSpeakerX(2)=0.595; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.178; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=0.812; tabSpeakerZ(5)=0.500; tabSpeakerD(5)=1.382; tabSpeakerX(6)=1.000; tabSpeakerY(6)=0.812; tabSpeakerZ(6)=0.500; tabSpeakerD(6)=1.382; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=0.812; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.631; tabSpeakerX(8)=1.000; tabSpeakerY(8)=0.812; tabSpeakerZ(8)=-1.000; tabSpeakerD(8)=1.631; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,9);
a79a379a1d44a403e179ec1b9f7bfc1d0efb79cff7ebbf7014c286741bd311e3
dblanchemain/MultiSpace3D
Auro71.dsp
declare name "objMatrixAuro71.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.595; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.178; tabSpeakerX(2)=-0.002; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=0.500; tabSpeakerD(5)=1.133; tabSpeakerX(6)=1.000; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=0.500; tabSpeakerD(6)=1.133; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,7); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,7);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/Auro71.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.595; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.178; tabSpeakerX(2)=-0.002; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=0.500; tabSpeakerD(5)=1.133; tabSpeakerX(6)=1.000; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=0.500; tabSpeakerD(6)=1.133; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,7);
ca75ae7ed1a657a4357d7c241d978f966ed1d8c69ab933173743ba2ba6751db9
dblanchemain/MultiSpace3D
Auro13.dsp
declare name "objMatrixAuro13.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.595; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.178; tabSpeakerX(2)=-0.002; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=0.500; tabSpeakerD(5)=1.133; tabSpeakerX(6)=1.000; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=0.500; tabSpeakerD(6)=1.133; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=1.000; tabSpeakerZ(7)=1.000; tabSpeakerD(7)=1.732; tabSpeakerX(8)=1.000; tabSpeakerY(8)=1.000; tabSpeakerZ(8)=1.000; tabSpeakerD(8)=1.732; tabSpeakerX(9)=-1.000; tabSpeakerY(9)=1.000; tabSpeakerZ(9)=-1.000; tabSpeakerD(9)=1.732; tabSpeakerX(10)=1.000; tabSpeakerY(10)=1.000; tabSpeakerZ(10)=-1.000; tabSpeakerD(10)=1.732; tabSpeakerX(11)=0.002; tabSpeakerY(11)=1.000; tabSpeakerZ(11)=1.000; tabSpeakerD(11)=1.414; tabSpeakerX(12)=0.002; tabSpeakerY(12)=1.000; tabSpeakerZ(12)=0.005; tabSpeakerD(12)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,13); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,13);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/Auro13.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.595; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.178; tabSpeakerX(2)=-0.002; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=0.500; tabSpeakerD(5)=1.133; tabSpeakerX(6)=1.000; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=0.500; tabSpeakerD(6)=1.133; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=1.000; tabSpeakerZ(7)=1.000; tabSpeakerD(7)=1.732; tabSpeakerX(8)=1.000; tabSpeakerY(8)=1.000; tabSpeakerZ(8)=1.000; tabSpeakerD(8)=1.732; tabSpeakerX(9)=-1.000; tabSpeakerY(9)=1.000; tabSpeakerZ(9)=-1.000; tabSpeakerD(9)=1.732; tabSpeakerX(10)=1.000; tabSpeakerY(10)=1.000; tabSpeakerZ(10)=-1.000; tabSpeakerD(10)=1.732; tabSpeakerX(11)=0.002; tabSpeakerY(11)=1.000; tabSpeakerZ(11)=1.000; tabSpeakerD(11)=1.414; tabSpeakerX(12)=0.002; tabSpeakerY(12)=1.000; tabSpeakerZ(12)=0.005; tabSpeakerD(12)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,13);
55286e62e01d3d91af99c287de586b88c36ef575d7f3f069f278f3a44b0c5b8b
dblanchemain/MultiSpace3D
Auro11.dsp
declare name "objMatrixAuro11.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.595; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.178; tabSpeakerX(2)=-0.002; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=1.000; tabSpeakerZ(5)=1.000; tabSpeakerD(5)=1.732; tabSpeakerX(6)=1.000; tabSpeakerY(6)=1.000; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.732; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=1.000; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.732; tabSpeakerX(8)=1.000; tabSpeakerY(8)=1.000; tabSpeakerZ(8)=-1.000; tabSpeakerD(8)=1.732; tabSpeakerX(9)=-0.007; tabSpeakerY(9)=1.000; tabSpeakerZ(9)=1.000; tabSpeakerD(9)=1.414; tabSpeakerX(10)=0.007; tabSpeakerY(10)=1.000; tabSpeakerZ(10)=0.005; tabSpeakerD(10)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,11); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,11);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/Auro11.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.595; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.178; tabSpeakerX(1)=0.595; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.178; tabSpeakerX(2)=-0.002; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=1.000; tabSpeakerZ(5)=1.000; tabSpeakerD(5)=1.732; tabSpeakerX(6)=1.000; tabSpeakerY(6)=1.000; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.732; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=1.000; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.732; tabSpeakerX(8)=1.000; tabSpeakerY(8)=1.000; tabSpeakerZ(8)=-1.000; tabSpeakerD(8)=1.732; tabSpeakerX(9)=-0.007; tabSpeakerY(9)=1.000; tabSpeakerZ(9)=1.000; tabSpeakerD(9)=1.414; tabSpeakerX(10)=0.007; tabSpeakerY(10)=1.000; tabSpeakerZ(10)=0.005; tabSpeakerD(10)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,11);
fb8a7cd6ce9972e17c39a9144535684701bd959f9d287f5fc1bc1620d0b6f841
dblanchemain/MultiSpace3D
micadome.dsp
declare name "objMatrixmicadome.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.437; tabSpeakerY(0)=-0.388; tabSpeakerZ(0)=0.965; tabSpeakerD(0)=1.128; tabSpeakerX(1)=0.373; tabSpeakerY(1)=-0.388; tabSpeakerZ(1)=0.970; tabSpeakerD(1)=1.109; tabSpeakerX(2)=-1.000; tabSpeakerY(2)=-0.388; tabSpeakerZ(2)=0.399; tabSpeakerD(2)=1.144; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.388; tabSpeakerZ(3)=0.409; tabSpeakerD(3)=1.148; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.388; tabSpeakerZ(4)=-0.515; tabSpeakerD(4)=1.190; tabSpeakerX(5)=1.000; tabSpeakerY(5)=-0.388; tabSpeakerZ(5)=-0.515; tabSpeakerD(5)=1.190; tabSpeakerX(6)=-0.412; tabSpeakerY(6)=-0.388; tabSpeakerZ(6)=-1.000; tabSpeakerD(6)=1.149; tabSpeakerX(7)=0.383; tabSpeakerY(7)=-0.388; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.139; tabSpeakerX(8)=-0.793; tabSpeakerY(8)=0.412; tabSpeakerZ(8)=0.242; tabSpeakerD(8)=0.926; tabSpeakerX(9)=0.822; tabSpeakerY(9)=0.412; tabSpeakerZ(9)=0.247; tabSpeakerD(9)=0.952; tabSpeakerX(10)=-0.798; tabSpeakerY(10)=0.412; tabSpeakerZ(10)=-0.354; tabSpeakerD(10)=0.965; tabSpeakerX(11)=0.802; tabSpeakerY(11)=0.412; tabSpeakerZ(11)=-0.348; tabSpeakerD(11)=0.967; tabSpeakerX(12)=-0.062; tabSpeakerY(12)=0.412; tabSpeakerZ(12)=0.803; tabSpeakerD(12)=0.905; tabSpeakerX(13)=-0.062; tabSpeakerY(13)=0.412; tabSpeakerZ(13)=-0.793; tabSpeakerD(13)=0.896; tabSpeakerX(14)=-0.244; tabSpeakerY(14)=1.000; tabSpeakerZ(14)=-0.056; tabSpeakerD(14)=1.031; tabSpeakerX(15)=0.121; tabSpeakerY(15)=1.000; tabSpeakerZ(15)=-0.051; tabSpeakerD(15)=1.009; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,16); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,16);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/micadome.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.437; tabSpeakerY(0)=-0.388; tabSpeakerZ(0)=0.965; tabSpeakerD(0)=1.128; tabSpeakerX(1)=0.373; tabSpeakerY(1)=-0.388; tabSpeakerZ(1)=0.970; tabSpeakerD(1)=1.109; tabSpeakerX(2)=-1.000; tabSpeakerY(2)=-0.388; tabSpeakerZ(2)=0.399; tabSpeakerD(2)=1.144; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.388; tabSpeakerZ(3)=0.409; tabSpeakerD(3)=1.148; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.388; tabSpeakerZ(4)=-0.515; tabSpeakerD(4)=1.190; tabSpeakerX(5)=1.000; tabSpeakerY(5)=-0.388; tabSpeakerZ(5)=-0.515; tabSpeakerD(5)=1.190; tabSpeakerX(6)=-0.412; tabSpeakerY(6)=-0.388; tabSpeakerZ(6)=-1.000; tabSpeakerD(6)=1.149; tabSpeakerX(7)=0.383; tabSpeakerY(7)=-0.388; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.139; tabSpeakerX(8)=-0.793; tabSpeakerY(8)=0.412; tabSpeakerZ(8)=0.242; tabSpeakerD(8)=0.926; tabSpeakerX(9)=0.822; tabSpeakerY(9)=0.412; tabSpeakerZ(9)=0.247; tabSpeakerD(9)=0.952; tabSpeakerX(10)=-0.798; tabSpeakerY(10)=0.412; tabSpeakerZ(10)=-0.354; tabSpeakerD(10)=0.965; tabSpeakerX(11)=0.802; tabSpeakerY(11)=0.412; tabSpeakerZ(11)=-0.348; tabSpeakerD(11)=0.967; tabSpeakerX(12)=-0.062; tabSpeakerY(12)=0.412; tabSpeakerZ(12)=0.803; tabSpeakerD(12)=0.905; tabSpeakerX(13)=-0.062; tabSpeakerY(13)=0.412; tabSpeakerZ(13)=-0.793; tabSpeakerD(13)=0.896; tabSpeakerX(14)=-0.244; tabSpeakerY(14)=1.000; tabSpeakerZ(14)=-0.056; tabSpeakerD(14)=1.031; tabSpeakerX(15)=0.121; tabSpeakerY(15)=1.000; tabSpeakerZ(15)=-0.051; tabSpeakerD(15)=1.009; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,16);
99bd2eea93a45e02c593af0b46db38d903ee4cf69e7ae2ae039bc975ef6ed98c
dblanchemain/MultiSpace3D
M17.dsp
declare name "objMatrixM17.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=0.975; tabSpeakerD(0)=1.408; tabSpeakerX(1)=1.000; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.426; tabSpeakerX(2)=0.007; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=0.985; tabSpeakerD(2)=1.001; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=0.956; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.395; tabSpeakerX(5)=-0.501; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=1.000; tabSpeakerD(5)=1.133; tabSpeakerX(6)=0.501; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.133; tabSpeakerX(7)=-0.002; tabSpeakerY(7)=-0.181; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.016; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.181; tabSpeakerZ(8)=0.283; tabSpeakerD(8)=1.055; tabSpeakerX(9)=1.000; tabSpeakerY(9)=-0.181; tabSpeakerZ(9)=0.283; tabSpeakerD(9)=1.055; tabSpeakerX(10)=-0.057; tabSpeakerY(10)=1.000; tabSpeakerZ(10)=-0.056; tabSpeakerD(10)=1.003; tabSpeakerX(11)=-1.000; tabSpeakerY(11)=0.624; tabSpeakerZ(11)=0.975; tabSpeakerD(11)=1.530; tabSpeakerX(12)=-0.007; tabSpeakerY(12)=0.624; tabSpeakerZ(12)=1.000; tabSpeakerD(12)=1.179; tabSpeakerX(13)=1.000; tabSpeakerY(13)=0.624; tabSpeakerZ(13)=1.000; tabSpeakerD(13)=1.546; tabSpeakerX(14)=-1.000; tabSpeakerY(14)=0.624; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.546; tabSpeakerX(15)=1.000; tabSpeakerY(15)=0.624; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.546; tabSpeakerX(16)=-0.032; tabSpeakerY(16)=0.624; tabSpeakerZ(16)=-1.000; tabSpeakerD(16)=1.179; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,17); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,17);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/M17.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=0.975; tabSpeakerD(0)=1.408; tabSpeakerX(1)=1.000; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.426; tabSpeakerX(2)=0.007; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=0.985; tabSpeakerD(2)=1.001; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=0.956; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.395; tabSpeakerX(5)=-0.501; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=1.000; tabSpeakerD(5)=1.133; tabSpeakerX(6)=0.501; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.133; tabSpeakerX(7)=-0.002; tabSpeakerY(7)=-0.181; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.016; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.181; tabSpeakerZ(8)=0.283; tabSpeakerD(8)=1.055; tabSpeakerX(9)=1.000; tabSpeakerY(9)=-0.181; tabSpeakerZ(9)=0.283; tabSpeakerD(9)=1.055; tabSpeakerX(10)=-0.057; tabSpeakerY(10)=1.000; tabSpeakerZ(10)=-0.056; tabSpeakerD(10)=1.003; tabSpeakerX(11)=-1.000; tabSpeakerY(11)=0.624; tabSpeakerZ(11)=0.975; tabSpeakerD(11)=1.530; tabSpeakerX(12)=-0.007; tabSpeakerY(12)=0.624; tabSpeakerZ(12)=1.000; tabSpeakerD(12)=1.179; tabSpeakerX(13)=1.000; tabSpeakerY(13)=0.624; tabSpeakerZ(13)=1.000; tabSpeakerD(13)=1.546; tabSpeakerX(14)=-1.000; tabSpeakerY(14)=0.624; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.546; tabSpeakerX(15)=1.000; tabSpeakerY(15)=0.624; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.546; tabSpeakerX(16)=-0.032; tabSpeakerY(16)=0.624; tabSpeakerZ(16)=-1.000; tabSpeakerD(16)=1.179; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,17);
b5f9d004da26f44b92c26ee8b446432d820c8662516f319b3616214e77011c03
dblanchemain/metaSurface
freeverbFaust.dsp
declare name "freeverbFaust"; declare version "0.0"; declare author "RM"; declare description "Freeverb mono"; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); re = library("reverbs.lib"); en = library("envelopes.lib");//----------------------------`(dm.)freeverb`------------------------- // Freeverb Mono. // // #### Usage // // ``` // _: freeverb_demo : _; // ``` //------------------------------------------------------------ freeverb = _<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _ with{ scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = 48000; parameters(x) = hgroup("Freeverb",x); knobGroup(x) = parameters(vgroup("[1]",x)); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom* origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR : int); g = parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0, 1, 0.025)); }; process = _: freeverb : _;
https://raw.githubusercontent.com/dblanchemain/metaSurface/f5695b5b58c0d7b41fd9a899cf5a664184d849c7/Plugins/freeverbFaust.dsp
faust
----------------------------`(dm.)freeverb`------------------------- Freeverb Mono. #### Usage ``` _: freeverb_demo : _; ``` ------------------------------------------------------------
declare name "freeverbFaust"; declare version "0.0"; declare author "RM"; declare description "Freeverb mono"; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); re = library("reverbs.lib"); freeverb = _<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _ with{ scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = 48000; parameters(x) = hgroup("Freeverb",x); knobGroup(x) = parameters(vgroup("[1]",x)); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom* origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR : int); g = parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0, 1, 0.025)); }; process = _: freeverb : _;
e3f550b580419fbfcd98479f645dd4946711cdf898c1b878e7a5ffe5065c244a
dblanchemain/MultiSpace3D
Dominium.dsp
declare name "objMatrixDominium"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.500; tabSpeakerY(0)=0.000; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.118; tabSpeakerX(1)=0.500; tabSpeakerY(1)=0.000; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.118; tabSpeakerX(2)=0.000; tabSpeakerY(2)=0.000; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.000; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=0.000; tabSpeakerZ(3)=0.500; tabSpeakerD(3)=1.118; tabSpeakerX(4)=1.000; tabSpeakerY(4)=0.000; tabSpeakerZ(4)=0.500; tabSpeakerD(4)=1.118; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=0.000; tabSpeakerZ(5)=-0.500; tabSpeakerD(5)=1.118; tabSpeakerX(6)=1.000; tabSpeakerY(6)=0.000; tabSpeakerZ(6)=-0.500; tabSpeakerD(6)=1.118; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=1.000; tabSpeakerZ(7)=0.500; tabSpeakerD(7)=1.500; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-1.000; tabSpeakerZ(8)=1.000; tabSpeakerD(8)=1.732; tabSpeakerX(9)=1.000; tabSpeakerY(9)=1.000; tabSpeakerZ(9)=0.500; tabSpeakerD(9)=1.500; tabSpeakerX(10)=1.000; tabSpeakerY(10)=-1.000; tabSpeakerZ(10)=1.000; tabSpeakerD(10)=1.732; tabSpeakerX(11)=-1.000; tabSpeakerY(11)=1.000; tabSpeakerZ(11)=-0.500; tabSpeakerD(11)=1.500; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-1.000; tabSpeakerZ(12)=-1.000; tabSpeakerD(12)=1.732; tabSpeakerX(13)=1.000; tabSpeakerY(13)=1.000; tabSpeakerZ(13)=-0.500; tabSpeakerD(13)=1.500; tabSpeakerX(14)=1.000; tabSpeakerY(14)=-1.000; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.732; tabSpeakerX(15)=-0.500; tabSpeakerY(15)=0.000; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.118; tabSpeakerX(16)=0.500; tabSpeakerY(16)=0.000; tabSpeakerZ(16)=-1.000; tabSpeakerD(16)=1.118; tabSpeakerX(17)=0.000; tabSpeakerY(17)=1.000; tabSpeakerZ(17)=0.000; tabSpeakerD(17)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1):si.smoo; paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- //minfreq=paramDistance(vslider("LPF Min",100, 20, 2000, 1)); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x); pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("[2]interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("[1]feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("[0]delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]FREEVERB",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,18); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ...
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/Dominium.dsp
faust
modifier le nom de votre greffon ----------------------------------------------------------- LPF ----------------------------------------------------------- minfreq=paramDistance(vslider("LPF Min",100, 20, 2000, 1)); ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb ----------------------------------------------------------- le deuxième chiffre permet de définir la dimension de votre espace :9,10, ...
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.500; tabSpeakerY(0)=0.000; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.118; tabSpeakerX(1)=0.500; tabSpeakerY(1)=0.000; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.118; tabSpeakerX(2)=0.000; tabSpeakerY(2)=0.000; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.000; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=0.000; tabSpeakerZ(3)=0.500; tabSpeakerD(3)=1.118; tabSpeakerX(4)=1.000; tabSpeakerY(4)=0.000; tabSpeakerZ(4)=0.500; tabSpeakerD(4)=1.118; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=0.000; tabSpeakerZ(5)=-0.500; tabSpeakerD(5)=1.118; tabSpeakerX(6)=1.000; tabSpeakerY(6)=0.000; tabSpeakerZ(6)=-0.500; tabSpeakerD(6)=1.118; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=1.000; tabSpeakerZ(7)=0.500; tabSpeakerD(7)=1.500; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-1.000; tabSpeakerZ(8)=1.000; tabSpeakerD(8)=1.732; tabSpeakerX(9)=1.000; tabSpeakerY(9)=1.000; tabSpeakerZ(9)=0.500; tabSpeakerD(9)=1.500; tabSpeakerX(10)=1.000; tabSpeakerY(10)=-1.000; tabSpeakerZ(10)=1.000; tabSpeakerD(10)=1.732; tabSpeakerX(11)=-1.000; tabSpeakerY(11)=1.000; tabSpeakerZ(11)=-0.500; tabSpeakerD(11)=1.500; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-1.000; tabSpeakerZ(12)=-1.000; tabSpeakerD(12)=1.732; tabSpeakerX(13)=1.000; tabSpeakerY(13)=1.000; tabSpeakerZ(13)=-0.500; tabSpeakerD(13)=1.500; tabSpeakerX(14)=1.000; tabSpeakerY(14)=-1.000; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.732; tabSpeakerX(15)=-0.500; tabSpeakerY(15)=0.000; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.118; tabSpeakerX(16)=0.500; tabSpeakerY(16)=0.000; tabSpeakerZ(16)=-1.000; tabSpeakerD(16)=1.118; tabSpeakerX(17)=0.000; tabSpeakerY(17)=1.000; tabSpeakerZ(17)=0.000; tabSpeakerD(17)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1):si.smoo; paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x); pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("[2]interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("[1]feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("[0]delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]FREEVERB",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); };
f4d30c80b025f9ce2cbe5e54202864ea40c5d1d80d7370e9ad3c4e66d30b076b
dblanchemain/MultiSpace3D
NHK22.dsp
declare name "objMatrixNHK22.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=0.990; tabSpeakerD(0)=1.419; tabSpeakerX(1)=1.000; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.426; tabSpeakerX(2)=-0.007; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-0.501; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=0.990; tabSpeakerD(5)=1.124; tabSpeakerX(6)=0.501; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.133; tabSpeakerX(7)=0.002; tabSpeakerY(7)=-0.181; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.016; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.181; tabSpeakerZ(8)=0.288; tabSpeakerD(8)=1.056; tabSpeakerX(9)=1.000; tabSpeakerY(9)=-0.181; tabSpeakerZ(9)=0.288; tabSpeakerD(9)=1.056; tabSpeakerX(10)=-1.000; tabSpeakerY(10)=0.619; tabSpeakerZ(10)=1.000; tabSpeakerD(10)=1.544; tabSpeakerX(11)=1.000; tabSpeakerY(11)=0.619; tabSpeakerZ(11)=1.000; tabSpeakerD(11)=1.544; tabSpeakerX(12)=0.007; tabSpeakerY(12)=0.619; tabSpeakerZ(12)=1.000; tabSpeakerD(12)=1.176; tabSpeakerX(13)=-0.062; tabSpeakerY(13)=1.000; tabSpeakerZ(13)=-0.061; tabSpeakerD(13)=1.004; tabSpeakerX(14)=-1.000; tabSpeakerY(14)=0.619; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.544; tabSpeakerX(15)=1.000; tabSpeakerY(15)=0.619; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.544; tabSpeakerX(16)=-1.000; tabSpeakerY(16)=0.619; tabSpeakerZ(16)=0.288; tabSpeakerD(16)=1.211; tabSpeakerX(17)=1.000; tabSpeakerY(17)=0.619; tabSpeakerZ(17)=0.283; tabSpeakerD(17)=1.210; tabSpeakerX(18)=0.007; tabSpeakerY(18)=0.619; tabSpeakerZ(18)=-1.000; tabSpeakerD(18)=1.176; tabSpeakerX(19)=0.002; tabSpeakerY(19)=-1.000; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.414; tabSpeakerX(20)=-1.000; tabSpeakerY(20)=-1.000; tabSpeakerZ(20)=1.000; tabSpeakerD(20)=1.732; tabSpeakerX(21)=1.000; tabSpeakerY(21)=-1.000; tabSpeakerZ(21)=1.000; tabSpeakerD(21)=1.732; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,22); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,22);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/651e16aa196d5084a9779419cb2ba7f50da184e6/Plugins/DSP/NHK22.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.181; tabSpeakerZ(0)=0.990; tabSpeakerD(0)=1.419; tabSpeakerX(1)=1.000; tabSpeakerY(1)=-0.181; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.426; tabSpeakerX(2)=-0.007; tabSpeakerY(2)=-0.181; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.016; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.181; tabSpeakerZ(3)=-1.000; tabSpeakerD(3)=1.426; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.181; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.426; tabSpeakerX(5)=-0.501; tabSpeakerY(5)=-0.181; tabSpeakerZ(5)=0.990; tabSpeakerD(5)=1.124; tabSpeakerX(6)=0.501; tabSpeakerY(6)=-0.181; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.133; tabSpeakerX(7)=0.002; tabSpeakerY(7)=-0.181; tabSpeakerZ(7)=-1.000; tabSpeakerD(7)=1.016; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.181; tabSpeakerZ(8)=0.288; tabSpeakerD(8)=1.056; tabSpeakerX(9)=1.000; tabSpeakerY(9)=-0.181; tabSpeakerZ(9)=0.288; tabSpeakerD(9)=1.056; tabSpeakerX(10)=-1.000; tabSpeakerY(10)=0.619; tabSpeakerZ(10)=1.000; tabSpeakerD(10)=1.544; tabSpeakerX(11)=1.000; tabSpeakerY(11)=0.619; tabSpeakerZ(11)=1.000; tabSpeakerD(11)=1.544; tabSpeakerX(12)=0.007; tabSpeakerY(12)=0.619; tabSpeakerZ(12)=1.000; tabSpeakerD(12)=1.176; tabSpeakerX(13)=-0.062; tabSpeakerY(13)=1.000; tabSpeakerZ(13)=-0.061; tabSpeakerD(13)=1.004; tabSpeakerX(14)=-1.000; tabSpeakerY(14)=0.619; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.544; tabSpeakerX(15)=1.000; tabSpeakerY(15)=0.619; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.544; tabSpeakerX(16)=-1.000; tabSpeakerY(16)=0.619; tabSpeakerZ(16)=0.288; tabSpeakerD(16)=1.211; tabSpeakerX(17)=1.000; tabSpeakerY(17)=0.619; tabSpeakerZ(17)=0.283; tabSpeakerD(17)=1.210; tabSpeakerX(18)=0.007; tabSpeakerY(18)=0.619; tabSpeakerZ(18)=-1.000; tabSpeakerD(18)=1.176; tabSpeakerX(19)=0.002; tabSpeakerY(19)=-1.000; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.414; tabSpeakerX(20)=-1.000; tabSpeakerY(20)=-1.000; tabSpeakerZ(20)=1.000; tabSpeakerD(20)=1.732; tabSpeakerX(21)=1.000; tabSpeakerY(21)=-1.000; tabSpeakerZ(21)=1.000; tabSpeakerD(21)=1.732; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,22);
7cfbc696a5f8a8472c743670b68eb352790b415a4abdd6d588f324face2b4fd8
dblanchemain/MultiSpace3D
ZKM23.dsp
declare name "objMatrixZKM23.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.007; tabSpeakerY(0)=-0.374; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.068; tabSpeakerX(1)=0.600; tabSpeakerY(1)=-0.374; tabSpeakerZ(1)=0.808; tabSpeakerD(1)=1.074; tabSpeakerX(2)=1.000; tabSpeakerY(2)=-0.374; tabSpeakerZ(2)=0.283; tabSpeakerD(2)=1.104; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.374; tabSpeakerZ(3)=-0.318; tabSpeakerD(3)=1.114; tabSpeakerX(4)=0.615; tabSpeakerY(4)=-0.374; tabSpeakerZ(4)=-0.798; tabSpeakerD(4)=1.075; tabSpeakerX(5)=0.007; tabSpeakerY(5)=-0.374; tabSpeakerZ(5)=-1.000; tabSpeakerD(5)=1.068; tabSpeakerX(6)=-0.600; tabSpeakerY(6)=-0.374; tabSpeakerZ(6)=-0.793; tabSpeakerD(6)=1.062; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=-0.374; tabSpeakerZ(7)=-0.303; tabSpeakerD(7)=1.110; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.374; tabSpeakerZ(8)=0.283; tabSpeakerD(8)=1.104; tabSpeakerX(9)=-0.585; tabSpeakerY(9)=-0.374; tabSpeakerZ(9)=0.808; tabSpeakerD(9)=1.066; tabSpeakerX(10)=0.294; tabSpeakerY(10)=0.219; tabSpeakerZ(10)=0.803; tabSpeakerD(10)=0.883; tabSpeakerX(11)=0.807; tabSpeakerY(11)=0.219; tabSpeakerZ(11)=0.283; tabSpeakerD(11)=0.883; tabSpeakerX(12)=0.807; tabSpeakerY(12)=0.219; tabSpeakerZ(12)=-0.394; tabSpeakerD(12)=0.925; tabSpeakerX(13)=0.279; tabSpeakerY(13)=0.219; tabSpeakerZ(13)=-0.803; tabSpeakerD(13)=0.878; tabSpeakerX(14)=-0.304; tabSpeakerY(14)=0.219; tabSpeakerZ(14)=-0.798; tabSpeakerD(14)=0.881; tabSpeakerX(15)=-0.793; tabSpeakerY(15)=0.219; tabSpeakerZ(15)=-0.394; tabSpeakerD(15)=0.912; tabSpeakerX(16)=-0.802; tabSpeakerY(16)=0.219; tabSpeakerZ(16)=0.278; tabSpeakerD(16)=0.877; tabSpeakerX(17)=-0.319; tabSpeakerY(17)=0.219; tabSpeakerZ(17)=0.808; tabSpeakerD(17)=0.896; tabSpeakerX(18)=-0.057; tabSpeakerY(18)=0.807; tabSpeakerZ(18)=0.207; tabSpeakerD(18)=0.835; tabSpeakerX(19)=-0.314; tabSpeakerY(19)=0.807; tabSpeakerZ(19)=-0.061; tabSpeakerD(19)=0.868; tabSpeakerX(20)=-0.052; tabSpeakerY(20)=0.807; tabSpeakerZ(20)=-0.354; tabSpeakerD(20)=0.883; tabSpeakerX(21)=0.225; tabSpeakerY(21)=0.807; tabSpeakerZ(21)=-0.076; tabSpeakerD(21)=0.841; tabSpeakerX(22)=-0.067; tabSpeakerY(22)=1.000; tabSpeakerZ(22)=-0.056; tabSpeakerD(22)=1.004; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,23); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,23);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/651e16aa196d5084a9779419cb2ba7f50da184e6/Plugins/DSP/ZKM23.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.007; tabSpeakerY(0)=-0.374; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.068; tabSpeakerX(1)=0.600; tabSpeakerY(1)=-0.374; tabSpeakerZ(1)=0.808; tabSpeakerD(1)=1.074; tabSpeakerX(2)=1.000; tabSpeakerY(2)=-0.374; tabSpeakerZ(2)=0.283; tabSpeakerD(2)=1.104; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.374; tabSpeakerZ(3)=-0.318; tabSpeakerD(3)=1.114; tabSpeakerX(4)=0.615; tabSpeakerY(4)=-0.374; tabSpeakerZ(4)=-0.798; tabSpeakerD(4)=1.075; tabSpeakerX(5)=0.007; tabSpeakerY(5)=-0.374; tabSpeakerZ(5)=-1.000; tabSpeakerD(5)=1.068; tabSpeakerX(6)=-0.600; tabSpeakerY(6)=-0.374; tabSpeakerZ(6)=-0.793; tabSpeakerD(6)=1.062; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=-0.374; tabSpeakerZ(7)=-0.303; tabSpeakerD(7)=1.110; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.374; tabSpeakerZ(8)=0.283; tabSpeakerD(8)=1.104; tabSpeakerX(9)=-0.585; tabSpeakerY(9)=-0.374; tabSpeakerZ(9)=0.808; tabSpeakerD(9)=1.066; tabSpeakerX(10)=0.294; tabSpeakerY(10)=0.219; tabSpeakerZ(10)=0.803; tabSpeakerD(10)=0.883; tabSpeakerX(11)=0.807; tabSpeakerY(11)=0.219; tabSpeakerZ(11)=0.283; tabSpeakerD(11)=0.883; tabSpeakerX(12)=0.807; tabSpeakerY(12)=0.219; tabSpeakerZ(12)=-0.394; tabSpeakerD(12)=0.925; tabSpeakerX(13)=0.279; tabSpeakerY(13)=0.219; tabSpeakerZ(13)=-0.803; tabSpeakerD(13)=0.878; tabSpeakerX(14)=-0.304; tabSpeakerY(14)=0.219; tabSpeakerZ(14)=-0.798; tabSpeakerD(14)=0.881; tabSpeakerX(15)=-0.793; tabSpeakerY(15)=0.219; tabSpeakerZ(15)=-0.394; tabSpeakerD(15)=0.912; tabSpeakerX(16)=-0.802; tabSpeakerY(16)=0.219; tabSpeakerZ(16)=0.278; tabSpeakerD(16)=0.877; tabSpeakerX(17)=-0.319; tabSpeakerY(17)=0.219; tabSpeakerZ(17)=0.808; tabSpeakerD(17)=0.896; tabSpeakerX(18)=-0.057; tabSpeakerY(18)=0.807; tabSpeakerZ(18)=0.207; tabSpeakerD(18)=0.835; tabSpeakerX(19)=-0.314; tabSpeakerY(19)=0.807; tabSpeakerZ(19)=-0.061; tabSpeakerD(19)=0.868; tabSpeakerX(20)=-0.052; tabSpeakerY(20)=0.807; tabSpeakerZ(20)=-0.354; tabSpeakerD(20)=0.883; tabSpeakerX(21)=0.225; tabSpeakerY(21)=0.807; tabSpeakerZ(21)=-0.076; tabSpeakerD(21)=0.841; tabSpeakerX(22)=-0.067; tabSpeakerY(22)=1.000; tabSpeakerZ(22)=-0.056; tabSpeakerD(22)=1.004; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,23);
f57aaf55f67754510686a2f783ff2edaa998f8ac4692fd16d247f889caf30303
dblanchemain/MultiSpace3D
Ircam.dsp
declare name "objMatrixIrcam.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=0.002; tabSpeakerY(0)=-0.581; tabSpeakerZ(0)=0.899; tabSpeakerD(0)=1.070; tabSpeakerX(1)=0.778; tabSpeakerY(1)=-0.581; tabSpeakerZ(1)=0.606; tabSpeakerD(1)=1.144; tabSpeakerX(2)=1.000; tabSpeakerY(2)=-0.581; tabSpeakerZ(2)=0.000; tabSpeakerD(2)=1.157; tabSpeakerX(3)=0.773; tabSpeakerY(3)=-0.581; tabSpeakerZ(3)=-0.601; tabSpeakerD(3)=1.138; tabSpeakerX(4)=0.254; tabSpeakerY(4)=-0.581; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.184; tabSpeakerX(5)=-0.274; tabSpeakerY(5)=-0.581; tabSpeakerZ(5)=-1.000; tabSpeakerD(5)=1.189; tabSpeakerX(6)=-0.719; tabSpeakerY(6)=-0.581; tabSpeakerZ(6)=-0.591; tabSpeakerD(6)=1.097; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=-0.581; tabSpeakerZ(7)=-0.010; tabSpeakerD(7)=1.157; tabSpeakerX(8)=-0.714; tabSpeakerY(8)=-0.581; tabSpeakerZ(8)=0.601; tabSpeakerD(8)=1.099; tabSpeakerX(9)=0.220; tabSpeakerY(9)=-0.181; tabSpeakerZ(9)=0.606; tabSpeakerD(9)=0.670; tabSpeakerX(10)=0.664; tabSpeakerY(10)=-0.181; tabSpeakerZ(10)=0.162; tabSpeakerD(10)=0.707; tabSpeakerX(11)=0.669; tabSpeakerY(11)=-0.181; tabSpeakerZ(11)=-0.273; tabSpeakerD(11)=0.745; tabSpeakerX(12)=0.353; tabSpeakerY(12)=-0.181; tabSpeakerZ(12)=-0.717; tabSpeakerD(12)=0.820; tabSpeakerX(13)=-0.042; tabSpeakerY(13)=-0.181; tabSpeakerZ(13)=-0.808; tabSpeakerD(13)=0.829; tabSpeakerX(14)=-0.506; tabSpeakerY(14)=-0.181; tabSpeakerZ(14)=-0.697; tabSpeakerD(14)=0.880; tabSpeakerX(15)=-0.743; tabSpeakerY(15)=-0.181; tabSpeakerZ(15)=-0.288; tabSpeakerD(15)=0.817; tabSpeakerX(16)=-0.743; tabSpeakerY(16)=-0.181; tabSpeakerZ(16)=0.152; tabSpeakerD(16)=0.780; tabSpeakerX(17)=-0.398; tabSpeakerY(17)=-0.181; tabSpeakerZ(17)=0.586; tabSpeakerD(17)=0.731; tabSpeakerX(18)=-0.106; tabSpeakerY(18)=0.525; tabSpeakerZ(18)=0.348; tabSpeakerD(18)=0.639; tabSpeakerX(19)=0.343; tabSpeakerY(19)=0.525; tabSpeakerZ(19)=0.086; tabSpeakerD(19)=0.633; tabSpeakerX(20)=0.235; tabSpeakerY(20)=0.525; tabSpeakerZ(20)=-0.429; tabSpeakerD(20)=0.718; tabSpeakerX(21)=-0.215; tabSpeakerY(21)=0.525; tabSpeakerZ(21)=-0.545; tabSpeakerD(21)=0.787; tabSpeakerX(22)=-0.521; tabSpeakerY(22)=0.525; tabSpeakerZ(22)=-0.076; tabSpeakerD(22)=0.744; tabSpeakerX(23)=0.007; tabSpeakerY(23)=1.000; tabSpeakerZ(23)=-0.005; tabSpeakerD(23)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,24); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,24);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/Ircam.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=0.002; tabSpeakerY(0)=-0.581; tabSpeakerZ(0)=0.899; tabSpeakerD(0)=1.070; tabSpeakerX(1)=0.778; tabSpeakerY(1)=-0.581; tabSpeakerZ(1)=0.606; tabSpeakerD(1)=1.144; tabSpeakerX(2)=1.000; tabSpeakerY(2)=-0.581; tabSpeakerZ(2)=0.000; tabSpeakerD(2)=1.157; tabSpeakerX(3)=0.773; tabSpeakerY(3)=-0.581; tabSpeakerZ(3)=-0.601; tabSpeakerD(3)=1.138; tabSpeakerX(4)=0.254; tabSpeakerY(4)=-0.581; tabSpeakerZ(4)=-1.000; tabSpeakerD(4)=1.184; tabSpeakerX(5)=-0.274; tabSpeakerY(5)=-0.581; tabSpeakerZ(5)=-1.000; tabSpeakerD(5)=1.189; tabSpeakerX(6)=-0.719; tabSpeakerY(6)=-0.581; tabSpeakerZ(6)=-0.591; tabSpeakerD(6)=1.097; tabSpeakerX(7)=-1.000; tabSpeakerY(7)=-0.581; tabSpeakerZ(7)=-0.010; tabSpeakerD(7)=1.157; tabSpeakerX(8)=-0.714; tabSpeakerY(8)=-0.581; tabSpeakerZ(8)=0.601; tabSpeakerD(8)=1.099; tabSpeakerX(9)=0.220; tabSpeakerY(9)=-0.181; tabSpeakerZ(9)=0.606; tabSpeakerD(9)=0.670; tabSpeakerX(10)=0.664; tabSpeakerY(10)=-0.181; tabSpeakerZ(10)=0.162; tabSpeakerD(10)=0.707; tabSpeakerX(11)=0.669; tabSpeakerY(11)=-0.181; tabSpeakerZ(11)=-0.273; tabSpeakerD(11)=0.745; tabSpeakerX(12)=0.353; tabSpeakerY(12)=-0.181; tabSpeakerZ(12)=-0.717; tabSpeakerD(12)=0.820; tabSpeakerX(13)=-0.042; tabSpeakerY(13)=-0.181; tabSpeakerZ(13)=-0.808; tabSpeakerD(13)=0.829; tabSpeakerX(14)=-0.506; tabSpeakerY(14)=-0.181; tabSpeakerZ(14)=-0.697; tabSpeakerD(14)=0.880; tabSpeakerX(15)=-0.743; tabSpeakerY(15)=-0.181; tabSpeakerZ(15)=-0.288; tabSpeakerD(15)=0.817; tabSpeakerX(16)=-0.743; tabSpeakerY(16)=-0.181; tabSpeakerZ(16)=0.152; tabSpeakerD(16)=0.780; tabSpeakerX(17)=-0.398; tabSpeakerY(17)=-0.181; tabSpeakerZ(17)=0.586; tabSpeakerD(17)=0.731; tabSpeakerX(18)=-0.106; tabSpeakerY(18)=0.525; tabSpeakerZ(18)=0.348; tabSpeakerD(18)=0.639; tabSpeakerX(19)=0.343; tabSpeakerY(19)=0.525; tabSpeakerZ(19)=0.086; tabSpeakerD(19)=0.633; tabSpeakerX(20)=0.235; tabSpeakerY(20)=0.525; tabSpeakerZ(20)=-0.429; tabSpeakerD(20)=0.718; tabSpeakerX(21)=-0.215; tabSpeakerY(21)=0.525; tabSpeakerZ(21)=-0.545; tabSpeakerD(21)=0.787; tabSpeakerX(22)=-0.521; tabSpeakerY(22)=0.525; tabSpeakerZ(22)=-0.076; tabSpeakerD(22)=0.744; tabSpeakerX(23)=0.007; tabSpeakerY(23)=1.000; tabSpeakerZ(23)=-0.005; tabSpeakerD(23)=1.000; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,24);
e999d90c4fb8d5b8c46c06b63b9573242e6fcce69ac6d83b6b36a65c078a5aae
dblanchemain/MultiSpace3D
RfStudio.dsp
declare name "objMatrixRfStudio.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.585; tabSpeakerY(0)=-0.374; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.218; tabSpeakerX(1)=-0.190; tabSpeakerY(1)=-0.374; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.084; tabSpeakerX(2)=0.205; tabSpeakerY(2)=-0.374; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.087; tabSpeakerX(3)=0.605; tabSpeakerY(3)=-0.374; tabSpeakerZ(3)=1.000; tabSpeakerD(3)=1.227; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.374; tabSpeakerZ(4)=-0.591; tabSpeakerD(4)=1.220; tabSpeakerX(5)=1.000; tabSpeakerY(5)=-0.374; tabSpeakerZ(5)=-0.197; tabSpeakerD(5)=1.086; tabSpeakerX(6)=1.000; tabSpeakerY(6)=-0.374; tabSpeakerZ(6)=0.197; tabSpeakerD(6)=1.086; tabSpeakerX(7)=1.000; tabSpeakerY(7)=-0.374; tabSpeakerZ(7)=0.601; tabSpeakerD(7)=1.225; tabSpeakerX(8)=0.610; tabSpeakerY(8)=-0.374; tabSpeakerZ(8)=-1.000; tabSpeakerD(8)=1.230; tabSpeakerX(9)=0.210; tabSpeakerY(9)=-0.374; tabSpeakerZ(9)=-1.000; tabSpeakerD(9)=1.088; tabSpeakerX(10)=-0.195; tabSpeakerY(10)=-0.374; tabSpeakerZ(10)=-1.000; tabSpeakerD(10)=1.085; tabSpeakerX(11)=-0.590; tabSpeakerY(11)=-0.374; tabSpeakerZ(11)=-1.000; tabSpeakerD(11)=1.220; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-0.374; tabSpeakerZ(12)=-0.591; tabSpeakerD(12)=1.220; tabSpeakerX(13)=-1.000; tabSpeakerY(13)=-0.374; tabSpeakerZ(13)=-0.197; tabSpeakerD(13)=1.086; tabSpeakerX(14)=-1.000; tabSpeakerY(14)=-0.374; tabSpeakerZ(14)=0.207; tabSpeakerD(14)=1.088; tabSpeakerX(15)=-1.000; tabSpeakerY(15)=-0.374; tabSpeakerZ(15)=0.601; tabSpeakerD(15)=1.225; tabSpeakerX(16)=-0.333; tabSpeakerY(16)=0.219; tabSpeakerZ(16)=1.000; tabSpeakerD(16)=1.077; tabSpeakerX(17)=0.343; tabSpeakerY(17)=0.219; tabSpeakerZ(17)=1.000; tabSpeakerD(17)=1.080; tabSpeakerX(18)=1.000; tabSpeakerY(18)=0.219; tabSpeakerZ(18)=-0.394; tabSpeakerD(18)=1.097; tabSpeakerX(19)=1.000; tabSpeakerY(19)=0.219; tabSpeakerZ(19)=0.404; tabSpeakerD(19)=1.101; tabSpeakerX(20)=0.338; tabSpeakerY(20)=0.219; tabSpeakerZ(20)=-1.000; tabSpeakerD(20)=1.078; tabSpeakerX(21)=-0.323; tabSpeakerY(21)=0.219; tabSpeakerZ(21)=-1.000; tabSpeakerD(21)=1.074; tabSpeakerX(22)=-1.000; tabSpeakerY(22)=0.219; tabSpeakerZ(22)=-0.399; tabSpeakerD(22)=1.099; tabSpeakerX(23)=-1.000; tabSpeakerY(23)=0.219; tabSpeakerZ(23)=0.409; tabSpeakerD(23)=1.102; tabSpeakerX(24)=-0.402; tabSpeakerY(24)=0.807; tabSpeakerZ(24)=-0.056; tabSpeakerD(24)=0.904; tabSpeakerX(25)=0.407; tabSpeakerY(25)=0.807; tabSpeakerZ(25)=-0.061; tabSpeakerD(25)=0.906; tabSpeakerX(26)=0.007; tabSpeakerY(26)=0.807; tabSpeakerZ(26)=0.283; tabSpeakerD(26)=0.855; tabSpeakerX(27)=0.002; tabSpeakerY(27)=0.807; tabSpeakerZ(27)=-0.404; tabSpeakerD(27)=0.902; tabSpeakerX(28)=-0.062; tabSpeakerY(28)=1.000; tabSpeakerZ(28)=-0.056; tabSpeakerD(28)=1.003; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,29); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,29);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/651e16aa196d5084a9779419cb2ba7f50da184e6/Plugins/DSP/RfStudio.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.585; tabSpeakerY(0)=-0.374; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.218; tabSpeakerX(1)=-0.190; tabSpeakerY(1)=-0.374; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.084; tabSpeakerX(2)=0.205; tabSpeakerY(2)=-0.374; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.087; tabSpeakerX(3)=0.605; tabSpeakerY(3)=-0.374; tabSpeakerZ(3)=1.000; tabSpeakerD(3)=1.227; tabSpeakerX(4)=1.000; tabSpeakerY(4)=-0.374; tabSpeakerZ(4)=-0.591; tabSpeakerD(4)=1.220; tabSpeakerX(5)=1.000; tabSpeakerY(5)=-0.374; tabSpeakerZ(5)=-0.197; tabSpeakerD(5)=1.086; tabSpeakerX(6)=1.000; tabSpeakerY(6)=-0.374; tabSpeakerZ(6)=0.197; tabSpeakerD(6)=1.086; tabSpeakerX(7)=1.000; tabSpeakerY(7)=-0.374; tabSpeakerZ(7)=0.601; tabSpeakerD(7)=1.225; tabSpeakerX(8)=0.610; tabSpeakerY(8)=-0.374; tabSpeakerZ(8)=-1.000; tabSpeakerD(8)=1.230; tabSpeakerX(9)=0.210; tabSpeakerY(9)=-0.374; tabSpeakerZ(9)=-1.000; tabSpeakerD(9)=1.088; tabSpeakerX(10)=-0.195; tabSpeakerY(10)=-0.374; tabSpeakerZ(10)=-1.000; tabSpeakerD(10)=1.085; tabSpeakerX(11)=-0.590; tabSpeakerY(11)=-0.374; tabSpeakerZ(11)=-1.000; tabSpeakerD(11)=1.220; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-0.374; tabSpeakerZ(12)=-0.591; tabSpeakerD(12)=1.220; tabSpeakerX(13)=-1.000; tabSpeakerY(13)=-0.374; tabSpeakerZ(13)=-0.197; tabSpeakerD(13)=1.086; tabSpeakerX(14)=-1.000; tabSpeakerY(14)=-0.374; tabSpeakerZ(14)=0.207; tabSpeakerD(14)=1.088; tabSpeakerX(15)=-1.000; tabSpeakerY(15)=-0.374; tabSpeakerZ(15)=0.601; tabSpeakerD(15)=1.225; tabSpeakerX(16)=-0.333; tabSpeakerY(16)=0.219; tabSpeakerZ(16)=1.000; tabSpeakerD(16)=1.077; tabSpeakerX(17)=0.343; tabSpeakerY(17)=0.219; tabSpeakerZ(17)=1.000; tabSpeakerD(17)=1.080; tabSpeakerX(18)=1.000; tabSpeakerY(18)=0.219; tabSpeakerZ(18)=-0.394; tabSpeakerD(18)=1.097; tabSpeakerX(19)=1.000; tabSpeakerY(19)=0.219; tabSpeakerZ(19)=0.404; tabSpeakerD(19)=1.101; tabSpeakerX(20)=0.338; tabSpeakerY(20)=0.219; tabSpeakerZ(20)=-1.000; tabSpeakerD(20)=1.078; tabSpeakerX(21)=-0.323; tabSpeakerY(21)=0.219; tabSpeakerZ(21)=-1.000; tabSpeakerD(21)=1.074; tabSpeakerX(22)=-1.000; tabSpeakerY(22)=0.219; tabSpeakerZ(22)=-0.399; tabSpeakerD(22)=1.099; tabSpeakerX(23)=-1.000; tabSpeakerY(23)=0.219; tabSpeakerZ(23)=0.409; tabSpeakerD(23)=1.102; tabSpeakerX(24)=-0.402; tabSpeakerY(24)=0.807; tabSpeakerZ(24)=-0.056; tabSpeakerD(24)=0.904; tabSpeakerX(25)=0.407; tabSpeakerY(25)=0.807; tabSpeakerZ(25)=-0.061; tabSpeakerD(25)=0.906; tabSpeakerX(26)=0.007; tabSpeakerY(26)=0.807; tabSpeakerZ(26)=0.283; tabSpeakerD(26)=0.855; tabSpeakerX(27)=0.002; tabSpeakerY(27)=0.807; tabSpeakerZ(27)=-0.404; tabSpeakerD(27)=0.902; tabSpeakerX(28)=-0.062; tabSpeakerY(28)=1.000; tabSpeakerZ(28)=-0.056; tabSpeakerD(28)=1.003; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,29);
877fe2f4be65cdfcfe064e81bd6ebb409da1f37296205256a6b5de7ddc5e8ca6
dblanchemain/MultiSpace3D
Satosphere.dsp
declare name "objMatrixSatosphere.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.062; tabSpeakerY(0)=1.000; tabSpeakerZ(0)=-0.061; tabSpeakerD(0)=1.004; tabSpeakerX(1)=-0.412; tabSpeakerY(1)=0.779; tabSpeakerZ(1)=0.081; tabSpeakerD(1)=0.885; tabSpeakerX(2)=-0.328; tabSpeakerY(2)=0.779; tabSpeakerZ(2)=-0.323; tabSpeakerD(2)=0.905; tabSpeakerX(3)=0.002; tabSpeakerY(3)=0.779; tabSpeakerZ(3)=-0.449; tabSpeakerD(3)=0.899; tabSpeakerX(4)=0.299; tabSpeakerY(4)=0.779; tabSpeakerZ(4)=-0.182; tabSpeakerD(4)=0.854; tabSpeakerX(5)=0.225; tabSpeakerY(5)=0.779; tabSpeakerZ(5)=0.242; tabSpeakerD(5)=0.846; tabSpeakerX(6)=-0.131; tabSpeakerY(6)=0.779; tabSpeakerZ(6)=0.384; tabSpeakerD(6)=0.878; tabSpeakerX(7)=-0.052; tabSpeakerY(7)=0.214; tabSpeakerZ(7)=0.672; tabSpeakerD(7)=0.707; tabSpeakerX(8)=-0.407; tabSpeakerY(8)=0.214; tabSpeakerZ(8)=0.561; tabSpeakerD(8)=0.725; tabSpeakerX(9)=-0.689; tabSpeakerY(9)=0.214; tabSpeakerZ(9)=0.359; tabSpeakerD(9)=0.806; tabSpeakerX(10)=-0.847; tabSpeakerY(10)=0.214; tabSpeakerZ(10)=0.000; tabSpeakerD(10)=0.874; tabSpeakerX(11)=-0.699; tabSpeakerY(11)=0.214; tabSpeakerZ(11)=-0.348; tabSpeakerD(11)=0.810; tabSpeakerX(12)=-0.422; tabSpeakerY(12)=0.214; tabSpeakerZ(12)=-0.581; tabSpeakerD(12)=0.749; tabSpeakerX(13)=-0.062; tabSpeakerY(13)=0.214; tabSpeakerZ(13)=-0.667; tabSpeakerD(13)=0.703; tabSpeakerX(14)=0.348; tabSpeakerY(14)=0.214; tabSpeakerZ(14)=-0.581; tabSpeakerD(14)=0.710; tabSpeakerX(15)=0.635; tabSpeakerY(15)=0.214; tabSpeakerZ(15)=-0.333; tabSpeakerD(15)=0.748; tabSpeakerX(16)=0.798; tabSpeakerY(16)=0.214; tabSpeakerZ(16)=0.010; tabSpeakerD(16)=0.826; tabSpeakerX(17)=0.644; tabSpeakerY(17)=0.214; tabSpeakerZ(17)=0.369; tabSpeakerD(17)=0.773; tabSpeakerX(18)=0.358; tabSpeakerY(18)=0.214; tabSpeakerZ(18)=0.596; tabSpeakerD(18)=0.727; tabSpeakerX(19)=0.007; tabSpeakerY(19)=-0.181; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.016; tabSpeakerX(20)=-0.501; tabSpeakerY(20)=-0.181; tabSpeakerZ(20)=0.798; tabSpeakerD(20)=0.960; tabSpeakerX(21)=-0.872; tabSpeakerY(21)=-0.181; tabSpeakerZ(21)=0.414; tabSpeakerD(21)=0.982; tabSpeakerX(22)=-1.000; tabSpeakerY(22)=-0.181; tabSpeakerZ(22)=-0.051; tabSpeakerD(22)=1.018; tabSpeakerX(23)=-0.872; tabSpeakerY(23)=-0.181; tabSpeakerZ(23)=-0.495; tabSpeakerD(23)=1.019; tabSpeakerX(24)=-0.506; tabSpeakerY(24)=-0.181; tabSpeakerZ(24)=-0.793; tabSpeakerD(24)=0.958; tabSpeakerX(25)=-0.002; tabSpeakerY(25)=-0.181; tabSpeakerZ(25)=-1.000; tabSpeakerD(25)=1.016; tabSpeakerX(26)=0.501; tabSpeakerY(26)=-0.181; tabSpeakerZ(26)=-0.823; tabSpeakerD(26)=0.981; tabSpeakerX(27)=0.872; tabSpeakerY(27)=-0.181; tabSpeakerZ(27)=-0.460; tabSpeakerD(27)=1.002; tabSpeakerX(28)=1.000; tabSpeakerY(28)=-0.181; tabSpeakerZ(28)=-0.005; tabSpeakerD(28)=1.016; tabSpeakerX(29)=0.847; tabSpeakerY(29)=-0.181; tabSpeakerZ(29)=0.480; tabSpeakerD(29)=0.990; tabSpeakerX(30)=0.511; tabSpeakerY(30)=-0.181; tabSpeakerZ(30)=0.904; tabSpeakerD(30)=1.054; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,31); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,31);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/651e16aa196d5084a9779419cb2ba7f50da184e6/Plugins/DSP/Satosphere.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.062; tabSpeakerY(0)=1.000; tabSpeakerZ(0)=-0.061; tabSpeakerD(0)=1.004; tabSpeakerX(1)=-0.412; tabSpeakerY(1)=0.779; tabSpeakerZ(1)=0.081; tabSpeakerD(1)=0.885; tabSpeakerX(2)=-0.328; tabSpeakerY(2)=0.779; tabSpeakerZ(2)=-0.323; tabSpeakerD(2)=0.905; tabSpeakerX(3)=0.002; tabSpeakerY(3)=0.779; tabSpeakerZ(3)=-0.449; tabSpeakerD(3)=0.899; tabSpeakerX(4)=0.299; tabSpeakerY(4)=0.779; tabSpeakerZ(4)=-0.182; tabSpeakerD(4)=0.854; tabSpeakerX(5)=0.225; tabSpeakerY(5)=0.779; tabSpeakerZ(5)=0.242; tabSpeakerD(5)=0.846; tabSpeakerX(6)=-0.131; tabSpeakerY(6)=0.779; tabSpeakerZ(6)=0.384; tabSpeakerD(6)=0.878; tabSpeakerX(7)=-0.052; tabSpeakerY(7)=0.214; tabSpeakerZ(7)=0.672; tabSpeakerD(7)=0.707; tabSpeakerX(8)=-0.407; tabSpeakerY(8)=0.214; tabSpeakerZ(8)=0.561; tabSpeakerD(8)=0.725; tabSpeakerX(9)=-0.689; tabSpeakerY(9)=0.214; tabSpeakerZ(9)=0.359; tabSpeakerD(9)=0.806; tabSpeakerX(10)=-0.847; tabSpeakerY(10)=0.214; tabSpeakerZ(10)=0.000; tabSpeakerD(10)=0.874; tabSpeakerX(11)=-0.699; tabSpeakerY(11)=0.214; tabSpeakerZ(11)=-0.348; tabSpeakerD(11)=0.810; tabSpeakerX(12)=-0.422; tabSpeakerY(12)=0.214; tabSpeakerZ(12)=-0.581; tabSpeakerD(12)=0.749; tabSpeakerX(13)=-0.062; tabSpeakerY(13)=0.214; tabSpeakerZ(13)=-0.667; tabSpeakerD(13)=0.703; tabSpeakerX(14)=0.348; tabSpeakerY(14)=0.214; tabSpeakerZ(14)=-0.581; tabSpeakerD(14)=0.710; tabSpeakerX(15)=0.635; tabSpeakerY(15)=0.214; tabSpeakerZ(15)=-0.333; tabSpeakerD(15)=0.748; tabSpeakerX(16)=0.798; tabSpeakerY(16)=0.214; tabSpeakerZ(16)=0.010; tabSpeakerD(16)=0.826; tabSpeakerX(17)=0.644; tabSpeakerY(17)=0.214; tabSpeakerZ(17)=0.369; tabSpeakerD(17)=0.773; tabSpeakerX(18)=0.358; tabSpeakerY(18)=0.214; tabSpeakerZ(18)=0.596; tabSpeakerD(18)=0.727; tabSpeakerX(19)=0.007; tabSpeakerY(19)=-0.181; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.016; tabSpeakerX(20)=-0.501; tabSpeakerY(20)=-0.181; tabSpeakerZ(20)=0.798; tabSpeakerD(20)=0.960; tabSpeakerX(21)=-0.872; tabSpeakerY(21)=-0.181; tabSpeakerZ(21)=0.414; tabSpeakerD(21)=0.982; tabSpeakerX(22)=-1.000; tabSpeakerY(22)=-0.181; tabSpeakerZ(22)=-0.051; tabSpeakerD(22)=1.018; tabSpeakerX(23)=-0.872; tabSpeakerY(23)=-0.181; tabSpeakerZ(23)=-0.495; tabSpeakerD(23)=1.019; tabSpeakerX(24)=-0.506; tabSpeakerY(24)=-0.181; tabSpeakerZ(24)=-0.793; tabSpeakerD(24)=0.958; tabSpeakerX(25)=-0.002; tabSpeakerY(25)=-0.181; tabSpeakerZ(25)=-1.000; tabSpeakerD(25)=1.016; tabSpeakerX(26)=0.501; tabSpeakerY(26)=-0.181; tabSpeakerZ(26)=-0.823; tabSpeakerD(26)=0.981; tabSpeakerX(27)=0.872; tabSpeakerY(27)=-0.181; tabSpeakerZ(27)=-0.460; tabSpeakerD(27)=1.002; tabSpeakerX(28)=1.000; tabSpeakerY(28)=-0.181; tabSpeakerZ(28)=-0.005; tabSpeakerD(28)=1.016; tabSpeakerX(29)=0.847; tabSpeakerY(29)=-0.181; tabSpeakerZ(29)=0.480; tabSpeakerD(29)=0.990; tabSpeakerX(30)=0.511; tabSpeakerY(30)=-0.181; tabSpeakerZ(30)=0.904; tabSpeakerD(30)=1.054; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,31);
01abb0d6c8e894c1c616db53dce0cc14f780cc318c50931e74d72986f9852fcc
grame-cncm/faustdoc
exfaust12.dsp
//################################### midiOnly.dsp ###################################### // Faust instrument specifically designed for faust2smartkeyb implementing a MIDI // controllable app where the mobile device's touch screen is used to control // specific parameters of the synth continuously using two separate X/Y control surfaces. // // ## SmartKeyboard Use Strategy // // The SmartKeyboard configuration for this instrument consists in a single keyboard // with two keys. Each key implements a control surface. Piano Keyboard mode is // disabled so that key names are not displayed and that keys don't change color when // touched. Finally, Send Freq is set to 0 so that new voices are not allocated by // the touch screen and that the freq and bend parameters are not computed. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. However // it was specifically designed to be used with faust2smartkeyb. For best results, // we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] -effect reverb.dsp midiOnly.dsp // // // ## Version/Licence // // Version 0.0, Feb. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //######################################################################################## // Interface with 4 polyphnic keyboards of 13 keys with the same config declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Keyboard 0 - Number of Keys':'2', 'Keyboard 0 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send Key X':'1', 'Keyboard 0 - Key 0 - Label':'Mod Index', 'Keyboard 0 - Key 1 - Label':'Mod Freq' }"; import("stdfaust.lib"); f = hslider("freq",300,50,2000,0.01); bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.001)) : si.polySmooth(gate,0.999,1); gain = hslider("gain",1,0,1,0.01); key = hslider("key",0,0,1,1) : int; kb0k0x = hslider("kb0k0x[midi:ctrl 1]",0.5,0,1,0.01) : si.smoo; kb0k1x = hslider("kb0k1x[midi:ctrl 1]",0.5,0,1,0.01) : si.smoo; s = hslider("sustain[midi:ctrl 64]",0,0,1,1); t = button("gate"); // fomating parameters gate = t+s : min(1); freq = f*bend; index = kb0k0x*1000; modFreqRatio = kb0k1x; envelope = gain*gate : si.smoo; process = sy.fm((freq,freq + freq*modFreqRatio),index*envelope)*envelope <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust12/exfaust12.dsp
faust
################################### midiOnly.dsp ###################################### Faust instrument specifically designed for faust2smartkeyb implementing a MIDI controllable app where the mobile device's touch screen is used to control specific parameters of the synth continuously using two separate X/Y control surfaces. ## SmartKeyboard Use Strategy The SmartKeyboard configuration for this instrument consists in a single keyboard with two keys. Each key implements a control surface. Piano Keyboard mode is disabled so that key names are not displayed and that keys don't change color when touched. Finally, Send Freq is set to 0 so that new voices are not allocated by the touch screen and that the freq and bend parameters are not computed. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] -effect reverb.dsp midiOnly.dsp ## Version/Licence Version 0.0, Feb. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ######################################################################################## Interface with 4 polyphnic keyboards of 13 keys with the same config fomating parameters
declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Keyboard 0 - Number of Keys':'2', 'Keyboard 0 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send Key X':'1', 'Keyboard 0 - Key 0 - Label':'Mod Index', 'Keyboard 0 - Key 1 - Label':'Mod Freq' }"; import("stdfaust.lib"); f = hslider("freq",300,50,2000,0.01); bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.001)) : si.polySmooth(gate,0.999,1); gain = hslider("gain",1,0,1,0.01); key = hslider("key",0,0,1,1) : int; kb0k0x = hslider("kb0k0x[midi:ctrl 1]",0.5,0,1,0.01) : si.smoo; kb0k1x = hslider("kb0k1x[midi:ctrl 1]",0.5,0,1,0.01) : si.smoo; s = hslider("sustain[midi:ctrl 64]",0,0,1,1); t = button("gate"); gate = t+s : min(1); freq = f*bend; index = kb0k0x*1000; modFreqRatio = kb0k1x; envelope = gain*gate : si.smoo; process = sy.fm((freq,freq + freq*modFreqRatio),index*envelope)*envelope <: _,_;
d6e3bceaf15d3efc49e7b943f770e8da7076558933bfe804a366df172bd2fdf4
grame-cncm/faustdoc
exfaust3.dsp
//############################### brass.dsp ################################### // Faust instrument specifically designed for faust2smartkeyb where a // trumpet physical model is controlled using some of the built-in sensors of // the device and the touchscreen. Some of these elements could be replaced by // external controllers (e.g., breath/mouth piece controller). // // ## SmartKeyboard Use Strategy // // 1 keyboard is used to implement the pistons of the trumpet (3 keys) and the // other allows to control the lips tension. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. // However it was specifically designed to be used with faust2smartkeyb. For // best results, we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] -effect reverb.dsp brass.dsp // // // ## Version/Licence // // Version 0.0, Aug. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //############################################################################## declare interface "SmartKeyboard{ 'Number of Keyboards':'2', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 1 - Number of Keys':'3', 'Keyboard 0 - Send Freq':'0', 'Keyboard 1 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 0 - Send Key X':'1', 'Keyboard 1 - Send Key Status':'1', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Key 0 - Label':'Lips Tension', 'Keyboard 1 - Key 0 - Label':'P1', 'Keyboard 1 - Key 1 - Label':'P2', 'Keyboard 1 - Key 2 - Label':'P3' }"; import("stdfaust.lib"); // SMARTKEYBOARD PARAMS kb0k0x = hslider("kb0k0x",0,0,1,1); kb1k0status = hslider("kb1k0status",0,0,1,1) : min(1) : int; kb1k1status = hslider("kb1k1status",0,0,1,1) : min(1) : int; kb1k2status = hslider("kb1k2status",0,0,1,1) : min(1) : int; // MODEL PARAMETERS // pressure is controlled by accelerometer pressure = hslider("pressure[acc: 1 1 -10 0 10]",0,0,1,0.01) : si.smoo; breathGain = 0.005; breathCutoff = 2000; vibratoFreq = 5; vibratoGain = 0; //pitch when no pistons are pushed basePitch = 48; // C4 // calculate pitch shift in function of piston combination pitchShift = ((kb1k0status == 0) & (kb1k1status == 1) & (kb1k2status == 0))*(1) + ((kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 0))*(2) + ((kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 0))*(3) + ((kb1k0status == 0) & (kb1k1status == 1) & (kb1k2status == 1))*(4) + ((kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 1))*(5) + ((kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 1))*(6); // tube length is calculated based on piston combination tubeLength = basePitch-pitchShift : ba.midikey2hz : pm.f2l : si.smoo; // lips tension is controlled using pad on screen lipsTension = kb0k0x : si.smoo; // default mute value mute = 0.5; // ASSEMBLING MODEL model = pm.blower(pressure,breathGain,breathCutoff,vibratoFreq,vibratoGain) : pm.brassModel(tubeLength,lipsTension,mute); process = model <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust3/exfaust3.dsp
faust
############################### brass.dsp ################################### Faust instrument specifically designed for faust2smartkeyb where a trumpet physical model is controlled using some of the built-in sensors of the device and the touchscreen. Some of these elements could be replaced by external controllers (e.g., breath/mouth piece controller). ## SmartKeyboard Use Strategy 1 keyboard is used to implement the pistons of the trumpet (3 keys) and the other allows to control the lips tension. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] -effect reverb.dsp brass.dsp ## Version/Licence Version 0.0, Aug. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ############################################################################## SMARTKEYBOARD PARAMS MODEL PARAMETERS pressure is controlled by accelerometer pitch when no pistons are pushed C4 calculate pitch shift in function of piston combination tube length is calculated based on piston combination lips tension is controlled using pad on screen default mute value ASSEMBLING MODEL
declare interface "SmartKeyboard{ 'Number of Keyboards':'2', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 1 - Number of Keys':'3', 'Keyboard 0 - Send Freq':'0', 'Keyboard 1 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 0 - Send Key X':'1', 'Keyboard 1 - Send Key Status':'1', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Key 0 - Label':'Lips Tension', 'Keyboard 1 - Key 0 - Label':'P1', 'Keyboard 1 - Key 1 - Label':'P2', 'Keyboard 1 - Key 2 - Label':'P3' }"; import("stdfaust.lib"); kb0k0x = hslider("kb0k0x",0,0,1,1); kb1k0status = hslider("kb1k0status",0,0,1,1) : min(1) : int; kb1k1status = hslider("kb1k1status",0,0,1,1) : min(1) : int; kb1k2status = hslider("kb1k2status",0,0,1,1) : min(1) : int; pressure = hslider("pressure[acc: 1 1 -10 0 10]",0,0,1,0.01) : si.smoo; breathGain = 0.005; breathCutoff = 2000; vibratoFreq = 5; vibratoGain = 0; pitchShift = ((kb1k0status == 0) & (kb1k1status == 1) & (kb1k2status == 0))*(1) + ((kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 0))*(2) + ((kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 0))*(3) + ((kb1k0status == 0) & (kb1k1status == 1) & (kb1k2status == 1))*(4) + ((kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 1))*(5) + ((kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 1))*(6); tubeLength = basePitch-pitchShift : ba.midikey2hz : pm.f2l : si.smoo; lipsTension = kb0k0x : si.smoo; mute = 0.5; model = pm.blower(pressure,breathGain,breathCutoff,vibratoFreq,vibratoGain) : pm.brassModel(tubeLength,lipsTension,mute); process = model <: _,_;
9b3cc1ccfa1eac3b1b67ef506281be8cae92df544a8c3f0cd3d87d9fdb827e01
grame-cncm/faustdoc
exfaust18.dsp
//############################### violin2.dsp ################################## // Faust instrument specifically designed for faust2smartkeyb where a // complete violin physical model can be played using the touch sceen // interface. Bowing is carried out by constantly moving a finger on the // y axis of a key. // // ## SmartKeyboard Use Strategy // // 4 keyboards are used to control the pitch of the 4 bowed strings. Strings // are connected to the virtual bow when they are touched. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. // However it was specifically designed to be used with faust2smartkeyb. For // best results, we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp // // // ## Version/Licence // // Version 0.0, Aug. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //############################################################################## declare interface "SmartKeyboard{ 'Number of Keyboards':'4', 'Max Keyboard Polyphony':'0', 'Rounding Mode':'2', 'Send Fingers Count':'1', 'Keyboard 0 - Number of Keys':'12', 'Keyboard 1 - Number of Keys':'12', 'Keyboard 2 - Number of Keys':'12', 'Keyboard 3 - Number of Keys':'12', 'Keyboard 0 - Lowest Key':'55', 'Keyboard 1 - Lowest Key':'62', 'Keyboard 2 - Lowest Key':'69', 'Keyboard 3 - Lowest Key':'76', 'Keyboard 0 - Send Keyboard Freq':'1', 'Keyboard 1 - Send Keyboard Freq':'1', 'Keyboard 2 - Send Keyboard Freq':'1', 'Keyboard 3 - Send Keyboard Freq':'1', 'Keyboard 0 - Send Y':'1', 'Keyboard 1 - Send Y':'1', 'Keyboard 2 - Send Y':'1', 'Keyboard 3 - Send Y':'1' }"; import("stdfaust.lib"); // SMARTKEYBOARD PARAMS kbfreq(0) = hslider("kb0freq",220,20,10000,0.01); kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01); kbfreq(1) = hslider("kb1freq",330,20,10000,0.01); kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01); kbfreq(2) = hslider("kb2freq",440,20,10000,0.01); kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01); kbfreq(3) = hslider("kb3freq",550,20,10000,0.01); kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01); kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int; kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int; kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int; kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int; y = hslider("y",0,0,1,1) : si.smoo; // MODEL PARAMETERS // strings lengths sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo; // string active only if fingers are touching the keyboard as(i) = kbfingers(i)>0; // retrieving finger displacement on screen (dirt simple) bowVel = y-y' : abs : *(3000) : min(1) : si.smoo; // bow position is constant but could be ontrolled by an external interface bowPos = 0.7; bowPress = 0.5; // ASSEMBLING MODELS // essentially 4 parallel violin strings model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _; process = model <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/b4755332f6410785856b2166cd5f9428c4fda4d8/docs/examples/smartKeyboard/exfaust18/exfaust18.dsp
faust
############################### violin2.dsp ################################## Faust instrument specifically designed for faust2smartkeyb where a complete violin physical model can be played using the touch sceen interface. Bowing is carried out by constantly moving a finger on the y axis of a key. ## SmartKeyboard Use Strategy 4 keyboards are used to control the pitch of the 4 bowed strings. Strings are connected to the virtual bow when they are touched. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp ## Version/Licence Version 0.0, Aug. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ############################################################################## SMARTKEYBOARD PARAMS MODEL PARAMETERS strings lengths string active only if fingers are touching the keyboard retrieving finger displacement on screen (dirt simple) bow position is constant but could be ontrolled by an external interface ASSEMBLING MODELS essentially 4 parallel violin strings
declare interface "SmartKeyboard{ 'Number of Keyboards':'4', 'Max Keyboard Polyphony':'0', 'Rounding Mode':'2', 'Send Fingers Count':'1', 'Keyboard 0 - Number of Keys':'12', 'Keyboard 1 - Number of Keys':'12', 'Keyboard 2 - Number of Keys':'12', 'Keyboard 3 - Number of Keys':'12', 'Keyboard 0 - Lowest Key':'55', 'Keyboard 1 - Lowest Key':'62', 'Keyboard 2 - Lowest Key':'69', 'Keyboard 3 - Lowest Key':'76', 'Keyboard 0 - Send Keyboard Freq':'1', 'Keyboard 1 - Send Keyboard Freq':'1', 'Keyboard 2 - Send Keyboard Freq':'1', 'Keyboard 3 - Send Keyboard Freq':'1', 'Keyboard 0 - Send Y':'1', 'Keyboard 1 - Send Y':'1', 'Keyboard 2 - Send Y':'1', 'Keyboard 3 - Send Y':'1' }"; import("stdfaust.lib"); kbfreq(0) = hslider("kb0freq",220,20,10000,0.01); kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01); kbfreq(1) = hslider("kb1freq",330,20,10000,0.01); kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01); kbfreq(2) = hslider("kb2freq",440,20,10000,0.01); kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01); kbfreq(3) = hslider("kb3freq",550,20,10000,0.01); kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01); kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int; kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int; kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int; kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int; y = hslider("y",0,0,1,1) : si.smoo; sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo; as(i) = kbfingers(i)>0; bowVel = y-y' : abs : *(3000) : min(1) : si.smoo; bowPos = 0.7; bowPress = 0.5; model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _; process = model <: _,_;
aca80d2d5a8470e3b6e950fec731ce4aa6362fc973f575dcea2d06bdccc96df2
grame-cncm/faustdoc
exfaust1.dsp
//################################ bells.dsp ################################### // Faust instrument specifically designed for faust2smartkeyb where the // physical models of 4 different bells can be played using screen pads. The // models are taken from physmodels.lib. // // ## SmartKeyboard Use Strategy // // The SmartKeyboard interface is used to implement percussion pads where // the X/Y position of fingers is retrieved to control the strike position on // the bells. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. // However it was specifically designed to be used with faust2smartkeyb. For // best results, we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] -effect reverb.dsp bells.dsp // // // ## Version/Licence // // Version 0.0, Aug. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //############################################################################## declare interface "SmartKeyboard{ 'Number of Keyboards':'2', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'2', 'Keyboard 1 - Number of Keys':'2', 'Keyboard 0 - Send Freq':'0', 'Keyboard 1 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 0 - Send Key Status':'1', 'Keyboard 1 - Send Key Status':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Send Y':'1', 'Keyboard 1 - Send X':'1', 'Keyboard 1 - Send Y':'1', 'Keyboard 0 - Key 0 - Label':'English Bell', 'Keyboard 0 - Key 1 - Label':'French Bell', 'Keyboard 1 - Key 0 - Label':'German Bell', 'Keyboard 1 - Key 1 - Label':'Russian Bell' }"; import("stdfaust.lib"); // SMARTKEYBOARD PARAMS kb0k0status = hslider("kb0k0status",0,0,1,1) : min(1) : int; kb0k1status = hslider("kb0k1status",0,0,1,1) : min(1) : int; kb1k0status = hslider("kb1k0status",0,0,1,1) : min(1) : int; kb1k1status = hslider("kb1k1status",0,0,1,1) : min(1) : int; x = hslider("x",1,0,1,0.001); y = hslider("y",1,0,1,0.001); // MODEL PARAMETERS strikeCutoff = 6500; strikeSharpness = 0.5; strikeGain = 1; // synthesize 10 modes out of 50 nModes = 10; // resonance duration is 30s t60 = 30; // number of excitation pos (retrieved from model) nExPos = 7; // computing excitation position from X and Y exPos = min((x*2-1 : abs),(y*2-1 : abs))*(nExPos-1) : int; // ASSEMBLING MODELS bells = (kb0k0status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.englishBellModel(nModes,exPos,t60,1,3)) + (kb0k1status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.frenchBellModel(nModes,exPos,t60,1,3)) + (kb1k0status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.germanBellModel(nModes,exPos,t60,1,2.5)) + (kb1k1status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.russianBellModel(nModes,exPos,t60,1,3)) :> *(0.2); process = bells <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust1/exfaust1.dsp
faust
################################ bells.dsp ################################### Faust instrument specifically designed for faust2smartkeyb where the physical models of 4 different bells can be played using screen pads. The models are taken from physmodels.lib. ## SmartKeyboard Use Strategy The SmartKeyboard interface is used to implement percussion pads where the X/Y position of fingers is retrieved to control the strike position on the bells. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] -effect reverb.dsp bells.dsp ## Version/Licence Version 0.0, Aug. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ############################################################################## SMARTKEYBOARD PARAMS MODEL PARAMETERS synthesize 10 modes out of 50 resonance duration is 30s number of excitation pos (retrieved from model) computing excitation position from X and Y ASSEMBLING MODELS
declare interface "SmartKeyboard{ 'Number of Keyboards':'2', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'2', 'Keyboard 1 - Number of Keys':'2', 'Keyboard 0 - Send Freq':'0', 'Keyboard 1 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 0 - Send Key Status':'1', 'Keyboard 1 - Send Key Status':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Send Y':'1', 'Keyboard 1 - Send X':'1', 'Keyboard 1 - Send Y':'1', 'Keyboard 0 - Key 0 - Label':'English Bell', 'Keyboard 0 - Key 1 - Label':'French Bell', 'Keyboard 1 - Key 0 - Label':'German Bell', 'Keyboard 1 - Key 1 - Label':'Russian Bell' }"; import("stdfaust.lib"); kb0k0status = hslider("kb0k0status",0,0,1,1) : min(1) : int; kb0k1status = hslider("kb0k1status",0,0,1,1) : min(1) : int; kb1k0status = hslider("kb1k0status",0,0,1,1) : min(1) : int; kb1k1status = hslider("kb1k1status",0,0,1,1) : min(1) : int; x = hslider("x",1,0,1,0.001); y = hslider("y",1,0,1,0.001); strikeCutoff = 6500; strikeSharpness = 0.5; strikeGain = 1; nModes = 10; t60 = 30; nExPos = 7; exPos = min((x*2-1 : abs),(y*2-1 : abs))*(nExPos-1) : int; bells = (kb0k0status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.englishBellModel(nModes,exPos,t60,1,3)) + (kb0k1status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.frenchBellModel(nModes,exPos,t60,1,3)) + (kb1k0status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.germanBellModel(nModes,exPos,t60,1,2.5)) + (kb1k1status : pm.strikeModel(10,strikeCutoff,strikeSharpness,strikeGain) : pm.russianBellModel(nModes,exPos,t60,1,3)) :> *(0.2); process = bells <: _,_;
cd4c8c64622f7011762a4d30440132b11858afdbdcd71c627eb51876aba2e956
dblanchemain/MultiSpace3D
Klangdom.dsp
declare name "objMatrixKlangdom.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.002; tabSpeakerY(0)=-0.562; tabSpeakerZ(0)=-1.000; tabSpeakerD(0)=1.147; tabSpeakerX(1)=-0.585; tabSpeakerY(1)=-0.562; tabSpeakerZ(1)=-0.914; tabSpeakerD(1)=1.222; tabSpeakerX(2)=-1.000; tabSpeakerY(2)=-0.562; tabSpeakerZ(2)=-0.646; tabSpeakerD(2)=1.317; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.562; tabSpeakerZ(3)=-0.202; tabSpeakerD(3)=1.165; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.562; tabSpeakerZ(4)=0.237; tabSpeakerD(4)=1.171; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=-0.562; tabSpeakerZ(5)=0.677; tabSpeakerD(5)=1.332; tabSpeakerX(6)=-0.516; tabSpeakerY(6)=-0.562; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.258; tabSpeakerX(7)=-0.002; tabSpeakerY(7)=-0.562; tabSpeakerZ(7)=1.000; tabSpeakerD(7)=1.147; tabSpeakerX(8)=0.472; tabSpeakerY(8)=-0.562; tabSpeakerZ(8)=1.000; tabSpeakerD(8)=1.240; tabSpeakerX(9)=1.000; tabSpeakerY(9)=-0.562; tabSpeakerZ(9)=0.667; tabSpeakerD(9)=1.327; tabSpeakerX(10)=1.000; tabSpeakerY(10)=-0.562; tabSpeakerZ(10)=0.354; tabSpeakerD(10)=1.200; tabSpeakerX(11)=1.000; tabSpeakerY(11)=-0.562; tabSpeakerZ(11)=-0.152; tabSpeakerD(11)=1.157; tabSpeakerX(12)=1.000; tabSpeakerY(12)=-0.562; tabSpeakerZ(12)=-0.606; tabSpeakerD(12)=1.297; tabSpeakerX(13)=0.442; tabSpeakerY(13)=-0.562; tabSpeakerZ(13)=-0.737; tabSpeakerD(13)=1.027; tabSpeakerX(14)=-0.358; tabSpeakerY(14)=0.002; tabSpeakerZ(14)=-0.742; tabSpeakerD(14)=0.824; tabSpeakerX(15)=-0.714; tabSpeakerY(15)=0.002; tabSpeakerZ(15)=-0.540; tabSpeakerD(15)=0.895; tabSpeakerX(16)=-0.699; tabSpeakerY(16)=0.002; tabSpeakerZ(16)=-0.207; tabSpeakerD(16)=0.729; tabSpeakerX(17)=-0.709; tabSpeakerY(17)=0.002; tabSpeakerZ(17)=0.121; tabSpeakerD(17)=0.719; tabSpeakerX(18)=-0.709; tabSpeakerY(18)=0.002; tabSpeakerZ(18)=0.409; tabSpeakerD(18)=0.818; tabSpeakerX(19)=-0.506; tabSpeakerY(19)=0.002; tabSpeakerZ(19)=0.672; tabSpeakerD(19)=0.841; tabSpeakerX(20)=-0.146; tabSpeakerY(20)=0.002; tabSpeakerZ(20)=0.677; tabSpeakerD(20)=0.692; tabSpeakerX(21)=0.215; tabSpeakerY(21)=0.002; tabSpeakerZ(21)=0.692; tabSpeakerD(21)=0.725; tabSpeakerX(22)=0.600; tabSpeakerY(22)=0.002; tabSpeakerZ(22)=0.702; tabSpeakerD(22)=0.923; tabSpeakerX(23)=0.615; tabSpeakerY(23)=0.002; tabSpeakerZ(23)=0.258; tabSpeakerD(23)=0.667; tabSpeakerX(24)=0.615; tabSpeakerY(24)=0.002; tabSpeakerZ(24)=-0.045; tabSpeakerD(24)=0.616; tabSpeakerX(25)=0.610; tabSpeakerY(25)=0.002; tabSpeakerZ(25)=-0.384; tabSpeakerD(25)=0.721; tabSpeakerX(26)=0.111; tabSpeakerY(26)=0.002; tabSpeakerZ(26)=-0.409; tabSpeakerD(26)=0.424; tabSpeakerX(27)=0.116; tabSpeakerY(27)=0.412; tabSpeakerZ(27)=-0.485; tabSpeakerD(27)=0.647; tabSpeakerX(28)=-0.254; tabSpeakerY(28)=0.412; tabSpeakerZ(28)=-0.571; tabSpeakerD(28)=0.748; tabSpeakerX(29)=-0.595; tabSpeakerY(29)=0.412; tabSpeakerZ(29)=-0.409; tabSpeakerD(29)=0.831; tabSpeakerX(30)=-0.595; tabSpeakerY(30)=0.412; tabSpeakerZ(30)=-0.030; tabSpeakerD(30)=0.724; tabSpeakerX(31)=-0.570; tabSpeakerY(31)=0.412; tabSpeakerZ(31)=0.303; tabSpeakerD(31)=0.766; tabSpeakerX(32)=-0.328; tabSpeakerY(32)=0.412; tabSpeakerZ(32)=0.404; tabSpeakerD(32)=0.664; tabSpeakerX(33)=-0.027; tabSpeakerY(33)=0.412; tabSpeakerZ(33)=0.409; tabSpeakerD(33)=0.581; tabSpeakerX(34)=0.264; tabSpeakerY(34)=0.412; tabSpeakerZ(34)=0.354; tabSpeakerD(34)=0.604; tabSpeakerX(35)=0.323; tabSpeakerY(35)=0.412; tabSpeakerZ(35)=-0.056; tabSpeakerD(35)=0.527; tabSpeakerX(36)=0.151; tabSpeakerY(36)=0.769; tabSpeakerZ(36)=-0.237; tabSpeakerD(36)=0.819; tabSpeakerX(37)=-0.091; tabSpeakerY(37)=0.769; tabSpeakerZ(37)=-0.354; tabSpeakerD(37)=0.851; tabSpeakerX(38)=-0.319; tabSpeakerY(38)=0.769; tabSpeakerZ(38)=-0.202; tabSpeakerD(38)=0.857; tabSpeakerX(39)=-0.314; tabSpeakerY(39)=0.769; tabSpeakerZ(39)=0.086; tabSpeakerD(39)=0.835; tabSpeakerX(40)=-0.086; tabSpeakerY(40)=0.769; tabSpeakerZ(40)=0.247; tabSpeakerD(40)=0.812; tabSpeakerX(41)=0.175; tabSpeakerY(41)=0.769; tabSpeakerZ(41)=0.091; tabSpeakerD(41)=0.794; tabSpeakerX(42)=-0.057; tabSpeakerY(42)=1.000; tabSpeakerZ(42)=-0.051; tabSpeakerD(42)=1.003; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,43); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,43);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/5125d94de7f28e47c15e4432bba31a1ad7a51fb8/Plugins/DSP/Klangdom.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-0.002; tabSpeakerY(0)=-0.562; tabSpeakerZ(0)=-1.000; tabSpeakerD(0)=1.147; tabSpeakerX(1)=-0.585; tabSpeakerY(1)=-0.562; tabSpeakerZ(1)=-0.914; tabSpeakerD(1)=1.222; tabSpeakerX(2)=-1.000; tabSpeakerY(2)=-0.562; tabSpeakerZ(2)=-0.646; tabSpeakerD(2)=1.317; tabSpeakerX(3)=-1.000; tabSpeakerY(3)=-0.562; tabSpeakerZ(3)=-0.202; tabSpeakerD(3)=1.165; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.562; tabSpeakerZ(4)=0.237; tabSpeakerD(4)=1.171; tabSpeakerX(5)=-1.000; tabSpeakerY(5)=-0.562; tabSpeakerZ(5)=0.677; tabSpeakerD(5)=1.332; tabSpeakerX(6)=-0.516; tabSpeakerY(6)=-0.562; tabSpeakerZ(6)=1.000; tabSpeakerD(6)=1.258; tabSpeakerX(7)=-0.002; tabSpeakerY(7)=-0.562; tabSpeakerZ(7)=1.000; tabSpeakerD(7)=1.147; tabSpeakerX(8)=0.472; tabSpeakerY(8)=-0.562; tabSpeakerZ(8)=1.000; tabSpeakerD(8)=1.240; tabSpeakerX(9)=1.000; tabSpeakerY(9)=-0.562; tabSpeakerZ(9)=0.667; tabSpeakerD(9)=1.327; tabSpeakerX(10)=1.000; tabSpeakerY(10)=-0.562; tabSpeakerZ(10)=0.354; tabSpeakerD(10)=1.200; tabSpeakerX(11)=1.000; tabSpeakerY(11)=-0.562; tabSpeakerZ(11)=-0.152; tabSpeakerD(11)=1.157; tabSpeakerX(12)=1.000; tabSpeakerY(12)=-0.562; tabSpeakerZ(12)=-0.606; tabSpeakerD(12)=1.297; tabSpeakerX(13)=0.442; tabSpeakerY(13)=-0.562; tabSpeakerZ(13)=-0.737; tabSpeakerD(13)=1.027; tabSpeakerX(14)=-0.358; tabSpeakerY(14)=0.002; tabSpeakerZ(14)=-0.742; tabSpeakerD(14)=0.824; tabSpeakerX(15)=-0.714; tabSpeakerY(15)=0.002; tabSpeakerZ(15)=-0.540; tabSpeakerD(15)=0.895; tabSpeakerX(16)=-0.699; tabSpeakerY(16)=0.002; tabSpeakerZ(16)=-0.207; tabSpeakerD(16)=0.729; tabSpeakerX(17)=-0.709; tabSpeakerY(17)=0.002; tabSpeakerZ(17)=0.121; tabSpeakerD(17)=0.719; tabSpeakerX(18)=-0.709; tabSpeakerY(18)=0.002; tabSpeakerZ(18)=0.409; tabSpeakerD(18)=0.818; tabSpeakerX(19)=-0.506; tabSpeakerY(19)=0.002; tabSpeakerZ(19)=0.672; tabSpeakerD(19)=0.841; tabSpeakerX(20)=-0.146; tabSpeakerY(20)=0.002; tabSpeakerZ(20)=0.677; tabSpeakerD(20)=0.692; tabSpeakerX(21)=0.215; tabSpeakerY(21)=0.002; tabSpeakerZ(21)=0.692; tabSpeakerD(21)=0.725; tabSpeakerX(22)=0.600; tabSpeakerY(22)=0.002; tabSpeakerZ(22)=0.702; tabSpeakerD(22)=0.923; tabSpeakerX(23)=0.615; tabSpeakerY(23)=0.002; tabSpeakerZ(23)=0.258; tabSpeakerD(23)=0.667; tabSpeakerX(24)=0.615; tabSpeakerY(24)=0.002; tabSpeakerZ(24)=-0.045; tabSpeakerD(24)=0.616; tabSpeakerX(25)=0.610; tabSpeakerY(25)=0.002; tabSpeakerZ(25)=-0.384; tabSpeakerD(25)=0.721; tabSpeakerX(26)=0.111; tabSpeakerY(26)=0.002; tabSpeakerZ(26)=-0.409; tabSpeakerD(26)=0.424; tabSpeakerX(27)=0.116; tabSpeakerY(27)=0.412; tabSpeakerZ(27)=-0.485; tabSpeakerD(27)=0.647; tabSpeakerX(28)=-0.254; tabSpeakerY(28)=0.412; tabSpeakerZ(28)=-0.571; tabSpeakerD(28)=0.748; tabSpeakerX(29)=-0.595; tabSpeakerY(29)=0.412; tabSpeakerZ(29)=-0.409; tabSpeakerD(29)=0.831; tabSpeakerX(30)=-0.595; tabSpeakerY(30)=0.412; tabSpeakerZ(30)=-0.030; tabSpeakerD(30)=0.724; tabSpeakerX(31)=-0.570; tabSpeakerY(31)=0.412; tabSpeakerZ(31)=0.303; tabSpeakerD(31)=0.766; tabSpeakerX(32)=-0.328; tabSpeakerY(32)=0.412; tabSpeakerZ(32)=0.404; tabSpeakerD(32)=0.664; tabSpeakerX(33)=-0.027; tabSpeakerY(33)=0.412; tabSpeakerZ(33)=0.409; tabSpeakerD(33)=0.581; tabSpeakerX(34)=0.264; tabSpeakerY(34)=0.412; tabSpeakerZ(34)=0.354; tabSpeakerD(34)=0.604; tabSpeakerX(35)=0.323; tabSpeakerY(35)=0.412; tabSpeakerZ(35)=-0.056; tabSpeakerD(35)=0.527; tabSpeakerX(36)=0.151; tabSpeakerY(36)=0.769; tabSpeakerZ(36)=-0.237; tabSpeakerD(36)=0.819; tabSpeakerX(37)=-0.091; tabSpeakerY(37)=0.769; tabSpeakerZ(37)=-0.354; tabSpeakerD(37)=0.851; tabSpeakerX(38)=-0.319; tabSpeakerY(38)=0.769; tabSpeakerZ(38)=-0.202; tabSpeakerD(38)=0.857; tabSpeakerX(39)=-0.314; tabSpeakerY(39)=0.769; tabSpeakerZ(39)=0.086; tabSpeakerD(39)=0.835; tabSpeakerX(40)=-0.086; tabSpeakerY(40)=0.769; tabSpeakerZ(40)=0.247; tabSpeakerD(40)=0.812; tabSpeakerX(41)=0.175; tabSpeakerY(41)=0.769; tabSpeakerZ(41)=0.091; tabSpeakerD(41)=0.794; tabSpeakerX(42)=-0.057; tabSpeakerY(42)=1.000; tabSpeakerZ(42)=-0.051; tabSpeakerD(42)=1.003; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,43);
c3cda34fad965f3b5cd5e334be36a182b8ded068f42f4550b8fc729310f3b4c7
grame-cncm/faustdoc
exfaust17.dsp
//############################### violin.dsp ################################### // Faust instrument specifically designed for faust2smartkeyb where a // complete violin physical model can be played using the touch sceen // interface. While the 4 virtual strings can be bowed using a control // surface on the screen, it could be easily substituted with an external // interface. // // ## SmartKeyboard Use Strategy // // 4 keyboards are used to control the pitch of the 4 bowed strings. Strings // are connected to the virtual bow when they are touched. A pad created from // a keybaord with a single key can be used to control the bow velocity and // pressure on the selected strings. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. // However it was specifically designed to be used with faust2smartkeyb. For // best results, we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp // // // ## Version/Licence // // Version 0.0, Aug. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //############################################################################## declare interface "SmartKeyboard{ 'Number of Keyboards':'5', 'Max Keyboard Polyphony':'0', 'Rounding Mode':'2', 'Send Fingers Count':'1', 'Keyboard 0 - Number of Keys':'19', 'Keyboard 1 - Number of Keys':'19', 'Keyboard 2 - Number of Keys':'19', 'Keyboard 3 - Number of Keys':'19', 'Keyboard 4 - Number of Keys':'1', 'Keyboard 0 - Lowest Key':'55', 'Keyboard 1 - Lowest Key':'62', 'Keyboard 2 - Lowest Key':'69', 'Keyboard 3 - Lowest Key':'76', 'Keyboard 0 - Send Keyboard Freq':'1', 'Keyboard 1 - Send Keyboard Freq':'1', 'Keyboard 2 - Send Keyboard Freq':'1', 'Keyboard 3 - Send Keyboard Freq':'1', 'Keyboard 4 - Send Freq':'0', 'Keyboard 4 - Send Key X':'1', 'Keyboard 4 - Send Key Y':'1', 'Keyboard 4 - Key 0 - Label':'Bow', 'Keyboard 4 - Static Mode':'1' }"; import("stdfaust.lib"); // SMARTKEYBOARD PARAMS kbfreq(0) = hslider("kb0freq",220,20,10000,0.01); kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01); kbfreq(1) = hslider("kb1freq",330,20,10000,0.01); kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01); kbfreq(2) = hslider("kb2freq",440,20,10000,0.01); kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01); kbfreq(3) = hslider("kb3freq",550,20,10000,0.01); kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01); kb4k0x = hslider("kb4k0x",0,0,1,1) : si.smoo; kb4k0y = hslider("kb4k0y",0,0,1,1) : si.smoo; kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int; kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int; kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int; kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int; // MODEL PARAMETERS // strings lengths sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo; // string active only if fingers are touching the keyboard as(i) = kbfingers(i)>0; // bow pressure could also be controlled by an external parameter bowPress = kb4k0y; // retrieving finger displacement on screen (dirt simple) bowVel = kb4k0x-kb4k0x' : abs : *(8000) : min(1) : si.smoo; // bow position is constant but could be ontrolled by an external interface bowPos = 0.7; // ASSEMBLING MODELS // essentially 4 parallel violin strings model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _; process = model <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/b4755332f6410785856b2166cd5f9428c4fda4d8/docs/examples/smartKeyboard/exfaust17/exfaust17.dsp
faust
############################### violin.dsp ################################### Faust instrument specifically designed for faust2smartkeyb where a complete violin physical model can be played using the touch sceen interface. While the 4 virtual strings can be bowed using a control surface on the screen, it could be easily substituted with an external interface. ## SmartKeyboard Use Strategy 4 keyboards are used to control the pitch of the 4 bowed strings. Strings are connected to the virtual bow when they are touched. A pad created from a keybaord with a single key can be used to control the bow velocity and pressure on the selected strings. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp ## Version/Licence Version 0.0, Aug. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ############################################################################## SMARTKEYBOARD PARAMS MODEL PARAMETERS strings lengths string active only if fingers are touching the keyboard bow pressure could also be controlled by an external parameter retrieving finger displacement on screen (dirt simple) bow position is constant but could be ontrolled by an external interface ASSEMBLING MODELS essentially 4 parallel violin strings
declare interface "SmartKeyboard{ 'Number of Keyboards':'5', 'Max Keyboard Polyphony':'0', 'Rounding Mode':'2', 'Send Fingers Count':'1', 'Keyboard 0 - Number of Keys':'19', 'Keyboard 1 - Number of Keys':'19', 'Keyboard 2 - Number of Keys':'19', 'Keyboard 3 - Number of Keys':'19', 'Keyboard 4 - Number of Keys':'1', 'Keyboard 0 - Lowest Key':'55', 'Keyboard 1 - Lowest Key':'62', 'Keyboard 2 - Lowest Key':'69', 'Keyboard 3 - Lowest Key':'76', 'Keyboard 0 - Send Keyboard Freq':'1', 'Keyboard 1 - Send Keyboard Freq':'1', 'Keyboard 2 - Send Keyboard Freq':'1', 'Keyboard 3 - Send Keyboard Freq':'1', 'Keyboard 4 - Send Freq':'0', 'Keyboard 4 - Send Key X':'1', 'Keyboard 4 - Send Key Y':'1', 'Keyboard 4 - Key 0 - Label':'Bow', 'Keyboard 4 - Static Mode':'1' }"; import("stdfaust.lib"); kbfreq(0) = hslider("kb0freq",220,20,10000,0.01); kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01); kbfreq(1) = hslider("kb1freq",330,20,10000,0.01); kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01); kbfreq(2) = hslider("kb2freq",440,20,10000,0.01); kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01); kbfreq(3) = hslider("kb3freq",550,20,10000,0.01); kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01); kb4k0x = hslider("kb4k0x",0,0,1,1) : si.smoo; kb4k0y = hslider("kb4k0y",0,0,1,1) : si.smoo; kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int; kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int; kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int; kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int; sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo; as(i) = kbfingers(i)>0; bowPress = kb4k0y; bowVel = kb4k0x-kb4k0x' : abs : *(8000) : min(1) : si.smoo; bowPos = 0.7; model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _; process = model <: _,_;
72843f412ee71d6f1076f2c2e96c7c8da674bc0e544879cb496ed3c9c18f7a5a
dblanchemain/MultiSpace3D
sound4D.dsp
declare name "objMatrixsound4D.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.333; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.453; tabSpeakerX(1)=-0.333; tabSpeakerY(1)=-0.333; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.105; tabSpeakerX(2)=0.333; tabSpeakerY(2)=-0.333; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.105; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.333; tabSpeakerZ(3)=1.000; tabSpeakerD(3)=1.453; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.333; tabSpeakerZ(4)=0.333; tabSpeakerD(4)=1.105; tabSpeakerX(5)=0.333; tabSpeakerY(5)=-0.333; tabSpeakerZ(5)=0.333; tabSpeakerD(5)=0.577; tabSpeakerX(6)=-0.333; tabSpeakerY(6)=-0.333; tabSpeakerZ(6)=0.333; tabSpeakerD(6)=0.577; tabSpeakerX(7)=1.000; tabSpeakerY(7)=-0.333; tabSpeakerZ(7)=0.333; tabSpeakerD(7)=1.105; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.333; tabSpeakerZ(8)=-0.333; tabSpeakerD(8)=1.105; tabSpeakerX(9)=0.333; tabSpeakerY(9)=-0.333; tabSpeakerZ(9)=-0.333; tabSpeakerD(9)=0.577; tabSpeakerX(10)=-0.333; tabSpeakerY(10)=-0.333; tabSpeakerZ(10)=-0.333; tabSpeakerD(10)=0.577; tabSpeakerX(11)=1.000; tabSpeakerY(11)=-0.333; tabSpeakerZ(11)=-0.333; tabSpeakerD(11)=1.105; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-0.333; tabSpeakerZ(12)=-1.000; tabSpeakerD(12)=1.453; tabSpeakerX(13)=0.333; tabSpeakerY(13)=-0.333; tabSpeakerZ(13)=-1.000; tabSpeakerD(13)=1.105; tabSpeakerX(14)=-0.333; tabSpeakerY(14)=-0.333; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.105; tabSpeakerX(15)=1.000; tabSpeakerY(15)=-0.333; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.453; tabSpeakerX(16)=-1.000; tabSpeakerY(16)=0.333; tabSpeakerZ(16)=1.000; tabSpeakerD(16)=1.453; tabSpeakerX(17)=-0.333; tabSpeakerY(17)=0.333; tabSpeakerZ(17)=1.000; tabSpeakerD(17)=1.105; tabSpeakerX(18)=0.333; tabSpeakerY(18)=0.333; tabSpeakerZ(18)=1.000; tabSpeakerD(18)=1.105; tabSpeakerX(19)=1.000; tabSpeakerY(19)=0.333; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.453; tabSpeakerX(20)=-1.000; tabSpeakerY(20)=0.333; tabSpeakerZ(20)=0.333; tabSpeakerD(20)=1.105; tabSpeakerX(21)=0.333; tabSpeakerY(21)=0.333; tabSpeakerZ(21)=0.333; tabSpeakerD(21)=0.577; tabSpeakerX(22)=-0.333; tabSpeakerY(22)=0.333; tabSpeakerZ(22)=0.333; tabSpeakerD(22)=0.577; tabSpeakerX(23)=1.000; tabSpeakerY(23)=0.333; tabSpeakerZ(23)=0.333; tabSpeakerD(23)=1.105; tabSpeakerX(24)=-1.000; tabSpeakerY(24)=0.333; tabSpeakerZ(24)=-0.333; tabSpeakerD(24)=1.105; tabSpeakerX(25)=0.333; tabSpeakerY(25)=0.333; tabSpeakerZ(25)=-0.333; tabSpeakerD(25)=0.577; tabSpeakerX(26)=-0.333; tabSpeakerY(26)=0.333; tabSpeakerZ(26)=-0.333; tabSpeakerD(26)=0.577; tabSpeakerX(27)=1.000; tabSpeakerY(27)=0.333; tabSpeakerZ(27)=-0.333; tabSpeakerD(27)=1.105; tabSpeakerX(28)=-1.000; tabSpeakerY(28)=0.333; tabSpeakerZ(28)=-1.000; tabSpeakerD(28)=1.453; tabSpeakerX(29)=0.333; tabSpeakerY(29)=0.333; tabSpeakerZ(29)=-1.000; tabSpeakerD(29)=1.105; tabSpeakerX(30)=-0.333; tabSpeakerY(30)=0.333; tabSpeakerZ(30)=-1.000; tabSpeakerD(30)=1.105; tabSpeakerX(31)=1.000; tabSpeakerY(31)=0.333; tabSpeakerZ(31)=-1.000; tabSpeakerD(31)=1.453; tabSpeakerX(32)=-1.000; tabSpeakerY(32)=1.000; tabSpeakerZ(32)=1.000; tabSpeakerD(32)=1.732; tabSpeakerX(33)=-0.333; tabSpeakerY(33)=1.000; tabSpeakerZ(33)=1.000; tabSpeakerD(33)=1.453; tabSpeakerX(34)=0.333; tabSpeakerY(34)=1.000; tabSpeakerZ(34)=1.000; tabSpeakerD(34)=1.453; tabSpeakerX(35)=1.000; tabSpeakerY(35)=1.000; tabSpeakerZ(35)=1.000; tabSpeakerD(35)=1.732; tabSpeakerX(36)=-1.000; tabSpeakerY(36)=1.000; tabSpeakerZ(36)=0.333; tabSpeakerD(36)=1.453; tabSpeakerX(37)=0.333; tabSpeakerY(37)=1.000; tabSpeakerZ(37)=0.333; tabSpeakerD(37)=1.105; tabSpeakerX(38)=-0.333; tabSpeakerY(38)=1.000; tabSpeakerZ(38)=0.333; tabSpeakerD(38)=1.105; tabSpeakerX(39)=1.000; tabSpeakerY(39)=1.000; tabSpeakerZ(39)=0.333; tabSpeakerD(39)=1.453; tabSpeakerX(40)=-1.000; tabSpeakerY(40)=1.000; tabSpeakerZ(40)=-0.333; tabSpeakerD(40)=1.453; tabSpeakerX(41)=0.333; tabSpeakerY(41)=1.000; tabSpeakerZ(41)=-0.333; tabSpeakerD(41)=1.105; tabSpeakerX(42)=-0.333; tabSpeakerY(42)=1.000; tabSpeakerZ(42)=-0.333; tabSpeakerD(42)=1.105; tabSpeakerX(43)=1.000; tabSpeakerY(43)=1.000; tabSpeakerZ(43)=-0.333; tabSpeakerD(43)=1.453; tabSpeakerX(44)=-1.000; tabSpeakerY(44)=1.000; tabSpeakerZ(44)=-1.000; tabSpeakerD(44)=1.732; tabSpeakerX(45)=0.333; tabSpeakerY(45)=1.000; tabSpeakerZ(45)=-1.000; tabSpeakerD(45)=1.453; tabSpeakerX(46)=-0.333; tabSpeakerY(46)=1.000; tabSpeakerZ(46)=-1.000; tabSpeakerD(46)=1.453; tabSpeakerX(47)=1.000; tabSpeakerY(47)=1.000; tabSpeakerZ(47)=-1.000; tabSpeakerD(47)=1.732; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,48); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=paramDistance(vslider("LPF Amp",5000, 20, 19980, 1)); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- pwindow=paramDistance(hslider("window (samples)", 1000, 50, 10000, 1)); pxfade=paramDistance(hslider("xfade (samples)", 10, 1, 10000, 1)); pshift=paramDistance(hslider("shift (semitones) ", 0, -12, +12, 0.1)); pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("Transpose",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,48);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/8e87f3812077e5cf008d43e976e6f053d5bc417a/Plugins/DSP/sound4D.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.333; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.453; tabSpeakerX(1)=-0.333; tabSpeakerY(1)=-0.333; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.105; tabSpeakerX(2)=0.333; tabSpeakerY(2)=-0.333; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.105; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.333; tabSpeakerZ(3)=1.000; tabSpeakerD(3)=1.453; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.333; tabSpeakerZ(4)=0.333; tabSpeakerD(4)=1.105; tabSpeakerX(5)=0.333; tabSpeakerY(5)=-0.333; tabSpeakerZ(5)=0.333; tabSpeakerD(5)=0.577; tabSpeakerX(6)=-0.333; tabSpeakerY(6)=-0.333; tabSpeakerZ(6)=0.333; tabSpeakerD(6)=0.577; tabSpeakerX(7)=1.000; tabSpeakerY(7)=-0.333; tabSpeakerZ(7)=0.333; tabSpeakerD(7)=1.105; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.333; tabSpeakerZ(8)=-0.333; tabSpeakerD(8)=1.105; tabSpeakerX(9)=0.333; tabSpeakerY(9)=-0.333; tabSpeakerZ(9)=-0.333; tabSpeakerD(9)=0.577; tabSpeakerX(10)=-0.333; tabSpeakerY(10)=-0.333; tabSpeakerZ(10)=-0.333; tabSpeakerD(10)=0.577; tabSpeakerX(11)=1.000; tabSpeakerY(11)=-0.333; tabSpeakerZ(11)=-0.333; tabSpeakerD(11)=1.105; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-0.333; tabSpeakerZ(12)=-1.000; tabSpeakerD(12)=1.453; tabSpeakerX(13)=0.333; tabSpeakerY(13)=-0.333; tabSpeakerZ(13)=-1.000; tabSpeakerD(13)=1.105; tabSpeakerX(14)=-0.333; tabSpeakerY(14)=-0.333; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.105; tabSpeakerX(15)=1.000; tabSpeakerY(15)=-0.333; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.453; tabSpeakerX(16)=-1.000; tabSpeakerY(16)=0.333; tabSpeakerZ(16)=1.000; tabSpeakerD(16)=1.453; tabSpeakerX(17)=-0.333; tabSpeakerY(17)=0.333; tabSpeakerZ(17)=1.000; tabSpeakerD(17)=1.105; tabSpeakerX(18)=0.333; tabSpeakerY(18)=0.333; tabSpeakerZ(18)=1.000; tabSpeakerD(18)=1.105; tabSpeakerX(19)=1.000; tabSpeakerY(19)=0.333; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.453; tabSpeakerX(20)=-1.000; tabSpeakerY(20)=0.333; tabSpeakerZ(20)=0.333; tabSpeakerD(20)=1.105; tabSpeakerX(21)=0.333; tabSpeakerY(21)=0.333; tabSpeakerZ(21)=0.333; tabSpeakerD(21)=0.577; tabSpeakerX(22)=-0.333; tabSpeakerY(22)=0.333; tabSpeakerZ(22)=0.333; tabSpeakerD(22)=0.577; tabSpeakerX(23)=1.000; tabSpeakerY(23)=0.333; tabSpeakerZ(23)=0.333; tabSpeakerD(23)=1.105; tabSpeakerX(24)=-1.000; tabSpeakerY(24)=0.333; tabSpeakerZ(24)=-0.333; tabSpeakerD(24)=1.105; tabSpeakerX(25)=0.333; tabSpeakerY(25)=0.333; tabSpeakerZ(25)=-0.333; tabSpeakerD(25)=0.577; tabSpeakerX(26)=-0.333; tabSpeakerY(26)=0.333; tabSpeakerZ(26)=-0.333; tabSpeakerD(26)=0.577; tabSpeakerX(27)=1.000; tabSpeakerY(27)=0.333; tabSpeakerZ(27)=-0.333; tabSpeakerD(27)=1.105; tabSpeakerX(28)=-1.000; tabSpeakerY(28)=0.333; tabSpeakerZ(28)=-1.000; tabSpeakerD(28)=1.453; tabSpeakerX(29)=0.333; tabSpeakerY(29)=0.333; tabSpeakerZ(29)=-1.000; tabSpeakerD(29)=1.105; tabSpeakerX(30)=-0.333; tabSpeakerY(30)=0.333; tabSpeakerZ(30)=-1.000; tabSpeakerD(30)=1.105; tabSpeakerX(31)=1.000; tabSpeakerY(31)=0.333; tabSpeakerZ(31)=-1.000; tabSpeakerD(31)=1.453; tabSpeakerX(32)=-1.000; tabSpeakerY(32)=1.000; tabSpeakerZ(32)=1.000; tabSpeakerD(32)=1.732; tabSpeakerX(33)=-0.333; tabSpeakerY(33)=1.000; tabSpeakerZ(33)=1.000; tabSpeakerD(33)=1.453; tabSpeakerX(34)=0.333; tabSpeakerY(34)=1.000; tabSpeakerZ(34)=1.000; tabSpeakerD(34)=1.453; tabSpeakerX(35)=1.000; tabSpeakerY(35)=1.000; tabSpeakerZ(35)=1.000; tabSpeakerD(35)=1.732; tabSpeakerX(36)=-1.000; tabSpeakerY(36)=1.000; tabSpeakerZ(36)=0.333; tabSpeakerD(36)=1.453; tabSpeakerX(37)=0.333; tabSpeakerY(37)=1.000; tabSpeakerZ(37)=0.333; tabSpeakerD(37)=1.105; tabSpeakerX(38)=-0.333; tabSpeakerY(38)=1.000; tabSpeakerZ(38)=0.333; tabSpeakerD(38)=1.105; tabSpeakerX(39)=1.000; tabSpeakerY(39)=1.000; tabSpeakerZ(39)=0.333; tabSpeakerD(39)=1.453; tabSpeakerX(40)=-1.000; tabSpeakerY(40)=1.000; tabSpeakerZ(40)=-0.333; tabSpeakerD(40)=1.453; tabSpeakerX(41)=0.333; tabSpeakerY(41)=1.000; tabSpeakerZ(41)=-0.333; tabSpeakerD(41)=1.105; tabSpeakerX(42)=-0.333; tabSpeakerY(42)=1.000; tabSpeakerZ(42)=-0.333; tabSpeakerD(42)=1.105; tabSpeakerX(43)=1.000; tabSpeakerY(43)=1.000; tabSpeakerZ(43)=-0.333; tabSpeakerD(43)=1.453; tabSpeakerX(44)=-1.000; tabSpeakerY(44)=1.000; tabSpeakerZ(44)=-1.000; tabSpeakerD(44)=1.732; tabSpeakerX(45)=0.333; tabSpeakerY(45)=1.000; tabSpeakerZ(45)=-1.000; tabSpeakerD(45)=1.453; tabSpeakerX(46)=-0.333; tabSpeakerY(46)=1.000; tabSpeakerZ(46)=-1.000; tabSpeakerD(46)=1.453; tabSpeakerX(47)=1.000; tabSpeakerY(47)=1.000; tabSpeakerZ(47)=-1.000; tabSpeakerD(47)=1.732; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=paramDistance(vslider("LPF Amp",5000, 20, 19980, 1)); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); pwindow=paramDistance(hslider("window (samples)", 1000, 50, 10000, 1)); pxfade=paramDistance(hslider("xfade (samples)", 10, 1, 10000, 1)); pshift=paramDistance(hslider("shift (semitones) ", 0, -12, +12, 0.1)); pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("Transpose",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,48);
cfcb6a7ebcb85a37493612af31cf3b87168184ace8430e853c8cd68adebbb719
dblanchemain/MultiSpace3D
sound4D57.dsp
declare name "objMatrixsound4D57.dsp"; // modifier le nom de votre greffon declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.333; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.453; tabSpeakerX(1)=-0.333; tabSpeakerY(1)=-0.333; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.105; tabSpeakerX(2)=0.333; tabSpeakerY(2)=-0.333; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.105; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.333; tabSpeakerZ(3)=1.000; tabSpeakerD(3)=1.453; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.333; tabSpeakerZ(4)=0.333; tabSpeakerD(4)=1.105; tabSpeakerX(5)=0.333; tabSpeakerY(5)=-0.333; tabSpeakerZ(5)=0.333; tabSpeakerD(5)=0.577; tabSpeakerX(6)=-0.333; tabSpeakerY(6)=-0.333; tabSpeakerZ(6)=0.333; tabSpeakerD(6)=0.577; tabSpeakerX(7)=1.000; tabSpeakerY(7)=-0.333; tabSpeakerZ(7)=0.333; tabSpeakerD(7)=1.105; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.333; tabSpeakerZ(8)=-0.333; tabSpeakerD(8)=1.105; tabSpeakerX(9)=0.333; tabSpeakerY(9)=-0.333; tabSpeakerZ(9)=-0.333; tabSpeakerD(9)=0.577; tabSpeakerX(10)=-0.333; tabSpeakerY(10)=-0.333; tabSpeakerZ(10)=-0.333; tabSpeakerD(10)=0.577; tabSpeakerX(11)=1.000; tabSpeakerY(11)=-0.333; tabSpeakerZ(11)=-0.333; tabSpeakerD(11)=1.105; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-0.333; tabSpeakerZ(12)=-1.000; tabSpeakerD(12)=1.453; tabSpeakerX(13)=0.333; tabSpeakerY(13)=-0.333; tabSpeakerZ(13)=-1.000; tabSpeakerD(13)=1.105; tabSpeakerX(14)=-0.333; tabSpeakerY(14)=-0.333; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.105; tabSpeakerX(15)=1.000; tabSpeakerY(15)=-0.333; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.453; tabSpeakerX(16)=-1.000; tabSpeakerY(16)=0.333; tabSpeakerZ(16)=1.000; tabSpeakerD(16)=1.453; tabSpeakerX(17)=-0.333; tabSpeakerY(17)=0.333; tabSpeakerZ(17)=1.000; tabSpeakerD(17)=1.105; tabSpeakerX(18)=0.333; tabSpeakerY(18)=0.333; tabSpeakerZ(18)=1.000; tabSpeakerD(18)=1.105; tabSpeakerX(19)=1.000; tabSpeakerY(19)=0.333; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.453; tabSpeakerX(20)=-1.000; tabSpeakerY(20)=0.333; tabSpeakerZ(20)=0.333; tabSpeakerD(20)=1.105; tabSpeakerX(21)=0.333; tabSpeakerY(21)=0.333; tabSpeakerZ(21)=0.333; tabSpeakerD(21)=0.577; tabSpeakerX(22)=-0.333; tabSpeakerY(22)=0.333; tabSpeakerZ(22)=0.333; tabSpeakerD(22)=0.577; tabSpeakerX(23)=1.000; tabSpeakerY(23)=0.333; tabSpeakerZ(23)=0.333; tabSpeakerD(23)=1.105; tabSpeakerX(24)=-1.000; tabSpeakerY(24)=0.333; tabSpeakerZ(24)=-0.333; tabSpeakerD(24)=1.105; tabSpeakerX(25)=0.333; tabSpeakerY(25)=0.333; tabSpeakerZ(25)=-0.333; tabSpeakerD(25)=0.577; tabSpeakerX(26)=-0.333; tabSpeakerY(26)=0.333; tabSpeakerZ(26)=-0.333; tabSpeakerD(26)=0.577; tabSpeakerX(27)=1.000; tabSpeakerY(27)=0.333; tabSpeakerZ(27)=-0.333; tabSpeakerD(27)=1.105; tabSpeakerX(28)=-1.000; tabSpeakerY(28)=0.333; tabSpeakerZ(28)=-1.000; tabSpeakerD(28)=1.453; tabSpeakerX(29)=0.333; tabSpeakerY(29)=0.333; tabSpeakerZ(29)=-1.000; tabSpeakerD(29)=1.105; tabSpeakerX(30)=-0.333; tabSpeakerY(30)=0.333; tabSpeakerZ(30)=-1.000; tabSpeakerD(30)=1.105; tabSpeakerX(31)=1.000; tabSpeakerY(31)=0.333; tabSpeakerZ(31)=-1.000; tabSpeakerD(31)=1.453; tabSpeakerX(32)=-1.000; tabSpeakerY(32)=1.000; tabSpeakerZ(32)=1.000; tabSpeakerD(32)=1.732; tabSpeakerX(33)=-0.333; tabSpeakerY(33)=1.000; tabSpeakerZ(33)=1.000; tabSpeakerD(33)=1.453; tabSpeakerX(34)=0.333; tabSpeakerY(34)=1.000; tabSpeakerZ(34)=1.000; tabSpeakerD(34)=1.453; tabSpeakerX(35)=1.000; tabSpeakerY(35)=1.000; tabSpeakerZ(35)=1.000; tabSpeakerD(35)=1.732; tabSpeakerX(36)=-1.000; tabSpeakerY(36)=1.000; tabSpeakerZ(36)=0.333; tabSpeakerD(36)=1.453; tabSpeakerX(37)=0.333; tabSpeakerY(37)=1.000; tabSpeakerZ(37)=0.333; tabSpeakerD(37)=1.105; tabSpeakerX(38)=-0.333; tabSpeakerY(38)=1.000; tabSpeakerZ(38)=0.333; tabSpeakerD(38)=1.105; tabSpeakerX(39)=1.000; tabSpeakerY(39)=1.000; tabSpeakerZ(39)=0.333; tabSpeakerD(39)=1.453; tabSpeakerX(40)=-1.000; tabSpeakerY(40)=1.000; tabSpeakerZ(40)=-0.333; tabSpeakerD(40)=1.453; tabSpeakerX(41)=0.333; tabSpeakerY(41)=1.000; tabSpeakerZ(41)=-0.333; tabSpeakerD(41)=1.105; tabSpeakerX(42)=-0.333; tabSpeakerY(42)=1.000; tabSpeakerZ(42)=-0.333; tabSpeakerD(42)=1.105; tabSpeakerX(43)=1.000; tabSpeakerY(43)=1.000; tabSpeakerZ(43)=-0.333; tabSpeakerD(43)=1.453; tabSpeakerX(44)=-1.000; tabSpeakerY(44)=1.000; tabSpeakerZ(44)=-1.000; tabSpeakerD(44)=1.732; tabSpeakerX(45)=0.333; tabSpeakerY(45)=1.000; tabSpeakerZ(45)=-1.000; tabSpeakerD(45)=1.453; tabSpeakerX(46)=-0.333; tabSpeakerY(46)=1.000; tabSpeakerZ(46)=-1.000; tabSpeakerD(46)=1.453; tabSpeakerX(47)=1.000; tabSpeakerY(47)=1.000; tabSpeakerZ(47)=-1.000; tabSpeakerD(47)=1.732; tabSpeakerX(48)=-0.595; tabSpeakerY(48)=-1.000; tabSpeakerZ(48)=0.500; tabSpeakerD(48)=1.267; tabSpeakerX(49)=0.000; tabSpeakerY(49)=-1.000; tabSpeakerZ(49)=0.444; tabSpeakerD(49)=1.094; tabSpeakerX(50)=0.600; tabSpeakerY(50)=-1.000; tabSpeakerZ(50)=0.444; tabSpeakerD(50)=1.248; tabSpeakerX(51)=-0.600; tabSpeakerY(51)=-1.000; tabSpeakerZ(51)=0.000; tabSpeakerD(51)=1.166; tabSpeakerX(52)=0.000; tabSpeakerY(52)=-1.000; tabSpeakerZ(52)=0.000; tabSpeakerD(52)=1.000; tabSpeakerX(53)=0.600; tabSpeakerY(53)=-1.000; tabSpeakerZ(53)=0.000; tabSpeakerD(53)=1.166; tabSpeakerX(54)=-0.600; tabSpeakerY(54)=-1.000; tabSpeakerZ(54)=-0.400; tabSpeakerD(54)=1.233; tabSpeakerX(55)=0.000; tabSpeakerY(55)=-1.000; tabSpeakerZ(55)=-0.444; tabSpeakerD(55)=1.094; tabSpeakerX(56)=0.600; tabSpeakerY(56)=-1.000; tabSpeakerZ(56)=-0.444; tabSpeakerD(56)=1.248; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); process = Matrix(1,57); // le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); //----------------------------------------------------------- // LPF //----------------------------------------------------------- ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); //----------------------------------------------------------- // Pitchshifting //----------------------------------------------------------- paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); //----------------------------------------------------------- // Delay //----------------------------------------------------------- delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); //----------------------------------------------------------- // Freeverb //----------------------------------------------------------- scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,57);
https://raw.githubusercontent.com/dblanchemain/MultiSpace3D/651e16aa196d5084a9779419cb2ba7f50da184e6/Plugins/DSP/sound4D57.dsp
faust
modifier le nom de votre greffon le deuxième chiffre permet de définir la dimension de votre espace :9,10, ... ----------------------------------------------------------- LPF ----------------------------------------------------------- ----------------------------------------------------------- Pitchshifting ----------------------------------------------------------- ----------------------------------------------------------- Delay ----------------------------------------------------------- ----------------------------------------------------------- Freeverb -----------------------------------------------------------
declare version "1.0"; declare author "D.Blanchemain"; declare license "BSD"; declare copyright "(c)D.Blanchemain 2020"; import("stdfaust.lib"); Matrix(N,M) =_*cdistance:filter:transpose:delay:freeverb<: par(out, M, *(Fader(1,out): si.smoo)) :> par(out, M, _) with { tabSpeakerX(0)=-1.000; tabSpeakerY(0)=-0.333; tabSpeakerZ(0)=1.000; tabSpeakerD(0)=1.453; tabSpeakerX(1)=-0.333; tabSpeakerY(1)=-0.333; tabSpeakerZ(1)=1.000; tabSpeakerD(1)=1.105; tabSpeakerX(2)=0.333; tabSpeakerY(2)=-0.333; tabSpeakerZ(2)=1.000; tabSpeakerD(2)=1.105; tabSpeakerX(3)=1.000; tabSpeakerY(3)=-0.333; tabSpeakerZ(3)=1.000; tabSpeakerD(3)=1.453; tabSpeakerX(4)=-1.000; tabSpeakerY(4)=-0.333; tabSpeakerZ(4)=0.333; tabSpeakerD(4)=1.105; tabSpeakerX(5)=0.333; tabSpeakerY(5)=-0.333; tabSpeakerZ(5)=0.333; tabSpeakerD(5)=0.577; tabSpeakerX(6)=-0.333; tabSpeakerY(6)=-0.333; tabSpeakerZ(6)=0.333; tabSpeakerD(6)=0.577; tabSpeakerX(7)=1.000; tabSpeakerY(7)=-0.333; tabSpeakerZ(7)=0.333; tabSpeakerD(7)=1.105; tabSpeakerX(8)=-1.000; tabSpeakerY(8)=-0.333; tabSpeakerZ(8)=-0.333; tabSpeakerD(8)=1.105; tabSpeakerX(9)=0.333; tabSpeakerY(9)=-0.333; tabSpeakerZ(9)=-0.333; tabSpeakerD(9)=0.577; tabSpeakerX(10)=-0.333; tabSpeakerY(10)=-0.333; tabSpeakerZ(10)=-0.333; tabSpeakerD(10)=0.577; tabSpeakerX(11)=1.000; tabSpeakerY(11)=-0.333; tabSpeakerZ(11)=-0.333; tabSpeakerD(11)=1.105; tabSpeakerX(12)=-1.000; tabSpeakerY(12)=-0.333; tabSpeakerZ(12)=-1.000; tabSpeakerD(12)=1.453; tabSpeakerX(13)=0.333; tabSpeakerY(13)=-0.333; tabSpeakerZ(13)=-1.000; tabSpeakerD(13)=1.105; tabSpeakerX(14)=-0.333; tabSpeakerY(14)=-0.333; tabSpeakerZ(14)=-1.000; tabSpeakerD(14)=1.105; tabSpeakerX(15)=1.000; tabSpeakerY(15)=-0.333; tabSpeakerZ(15)=-1.000; tabSpeakerD(15)=1.453; tabSpeakerX(16)=-1.000; tabSpeakerY(16)=0.333; tabSpeakerZ(16)=1.000; tabSpeakerD(16)=1.453; tabSpeakerX(17)=-0.333; tabSpeakerY(17)=0.333; tabSpeakerZ(17)=1.000; tabSpeakerD(17)=1.105; tabSpeakerX(18)=0.333; tabSpeakerY(18)=0.333; tabSpeakerZ(18)=1.000; tabSpeakerD(18)=1.105; tabSpeakerX(19)=1.000; tabSpeakerY(19)=0.333; tabSpeakerZ(19)=1.000; tabSpeakerD(19)=1.453; tabSpeakerX(20)=-1.000; tabSpeakerY(20)=0.333; tabSpeakerZ(20)=0.333; tabSpeakerD(20)=1.105; tabSpeakerX(21)=0.333; tabSpeakerY(21)=0.333; tabSpeakerZ(21)=0.333; tabSpeakerD(21)=0.577; tabSpeakerX(22)=-0.333; tabSpeakerY(22)=0.333; tabSpeakerZ(22)=0.333; tabSpeakerD(22)=0.577; tabSpeakerX(23)=1.000; tabSpeakerY(23)=0.333; tabSpeakerZ(23)=0.333; tabSpeakerD(23)=1.105; tabSpeakerX(24)=-1.000; tabSpeakerY(24)=0.333; tabSpeakerZ(24)=-0.333; tabSpeakerD(24)=1.105; tabSpeakerX(25)=0.333; tabSpeakerY(25)=0.333; tabSpeakerZ(25)=-0.333; tabSpeakerD(25)=0.577; tabSpeakerX(26)=-0.333; tabSpeakerY(26)=0.333; tabSpeakerZ(26)=-0.333; tabSpeakerD(26)=0.577; tabSpeakerX(27)=1.000; tabSpeakerY(27)=0.333; tabSpeakerZ(27)=-0.333; tabSpeakerD(27)=1.105; tabSpeakerX(28)=-1.000; tabSpeakerY(28)=0.333; tabSpeakerZ(28)=-1.000; tabSpeakerD(28)=1.453; tabSpeakerX(29)=0.333; tabSpeakerY(29)=0.333; tabSpeakerZ(29)=-1.000; tabSpeakerD(29)=1.105; tabSpeakerX(30)=-0.333; tabSpeakerY(30)=0.333; tabSpeakerZ(30)=-1.000; tabSpeakerD(30)=1.105; tabSpeakerX(31)=1.000; tabSpeakerY(31)=0.333; tabSpeakerZ(31)=-1.000; tabSpeakerD(31)=1.453; tabSpeakerX(32)=-1.000; tabSpeakerY(32)=1.000; tabSpeakerZ(32)=1.000; tabSpeakerD(32)=1.732; tabSpeakerX(33)=-0.333; tabSpeakerY(33)=1.000; tabSpeakerZ(33)=1.000; tabSpeakerD(33)=1.453; tabSpeakerX(34)=0.333; tabSpeakerY(34)=1.000; tabSpeakerZ(34)=1.000; tabSpeakerD(34)=1.453; tabSpeakerX(35)=1.000; tabSpeakerY(35)=1.000; tabSpeakerZ(35)=1.000; tabSpeakerD(35)=1.732; tabSpeakerX(36)=-1.000; tabSpeakerY(36)=1.000; tabSpeakerZ(36)=0.333; tabSpeakerD(36)=1.453; tabSpeakerX(37)=0.333; tabSpeakerY(37)=1.000; tabSpeakerZ(37)=0.333; tabSpeakerD(37)=1.105; tabSpeakerX(38)=-0.333; tabSpeakerY(38)=1.000; tabSpeakerZ(38)=0.333; tabSpeakerD(38)=1.105; tabSpeakerX(39)=1.000; tabSpeakerY(39)=1.000; tabSpeakerZ(39)=0.333; tabSpeakerD(39)=1.453; tabSpeakerX(40)=-1.000; tabSpeakerY(40)=1.000; tabSpeakerZ(40)=-0.333; tabSpeakerD(40)=1.453; tabSpeakerX(41)=0.333; tabSpeakerY(41)=1.000; tabSpeakerZ(41)=-0.333; tabSpeakerD(41)=1.105; tabSpeakerX(42)=-0.333; tabSpeakerY(42)=1.000; tabSpeakerZ(42)=-0.333; tabSpeakerD(42)=1.105; tabSpeakerX(43)=1.000; tabSpeakerY(43)=1.000; tabSpeakerZ(43)=-0.333; tabSpeakerD(43)=1.453; tabSpeakerX(44)=-1.000; tabSpeakerY(44)=1.000; tabSpeakerZ(44)=-1.000; tabSpeakerD(44)=1.732; tabSpeakerX(45)=0.333; tabSpeakerY(45)=1.000; tabSpeakerZ(45)=-1.000; tabSpeakerD(45)=1.453; tabSpeakerX(46)=-0.333; tabSpeakerY(46)=1.000; tabSpeakerZ(46)=-1.000; tabSpeakerD(46)=1.453; tabSpeakerX(47)=1.000; tabSpeakerY(47)=1.000; tabSpeakerZ(47)=-1.000; tabSpeakerD(47)=1.732; tabSpeakerX(48)=-0.595; tabSpeakerY(48)=-1.000; tabSpeakerZ(48)=0.500; tabSpeakerD(48)=1.267; tabSpeakerX(49)=0.000; tabSpeakerY(49)=-1.000; tabSpeakerZ(49)=0.444; tabSpeakerD(49)=1.094; tabSpeakerX(50)=0.600; tabSpeakerY(50)=-1.000; tabSpeakerZ(50)=0.444; tabSpeakerD(50)=1.248; tabSpeakerX(51)=-0.600; tabSpeakerY(51)=-1.000; tabSpeakerZ(51)=0.000; tabSpeakerD(51)=1.166; tabSpeakerX(52)=0.000; tabSpeakerY(52)=-1.000; tabSpeakerZ(52)=0.000; tabSpeakerD(52)=1.000; tabSpeakerX(53)=0.600; tabSpeakerY(53)=-1.000; tabSpeakerZ(53)=0.000; tabSpeakerD(53)=1.166; tabSpeakerX(54)=-0.600; tabSpeakerY(54)=-1.000; tabSpeakerZ(54)=-0.400; tabSpeakerD(54)=1.233; tabSpeakerX(55)=0.000; tabSpeakerY(55)=-1.000; tabSpeakerZ(55)=-0.444; tabSpeakerD(55)=1.094; tabSpeakerX(56)=0.600; tabSpeakerY(56)=-1.000; tabSpeakerZ(56)=-0.444; tabSpeakerD(56)=1.248; dtencGen(in, out) = sqrt(pow(tabSpeakerX(out)-x(in),2) + pow(tabSpeakerY(out)-y(in),2) + pow(tabSpeakerZ(out)-z(in),2)); hspot = hslider("Hot Spot",-20,-50,0,1); dgain(in, out) = ba.db2linear((hspot/tabSpeakerD(out))*dtencGen(in,out)); x(i) = hslider("/X%i",0,-1,1,0.01); y(i) = hslider("/Y%i",0,-1,1,0.01); z(i) = hslider("/Z%i",0,-1,1,0.01); Fader(in,out)= vgroup("[1]Input %2in",dgain(in,out)); cdistance=hslider("dt",1,0,1,0.1); paramDistance(x)=hgroup("[2]Distance",x); ampfreq=vslider("LPF Amp[unit:Hz]",5000, 20, 19980, 1); rpf=ampfreq:floor; LPF=fi.lowpass(3,rpf); fbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); filter=paramDistance(vgroup("FILTERS",ba.bypass1(fbp,hgroup("[1]",LPF)))); paramPitch(x)=vgroup("[2]Param",x);pwindow=paramPitch(vslider("window (samples)[style:knob]", 1000, 50, 10000, 1)); pxfade=paramPitch(vslider("xfade (samples)[style:knob]", 10, 1, 10000, 1)); pshift=vslider("shift (semitones) ", 0, -12, +12, 0.1):si.smoo; pbp = checkbox("[0] Bypass [tooltip: When this is checked, the filters has no effect]"); transpose=paramDistance(vgroup("TRANSPOSE",ba.bypass1(pbp,hgroup("[1]",ef.transpose(pwindow,pxfade,pshift))))); delay_group(x) = paramDistance(vgroup("[2]DELAY", x)); cbp =delay_group(vgroup("[0]",checkbox("Bypass [tooltip: When this is checked, Delay has no effect]"))); voice = delay_group(vgroup("[1]",(+ : de.sdelay(N, interp, dtime)) ~ *(fback))); N = int(2^19); interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0; fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0; dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 1000, 0.01)*ma.SR/1000.0; delay = ba.bypass1(cbp,voice); scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = ma.SR; g=parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0.3, 1, 0.025)); freeverbMono=_<: (*(g)*fixedgain :re.mono_freeverb(combfeed, allpassfeed, damping, spatSpread)),*(1-g):> _; parameters(x) = paramDistance(hgroup("[3]Freeverb",x)); knobGroup(x) = parameters(vgroup("[1]",x)); fvbp = knobGroup(checkbox("[0] Bypass [tooltip: When this is checked, the freeverb has no effect]")); damping = knobGroup(vslider("[1] Damp [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[2] RoomSize [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[3] Stereo Spread [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR: int); freeverb = ba.bypass1(fvbp,freeverbMono); }; process = Matrix(1,57);
14e8237099f1e035a2d35608cde8604128a2688ed0351b6b2ee6ae44b7dcd835
lliurex/supercollider-sc3-plugins
JPverbRaw.dsp
declare name "JPverbRaw"; declare version "1.1"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); allpass_stretched(maxdel,N,a) = (+ <: de.fdelay1a(maxdel,N-1),*(a)) ~ *(-a) : mem, _ : + ; // using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); // prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) // : rdtable; // gi = 1.618; depth = 50*hslider("mDepth",0.1,0.0,1.0,0.001); freq = hslider("mFreq",2.0,0.0,10.0,0.01); wet = hslider("wet",0.5,0.0,1.0,0.01); low = hslider("lowX",1.0,0.0,1.0,0.01); mid = hslider("midX",1.0,0.0,1.0,0.01); high = hslider("highX",1.0,0.0,1.0,0.01); early_diff = hslider("earlyDiff", 0.707, 0.0 ,0.99,0.001); low_cutoff = hslider("lowBand",500,100.0,6000.0,0.1); high_cutoff = hslider("highBand",2000,1000.0,10000.0,0.1); size = hslider("size",1.0, 0.5,3.0,0.01); T60 = hslider("t60",1.0,0.1,60.0,0.1); damping = hslider("damp",0.0,0.0,0.999,0.0001); calib = 1.7; // Calibration constant given by T60 in seconds when fb = 0.5 total_length = calib*0.1*(size*5/4 -1/4); fb = 10^(-3/((T60)/(total_length))); smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; diffuser(angle,g,scale1,scale2) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale1):smooth_init(0.9999,prime_delays(size*scale1)) -1 ), de.fdelay1a(8192, prime_delays(size*scale2):smooth_init(0.9999,prime_delays(size*scale2)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; reverb = ( ( si.bus(4) :> (de.fdelay4(512, depth + depth*os.oscrs(freq) +5 ),de.fdelay4(512, depth + depth*os.oscrc(freq)+ 5 ) ) : par(i,2,si.smooth(damping)) : diffuser(ma.PI/4,early_diff,55,240) :diffuser(ma.PI/4,early_diff,215,85):diffuser(ma.PI/4,early_diff,115,190):diffuser(ma.PI/4,early_diff,175,145) ) ~( seq(i,5,diffuser(ma.PI/4,0.707,10+30*i,110 + 30*i) ): par(i,2,de.fdelay4(512, depth + (-1^i)*depth*os.oscrc(freq)+5):de.fdelay1a(8192,(prime_delays(size*(54+150*i)):smooth_init(0.995,prime_delays(size*(54+150*i)))) -1 )) : seq(i,5,diffuser(ma.PI/4,0.707,125+30*i, 25+30*i) ): par(i,2,de.fdelay4(8192, depth + (-1^i)*depth*os.oscrs(freq) + 5) : de.fdelay1a(8192,(prime_delays(size*(134-100*i)):smooth_init(0.995,prime_delays(size*(134-100*i)))) -1 )) : par(i,2, fi.filterbank(5,(low_cutoff,high_cutoff) ):(_*(high),_*(mid),_*(low)) :> _ ): par(i,2,*(fb)) )); //Alesis Style 2-channel // with wet control // process = (_,_) <: ((reverb:par(i,2,_*(wet))), par(i,2,_*(1-wet))) :> (_,_); // without wet control process = (_,_) : reverb : (_,_);
https://raw.githubusercontent.com/lliurex/supercollider-sc3-plugins/5fbbc4460f6220e3d9ba32eae4bfb25f542c5f53/source/DEINDUGens/faust_src/JPverbRaw.dsp
faust
using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) : rdtable; gi = 1.618; Calibration constant given by T60 in seconds when fb = 0.5 Alesis Style 2-channel with wet control process = (_,_) <: ((reverb:par(i,2,_*(wet))), par(i,2,_*(1-wet))) :> (_,_); without wet control
declare name "JPverbRaw"; declare version "1.1"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); allpass_stretched(maxdel,N,a) = (+ <: de.fdelay1a(maxdel,N-1),*(a)) ~ *(-a) : mem, _ : + ; prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); depth = 50*hslider("mDepth",0.1,0.0,1.0,0.001); freq = hslider("mFreq",2.0,0.0,10.0,0.01); wet = hslider("wet",0.5,0.0,1.0,0.01); low = hslider("lowX",1.0,0.0,1.0,0.01); mid = hslider("midX",1.0,0.0,1.0,0.01); high = hslider("highX",1.0,0.0,1.0,0.01); early_diff = hslider("earlyDiff", 0.707, 0.0 ,0.99,0.001); low_cutoff = hslider("lowBand",500,100.0,6000.0,0.1); high_cutoff = hslider("highBand",2000,1000.0,10000.0,0.1); size = hslider("size",1.0, 0.5,3.0,0.01); T60 = hslider("t60",1.0,0.1,60.0,0.1); damping = hslider("damp",0.0,0.0,0.999,0.0001); total_length = calib*0.1*(size*5/4 -1/4); fb = 10^(-3/((T60)/(total_length))); smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; diffuser(angle,g,scale1,scale2) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale1):smooth_init(0.9999,prime_delays(size*scale1)) -1 ), de.fdelay1a(8192, prime_delays(size*scale2):smooth_init(0.9999,prime_delays(size*scale2)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; reverb = ( ( si.bus(4) :> (de.fdelay4(512, depth + depth*os.oscrs(freq) +5 ),de.fdelay4(512, depth + depth*os.oscrc(freq)+ 5 ) ) : par(i,2,si.smooth(damping)) : diffuser(ma.PI/4,early_diff,55,240) :diffuser(ma.PI/4,early_diff,215,85):diffuser(ma.PI/4,early_diff,115,190):diffuser(ma.PI/4,early_diff,175,145) ) ~( seq(i,5,diffuser(ma.PI/4,0.707,10+30*i,110 + 30*i) ): par(i,2,de.fdelay4(512, depth + (-1^i)*depth*os.oscrc(freq)+5):de.fdelay1a(8192,(prime_delays(size*(54+150*i)):smooth_init(0.995,prime_delays(size*(54+150*i)))) -1 )) : seq(i,5,diffuser(ma.PI/4,0.707,125+30*i, 25+30*i) ): par(i,2,de.fdelay4(8192, depth + (-1^i)*depth*os.oscrs(freq) + 5) : de.fdelay1a(8192,(prime_delays(size*(134-100*i)):smooth_init(0.995,prime_delays(size*(134-100*i)))) -1 )) : par(i,2, fi.filterbank(5,(low_cutoff,high_cutoff) ):(_*(high),_*(mid),_*(low)) :> _ ): par(i,2,*(fb)) )); process = (_,_) : reverb : (_,_);
b7a8c8cc617f5ec4c63f253ee3062fd74efd958e5659931f03cc33e34ef959eb
OceanSwift/Faust-Course-Examples
Looper With Effects Example.dsp
import("stdfaust.lib"); looper(detune) = rwtable(tablesize,0.0,recIndex,_,readIndex) with{ record = button("Record") : int; readSpeed = hslider("Read Speed",1,0.001,10,0.01); tablesize = 48000; recIndex = +(1)~*(record) : %(tablesize); readIndex = readSpeed*(detune+1)/float(ma.SR) : (+ : ma.decimal) ~ _ : *(float(tablesize)) : int; }; polyLooper = vgroup("[0]Looper",_ <: par(i,nVoices,looper(detune*i)) :> _,_) with{ nVoices = 10; detune = hslider("Detune",0.01,0,1,0.01); }; myFlanger = hgroup("[1]Flanger",pf.flanger_mono(50,flangerOffset,flangerDepth,flangerFb,0)) with{ flangerDepth = hslider("[0]Depth[style:knob]",1,0,2,0.1) : si.smoo; flangerOffset = hslider("[1]Offset[style:knob]",10,10,100,1); flangerFb = hslider("[2]Feedback[style:knob]",0,0,0.95,0.01); }; myEcho = hgroup("[2]Delay",ef.echo(2,delayTime,delayFb)) with{ delayTime = hslider("[0]Time[style:knob]",0.3,0,2,0.01); delayFb = hslider("[1]Feedback[style:knob]",0.5,0,1,0.01); }; process = polyLooper:> myFlanger : myEcho;
https://raw.githubusercontent.com/OceanSwift/Faust-Course-Examples/c3c779ab8257fae9563de4bc09ee71c5346bb1cd/Looper%20With%20Effects%20Example.dsp
faust
import("stdfaust.lib"); looper(detune) = rwtable(tablesize,0.0,recIndex,_,readIndex) with{ record = button("Record") : int; readSpeed = hslider("Read Speed",1,0.001,10,0.01); tablesize = 48000; recIndex = +(1)~*(record) : %(tablesize); readIndex = readSpeed*(detune+1)/float(ma.SR) : (+ : ma.decimal) ~ _ : *(float(tablesize)) : int; }; polyLooper = vgroup("[0]Looper",_ <: par(i,nVoices,looper(detune*i)) :> _,_) with{ nVoices = 10; detune = hslider("Detune",0.01,0,1,0.01); }; myFlanger = hgroup("[1]Flanger",pf.flanger_mono(50,flangerOffset,flangerDepth,flangerFb,0)) with{ flangerDepth = hslider("[0]Depth[style:knob]",1,0,2,0.1) : si.smoo; flangerOffset = hslider("[1]Offset[style:knob]",10,10,100,1); flangerFb = hslider("[2]Feedback[style:knob]",0,0,0.95,0.01); }; myEcho = hgroup("[2]Delay",ef.echo(2,delayTime,delayFb)) with{ delayTime = hslider("[0]Time[style:knob]",0.3,0,2,0.01); delayFb = hslider("[1]Feedback[style:knob]",0.5,0,1,0.01); }; process = polyLooper:> myFlanger : myEcho;
8f634eaf0515388b1aa32d094407b844f5302e018e3d5a411a60077c39aff242
nebularnoise/serge
flanger_demo.dsp
// Author: Thibault Geoffroy import("stdfaust.lib"); process = dm.flanger_demo;
https://raw.githubusercontent.com/nebularnoise/serge/404a84ad02e935b8a6e17ea883229d77513a4d9c/faust/flanger_demo.dsp
faust
Author: Thibault Geoffroy
import("stdfaust.lib"); process = dm.flanger_demo;
b1830f91137dc6819df5b65a65e78fd94ca53b366846a7602bb2782b1eed3425
dblanchemain/metaSurface
flangerFaust.dsp
declare name "flangerFaust"; declare version "0.0"; declare author "JOS, revised by RM"; declare description "Flanger effect application."; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); re = library("reverbs.lib"); en = library("envelopes.lib"); //---------------------------------FLANGER---------------------------- // Flanger effect application. // // #### Usage // // ``` // _: flangerMono : _; // ``` //------------------------------------------------------------ flangerMono =*(level) :pf.flanger_mono(dmax,curdel1,depth,fb,invert) with{ flanger_group(x) = vgroup("FLANGER [tooltip: Reference: https://ccrma.stanford.edu/~jos/pasp/Flanging.html]", x); meter_group(x) = flanger_group(hgroup("[0]", x)); ctl_group(x) = flanger_group(hgroup("[1]", x)); del_group(x) = flanger_group(hgroup("[2] Delay Controls", x)); lvl_group(x) = flanger_group(hgroup("[3]", x)); invert = meter_group(checkbox("[1] Invert Flange Sum")); // FIXME: This should be an amplitude-response display: flangeview = lfor(freq) + lfol(freq) : meter_group(hbargraph("[2] Flange LFO [style: led] [tooltip: Display sum of flange delays]", -1.5,+1.5)); lfol = os.oscrs; lfor = os.oscrc; dmax = 2048; dflange = 0.001 * ma.SR * del_group(hslider("[1] Flange Delay [unit:ms] [style:knob]", 10, 0, 20, 0.001)); odflange = 0.001 * ma.SR * del_group(hslider("[2] Delay Offset [unit:ms] [style:knob]", 1, 0, 20, 0.001)); freq = ctl_group(hslider("[1] Speed [unit:Hz] [style:knob]", 0.5, 0, 10, 0.01)); depth = ctl_group(hslider("[2] Depth [style:knob]", 1, 0, 1, 0.001)); fb = ctl_group(hslider("[3] Feedback [style:knob]", 0, -0.999, 0.999, 0.001)); level = lvl_group(hslider("Flanger Output Level [unit:dB]", 0, -60, 10, 0.1)):ba.db2linear; curdel1 = odflange+dflange*(1 + lfol(freq))/2; curdel2 = odflange+dflange*(1 + lfor(freq))/2; }; process = _: flangerMono : _;
https://raw.githubusercontent.com/dblanchemain/metaSurface/f5695b5b58c0d7b41fd9a899cf5a664184d849c7/Plugins/flangerFaust.dsp
faust
---------------------------------FLANGER---------------------------- Flanger effect application. #### Usage ``` _: flangerMono : _; ``` ------------------------------------------------------------ ccrma.stanford.edu/~jos/pasp/Flanging.html]", x); FIXME: This should be an amplitude-response display:
declare name "flangerFaust"; declare version "0.0"; declare author "JOS, revised by RM"; declare description "Flanger effect application."; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); re = library("reverbs.lib"); en = library("envelopes.lib"); flangerMono =*(level) :pf.flanger_mono(dmax,curdel1,depth,fb,invert) with{ flanger_group(x) = vgroup("FLANGER meter_group(x) = flanger_group(hgroup("[0]", x)); ctl_group(x) = flanger_group(hgroup("[1]", x)); del_group(x) = flanger_group(hgroup("[2] Delay Controls", x)); lvl_group(x) = flanger_group(hgroup("[3]", x)); invert = meter_group(checkbox("[1] Invert Flange Sum")); flangeview = lfor(freq) + lfol(freq) : meter_group(hbargraph("[2] Flange LFO [style: led] [tooltip: Display sum of flange delays]", -1.5,+1.5)); lfol = os.oscrs; lfor = os.oscrc; dmax = 2048; dflange = 0.001 * ma.SR * del_group(hslider("[1] Flange Delay [unit:ms] [style:knob]", 10, 0, 20, 0.001)); odflange = 0.001 * ma.SR * del_group(hslider("[2] Delay Offset [unit:ms] [style:knob]", 1, 0, 20, 0.001)); freq = ctl_group(hslider("[1] Speed [unit:Hz] [style:knob]", 0.5, 0, 10, 0.01)); depth = ctl_group(hslider("[2] Depth [style:knob]", 1, 0, 1, 0.001)); fb = ctl_group(hslider("[3] Feedback [style:knob]", 0, -0.999, 0.999, 0.001)); level = lvl_group(hslider("Flanger Output Level [unit:dB]", 0, -60, 10, 0.1)):ba.db2linear; curdel1 = odflange+dflange*(1 + lfol(freq))/2; curdel2 = odflange+dflange*(1 + lfor(freq))/2; }; process = _: flangerMono : _;
b70ab6b5baf053ff5f15bbdf3d5cd7687fcf26610a0fb3dbfadcdc4ccc039538
orchidas/Music-256A
phaser.dsp
import("stdfaust.lib"); Notches = 4; phase = 0; width = 1000; frqmin = 100; fratio = 1.5; frqmax = 800; speed = hslider("speed",0.5,0,10,0.001) : si.smoo; gain = hslider("gain",1,0,1,0.01) : si.smoo; gate = button("gate"); depth = 1; fb = 0; invert = 0; process = hgroup("phaser", pf.phaser2_mono(Notches,phase, width,frqmin,fratio,frqmax,speed,depth,fb,invert) * gain * gate);
https://raw.githubusercontent.com/orchidas/Music-256A/46c465a3f004a00723088f918106a854af863d08/ofEffectsChain/src/faust/phaser.dsp
faust
import("stdfaust.lib"); Notches = 4; phase = 0; width = 1000; frqmin = 100; fratio = 1.5; frqmax = 800; speed = hslider("speed",0.5,0,10,0.001) : si.smoo; gain = hslider("gain",1,0,1,0.01) : si.smoo; gate = button("gate"); depth = 1; fb = 0; invert = 0; process = hgroup("phaser", pf.phaser2_mono(Notches,phase, width,frqmin,fratio,frqmax,speed,depth,fb,invert) * gain * gate);
76d1784b724ae6300f4a544dcbb94c769f1fcbbe49da4935bcbef244c8377995
grame-cncm/faustide
drumkit.dsp
//------------------------------------------------- // A simple, fully generative // drum machine //------------------------------------------------- import("stdfaust.lib"); drumkit(gate, ks, ss, hs) = k_seq, s_seq, h_seq :> /(3) with { N = outputs(ks); env = en.ar(0.001, 0.05); kick(g) = g : env : *(os.osc(100)); snare(g) = g : env : *(no.noise : fi.low_shelf(-60, 3000)); hihat(g) = g : env : *(no.noise : fi.highpass(3, 10000)); sequencer(t) = t : ba.selectn(N, gate : ba.pulse_countup_loop(N - 1, 1)) : *(gate : mem); k_seq = sequencer(ks) : kick; s_seq = sequencer(ss) : snare; h_seq = sequencer(hs) : hihat; }; drumkit_ui(n) = drumkit(attach(gate, nn), ks, ss, hs) with { gate = ba.pulse(ba.tempo(bpm)); ks = par(i, n, checkbox("v:Drum kit/h:[0]kick/%2i")); ss = par(i, n, checkbox("v:Drum kit/h:[1]snare/%2i")); hs = par(i, n, checkbox("v:Drum kit/h:[2]hihat/%2i")); bpm = hslider("v:Drum kit/[4]BPM", 350, 10, 800, 1); mon = par(i, n, hbargraph("v:Drum kit/h:[3]seq/%2i[style:led]", 0, 1)); nn = 1 : ba.selectoutn(n, gate : ba.pulse_countup_loop(n - 1, 1)) : mon :> _; }; drumkit_ui_demo = drumkit_ui(15) <: (_, _); process = drumkit_ui_demo;
https://raw.githubusercontent.com/grame-cncm/faustide/59a6811339ed460f4653914ece98927b096befde/docs/examples/misc/drumkit.dsp
faust
------------------------------------------------- A simple, fully generative drum machine -------------------------------------------------
import("stdfaust.lib"); drumkit(gate, ks, ss, hs) = k_seq, s_seq, h_seq :> /(3) with { N = outputs(ks); env = en.ar(0.001, 0.05); kick(g) = g : env : *(os.osc(100)); snare(g) = g : env : *(no.noise : fi.low_shelf(-60, 3000)); hihat(g) = g : env : *(no.noise : fi.highpass(3, 10000)); sequencer(t) = t : ba.selectn(N, gate : ba.pulse_countup_loop(N - 1, 1)) : *(gate : mem); k_seq = sequencer(ks) : kick; s_seq = sequencer(ss) : snare; h_seq = sequencer(hs) : hihat; }; drumkit_ui(n) = drumkit(attach(gate, nn), ks, ss, hs) with { gate = ba.pulse(ba.tempo(bpm)); ks = par(i, n, checkbox("v:Drum kit/h:[0]kick/%2i")); ss = par(i, n, checkbox("v:Drum kit/h:[1]snare/%2i")); hs = par(i, n, checkbox("v:Drum kit/h:[2]hihat/%2i")); bpm = hslider("v:Drum kit/[4]BPM", 350, 10, 800, 1); mon = par(i, n, hbargraph("v:Drum kit/h:[3]seq/%2i[style:led]", 0, 1)); nn = 1 : ba.selectoutn(n, gate : ba.pulse_countup_loop(n - 1, 1)) : mon :> _; }; drumkit_ui_demo = drumkit_ui(15) <: (_, _); process = drumkit_ui_demo;
db177c2ec9bf672cb5d02297ea5f7bd783e4a6ba8751481f4a8f75676a0535b0
nicodaleman/brainwave_virtual_instrument
BrainwaveVirtualInstrument.dsp
declare options "[osc:on]"; import("stdfaust.lib"); nChans = 8; master = vslider("master",1,0,12,0.01): si.smoo; start = checkbox("start"): si.smoo ; //pan = hslider("pan",0,0,1,0.01); fm(carrierFreq, modFreq, ratio, index, gain, start, decay, rate, pan) = (os.osc(carrierFreq+os.osc(modFreq*ratio)*index)* en.arfe(0.1, decay, 0, os.lf_imptrain(rate)) * start * gain <: _*(1-pan), _*pan) ; fmSynth(N) = hgroup("Synth",par(i,N,oneChan(i))) with { oneChan(j) = vgroup("[%j]Channel %a", fm(carrierFreq, modFreq, ratio, index, gain, start, decay, rate, pan)) with { a = j+1; // just so that band numbers don't start at 0 carrierFreq = vslider("[1]freq[style:knob]",20+(40*(((a / 2)+0.5):int)),60,4000,0.1): si.smoo; //default,min, max, step modFreq = vslider("[2]modFreq[style:knob]",20+(40*(((a / 2)+0.5):int)),60,4000,0.1): si.smoo; index = vslider("[3]index[style:knob]",100,20,20000,0.1): si.smoo; ratio = vslider("[4]ratio[style:knob]",0.01,0,1,0.01): si.smoo; decay = vslider("[5]decay[style:knob]",0.1,0.1,1,0.01): si.smoo; rate = vslider("[6]rate[style:knob]",1,1,16,1): si.smoo; pan = vslider("[7]pan[style:knob]",0.25+(0.5*(a % 2)),0,1,0.1); gain = vslider("[8]gain",1,0,12,0.01): si.smoo; start = checkbox("[9]start"): si.smoo; }; }; process = hgroup("All", fmSynth(nChans) :> _,_ : vgroup("[99]", dm.freeverb_demo :>_*master*start,_*master*start)); // ://
https://raw.githubusercontent.com/nicodaleman/brainwave_virtual_instrument/705fb147b4f761d9bd528fbe0b2e4ba61678e312/BrainwaveVirtualInstrument.dsp
faust
pan = hslider("pan",0,0,1,0.01); just so that band numbers don't start at 0 default,min, max, step ://
declare options "[osc:on]"; import("stdfaust.lib"); nChans = 8; master = vslider("master",1,0,12,0.01): si.smoo; start = checkbox("start"): si.smoo ; fm(carrierFreq, modFreq, ratio, index, gain, start, decay, rate, pan) = (os.osc(carrierFreq+os.osc(modFreq*ratio)*index)* en.arfe(0.1, decay, 0, os.lf_imptrain(rate)) * start * gain <: _*(1-pan), _*pan) ; fmSynth(N) = hgroup("Synth",par(i,N,oneChan(i))) with { oneChan(j) = vgroup("[%j]Channel %a", fm(carrierFreq, modFreq, ratio, index, gain, start, decay, rate, pan)) with { modFreq = vslider("[2]modFreq[style:knob]",20+(40*(((a / 2)+0.5):int)),60,4000,0.1): si.smoo; index = vslider("[3]index[style:knob]",100,20,20000,0.1): si.smoo; ratio = vslider("[4]ratio[style:knob]",0.01,0,1,0.01): si.smoo; decay = vslider("[5]decay[style:knob]",0.1,0.1,1,0.01): si.smoo; rate = vslider("[6]rate[style:knob]",1,1,16,1): si.smoo; pan = vslider("[7]pan[style:knob]",0.25+(0.5*(a % 2)),0,1,0.1); gain = vslider("[8]gain",1,0,12,0.01): si.smoo; start = checkbox("[9]start"): si.smoo; }; }; process = hgroup("All", fmSynth(nChans) :> _,_ : vgroup("[99]", dm.freeverb_demo :>_*master*start,_*master*start));
159cd82df8f8d5a16632af72e6738869d4cef2a5f8a97bfdebae57b296cb733b
grame-cncm/faustdoc
exfaust9.dsp
//###################################### fm.dsp ########################################## // A simple smart phone percussion abstract sound toy based on an FM synth. // // ## SmartKeyboard Use Strategy // // The idea here is to use the SmartKeyboard interface as an X/Y control pad by just // creating one keyboard with on key and by retrieving the X and Y position on that single // key using the x and y standard parameters. Keyboard mode is deactivated so that // the color of the pad doesn't change when it is pressed. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. However // it was specifically designed to be used with faust2smartkeyb. For best results, // we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] crazyGuiro.dsp // // // ## Version/Licence // // Version 0.0, Feb. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //######################################################################################## declare name "fm"; import("stdfaust.lib"); //========================= Smart Keyboard Configuration ================================= // (1 keyboards with 1 key configured as a pad. //======================================================================================== declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Send Y':'1' }"; //================================ Instrument Parameters ================================= // Creates the connection between the synth and the mobile device //======================================================================================== // SmartKeyboard X parameter x = hslider("x",0,0,1,0.01); // SmartKeyboard Y parameter y = hslider("y",0,0,1,0.01); // SmartKeyboard gate parameter gate = button("gate") ; // mode resonance duration is controlled with the x axis of the accelerometer modFreqRatio = hslider("res[acc: 0 0 -10 0 10]",1,0,2,0.01) : si.smoo; //=================================== Parameters Mapping ================================= //======================================================================================== // carrier frequency minFreq = 80; maxFreq = 500; cFreq = x*(maxFreq-minFreq) + minFreq : si.polySmooth(gate,0.999,1); // modulator frequency modFreq = cFreq*modFreqRatio; // modulation index modIndex = y*1000 : si.smoo; //============================================ DSP ======================================= //======================================================================================== // since the generated sound is pretty chaotic, there is no need for an envelope generator fmSynth = sy.fm((cFreq,modFreq),(modIndex))*(gate : si.smoo)*0.5; process = fmSynth;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust9/exfaust9.dsp
faust
###################################### fm.dsp ########################################## A simple smart phone percussion abstract sound toy based on an FM synth. ## SmartKeyboard Use Strategy The idea here is to use the SmartKeyboard interface as an X/Y control pad by just creating one keyboard with on key and by retrieving the X and Y position on that single key using the x and y standard parameters. Keyboard mode is deactivated so that the color of the pad doesn't change when it is pressed. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] crazyGuiro.dsp ## Version/Licence Version 0.0, Feb. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ######################################################################################## ========================= Smart Keyboard Configuration ================================= (1 keyboards with 1 key configured as a pad. ======================================================================================== ================================ Instrument Parameters ================================= Creates the connection between the synth and the mobile device ======================================================================================== SmartKeyboard X parameter SmartKeyboard Y parameter SmartKeyboard gate parameter mode resonance duration is controlled with the x axis of the accelerometer =================================== Parameters Mapping ================================= ======================================================================================== carrier frequency modulator frequency modulation index ============================================ DSP ======================================= ======================================================================================== since the generated sound is pretty chaotic, there is no need for an envelope generator
declare name "fm"; import("stdfaust.lib"); declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Send Y':'1' }"; x = hslider("x",0,0,1,0.01); y = hslider("y",0,0,1,0.01); gate = button("gate") ; modFreqRatio = hslider("res[acc: 0 0 -10 0 10]",1,0,2,0.01) : si.smoo; minFreq = 80; maxFreq = 500; cFreq = x*(maxFreq-minFreq) + minFreq : si.polySmooth(gate,0.999,1); modFreq = cFreq*modFreqRatio; modIndex = y*1000 : si.smoo; fmSynth = sy.fm((cFreq,modFreq),(modIndex))*(gate : si.smoo)*0.5; process = fmSynth;
82cdc5a874deb037b0ca3d9a0b4925f33b7d3fea1df9e3d22885c277a2ee017a
grame-cncm/faustdoc
exfaust19.dsp
//######################################## vocal.dsp ##################################### // A funny vocal synth app... // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. However // it was specifically designed to be used with faust2smartkeyb. For best results, // we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] vocal.dsp // // // ## Version/Licence // // Version 0.0, Feb. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //######################################################################################## import("stdfaust.lib"); declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Send Freq':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Piano Keyboard':'0' }"; // standard parameters vowel = hslider("vowel[acc: 0 0 -10 0 10]",2,0,4,0.01) : si.smoo; x = hslider("x",0.5,0,1,0.01) : si.smoo; vibrato = hslider("vibrato[acc: 1 0 -10 0 10]",0.05,0,0.1,0.01); gain = hslider("gain",0.25,0,1,0.01); // fomating parameters freq = x*200 + 50; voiceFreq = freq*(os.osc(6)*vibrato+1); process = pm.SFFormantModelBP(1,vowel,0,voiceFreq,gain) <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust19/exfaust19.dsp
faust
######################################## vocal.dsp ##################################### A funny vocal synth app... ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] vocal.dsp ## Version/Licence Version 0.0, Feb. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ######################################################################################## standard parameters fomating parameters
import("stdfaust.lib"); declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Send Freq':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Piano Keyboard':'0' }"; vowel = hslider("vowel[acc: 0 0 -10 0 10]",2,0,4,0.01) : si.smoo; x = hslider("x",0.5,0,1,0.01) : si.smoo; vibrato = hslider("vibrato[acc: 1 0 -10 0 10]",0.05,0,0.1,0.01); gain = hslider("gain",0.25,0,1,0.01); freq = x*200 + 50; voiceFreq = freq*(os.osc(6)*vibrato+1); process = pm.SFFormantModelBP(1,vowel,0,voiceFreq,gain) <: _,_;
1bf549704294cf8af34a7e6061b9f283d7a7286b2d57768dd852032cb57a0be2
grame-cncm/faustdoc
exfaust11.dsp
//######################################## harp.dsp ###################################### // A simple smart phone based harp (if we dare to call it like that). // // ## SmartKeyboard Use Strategy // // Since the sounds generated by this synth are very short, the strategy here is to take // advantage of the polyphony capabilities of the iOSKeyboard architecture by creating // a new voice every time a new key is pressed. Since the SmartKeyboard interface has a // large number of keys here (128), lots of sounds are generated when sliding a // finger across the keyboard. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. However // it was specifically designed to be used with faust2smartkeyb. For best results, // we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] harp.dsp // // // ## Version/Licence // // Version 0.0, Feb. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //######################################################################################## declare name "harp"; import("stdfaust.lib"); //========================= Smart Keyboard Configuration ================================= // (8 keyboards with 16 keys configured as a pitch matrix. //======================================================================================== declare interface "SmartKeyboard{ 'Number of Keyboards':'8', 'Keyboard 0 - Number of Keys':'16', 'Keyboard 1 - Number of Keys':'16', 'Keyboard 2 - Number of Keys':'16', 'Keyboard 3 - Number of Keys':'16', 'Keyboard 4 - Number of Keys':'16', 'Keyboard 5 - Number of Keys':'16', 'Keyboard 6 - Number of Keys':'16', 'Keyboard 7 - Number of Keys':'16', 'Keyboard 0 - Lowest Key':'40', 'Keyboard 1 - Lowest Key':'45', 'Keyboard 2 - Lowest Key':'50', 'Keyboard 3 - Lowest Key':'55', 'Keyboard 4 - Lowest Key':'60', 'Keyboard 5 - Lowest Key':'65', 'Keyboard 6 - Lowest Key':'70', 'Keyboard 7 - Lowest Key':'75', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 2 - Piano Keyboard':'0', 'Keyboard 3 - Piano Keyboard':'0', 'Keyboard 4 - Piano Keyboard':'0', 'Keyboard 5 - Piano Keyboard':'0', 'Keyboard 6 - Piano Keyboard':'0', 'Keyboard 7 - Piano Keyboard':'0' }"; //================================ Instrument Parameters ================================= // Creates the connection between the synth and the mobile device //======================================================================================== // the string resonance in second is controlled by the x axis of the accelerometer res = hslider("res[acc: 0 0 -10 0 10]",2,0.1,4,0.01); // Smart Keyboard frequency parameter freq = hslider("freq",400,50,2000,0.01); // Smart Keyboard gate parameter gate = button("gate"); //=================================== Parameters Mapping ================================= //======================================================================================== stringFreq = freq; //============================================ DSP ======================================= //======================================================================================== process = sy.combString(freq,res,gate);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust11/exfaust11.dsp
faust
######################################## harp.dsp ###################################### A simple smart phone based harp (if we dare to call it like that). ## SmartKeyboard Use Strategy Since the sounds generated by this synth are very short, the strategy here is to take advantage of the polyphony capabilities of the iOSKeyboard architecture by creating a new voice every time a new key is pressed. Since the SmartKeyboard interface has a large number of keys here (128), lots of sounds are generated when sliding a finger across the keyboard. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] harp.dsp ## Version/Licence Version 0.0, Feb. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ######################################################################################## ========================= Smart Keyboard Configuration ================================= (8 keyboards with 16 keys configured as a pitch matrix. ======================================================================================== ================================ Instrument Parameters ================================= Creates the connection between the synth and the mobile device ======================================================================================== the string resonance in second is controlled by the x axis of the accelerometer Smart Keyboard frequency parameter Smart Keyboard gate parameter =================================== Parameters Mapping ================================= ======================================================================================== ============================================ DSP ======================================= ========================================================================================
declare name "harp"; import("stdfaust.lib"); declare interface "SmartKeyboard{ 'Number of Keyboards':'8', 'Keyboard 0 - Number of Keys':'16', 'Keyboard 1 - Number of Keys':'16', 'Keyboard 2 - Number of Keys':'16', 'Keyboard 3 - Number of Keys':'16', 'Keyboard 4 - Number of Keys':'16', 'Keyboard 5 - Number of Keys':'16', 'Keyboard 6 - Number of Keys':'16', 'Keyboard 7 - Number of Keys':'16', 'Keyboard 0 - Lowest Key':'40', 'Keyboard 1 - Lowest Key':'45', 'Keyboard 2 - Lowest Key':'50', 'Keyboard 3 - Lowest Key':'55', 'Keyboard 4 - Lowest Key':'60', 'Keyboard 5 - Lowest Key':'65', 'Keyboard 6 - Lowest Key':'70', 'Keyboard 7 - Lowest Key':'75', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 2 - Piano Keyboard':'0', 'Keyboard 3 - Piano Keyboard':'0', 'Keyboard 4 - Piano Keyboard':'0', 'Keyboard 5 - Piano Keyboard':'0', 'Keyboard 6 - Piano Keyboard':'0', 'Keyboard 7 - Piano Keyboard':'0' }"; res = hslider("res[acc: 0 0 -10 0 10]",2,0.1,4,0.01); freq = hslider("freq",400,50,2000,0.01); gate = button("gate"); stringFreq = freq; process = sy.combString(freq,res,gate);
e2a3e8e5e36428a45b930b174d7174b7549832a1e7d4e21c1478efbb85c3ef9d
grame-cncm/faustdoc
exfaust14.dsp
//##################################### toy.dsp ####################################### // Faust sound toy specifically designed for faust2smartkeyb where a funny // synth can be controlled using several fingers on the screen and the built-in // accelerometer. // // ## SmartKeyboard Use Strategy // // We just want a blank screen where the position of the different fingers on // the screen can be tracked and retrieved in the Faust object. For that, we // create one keyboard with one key, that should fill the screen. We ask the // interface to not compute the freq and bend parameters to save // computation by setting 'Keyboard 0 - Send Freq':'0'. We don't want the // color of the key to change when it is touched so we deactivate the // Piano Keyboard mode. Fingers should be numbered to be able to use the // numbered x and y parameters (x0, y0, x1, etc.), so Count Fingers // is enabled. Finally, by setting Max Keyboard Polyphony to 0, we deactivate // the voice allocation system and we automatically start a voice when the app // is launched. This means that fingers are no longer associated to specific voices. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. However // it was specifically designed to be used with faust2smartkeyb. For best results, // we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] toy.dsp // // // ## Version/Licence // // Version 0.0, Feb. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017: // https://ccrma.stanford.edu/~rmichon // MIT Licence: https://opensource.org/licenses/MIT //######################################################################################## // X/Y interface: one keyboard with one key // freq and bend are not computed // fingers are counted // voice is launched on startup declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Send Freq':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Send Numbered X':'1', 'Keyboard 0 - Send Numbered Y':'1' }"; import("stdfaust.lib"); // parameters x0 = hslider("x0",0.5,0,1,0.01) : si.smoo; y0 = hslider("y0",0.5,0,1,0.01) : si.smoo; y1 = hslider("y1",0,0,1,0.01) : si.smoo; q = hslider("q[acc: 0 0 -10 0 10]",30,10,50,0.01) : si.smoo; del = hslider("del[acc: 0 0 -10 0 10]",0.5,0.01,1,0.01) : si.smoo; fb = hslider("fb[acc: 1 0 -10 0 10]",0.5,0,1,0.01) : si.smoo; // mapping impFreq = 2 + x0*20; resFreq = y0*3000+300; // simple echo effect echo = +~(de.delay(65536,del*ma.SR)*fb); // putting it together process = os.lf_imptrain(impFreq) : fi.resonlp(resFreq,q,1) : echo : ef.cubicnl(y1,0)*0.95 <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust14/exfaust14.dsp
faust
##################################### toy.dsp ####################################### Faust sound toy specifically designed for faust2smartkeyb where a funny synth can be controlled using several fingers on the screen and the built-in accelerometer. ## SmartKeyboard Use Strategy We just want a blank screen where the position of the different fingers on the screen can be tracked and retrieved in the Faust object. For that, we create one keyboard with one key, that should fill the screen. We ask the interface to not compute the freq and bend parameters to save computation by setting 'Keyboard 0 - Send Freq':'0'. We don't want the color of the key to change when it is touched so we deactivate the Piano Keyboard mode. Fingers should be numbered to be able to use the numbered x and y parameters (x0, y0, x1, etc.), so Count Fingers is enabled. Finally, by setting Max Keyboard Polyphony to 0, we deactivate the voice allocation system and we automatically start a voice when the app is launched. This means that fingers are no longer associated to specific voices. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] toy.dsp ## Version/Licence Version 0.0, Feb. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017: https://ccrma.stanford.edu/~rmichon MIT Licence: https://opensource.org/licenses/MIT ######################################################################################## X/Y interface: one keyboard with one key freq and bend are not computed fingers are counted voice is launched on startup parameters mapping simple echo effect putting it together
declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Send Freq':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Send Numbered X':'1', 'Keyboard 0 - Send Numbered Y':'1' }"; import("stdfaust.lib"); x0 = hslider("x0",0.5,0,1,0.01) : si.smoo; y0 = hslider("y0",0.5,0,1,0.01) : si.smoo; y1 = hslider("y1",0,0,1,0.01) : si.smoo; q = hslider("q[acc: 0 0 -10 0 10]",30,10,50,0.01) : si.smoo; del = hslider("del[acc: 0 0 -10 0 10]",0.5,0.01,1,0.01) : si.smoo; fb = hslider("fb[acc: 1 0 -10 0 10]",0.5,0,1,0.01) : si.smoo; impFreq = 2 + x0*20; resFreq = y0*3000+300; echo = +~(de.delay(65536,del*ma.SR)*fb); process = os.lf_imptrain(impFreq) : fi.resonlp(resFreq,q,1) : echo : ef.cubicnl(y1,0)*0.95 <: _,_;
ecd5cdd0c738a96aa886216d0e951e4e021a06eab83e1e87e74fe043e3d7e79d
Corredor1230/varikeyTests
Synthesizer.dsp
import("stdfaust.lib"); //Synth Control declare options "[nvoices:8]"; declare options "[midi:on]"; //Note parameters freq = hgroup("Pitch", nentry("freq",500,200,1000,0.01) : max(20)); vFreq = hgroup("Pitch",vslider("vFreq",0,0,20,0.02):si.smoo); vDepth = hgroup("Pitch", vslider("vDepth[style:knob]",0,0,1,0.001)); pWheel = hgroup("Pitch", hslider("pWheel",0,-1,1,0.001):si.smoo); detune = hgroup("Pitch", hslider("detune[midi: ctrl 1]",0,0,1,0.001)); port = hgroup("Pitch", vslider("port", 10, 0, 1000, 1)) / 1000; pHasRel = hgroup("Pitch", checkbox("pHasRel")); pRel = hgroup("Pitch", vslider("pRel", 10, 0, 5000, 1)) / 1000; //Envelope/Gain parameters gain = hgroup("Envelope", vslider("[5]gain",-60,-60,0,1) : si.smoo: ba.db2linear); gate = button("gate"); vol = vslider("volume", -20, -60, 0, 1) : si.smoo : ba.db2linear; att = hgroup("Envelope", vslider("[1]att", 50, 10, 3000, 1)); dec = hgroup("Envelope", vslider ("[2]dec", 50, 10, 3000, 1)); sus = hgroup("Envelope", vslider ("[3]sus", 0.3, 0, 1, 0.001)); rel = hgroup("Envelope", vslider ("[4]rel", 200, 30, 5000, 1)); //Processing parameters //Tremolo tFreq = vslider("tFreq",0,0,20,0.02):si.smoo; tDepth = vslider("tDepth[style:knob]",0,0,1,0.001); //Filter cutoff = hgroup("Filter", vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo : max(20)); lfoF = hgroup("Filter", vslider("lfoF",0,0,20,0.001)); lfoD = hgroup("Filter", vslider("lfoD[style:knob]",0,0,1,0.01)); filtAtt = hgroup("Filter", vslider("filtAtt", 50, 10, 3000, 1)); filtDec = hgroup("Filter", vslider("filtDec", 50, 10, 3000, 1)); filtSus = hgroup("Filter", vslider("filtSus", 0.5, 0, 1, 0.001)); filtRel = hgroup("Filter", vslider("filtRel", 200, 30, 5000, 1)); filtSw = hgroup("Filter", vslider("filtSw[style:knob]", 0, 0, 1, 1)); //Other controls //Synth switcher switcher = hslider("switcher", 1, 1, 3, 1):max(1); midiNote = ba.hz2midikey(freq):int; //Midi note controls // tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); tuningSliders = vgroup("Tuning", hgroup("[1]Note Tuning", c, ces, d, des, e, f, fes, g, ges, a, as, b)) with{ c = vslider("[1]c", 0, -1, 1, 0.001):si.smoo; ces = vslider("[2]ces", 0, -1, 1, 0.001):si.smoo; d = vslider("[3]d", 0, -1, 1, 0.001):si.smoo; des = vslider("[4]des", 0, -1, 1, 0.001):si.smoo; e = vslider("[5]e", 0, -1, 1, 0.001):si.smoo; f = vslider("[6]f", 0, -1, 1, 0.001):si.smoo; fes = vslider("[7]fes", 0, -1, 1, 0.001):si.smoo; g = vslider("[8]g", 0, -1, 1, 0.001):si.smoo; ges = vslider("[9]ges", 0, -1, 1, 0.001):si.smoo; a = vslider("[]a", 0, -1, 1, 0.001):si.smoo; as = vslider("[]as", 0, -1, 1, 0.001):si.smoo; b = vslider("[]b", 0, -1, 1, 0.001):si.smoo; }; offset = vgroup("Tuning", hslider("offset[2]",0,0,11,1)); // tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); //Identifies the MIDI input note and modifies it accordingly notePitch = noteDifference with{ noteDifference = tuningSliders : par(i, 12, _ * (ma.modulo(midiNote-offset, 12) == i)) :> _; }; //Takes MIDI note and detune value (in cents) and outputs stereo voice. voice(note, detune) = oscillator(note - detune), oscillator(note), oscillator(note + detune) : _ , (_ <: _, _ ), _ : + , + : par(i, 2, _ * 0.5) with { oscillator(note) = (os.sawtooth(thisFreq):_*(switcher == 1)) +(os.square(thisFreq):_*(switcher == 2):_*0.6) +(os.triangle(thisFreq):_*(switcher == 3)) with { thisFreq = ba.midikey2hz(note); }; }; //Creates an LFO to control other parameters. lfo(freq,depth) = os.osc(freq) * depth; lfoCos(freq,depth) = os.osccos(freq) * depth; //Creates an Envelope to control a signal's gain. envelope(att, dec, sus, rel, gate) = _ * en.adsr(attack, decay, sustain, release, gate) with{ attack = att : _ / 1000 : max (0); decay = dec : _ / 1000 : max (0); sustain = sus : max (0) : min (1); release = rel : _ / 1000 : max (0); }; //Creates a Tremolo limited between 0 and 1 to control an instrument's amplitude. tremolo(freq) = _*tremGain with{ tremGain = os.osc(freq) - 1 : _ / 2 : _ * tDepth : _ + 1 : max (0) : min (1); }; //Basic filter signal filter(freq) = fi.lowpass(3, filterFreq) : fi.lowpass(5, 18000) with { filterFreq = freq : min(20000) : max (20); }; filtSwitch(cutoff, lfo, env, switch) = filter((cutoff - lfoCtrl) * (switch == 0) + envCtrl * (switch ==1)) with { // distanceToMax = 20000 - cutoff; distanceToMin = cutoff - 50; lfoCtrl = ((lfo + 1) / 2) * distanceToMin; cutoffMidi = ba.hz2midikey(cutoff); envCtrlMidi = cutoffMidi : env : max(10); envCtrl = ba.midikey2hz(envCtrlMidi); filtCtrl = lfoCtrl * (switch == 0) + envCtrl * (switch ==1); }; //Alters original midi input and adds different pitch control parameters note = midi + vibrato + pWheel + notePitch with{ vibrato = lfo(vFreq, vDepth); hasRelease = ((pHasRel - 1) * 10000) * -1 + pRel; midi = midiNote: _ * en.adsr(port, 0.001, 1, hasRelease, gate); // midi = midiNote; }; masterGain(gain) = _ , _: par(i,2, _*gain); process = voice(note, detune) : hgroup("Processing", par(i,2, envelope(att, dec, sus, rel, gate) : _ / 5.5) : par(i, 2, filtSwitch(cutoff, lfoCos(lfoF, lfoD), envelope(filtAtt, filtDec, filtSus, filtRel, gate), filtSw) : tremolo(tFreq))) : hgroup("Processing", masterGain(vol));
https://raw.githubusercontent.com/Corredor1230/varikeyTests/0dd4a8a3679497ecb0e53af415e0b9ba8e5edd20/SynthTests/Source/Faust/Synthesizer.dsp
faust
Synth Control Note parameters Envelope/Gain parameters Processing parameters Tremolo Filter Other controls Synth switcher Midi note controls tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); Identifies the MIDI input note and modifies it accordingly Takes MIDI note and detune value (in cents) and outputs stereo voice. Creates an LFO to control other parameters. Creates an Envelope to control a signal's gain. Creates a Tremolo limited between 0 and 1 to control an instrument's amplitude. Basic filter signal distanceToMax = 20000 - cutoff; Alters original midi input and adds different pitch control parameters midi = midiNote;
import("stdfaust.lib"); declare options "[nvoices:8]"; declare options "[midi:on]"; freq = hgroup("Pitch", nentry("freq",500,200,1000,0.01) : max(20)); vFreq = hgroup("Pitch",vslider("vFreq",0,0,20,0.02):si.smoo); vDepth = hgroup("Pitch", vslider("vDepth[style:knob]",0,0,1,0.001)); pWheel = hgroup("Pitch", hslider("pWheel",0,-1,1,0.001):si.smoo); detune = hgroup("Pitch", hslider("detune[midi: ctrl 1]",0,0,1,0.001)); port = hgroup("Pitch", vslider("port", 10, 0, 1000, 1)) / 1000; pHasRel = hgroup("Pitch", checkbox("pHasRel")); pRel = hgroup("Pitch", vslider("pRel", 10, 0, 5000, 1)) / 1000; gain = hgroup("Envelope", vslider("[5]gain",-60,-60,0,1) : si.smoo: ba.db2linear); gate = button("gate"); vol = vslider("volume", -20, -60, 0, 1) : si.smoo : ba.db2linear; att = hgroup("Envelope", vslider("[1]att", 50, 10, 3000, 1)); dec = hgroup("Envelope", vslider ("[2]dec", 50, 10, 3000, 1)); sus = hgroup("Envelope", vslider ("[3]sus", 0.3, 0, 1, 0.001)); rel = hgroup("Envelope", vslider ("[4]rel", 200, 30, 5000, 1)); tFreq = vslider("tFreq",0,0,20,0.02):si.smoo; tDepth = vslider("tDepth[style:knob]",0,0,1,0.001); cutoff = hgroup("Filter", vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo : max(20)); lfoF = hgroup("Filter", vslider("lfoF",0,0,20,0.001)); lfoD = hgroup("Filter", vslider("lfoD[style:knob]",0,0,1,0.01)); filtAtt = hgroup("Filter", vslider("filtAtt", 50, 10, 3000, 1)); filtDec = hgroup("Filter", vslider("filtDec", 50, 10, 3000, 1)); filtSus = hgroup("Filter", vslider("filtSus", 0.5, 0, 1, 0.001)); filtRel = hgroup("Filter", vslider("filtRel", 200, 30, 5000, 1)); filtSw = hgroup("Filter", vslider("filtSw[style:knob]", 0, 0, 1, 1)); switcher = hslider("switcher", 1, 1, 3, 1):max(1); midiNote = ba.hz2midikey(freq):int; tuningSliders = vgroup("Tuning", hgroup("[1]Note Tuning", c, ces, d, des, e, f, fes, g, ges, a, as, b)) with{ c = vslider("[1]c", 0, -1, 1, 0.001):si.smoo; ces = vslider("[2]ces", 0, -1, 1, 0.001):si.smoo; d = vslider("[3]d", 0, -1, 1, 0.001):si.smoo; des = vslider("[4]des", 0, -1, 1, 0.001):si.smoo; e = vslider("[5]e", 0, -1, 1, 0.001):si.smoo; f = vslider("[6]f", 0, -1, 1, 0.001):si.smoo; fes = vslider("[7]fes", 0, -1, 1, 0.001):si.smoo; g = vslider("[8]g", 0, -1, 1, 0.001):si.smoo; ges = vslider("[9]ges", 0, -1, 1, 0.001):si.smoo; a = vslider("[]a", 0, -1, 1, 0.001):si.smoo; as = vslider("[]as", 0, -1, 1, 0.001):si.smoo; b = vslider("[]b", 0, -1, 1, 0.001):si.smoo; }; offset = vgroup("Tuning", hslider("offset[2]",0,0,11,1)); notePitch = noteDifference with{ noteDifference = tuningSliders : par(i, 12, _ * (ma.modulo(midiNote-offset, 12) == i)) :> _; }; voice(note, detune) = oscillator(note - detune), oscillator(note), oscillator(note + detune) : _ , (_ <: _, _ ), _ : + , + : par(i, 2, _ * 0.5) with { oscillator(note) = (os.sawtooth(thisFreq):_*(switcher == 1)) +(os.square(thisFreq):_*(switcher == 2):_*0.6) +(os.triangle(thisFreq):_*(switcher == 3)) with { thisFreq = ba.midikey2hz(note); }; }; lfo(freq,depth) = os.osc(freq) * depth; lfoCos(freq,depth) = os.osccos(freq) * depth; envelope(att, dec, sus, rel, gate) = _ * en.adsr(attack, decay, sustain, release, gate) with{ attack = att : _ / 1000 : max (0); decay = dec : _ / 1000 : max (0); sustain = sus : max (0) : min (1); release = rel : _ / 1000 : max (0); }; tremolo(freq) = _*tremGain with{ tremGain = os.osc(freq) - 1 : _ / 2 : _ * tDepth : _ + 1 : max (0) : min (1); }; filter(freq) = fi.lowpass(3, filterFreq) : fi.lowpass(5, 18000) with { filterFreq = freq : min(20000) : max (20); }; filtSwitch(cutoff, lfo, env, switch) = filter((cutoff - lfoCtrl) * (switch == 0) + envCtrl * (switch ==1)) with { distanceToMin = cutoff - 50; lfoCtrl = ((lfo + 1) / 2) * distanceToMin; cutoffMidi = ba.hz2midikey(cutoff); envCtrlMidi = cutoffMidi : env : max(10); envCtrl = ba.midikey2hz(envCtrlMidi); filtCtrl = lfoCtrl * (switch == 0) + envCtrl * (switch ==1); }; note = midi + vibrato + pWheel + notePitch with{ vibrato = lfo(vFreq, vDepth); hasRelease = ((pHasRel - 1) * 10000) * -1 + pRel; midi = midiNote: _ * en.adsr(port, 0.001, 1, hasRelease, gate); }; masterGain(gain) = _ , _: par(i,2, _*gain); process = voice(note, detune) : hgroup("Processing", par(i,2, envelope(att, dec, sus, rel, gate) : _ / 5.5) : par(i, 2, filtSwitch(cutoff, lfoCos(lfoF, lfoD), envelope(filtAtt, filtDec, filtSus, filtRel, gate), filtSw) : tremolo(tFreq))) : hgroup("Processing", masterGain(vol));
9369dc004607df055a3b6d288c91e5ae0489a2a25c231afb029f0c4a0054fcda
Corredor1230/varikeyTests
Synthesizer.dsp
import("stdfaust.lib"); //Synth Control //Note parameters freq = hgroup("Pitch", nentry("freq[style:knob]",500,200,1000,0.01) : max(20)); vFreq = hgroup("Pitch",vslider("vFreq",0,0,20,0.02):si.smoo); vDepth = hgroup("Pitch", vslider("vDepth[style:knob]",0,0,1,0.001)); pWheel = hgroup("Pitch", hslider("pWheel",0,-1,1,0.001):si.smoo); detune = hgroup("Pitch", hslider("detune[midi: ctrl 1]",0,0,1,0.001)); //Envelope/Gain parameters gain = hgroup("Envelope", vslider("[5]gain",-60,-60,0,1) : si.smoo: ba.db2linear); gate = button("gate"); att = hgroup("Envelope", vslider("[1]att", 50, 10, 3000, 1)); dec = hgroup("Envelope", vslider ("[2]dec", 50, 10, 3000, 1)); sus = hgroup("Envelope", vslider ("[3]sus", 0.3, 0, 1, 0.001)); rel = hgroup("Envelope", vslider ("[4]rel", 200, 30, 5000, 1)); //Processing parameters //Tremolo tFreq = vslider("tFreq",0,0,20,0.02):si.smoo; tDepth = vslider("tDepth[style:knob]",0,0,1,0.001); //Filter cutoff = hgroup("Filter", vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo : max(20)); lfoF = hgroup("Filter", vslider("lfoF",0,0,20,0.001)); lfoD = hgroup("Filter", vslider("lfoD[style:knob]",0,0,1,0.01)); midiNote = ba.hz2midikey(freq):int; //Midi note controls // tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); tuningSliders = vgroup("Tuning", hgroup("[1]Note Tuning", c, ces, d, des, e, f, fes, g, ges, a, as, b)) with{ c = vslider("[1]c", 0, -1, 1, 0.001):si.smoo; ces = vslider("[2]ces", 0, -1, 1, 0.001):si.smoo; d = vslider("[3]d", 0, -1, 1, 0.001):si.smoo; des = vslider("[4]des", 0, -1, 1, 0.001):si.smoo; e = vslider("[5]e", 0, -1, 1, 0.001):si.smoo; f = vslider("[6]f", 0, -1, 1, 0.001):si.smoo; fes = vslider("[7]fes", 0, -1, 1, 0.001):si.smoo; g = vslider("[8]g", 0, -1, 1, 0.001):si.smoo; ges = vslider("[9]ges", 0, -1, 1, 0.001):si.smoo; a = vslider("[]a", 0, -1, 1, 0.001):si.smoo; as = vslider("[]as", 0, -1, 1, 0.001):si.smoo; b = vslider("[]b", 0, -1, 1, 0.001):si.smoo; }; offset = vgroup("Tuning", hslider("offset[2]",0,0,11,1)); // tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); //Identifies the MIDI input note and modifies it accordingly notePitch = noteDifference with{ noteDifference = tuningSliders : par(i, 12, _ * (ma.modulo(midiNote-offset, 12) == i)) :> _; }; //Takes MIDI note and detune value (in cents) and outputs stereo voice. voice(note, detune) = oscillator(note - detune), oscillator(note), oscillator(note + detune) : _ , (_ <: _, _ ), _ : + , + : par(i, 2, _ * 0.5) with { oscillator(note) = os.sawtooth(thisFreq) with { thisFreq = ba.midikey2hz(note); }; }; //Creates an LFO to control other parameters. lfo(freq,depth) = os.osc(freq) * depth; //Creates an Envelope to control a signal's gain. envelope(att, dec, sus, rel, gate) = _ * en.adsr(attack, decay, sustain, release, gate) : _ * gate : _ / 5.5 with{ attack = att : _ / 1000 : max (0); decay = dec : _ / 1000 : max (0); sustain = sus : max (0) : min (1); release = rel : _ / 1000 : max (0); }; //Creates a Tremolo limited between 0 and 1 to control an instrument's amplitude. tremolo(freq) = _*tremGain with{ tremGain = os.osc(freq) - 1 : _ / 2 : _ * tDepth : _ + 1 : max (0) : min (1); }; //Basic filter signal filter(freq) = fi.lowpass(3, filterFreq) : fi.lowpass(5, 18000) with { filterFreq = freq : min(20000) : max (20); }; //Variable band limited filter signal for LFO control lfoFilter(cutoff, lfo) = filter(cutoff+lfoVariation) with{ distanceToMax = 18000 - cutoff; distanceToMin = cutoff - 50; lfoVariation = lfo : _ * (distanceToMax, distanceToMin : min); }; //Alters original midi input and adds different pitch control parameters note = midiNote + vibrato + pWheel + notePitch with{ vibrato = lfo(vFreq, vDepth); }; masterGain(gain) = _ , _: par(i,2, _*gain); process = voice(note, detune) : hgroup("Processing", par(i,2, envelope(att, dec, sus, rel, gate)) : par(i, 2, lfoFilter(cutoff, lfo(lfoF, lfoD)) : tremolo(tFreq))) : hgroup("Processing", masterGain(gain));
https://raw.githubusercontent.com/Corredor1230/varikeyTests/90f3a627aa1974bede873979b98268e0ea1b4c6a/Faust/Synthesizer.dsp
faust
Synth Control Note parameters Envelope/Gain parameters Processing parameters Tremolo Filter Midi note controls tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); Identifies the MIDI input note and modifies it accordingly Takes MIDI note and detune value (in cents) and outputs stereo voice. Creates an LFO to control other parameters. Creates an Envelope to control a signal's gain. Creates a Tremolo limited between 0 and 1 to control an instrument's amplitude. Basic filter signal Variable band limited filter signal for LFO control Alters original midi input and adds different pitch control parameters
import("stdfaust.lib"); freq = hgroup("Pitch", nentry("freq[style:knob]",500,200,1000,0.01) : max(20)); vFreq = hgroup("Pitch",vslider("vFreq",0,0,20,0.02):si.smoo); vDepth = hgroup("Pitch", vslider("vDepth[style:knob]",0,0,1,0.001)); pWheel = hgroup("Pitch", hslider("pWheel",0,-1,1,0.001):si.smoo); detune = hgroup("Pitch", hslider("detune[midi: ctrl 1]",0,0,1,0.001)); gain = hgroup("Envelope", vslider("[5]gain",-60,-60,0,1) : si.smoo: ba.db2linear); gate = button("gate"); att = hgroup("Envelope", vslider("[1]att", 50, 10, 3000, 1)); dec = hgroup("Envelope", vslider ("[2]dec", 50, 10, 3000, 1)); sus = hgroup("Envelope", vslider ("[3]sus", 0.3, 0, 1, 0.001)); rel = hgroup("Envelope", vslider ("[4]rel", 200, 30, 5000, 1)); tFreq = vslider("tFreq",0,0,20,0.02):si.smoo; tDepth = vslider("tDepth[style:knob]",0,0,1,0.001); cutoff = hgroup("Filter", vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo : max(20)); lfoF = hgroup("Filter", vslider("lfoF",0,0,20,0.001)); lfoD = hgroup("Filter", vslider("lfoD[style:knob]",0,0,1,0.01)); midiNote = ba.hz2midikey(freq):int; tuningSliders = vgroup("Tuning", hgroup("[1]Note Tuning", c, ces, d, des, e, f, fes, g, ges, a, as, b)) with{ c = vslider("[1]c", 0, -1, 1, 0.001):si.smoo; ces = vslider("[2]ces", 0, -1, 1, 0.001):si.smoo; d = vslider("[3]d", 0, -1, 1, 0.001):si.smoo; des = vslider("[4]des", 0, -1, 1, 0.001):si.smoo; e = vslider("[5]e", 0, -1, 1, 0.001):si.smoo; f = vslider("[6]f", 0, -1, 1, 0.001):si.smoo; fes = vslider("[7]fes", 0, -1, 1, 0.001):si.smoo; g = vslider("[8]g", 0, -1, 1, 0.001):si.smoo; ges = vslider("[9]ges", 0, -1, 1, 0.001):si.smoo; a = vslider("[]a", 0, -1, 1, 0.001):si.smoo; as = vslider("[]as", 0, -1, 1, 0.001):si.smoo; b = vslider("[]b", 0, -1, 1, 0.001):si.smoo; }; offset = vgroup("Tuning", hslider("offset[2]",0,0,11,1)); notePitch = noteDifference with{ noteDifference = tuningSliders : par(i, 12, _ * (ma.modulo(midiNote-offset, 12) == i)) :> _; }; voice(note, detune) = oscillator(note - detune), oscillator(note), oscillator(note + detune) : _ , (_ <: _, _ ), _ : + , + : par(i, 2, _ * 0.5) with { oscillator(note) = os.sawtooth(thisFreq) with { thisFreq = ba.midikey2hz(note); }; }; lfo(freq,depth) = os.osc(freq) * depth; envelope(att, dec, sus, rel, gate) = _ * en.adsr(attack, decay, sustain, release, gate) : _ * gate : _ / 5.5 with{ attack = att : _ / 1000 : max (0); decay = dec : _ / 1000 : max (0); sustain = sus : max (0) : min (1); release = rel : _ / 1000 : max (0); }; tremolo(freq) = _*tremGain with{ tremGain = os.osc(freq) - 1 : _ / 2 : _ * tDepth : _ + 1 : max (0) : min (1); }; filter(freq) = fi.lowpass(3, filterFreq) : fi.lowpass(5, 18000) with { filterFreq = freq : min(20000) : max (20); }; lfoFilter(cutoff, lfo) = filter(cutoff+lfoVariation) with{ distanceToMax = 18000 - cutoff; distanceToMin = cutoff - 50; lfoVariation = lfo : _ * (distanceToMax, distanceToMin : min); }; note = midiNote + vibrato + pWheel + notePitch with{ vibrato = lfo(vFreq, vDepth); }; masterGain(gain) = _ , _: par(i,2, _*gain); process = voice(note, detune) : hgroup("Processing", par(i,2, envelope(att, dec, sus, rel, gate)) : par(i, 2, lfoFilter(cutoff, lfo(lfoF, lfoD)) : tremolo(tFreq))) : hgroup("Processing", masterGain(gain));
1188d2d22947e1d60837fd96d1f4fdb08c23fb5539c2a2b975bbf39cf11ff4a0
Corredor1230/varikeyTests
synthesizer.dsp
import("stdfaust.lib"); import("parameters.dsp"); //Synth Control //Note parameters freq = hgroup("Pitch", nentry("freq[style:knob]",500,200,1000,0.01) : max(20)); vibFreq = hgroup("Pitch",vslider("vibFreq",0,0,20,0.02):si.smoo); vibDepth = hgroup("Pitch", vslider("vibDepth[style:knob]",0,0,1,0.001)); pitchWheel = hgroup("Pitch", hslider("pitchWheel",0,-1,1,0.001):si.smoo); detune = hgroup("Pitch", hslider("detune[midi: ctrl 1]",0,0,1,0.001)); //Envelope/Gain parameters gain = hgroup("Envelope", vslider("[5]gain",-60,-60,0,1) : si.smoo: ba.db2linear); gate = button("gate"); attack = hgroup("Envelope", vslider("[1]attack", 50, 10, 3000, 1)); decay = hgroup("Envelope", vslider ("[2]decay", 50, 10, 3000, 1)); sustain = hgroup("Envelope", vslider ("[3]sustain", 0.3, 0, 1, 0.001)); release = hgroup("Envelope", vslider ("[4]release", 200, 30, 5000, 1)); //Processing parameters //Tremolo tremFreq = vslider("tremFreq",0,0,20,0.02):si.smoo; tremDepth = vslider("tremDepth[style:knob]",0,0,1,0.001); //Filter cutoff = hgroup("Filter", vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo : max(20)); lfoFreq = hgroup("Filter", vslider("lfoFreq",0,0,20,0.001)); lfoDepth = hgroup("Filter", vslider("lfoDepth[style:knob]",0,0,1,0.01)); midiNote = ba.hz2midikey(freq):int; //Midi note controls // tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); tuningSliders = vgroup("Tuning", hgroup("[1]Note Tuning", cSlider, cesSlider, dSlider, desSlider, eSlider, fSlider, fesSlider, gSlider, gesSlider, aSlider, asSlider, bSlider)) with{ cSlider = vslider("[1]C", 0, -1, 1, 0.001):si.smoo; cesSlider = vslider("[2]C#/Db", 0, -1, 1, 0.001):si.smoo; dSlider = vslider("[3]D", 0, -1, 1, 0.001):si.smoo; desSlider = vslider("[4]D#/Eb", 0, -1, 1, 0.001):si.smoo; eSlider = vslider("[5]E", 0, -1, 1, 0.001):si.smoo; fSlider = vslider("[6]F", 0, -1, 1, 0.001):si.smoo; fesSlider = vslider("[7]F#/Gb", 0, -1, 1, 0.001):si.smoo; gSlider = vslider("[8]G", 0, -1, 1, 0.001):si.smoo; gesSlider = vslider("[9]G#/Ab", 0, -1, 1, 0.001):si.smoo; aSlider = vslider("[]A", 0, -1, 1, 0.001):si.smoo; asSlider = vslider("[]A#/Bb", 0, -1, 1, 0.001):si.smoo; bSlider = vslider("[]B", 0, -1, 1, 0.001):si.smoo; }; offset = vgroup("Tuning", hslider("offset[2]",0,0,11,1)); // tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); //Identifies the MIDI input note and modifies it accordingly notePitch = noteDifference with{ noteDifference = tuningSliders : par(i, 12, _ * (ma.modulo(midiNote-offset, 12) == i)) :> _; }; //Takes MIDI note and detune value (in cents) and outputs stereo voice. voice(note, detune) = oscillator(note - detune), oscillator(note), oscillator(note + detune) : _ , (_ <: _, _ ), _ : + , + : par(i, 2, _ * 0.5) with { oscillator(note) = os.sawtooth(thisFreq) with { thisFreq = ba.midikey2hz(note); }; }; //Creates an LFO to control other parameters. lfo(freq,depth) = os.osc(freq) * depth; //Creates an Envelope to control a signal's gain. envelope(att, dec, sus, rel, gate) = _ * en.adsr(attackTime, decayTime, sustain, release, gate) : _ * gate : _ / 5.5 with{ attackTime = att : _ / 1000 : max (0); decayTime = dec : _ / 1000 : max (0); sustain = sus : max (0) : min (1); release = rel : _ / 1000 : max (0); }; //Creates a Tremolo limited between 0 and 1 to control an instrument's amplitude. tremolo(freq) = _*tremGain with{ tremGain = os.osc(freq) - 1 : _ / 2 : _ * tremDepth : _ + 1 : max (0) : min (1); }; //Basic filter signal filter(freq) = fi.lowpass(3, filterFreq) : fi.lowpass(5, 18000) with { filterFreq = freq : min(20000) : max (20); }; //Variable band limited filter signal for LFO control lfoFilter(cutoff, lfo) = filter(cutoff+lfoVariation) with{ distanceToMax = 18000 - cutoff; distanceToMin = cutoff - 50; lfoVariation = lfo : _ * (distanceToMax, distanceToMin : min); }; //Alters original midi input and adds different pitch control parameters note = midiNote + vibrato + pitchWheel + notePitch with{ vibrato = lfo(vibFreq, vibDepth); }; masterGain(gain) = _ , _: par(i,2, _*gain); process = voice(note, detune) : hgroup("Processing", // par(i,2, envelope(attack, decay, sustain, release, gate)) : par(i, 2, lfoFilter(cutoff, lfo(lfoFreq, lfoDepth)) : tremolo(tremFreq))) : hgroup("Processing", masterGain(gain*gate));
https://raw.githubusercontent.com/Corredor1230/varikeyTests/5ee7586a25ecab456be43298027f8f6d0145a92d/SynthTests/Source/Faust/Outdated/synthesizer.dsp
faust
Synth Control Note parameters Envelope/Gain parameters Processing parameters Tremolo Filter Midi note controls tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); tuningSliders = hgroup("Note tuning", par(i, 12, vslider("tune", 0, -1, 1, 0.001))); Identifies the MIDI input note and modifies it accordingly Takes MIDI note and detune value (in cents) and outputs stereo voice. Creates an LFO to control other parameters. Creates an Envelope to control a signal's gain. Creates a Tremolo limited between 0 and 1 to control an instrument's amplitude. Basic filter signal Variable band limited filter signal for LFO control Alters original midi input and adds different pitch control parameters par(i,2, envelope(attack, decay, sustain, release, gate)) :
import("stdfaust.lib"); import("parameters.dsp"); freq = hgroup("Pitch", nentry("freq[style:knob]",500,200,1000,0.01) : max(20)); vibFreq = hgroup("Pitch",vslider("vibFreq",0,0,20,0.02):si.smoo); vibDepth = hgroup("Pitch", vslider("vibDepth[style:knob]",0,0,1,0.001)); pitchWheel = hgroup("Pitch", hslider("pitchWheel",0,-1,1,0.001):si.smoo); detune = hgroup("Pitch", hslider("detune[midi: ctrl 1]",0,0,1,0.001)); gain = hgroup("Envelope", vslider("[5]gain",-60,-60,0,1) : si.smoo: ba.db2linear); gate = button("gate"); attack = hgroup("Envelope", vslider("[1]attack", 50, 10, 3000, 1)); decay = hgroup("Envelope", vslider ("[2]decay", 50, 10, 3000, 1)); sustain = hgroup("Envelope", vslider ("[3]sustain", 0.3, 0, 1, 0.001)); release = hgroup("Envelope", vslider ("[4]release", 200, 30, 5000, 1)); tremFreq = vslider("tremFreq",0,0,20,0.02):si.smoo; tremDepth = vslider("tremDepth[style:knob]",0,0,1,0.001); cutoff = hgroup("Filter", vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo : max(20)); lfoFreq = hgroup("Filter", vslider("lfoFreq",0,0,20,0.001)); lfoDepth = hgroup("Filter", vslider("lfoDepth[style:knob]",0,0,1,0.01)); midiNote = ba.hz2midikey(freq):int; tuningSliders = vgroup("Tuning", hgroup("[1]Note Tuning", cSlider, cesSlider, dSlider, desSlider, eSlider, fSlider, fesSlider, gSlider, gesSlider, aSlider, asSlider, bSlider)) with{ cSlider = vslider("[1]C", 0, -1, 1, 0.001):si.smoo; cesSlider = vslider("[2]C#/Db", 0, -1, 1, 0.001):si.smoo; dSlider = vslider("[3]D", 0, -1, 1, 0.001):si.smoo; desSlider = vslider("[4]D#/Eb", 0, -1, 1, 0.001):si.smoo; eSlider = vslider("[5]E", 0, -1, 1, 0.001):si.smoo; fSlider = vslider("[6]F", 0, -1, 1, 0.001):si.smoo; fesSlider = vslider("[7]F#/Gb", 0, -1, 1, 0.001):si.smoo; gSlider = vslider("[8]G", 0, -1, 1, 0.001):si.smoo; gesSlider = vslider("[9]G#/Ab", 0, -1, 1, 0.001):si.smoo; aSlider = vslider("[]A", 0, -1, 1, 0.001):si.smoo; asSlider = vslider("[]A#/Bb", 0, -1, 1, 0.001):si.smoo; bSlider = vslider("[]B", 0, -1, 1, 0.001):si.smoo; }; offset = vgroup("Tuning", hslider("offset[2]",0,0,11,1)); notePitch = noteDifference with{ noteDifference = tuningSliders : par(i, 12, _ * (ma.modulo(midiNote-offset, 12) == i)) :> _; }; voice(note, detune) = oscillator(note - detune), oscillator(note), oscillator(note + detune) : _ , (_ <: _, _ ), _ : + , + : par(i, 2, _ * 0.5) with { oscillator(note) = os.sawtooth(thisFreq) with { thisFreq = ba.midikey2hz(note); }; }; lfo(freq,depth) = os.osc(freq) * depth; envelope(att, dec, sus, rel, gate) = _ * en.adsr(attackTime, decayTime, sustain, release, gate) : _ * gate : _ / 5.5 with{ attackTime = att : _ / 1000 : max (0); decayTime = dec : _ / 1000 : max (0); sustain = sus : max (0) : min (1); release = rel : _ / 1000 : max (0); }; tremolo(freq) = _*tremGain with{ tremGain = os.osc(freq) - 1 : _ / 2 : _ * tremDepth : _ + 1 : max (0) : min (1); }; filter(freq) = fi.lowpass(3, filterFreq) : fi.lowpass(5, 18000) with { filterFreq = freq : min(20000) : max (20); }; lfoFilter(cutoff, lfo) = filter(cutoff+lfoVariation) with{ distanceToMax = 18000 - cutoff; distanceToMin = cutoff - 50; lfoVariation = lfo : _ * (distanceToMax, distanceToMin : min); }; note = midiNote + vibrato + pitchWheel + notePitch with{ vibrato = lfo(vibFreq, vibDepth); }; masterGain(gain) = _ , _: par(i,2, _*gain); process = voice(note, detune) : hgroup("Processing", par(i, 2, lfoFilter(cutoff, lfo(lfoFreq, lfoDepth)) : tremolo(tremFreq))) : hgroup("Processing", masterGain(gain*gate));
4706da6fddf598f6e335deca79a27ddf72e42446f0c3e5c505d452da45406676
grame-cncm/faustdoc
exfaust2.dsp
// Voltage-controlled oscillator example import("stdfaust.lib"); // Create a phasor with a given frequency phasor(freq) = freq/ma.SR : (+ : decimal) ~ _ with { decimal(x) = x-int(x); }; // Pitch to freq conversion (also included in the rack.lib library) cv_pitch2freq(cv_pitch) = 440 * 2 ^ (cv_pitch - 0.75); gain = hslider("gain [knob:1]", 0.1, 0, 1, 0.01) * 10 - 5; pitch(x) = x + gain; process(x) = sin(2 * ma.PI * phasor(cv_pitch2freq(pitch(x)))) * 5;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-11-21-faust-vcvrack/exfaust2/exfaust2.dsp
faust
Voltage-controlled oscillator example Create a phasor with a given frequency Pitch to freq conversion (also included in the rack.lib library)
import("stdfaust.lib"); phasor(freq) = freq/ma.SR : (+ : decimal) ~ _ with { decimal(x) = x-int(x); }; cv_pitch2freq(cv_pitch) = 440 * 2 ^ (cv_pitch - 0.75); gain = hslider("gain [knob:1]", 0.1, 0, 1, 0.01) * 10 - 5; pitch(x) = x + gain; process(x) = sin(2 * ma.PI * phasor(cv_pitch2freq(pitch(x)))) * 5;
4022678b411224dff00a6cdfb176e5e5e1e877f18d5fd6f5ab0a90b1ad50b26b
grame-cncm/faustdoc
exfaust4.dsp
//############################### clarinet.dsp ################################# // Faust instrument specifically designed for faust2smartkeyb where a // clarinet physical model is controlled by an interface implementing // fingerings similar to that of a the real instrument. The pressure of the // breath in the mouthpiece of the clarinet is controlled by blowing on the // built-in microphone of the device. // // ## SmartKeyboard Use Strategy // // The device is meant to be held with 2 hands vertically in order to put all // fingers on the screen at the same time. Key combinations determine the // pitch of the instrument. A single voice is constantly ran. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. // However it was specifically designed to be used with faust2smartkeyb. For // best results, we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] clarinet.dsp // // // ## Version/Licence // // Version 0.0, Aug. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //############################################################################## declare interface "SmartKeyboard{ 'Number of Keyboards':'2', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'4', 'Keyboard 1 - Number of Keys':'5', 'Keyboard 0 - Send Freq':'0', 'Keyboard 1 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 0 - Send Key Status':'1', 'Keyboard 1 - Send Key Status':'1', 'Keyboard 0 - Key 3 - Label':'O+', 'Keyboard 1 - Key 4 - Label':'O-' }"; import("stdfaust.lib"); // SMARTKEYBOARD PARAMS kb0k0status = hslider("kb0k0status",0,0,1,1) : min(1) : int; kb0k1status = hslider("kb0k1status",0,0,1,1) : min(1) : int; kb0k2status = hslider("kb0k2status",0,0,1,1) : min(1) : int; kb0k3status = hslider("kb0k3status",0,0,1,1) : min(1) : int; kb1k0status = hslider("kb1k0status",0,0,1,1) : min(1) : int; kb1k1status = hslider("kb1k1status",0,0,1,1) : min(1) : int; kb1k2status = hslider("kb1k2status",0,0,1,1) : min(1) : int; kb1k3status = hslider("kb1k3status",0,0,1,1) : min(1) : int; kb1k4status = hslider("kb1k4status",0,0,1,1) : min(1) : int; // MODEL PARAMETERS reedStiffness = hslider("reedStiffness[acc: 1 1 -10 0 10]",0,0,1,0.01) : si.smoo; basePitch = 73; // C#4 pitchShift = // calculate pitch shfit in function of "keys" combination ((kb0k0status == 0) & (kb0k1status == 1) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 0))*(-1) + // C ((kb0k0status == 1) & (kb0k1status == 0) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 0))*(-2) + // B ((kb0k0status == 1) & (kb0k1status == 0) & (kb0k2status == 1) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 0))*(-3) + // Bb ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 0))*(-4) + // A ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 0) & (kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 0))*(-5) + // G# ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 0))*(-6) + // G ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 0) & (kb1k1status == 1) & (kb1k2status == 0) & (kb1k3status == 0))*(-7) + // F# ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 0))*(-8) + // F ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 0) & (kb1k3status == 0))*(-9) + // E ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 0) & (kb1k3status == 1))*(-10) + // Eb ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 1) & (kb1k3status == 0))*(-11) + // D ((kb0k0status == 0) & (kb0k1status == 0) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & (kb1k3status == 1))*(-12) + // C# ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 1) & (kb1k3status == 1))*(-13); // C octaveShiftUp = +(kb0k3status : ba.impulsify)~_; // counting up octaveShiftDown = +(kb1k4status : ba.impulsify)~_; // counting down octaveShift = (octaveShiftUp-octaveShiftDown)*(12); // tube length is just smoothed: could be improved tubeLength = basePitch+pitchShift+octaveShift : ba.midikey2hz : pm.f2l : si.smoo; bellOpening = 0.5; // ASSEMBLING MODEL model(pressure) = pm.clarinetModel(tubeLength,pressure,reedStiffness,bellOpening); // pressure is estimated from mic signal process = an.amp_follower_ud(0.02,0.02)*0.7 : model <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust4/exfaust4.dsp
faust
############################### clarinet.dsp ################################# Faust instrument specifically designed for faust2smartkeyb where a clarinet physical model is controlled by an interface implementing fingerings similar to that of a the real instrument. The pressure of the breath in the mouthpiece of the clarinet is controlled by blowing on the built-in microphone of the device. ## SmartKeyboard Use Strategy The device is meant to be held with 2 hands vertically in order to put all fingers on the screen at the same time. Key combinations determine the pitch of the instrument. A single voice is constantly ran. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] clarinet.dsp ## Version/Licence Version 0.0, Aug. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ############################################################################## SMARTKEYBOARD PARAMS MODEL PARAMETERS C#4 calculate pitch shfit in function of "keys" combination C B Bb A G# G F# F E Eb D C# C counting up counting down tube length is just smoothed: could be improved ASSEMBLING MODEL pressure is estimated from mic signal
declare interface "SmartKeyboard{ 'Number of Keyboards':'2', 'Max Keyboard Polyphony':'0', 'Keyboard 0 - Number of Keys':'4', 'Keyboard 1 - Number of Keys':'5', 'Keyboard 0 - Send Freq':'0', 'Keyboard 1 - Send Freq':'0', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 1 - Piano Keyboard':'0', 'Keyboard 0 - Send Key Status':'1', 'Keyboard 1 - Send Key Status':'1', 'Keyboard 0 - Key 3 - Label':'O+', 'Keyboard 1 - Key 4 - Label':'O-' }"; import("stdfaust.lib"); kb0k0status = hslider("kb0k0status",0,0,1,1) : min(1) : int; kb0k1status = hslider("kb0k1status",0,0,1,1) : min(1) : int; kb0k2status = hslider("kb0k2status",0,0,1,1) : min(1) : int; kb0k3status = hslider("kb0k3status",0,0,1,1) : min(1) : int; kb1k0status = hslider("kb1k0status",0,0,1,1) : min(1) : int; kb1k1status = hslider("kb1k1status",0,0,1,1) : min(1) : int; kb1k2status = hslider("kb1k2status",0,0,1,1) : min(1) : int; kb1k3status = hslider("kb1k3status",0,0,1,1) : min(1) : int; kb1k4status = hslider("kb1k4status",0,0,1,1) : min(1) : int; reedStiffness = hslider("reedStiffness[acc: 1 1 -10 0 10]",0,0,1,0.01) : si.smoo; ((kb0k0status == 0) & (kb0k1status == 1) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 0) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 0) & (kb0k2status == 1) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 0) & (kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 0) & (kb1k1status == 1) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 1) & ((kb0k0status == 0) & (kb0k1status == 0) & (kb0k2status == 0) & (kb1k0status == 0) & (kb1k1status == 0) & (kb1k2status == 0) & ((kb0k0status == 1) & (kb0k1status == 1) & (kb0k2status == 1) & (kb1k0status == 1) & (kb1k1status == 1) & (kb1k2status == 1) & octaveShift = (octaveShiftUp-octaveShiftDown)*(12); tubeLength = basePitch+pitchShift+octaveShift : ba.midikey2hz : pm.f2l : si.smoo; bellOpening = 0.5; model(pressure) = pm.clarinetModel(tubeLength,pressure,reedStiffness,bellOpening); process = an.amp_follower_ud(0.02,0.02)*0.7 : model <: _,_;
57daca8b819a376de47727822b82c0a5138a42b33c6e3f05f1ed1967d7e3f37f
Corredor1230/varikeyTests
synthesizer2.dsp
import("stdfaust.lib"); //Parameter declarations freq = vslider("freq[style:knob]",500,200,1000,0.01); gain = vslider("gain",0.5,0,1,0.01) : si.smoo; gate = button("gate") : si.smoo; cutoff = vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo; vibFreq=vslider("vibFreq",0,0,20,0.02):si.smoo; vibDepth=vslider("vibDepth[style:knob]",0,0,1,0.001):si.smoo; tremFreq=vslider("tremFreq",0,0,20,0.02):si.smoo; tremDepth=vslider("tremDepth[style:knob]",0,0,1,0.001):si.smoo; pitchWheel=hslider("pitchWheel",0,-1,1,0.001):si.smoo; detune = hslider("detune",0,0,1,0.001):si.smoo; lfoFreq = vslider("lfoFreq",0,0,20,0.001):si.smoo; lfoDepth = vslider("lfoDepth[style:knob]",0,0,1,0.0001):si.smoo; midiNote=ba.hz2midikey(freq); //Adds pitch wheel and vibrato to frequency oscFreq=vibrato+wheel with{ oscillator = os.osc(vibFreq)*vibDepth; midiVib=midiNote+oscillator; vibrato = ba.midikey2hz(midiVib); wheel = ba.midikey2hz(midiNote+pitchWheel); }; //Adds tremolo to gain oscGain=tremolo*gain*0.5 with{ tremolo = (((os.osc(tremFreq)-1)/2)*tremDepth)+1; }; //Creates lfo-controlled low-pass filter frequency lfoFilt=filter with{ maxValue=18000; minValue=100; cutoffMid=cutoff; distanceToMin=cutoff-minValue; distanceToMax=maxValue-cutoff; isMaxSmallerThan=distanceToMax<distanceToMin; width=distanceToMin,distanceToMax:select2(isMaxSmallerThan):_:si.smoo; lfoGain=width*lfoDepth; lfoFreqOsc=os.osc(lfoFreq)*lfoGain; filter=cutoff+lfoFreqOsc; }; //Adds stereo detune to the synthesizer oscWithStereoDetune = sawOsc(oscFreq)<:(_+sawOsc(oscFreq+detuneLeft))/2,(_+sawOsc(oscFreq+detuneRight))/2 with{ detuneLeft=ba.midikey2hz(midiNote)-ba.midikey2hz(midiNote+detune); detuneRight=ba.midikey2hz(midiNote+detune)-ba.midikey2hz(midiNote); phaseReset=((detune*(-1))+1); sawOsc(x) = (os.lf_sawpos_phase(x, phaseReset)-0.5)*oscGain*gate:fi.lowpass(3,lfoFilt):fi.lowpass(5,18000); }; process = oscWithStereoDetune;
https://raw.githubusercontent.com/Corredor1230/varikeyTests/8d11723ab47cdfa07e786db8b118dabaf0cae2cb/Faust/synthesizer2.dsp
faust
Parameter declarations Adds pitch wheel and vibrato to frequency Adds tremolo to gain Creates lfo-controlled low-pass filter frequency Adds stereo detune to the synthesizer
import("stdfaust.lib"); freq = vslider("freq[style:knob]",500,200,1000,0.01); gain = vslider("gain",0.5,0,1,0.01) : si.smoo; gate = button("gate") : si.smoo; cutoff = vslider("cutoff[style:knob][scale:log]",1000,110,20000,0.01) : si.smoo; vibFreq=vslider("vibFreq",0,0,20,0.02):si.smoo; vibDepth=vslider("vibDepth[style:knob]",0,0,1,0.001):si.smoo; tremFreq=vslider("tremFreq",0,0,20,0.02):si.smoo; tremDepth=vslider("tremDepth[style:knob]",0,0,1,0.001):si.smoo; pitchWheel=hslider("pitchWheel",0,-1,1,0.001):si.smoo; detune = hslider("detune",0,0,1,0.001):si.smoo; lfoFreq = vslider("lfoFreq",0,0,20,0.001):si.smoo; lfoDepth = vslider("lfoDepth[style:knob]",0,0,1,0.0001):si.smoo; midiNote=ba.hz2midikey(freq); oscFreq=vibrato+wheel with{ oscillator = os.osc(vibFreq)*vibDepth; midiVib=midiNote+oscillator; vibrato = ba.midikey2hz(midiVib); wheel = ba.midikey2hz(midiNote+pitchWheel); }; oscGain=tremolo*gain*0.5 with{ tremolo = (((os.osc(tremFreq)-1)/2)*tremDepth)+1; }; lfoFilt=filter with{ maxValue=18000; minValue=100; cutoffMid=cutoff; distanceToMin=cutoff-minValue; distanceToMax=maxValue-cutoff; isMaxSmallerThan=distanceToMax<distanceToMin; width=distanceToMin,distanceToMax:select2(isMaxSmallerThan):_:si.smoo; lfoGain=width*lfoDepth; lfoFreqOsc=os.osc(lfoFreq)*lfoGain; filter=cutoff+lfoFreqOsc; }; oscWithStereoDetune = sawOsc(oscFreq)<:(_+sawOsc(oscFreq+detuneLeft))/2,(_+sawOsc(oscFreq+detuneRight))/2 with{ detuneLeft=ba.midikey2hz(midiNote)-ba.midikey2hz(midiNote+detune); detuneRight=ba.midikey2hz(midiNote+detune)-ba.midikey2hz(midiNote); phaseReset=((detune*(-1))+1); sawOsc(x) = (os.lf_sawpos_phase(x, phaseReset)-0.5)*oscGain*gate:fi.lowpass(3,lfoFilt):fi.lowpass(5,18000); }; process = oscWithStereoDetune;
9701b65db5102327b492b4be186f9072152c7f948bb84d87caeafa0a95fb0dd4
megrimm/pd-fresh
pm.tambura.dsp
declare name "tambura"; declare description "Pseudo physical model of an Indian Tambura/Tanpura"; declare author "Oli Larkin ([email protected])"; declare copyright "Oliver Larkin"; declare version "1.0"; declare licence "GPL"; //TODO // - pitch env doesn't get triggered by autoplucker // - autoplucker fixed to 4 strings import("stdfaust.lib"); line (value, time) = state~(_,_):!,_ with { state (t, c) = nt, ba.if (nt <= 0, value, c+(value - c) / nt) with { nt = ba.if( value != value', samples, t-1); samples = time*ma.SR/1000.0; }; }; dtmax = 4096; //tunings of the four strings, ratios of f0 ratios(0) = 1.5; ratios(1) = 2.; ratios(2) = 2.01; ratios(3) = 1.; NStrings = 4; sm = si.smooth(ba.tau2pole(0.05)); //50 ms smoothing //ratios(i) = hslider("/h:main/ratio%1i [style:knob]", 1., 0.1, 2., 0.001); pluck(i) = button("/h:trigger/pluck%1i"); // buttons for manual plucking pluckrate = hslider("/h:trigger/autopluckrate [style:knob][unit:hz]", 0.1, 0.0, 0.5, 0.001); // automatic plucking rate (Hz) enableautoplucker = checkbox("/h:trigger/enableautopluck"); // enable automatic plucking f0 = hslider("/h:main/[1]sa [style:knob]", 36, 24, 72, 1) : sm : ba.midikey2hz; // the base pitch of the drone t60 = hslider("/h:main/[2]decay_time [style:knob][unit:s]", 10, 0, 100, 0.1) : sm; // how long the strings decay damp = 1. - hslider("/h:main/[3]high_freq_loss [style:knob]", 0, 0, 1., 0.01) : sm; // string brightness fd = hslider("/h:main/[4]harmonic_motion [style:knob][scale:exp]", 0.001, 0., 1, 0.0001) : *(0.2) : sm; // controls the detuning of parallel waveguides that mimics harmonic motion of the tambura coupling = hslider("/h:main/[5]sympathetic_coupling [style:knob]", 0.1, 0., 1., 0.0001) : sm; // level of sympathetic coupling between strings jw = hslider("/h:main/[6]jawari [style:knob]", 0, 0, 1, 0.001) : *(0.1) : sm; // creates the buzzing / jawari effect spread = hslider("/h:main/[7]string_spread [style:knob]", 1., 0., 1., 0.01) : sm; // stereo spread of strings tscale = hslider("/h:main/[8]tune_scale [style:knob]", 1, 0.9, 1.1, 0.001); // descale = hslider("/h:main/[9]decay_scale [style:knob]", 1, 0.1, 1., 0.001); // //dascale = hslider("/h:main/[10]damp_scale [style:knob]", 1, 0.5, 2, 0.01); // ptype = hslider("/h:pick/[1]material [style:knob]", 0.13, 0.0, 1., 0.01) : sm; // crossfades between pink noise and DC excitation pattack = hslider("/h:pick/[2]attack_time [style:knob][scale:exp]", 0.07, 0, 0.5, 0.01); // attack time of pluck envelope, 0 to 0.5 times f0 wavelength ptime = hslider("/h:pick/[3]decay_time [style:knob]", 1., 1, 100., 0.01); // decay time (1 to 10 times f0 wavelength) ppos = hslider("/h:pick/[4]position [style:knob]", 0.25, 0.01, 0.5, 0.01); // pick position (ratio of f0 wavelength) pbend = hslider("/h:pick/[5]bend_depth [style:knob][unit:st]", 3, 0., 12., 0.01); // pick bend depth in semitones pbendtime = hslider("/h:pick/[6]bend_time [style:knob][unit:ms]", 10., 1, 200., 1); // pick bend time (1 to 200 ms) vol = hslider("volume [unit:dB]", 0, -36, +4, 0.1) : ba.db2linear : sm; // master volume // s = string index // c = comb filter index (of 9 comb filters in risset string) tambura(NStrings) = ( couplingmatrix(NStrings), par(s, NStrings, excitation(s)) : ro.interleave(NStrings, 2) : par(s, NStrings, string(s, pluck(s))) ) // string itself with excitation + fbk as input ~ par(s, NStrings, (!,_)) // feedback only the right waveguide : par(s, NStrings, (+:pan(s)) // add left/right waveguides and pan ) :> _,_ //stereo output with { couplingmatrix(NStrings) = par(s, NStrings, *(coupling) : couplingfilter) // coupling filters <: par(s, NStrings, unsel(NStrings, s) :> _ ) // unsel makes sure the feedback is disconnected with { unsel(NStrings,s) = par(j, NStrings, U(s,j)) with { U(s,s)=!; U(s,j)=_; }; //couplingfilter = component("bridgeIR.dsp"); couplingfilter = fi.highshelf(1,-100,5000) : fi.peak_eq(14, 2500, 400) : fi.peak_eq(20, 7500, 650); // EQ to simulate bridge response }; //pan(s) = _ <: *(1-v), *(v) pan(s) = _ <: *((1-v) : sqrt), *((v) : sqrt) with { spreadScale = (1/(NStrings-1)); v = 0.5 + ((spreadScale * s) - 0.5) * spread; }; // excitation(s) = _; excitation(s, trig) = input * ampenv : pickposfilter with { wl = (ma.SR/(f0 * ratios(s))); // wavelength of f0 in samples dur = (ptime * wl) / (ma.SR/1000.); // duration of the pluck in ms ampenv = trig * line(1. - trig, dur) : si.lag_ud(wl * pattack * (1/ma.SR), 0.005); amprand = abs(no.noise) : ba.latch(trig) *(0.25) + (0.75); posrand = abs(no.noise) : ba.latch(trig) *(0.2); input = 1., no.pink_noise : si.interpolate(ptype); // crossfade between DC and pink noise excitation source pickposfilter = fi.ffcombfilter(dtmax, ((ppos + posrand) * wl), -1); // simulation of different pluck positions }; string(s, trig) = _, _ <: +, !,_ : rissetstring(_, s, 1., 1., 1.), rissetstring(_, s, tscale, descale, 1.) // dual risset strings for decoupled feedback with { rissetstring(x, s, ts, des, das) = _ <: par(c, 9, stringloop(x, s, c, ts, das)) :> _ : fi.dcblocker *(0.01); // 9 detuned delay line resonators in parallel stringloop(x, s, c, ts, des, das) = (+ : delay) ~ ((dampingfilter : nlfm) * fbk) // waveguide string with damping filter and non linear apf for jawari effect with { //delay = de.fdelay1a(dtmax, dtsamples, x); // allpass interpolation has better HF response delay = de.fdelaylti(2, dtmax, dtsamples, x); // lagrange interpolation glitches less with pitch envelope pitchenv = trig * line(1. - trig, pbendtime) <: * : *(pbend); thisf0 = ba.pianokey2hz( ba.hz2pianokey((f0 * ratios(s)) + ((c-4) * fd) + pitchenv) ) * ts; dtsamples = (ma.SR/thisf0) - 2; fbk = pow(0.001, 1.0/(thisf0*(t60 * descale))); dampingfilter(x) = (h0 * x' + h1*(x+x'')) with { d = das * damp; h0 = (1. + d)/2; h1 = (1. - d)/4; }; nlfm(x) = x <: fi.allpassnn(1,(par(i,1,jw * ma.PI * x))); }; }; }; autoplucker= phasor(pluckrate) <: <(0.25), >(0.25) & <(0.5), >(0.5) & <(0.75), >(0.75) & <(1) : par(s, NStrings, *(enableautoplucker)) with { phasor(freq) = (freq/float(ma.SR) : (+ : ma.decimal) ~ _); }; process = (par(s, NStrings, pluck(s)), autoplucker) :> tambura(NStrings) : *(vol), *(vol);
https://raw.githubusercontent.com/megrimm/pd-fresh/32662a2213ba9d81bfaabbf0d345a8008283745f/pm.tambura.dsp
faust
TODO - pitch env doesn't get triggered by autoplucker - autoplucker fixed to 4 strings tunings of the four strings, ratios of f0 50 ms smoothing ratios(i) = hslider("/h:main/ratio%1i [style:knob]", 1., 0.1, 2., 0.001); buttons for manual plucking automatic plucking rate (Hz) enable automatic plucking the base pitch of the drone how long the strings decay string brightness controls the detuning of parallel waveguides that mimics harmonic motion of the tambura level of sympathetic coupling between strings creates the buzzing / jawari effect stereo spread of strings dascale = hslider("/h:main/[10]damp_scale [style:knob]", 1, 0.5, 2, 0.01); // crossfades between pink noise and DC excitation attack time of pluck envelope, 0 to 0.5 times f0 wavelength decay time (1 to 10 times f0 wavelength) pick position (ratio of f0 wavelength) pick bend depth in semitones pick bend time (1 to 200 ms) master volume s = string index c = comb filter index (of 9 comb filters in risset string) string itself with excitation + fbk as input feedback only the right waveguide add left/right waveguides and pan stereo output coupling filters unsel makes sure the feedback is disconnected couplingfilter = component("bridgeIR.dsp"); EQ to simulate bridge response pan(s) = _ <: *(1-v), *(v) excitation(s) = _; wavelength of f0 in samples duration of the pluck in ms crossfade between DC and pink noise excitation source simulation of different pluck positions dual risset strings for decoupled feedback 9 detuned delay line resonators in parallel waveguide string with damping filter and non linear apf for jawari effect delay = de.fdelay1a(dtmax, dtsamples, x); // allpass interpolation has better HF response lagrange interpolation glitches less with pitch envelope
declare name "tambura"; declare description "Pseudo physical model of an Indian Tambura/Tanpura"; declare author "Oli Larkin ([email protected])"; declare copyright "Oliver Larkin"; declare version "1.0"; declare licence "GPL"; import("stdfaust.lib"); line (value, time) = state~(_,_):!,_ with { state (t, c) = nt, ba.if (nt <= 0, value, c+(value - c) / nt) with { nt = ba.if( value != value', samples, t-1); samples = time*ma.SR/1000.0; }; }; dtmax = 4096; ratios(0) = 1.5; ratios(1) = 2.; ratios(2) = 2.01; ratios(3) = 1.; NStrings = 4; with { couplingmatrix(NStrings) = with { unsel(NStrings,s) = par(j, NStrings, U(s,j)) with { U(s,s)=!; U(s,j)=_; }; }; pan(s) = _ <: *((1-v) : sqrt), *((v) : sqrt) with { spreadScale = (1/(NStrings-1)); v = 0.5 + ((spreadScale * s) - 0.5) * spread; }; excitation(s, trig) = input * ampenv : pickposfilter with { ampenv = trig * line(1. - trig, dur) : si.lag_ud(wl * pattack * (1/ma.SR), 0.005); amprand = abs(no.noise) : ba.latch(trig) *(0.25) + (0.75); posrand = abs(no.noise) : ba.latch(trig) *(0.2); }; with { with { pitchenv = trig * line(1. - trig, pbendtime) <: * : *(pbend); thisf0 = ba.pianokey2hz( ba.hz2pianokey((f0 * ratios(s)) + ((c-4) * fd) + pitchenv) ) * ts; dtsamples = (ma.SR/thisf0) - 2; fbk = pow(0.001, 1.0/(thisf0*(t60 * descale))); dampingfilter(x) = (h0 * x' + h1*(x+x'')) with { d = das * damp; h0 = (1. + d)/2; h1 = (1. - d)/4; }; nlfm(x) = x <: fi.allpassnn(1,(par(i,1,jw * ma.PI * x))); }; }; }; autoplucker= phasor(pluckrate) <: <(0.25), >(0.25) & <(0.5), >(0.5) & <(0.75), >(0.75) & <(1) : par(s, NStrings, *(enableautoplucker)) with { phasor(freq) = (freq/float(ma.SR) : (+ : ma.decimal) ~ _); }; process = (par(s, NStrings, pluck(s)), autoplucker) :> tambura(NStrings) : *(vol), *(vol);
0314aea2e870a9615f779d793f6e45aeda590c4c3fd5a0aef92688d418d0f3c5
t2techno/Faug
Faug.dsp
import("stdfaust.lib"); display(name, mini, maxi) = _ <: attach(_,vbargraph("[00]%name[style:numerical]",mini,maxi)); limit_range(mini,maxi) = _, mini : max : _, maxi : min; gain = hslider("gain[style:knob]",1.0,0.0,1.0,0.01); // Midi note 48, 130.81hz, C2 is default 1V in model D // Will use as center for keyTrackingDiff keyboardCenter = 130.81; // currently I only have 44.1khz // the things relying on this require it to be known at compile time anyway nyquist = 22050.0;//ma.SR/2; // todo variable keytracking per oscillator generateSound(fdb) = output(fdb) : filter : _*envelope with{ gate = button("[00]gate"); frequencyIn = nentry("[01]freq[unit:Hz]", 440, 20, 20000, 0.01); prevfreq = nentry("[02]prevFreq[unit:Hz]", 440, 20, 20000, 0.01); pitchbend = hslider("[03]pitchBend[style:knob]", 0, -2.5, 2.5, 0.01) : ba.semi2ratio; glide = hslider("[04]glide[style:knob]", 0.01, 0.001, 3.0, 0.001); start_time = ba.latch(frequencyIn != frequencyIn', ba.time); dt = ba.time - start_time; epsilon = 0.01; expo(tau) = exp((0-dt)/(tau*ma.SR)), epsilon : max; blend(rate, f, pf) = f*(1 - expo(rate)) + pf*expo(rate); glideOn = checkbox("[05]glideOn"); freq = blend(glide, frequencyIn, ba.if(glideOn, prevfreq, frequencyIn)) <: attach(_,vbargraph("finalFreq[style:numerical]",0,20000)); // Oscillators scale = 1.0, oscOnePower*oscOneGain*0.4 + oscTwoPower*oscTwoGain*0.4 + oscThreePower*oscThreeGain*0.4 : max; oscOnePower = checkbox("[06]oscOnePower"); oscTwoPower = checkbox("[07]oscTwoPower"); oscThreePower = checkbox("[08]oscThreePower"); oscOneGain = hslider("[09]oscOneGain[style:knob]", 1.0,0.0,1.0,0.01); oscTwoGain = hslider("[10]oscTwoGain[style:knob]", 1.0,0.0,1.0,0.01); oscThreeGain = hslider("[11]oscThreeGain[style:knob]",1.0,0.0,1.0,0.01); oscModOn = checkbox("[12]oscModOn"); // oscillators oscOne = waveOneTwo(freqOne, rangeOne, waveSelectOne)*oscOneGain*oscOnePower; oscTwoSignal = waveOneTwo(freqTwo, rangeTwo, waveSelectTwo); oscThreeSignal = waveThree (freqThree, rangeThree, waveSelectThree); oscTwo = oscTwoSignal *oscTwoGain *oscTwoPower; oscThree = oscThreeSignal*oscThreeGain*oscThreePower; oscillators = (oscOne + oscTwo + oscThree)/scale; freqOne = freq, 2^(rangeOne-4) : * : _*globalDetune*driftOne*pitchbend : modulate(oscModOn); freqTwo = freq, 2^(rangeTwo-4) : * : _*detuneTwo *driftTwo*pitchbend : modulate(oscModOn); oscThreeKeyTrack = checkbox("[13]oscThreeKeyTrack"); freqThreePre = freq, keyboardCenter : select2(oscThreeKeyTrack); freqThree = freqThreePre : _, 2^(rangeThree-4) : * : _*detuneThree *driftThree*pitchbend; // Oscillator wave selectors. 3rd option in waves one and two is a triangle saw // 3rd option in wave three is a reverse saw waveSelectOne = hslider("[14]waveOne[style:knob]" ,1,0,5,1); waveSelectTwo = hslider("[15]waveTwo[style:knob]" ,1,0,5,1); waveSelectThree = hslider("[16]waveThree[style:knob]",1,0,5,1); waveOneTwo(f,r,ws) = tri(f,r), triSaw(f,r), saw(f,r), square(f,r), rectangle(f,r,0.70), rectangle(f,r,0.85) : ba.selectn(6,ws); waveThree(f,r,ws) = tri(f,r), revSaw(f,r), saw(f,r), square(f,r), rectangle(f,r,0.70), rectangle(f,r,0.85) : ba.selectn(6,ws); driftOne = os.osc(0.05)*0.01 : 2^_ : @(ma.SR/100); driftTwo = driftOne@(ma.SR/100); driftThree = driftTwo@(ma.SR/100); rangeOne = hslider("[17]rangeOne[style:knob]",2,0,5,1); rangeTwo = hslider("[18]rangeTwo[style:knob]",2,0,5,1); rangeThree = hslider("[19]rangeThree[style:knob]",2,0,5,1); globalDetuneSemi = hslider("[20]globalDetune[style:knob]", 0, -2.5, 2.5, 0.01); globalDetune = globalDetuneSemi : ba.semi2ratio; detuneTwo = hslider("[21]detuneTwo[style:knob]", 0, -7.5, 7.5, 0.01) + globalDetuneSemi : ba.semi2ratio; detuneThree = hslider("[22]detuneThree[style:knob]", 0, -7.5, 7.5, 0.01) + globalDetuneSemi : ba.semi2ratio; tri(f,type) = os.lf_triangle(f), os.triangle(f) : select2(type); saw(f,type) = os.lf_saw(f), os.sawtooth(f) : select2(type); square(f,type) = os.lf_squarewave(f), os.square(f) : select2(type); rectangle(f,type,n) = os.lf_pulsetrain(f,n), os.pulsetrain(f,n) : select2(type); revSaw(f,type) = saw(f,type), -1: *; triSaw(f,type) = (saw(f,type) + tri(f,type))/2; // Envelope Section envelope = en.adsr(attack,decay,sustain,release,gate) <: _, si.smoo : select2(decayButton); decayButton = checkbox("[23]decayOn"); attack = hslider("[24]attack[style:knob]",1,1,10000,1)*0.001; decay = hslider("[25]decay[style:knob]",4,1,24000,1)*0.001; sustain = hslider("[26]sustain[style:knob]",0.8,0.01,1,0.01); release = 10*0.001, decay : select2(decayButton); // Filter Section // filter response is 32k, cutoff max is 20k // Have to have constant value know at compile time. // Maybe have multiple hardcoded values for different sample rates filterMax = 20000.0/nyquist; filterMin = 10.0/nyquist; cutoffIn = hslider("[27]cutoff[style:knob]",0.5,filterMin,filterMax,0.001); cutoffFreq = cutoffIn*nyquist; // key tracking stuff // offset of played frequency from keyboard center keyTrackDiff = frequencyIn-keyboardCenter; //oneThird, twoThird keyTrackOne = checkbox("[28]keyTrackOne")*keyTrackDiff; keyTrackTwo = checkbox("[29]keyTrackTwo")*2.0*keyTrackDiff; keyTrackSum = (keyTrackOne + keyTrackTwo)/3.0; cutoff_KeyTrack = cutoffFreq + keyTrackSum; // filter contour reverseContour = hslider("[30]contour_direction[style:radio{'+':0;'-':1}]",0,0,1,1); contourAmount = hslider("[31]contourAmount[style:knob]",0.0,0.0,1.0,0.001); fAttack = hslider("[32]fAttack[style:knob]",1,1,7000,1)*0.001; fDecay = hslider("[33]fDecay[style:knob]",4,1,30000,1)*0.001; fSustain = hslider("[34]fSustain[style:knob]",0.8,0.01,1.0,0.01); fRelease = 10*0.001, fDecay : select2(decayButton); // either up 4 octaves, or down 4 octaves contourPeak = 16.0, (1/16) : select2(reverseContour) : _*cutoff_KeyTrack; filterUp = cutoff_KeyTrack <: _ + contourAmount*filterContour*(contourPeak-_); filterDown = cutoff_KeyTrack <: _ - contourAmount*filterContour*(_-contourPeak); filterContour = en.adsr(fAttack, fDecay, fSustain, fRelease, gate) <: _, si.smoo : select2(decayButton); // set signal up/down a percentage of 4 octaves from the set cutoff-frequency(plus keyTrack) cutOffCombine = filterUp, filterDown : select2(reverseContour) : modulate(filterModOn) : _/nyquist : limit_range(filterMin,filterMax); filterModOn = checkbox("[35]filterModOn"); modulate(on) = _ <: _, _*(2^(modulation)) : select2(on); emphasis = hslider("[36]emphasis[style:knob]",1,0.707,25.0,0.001); filter = ve.moogLadder(cutOffCombine, emphasis); // Noise noiseSelect = checkbox("[37]noiseType"); noiseOn = checkbox("[38]noiseOn"); noiseGain = hslider("[39]noiseGain[style:knob]", 0.0, 0.0, 1.0, 0.01); noise = no.noise, no.pink_noise : select2(noiseSelect)*noiseGain*noiseOn; // Modulation modLeft = oscThreeSignal, filterContour : select2(checkbox("[40]oscThree_filterEg")); lfoRate = hslider("[41]lfoRate[style:knob]",10.0,0.5,200.0,0.01) ; lfo = os.lf_triangle(lfoRate), os.lf_squarewave(lfoRate) : select2(checkbox("[42]lfoShape")); lowBandLimit = 20; bw3 = 0.7 * ma.SR/2.0 - lowBandLimit; redNoise = no.noise : fi.spectral_tilt(3,lowBandLimit,bw3,-0.25); modNoise = no.pink_noise, redNoise : select2(noiseSelect); modRight = modNoise, lfo : select2(checkbox("[43]noise_lfo")) ; modMix = hslider("[44]modMix[style:knob]",0.0,0.0,1.0,0.01); modAmount = hslider("[45]modAmount[style:knob]",0.0,0.0,1.0,0.01); modulation = (1-modMix)*modLeft + (modMix)*modRight : _*modAmount; load = hslider("[46]load[style:knob]",1.0,1.0,3.0,0.01); output(fdb) = ((oscillators+noise)*load)+fdb; }; process = hgroup("faug", (generateSound ~ fdBackSignal) : drive : _*on*masterVolume) <: _,_ with { // Inverting power button so it defaults to on powerButton = checkbox("on"); on = 1.0,0.0 : select2(powerButton); masterVolume = hslider("masterVolume[style:knob]",1.0,0.0,1.0,0.01); fdbackOn = checkbox("feedbackOn"); fdback = hslider("feedbackGain[style:knob]",0,0,1,0.01); fdBackSignal = _*fdback*fdbackOn; drive = _ <: drySig, wetSig : + : aa.Ratanh; drySig = _, (1-fdback)*_ : select2(fdbackOn); wetSig = 0.0, _*(2^fdback) : select2(fdbackOn); };
https://raw.githubusercontent.com/t2techno/Faug/4c5f8d9c76693dda6d05baff4ea64f57c6a08de7/FaustDsp/Faug.dsp
faust
Midi note 48, 130.81hz, C2 is default 1V in model D Will use as center for keyTrackingDiff currently I only have 44.1khz the things relying on this require it to be known at compile time anyway ma.SR/2; todo variable keytracking per oscillator Oscillators oscillators Oscillator wave selectors. 3rd option in waves one and two is a triangle saw 3rd option in wave three is a reverse saw Envelope Section Filter Section filter response is 32k, cutoff max is 20k Have to have constant value know at compile time. Maybe have multiple hardcoded values for different sample rates key tracking stuff offset of played frequency from keyboard center oneThird, twoThird filter contour either up 4 octaves, or down 4 octaves set signal up/down a percentage of 4 octaves from the set cutoff-frequency(plus keyTrack) Noise Modulation Inverting power button so it defaults to on
import("stdfaust.lib"); display(name, mini, maxi) = _ <: attach(_,vbargraph("[00]%name[style:numerical]",mini,maxi)); limit_range(mini,maxi) = _, mini : max : _, maxi : min; gain = hslider("gain[style:knob]",1.0,0.0,1.0,0.01); keyboardCenter = 130.81; generateSound(fdb) = output(fdb) : filter : _*envelope with{ gate = button("[00]gate"); frequencyIn = nentry("[01]freq[unit:Hz]", 440, 20, 20000, 0.01); prevfreq = nentry("[02]prevFreq[unit:Hz]", 440, 20, 20000, 0.01); pitchbend = hslider("[03]pitchBend[style:knob]", 0, -2.5, 2.5, 0.01) : ba.semi2ratio; glide = hslider("[04]glide[style:knob]", 0.01, 0.001, 3.0, 0.001); start_time = ba.latch(frequencyIn != frequencyIn', ba.time); dt = ba.time - start_time; epsilon = 0.01; expo(tau) = exp((0-dt)/(tau*ma.SR)), epsilon : max; blend(rate, f, pf) = f*(1 - expo(rate)) + pf*expo(rate); glideOn = checkbox("[05]glideOn"); freq = blend(glide, frequencyIn, ba.if(glideOn, prevfreq, frequencyIn)) <: attach(_,vbargraph("finalFreq[style:numerical]",0,20000)); scale = 1.0, oscOnePower*oscOneGain*0.4 + oscTwoPower*oscTwoGain*0.4 + oscThreePower*oscThreeGain*0.4 : max; oscOnePower = checkbox("[06]oscOnePower"); oscTwoPower = checkbox("[07]oscTwoPower"); oscThreePower = checkbox("[08]oscThreePower"); oscOneGain = hslider("[09]oscOneGain[style:knob]", 1.0,0.0,1.0,0.01); oscTwoGain = hslider("[10]oscTwoGain[style:knob]", 1.0,0.0,1.0,0.01); oscThreeGain = hslider("[11]oscThreeGain[style:knob]",1.0,0.0,1.0,0.01); oscModOn = checkbox("[12]oscModOn"); oscOne = waveOneTwo(freqOne, rangeOne, waveSelectOne)*oscOneGain*oscOnePower; oscTwoSignal = waveOneTwo(freqTwo, rangeTwo, waveSelectTwo); oscThreeSignal = waveThree (freqThree, rangeThree, waveSelectThree); oscTwo = oscTwoSignal *oscTwoGain *oscTwoPower; oscThree = oscThreeSignal*oscThreeGain*oscThreePower; oscillators = (oscOne + oscTwo + oscThree)/scale; freqOne = freq, 2^(rangeOne-4) : * : _*globalDetune*driftOne*pitchbend : modulate(oscModOn); freqTwo = freq, 2^(rangeTwo-4) : * : _*detuneTwo *driftTwo*pitchbend : modulate(oscModOn); oscThreeKeyTrack = checkbox("[13]oscThreeKeyTrack"); freqThreePre = freq, keyboardCenter : select2(oscThreeKeyTrack); freqThree = freqThreePre : _, 2^(rangeThree-4) : * : _*detuneThree *driftThree*pitchbend; waveSelectOne = hslider("[14]waveOne[style:knob]" ,1,0,5,1); waveSelectTwo = hslider("[15]waveTwo[style:knob]" ,1,0,5,1); waveSelectThree = hslider("[16]waveThree[style:knob]",1,0,5,1); waveOneTwo(f,r,ws) = tri(f,r), triSaw(f,r), saw(f,r), square(f,r), rectangle(f,r,0.70), rectangle(f,r,0.85) : ba.selectn(6,ws); waveThree(f,r,ws) = tri(f,r), revSaw(f,r), saw(f,r), square(f,r), rectangle(f,r,0.70), rectangle(f,r,0.85) : ba.selectn(6,ws); driftOne = os.osc(0.05)*0.01 : 2^_ : @(ma.SR/100); driftTwo = driftOne@(ma.SR/100); driftThree = driftTwo@(ma.SR/100); rangeOne = hslider("[17]rangeOne[style:knob]",2,0,5,1); rangeTwo = hslider("[18]rangeTwo[style:knob]",2,0,5,1); rangeThree = hslider("[19]rangeThree[style:knob]",2,0,5,1); globalDetuneSemi = hslider("[20]globalDetune[style:knob]", 0, -2.5, 2.5, 0.01); globalDetune = globalDetuneSemi : ba.semi2ratio; detuneTwo = hslider("[21]detuneTwo[style:knob]", 0, -7.5, 7.5, 0.01) + globalDetuneSemi : ba.semi2ratio; detuneThree = hslider("[22]detuneThree[style:knob]", 0, -7.5, 7.5, 0.01) + globalDetuneSemi : ba.semi2ratio; tri(f,type) = os.lf_triangle(f), os.triangle(f) : select2(type); saw(f,type) = os.lf_saw(f), os.sawtooth(f) : select2(type); square(f,type) = os.lf_squarewave(f), os.square(f) : select2(type); rectangle(f,type,n) = os.lf_pulsetrain(f,n), os.pulsetrain(f,n) : select2(type); revSaw(f,type) = saw(f,type), -1: *; triSaw(f,type) = (saw(f,type) + tri(f,type))/2; envelope = en.adsr(attack,decay,sustain,release,gate) <: _, si.smoo : select2(decayButton); decayButton = checkbox("[23]decayOn"); attack = hslider("[24]attack[style:knob]",1,1,10000,1)*0.001; decay = hslider("[25]decay[style:knob]",4,1,24000,1)*0.001; sustain = hslider("[26]sustain[style:knob]",0.8,0.01,1,0.01); release = 10*0.001, decay : select2(decayButton); filterMax = 20000.0/nyquist; filterMin = 10.0/nyquist; cutoffIn = hslider("[27]cutoff[style:knob]",0.5,filterMin,filterMax,0.001); cutoffFreq = cutoffIn*nyquist; keyTrackDiff = frequencyIn-keyboardCenter; keyTrackOne = checkbox("[28]keyTrackOne")*keyTrackDiff; keyTrackTwo = checkbox("[29]keyTrackTwo")*2.0*keyTrackDiff; keyTrackSum = (keyTrackOne + keyTrackTwo)/3.0; cutoff_KeyTrack = cutoffFreq + keyTrackSum; reverseContour = hslider("[30]contour_direction[style:radio{'+':0;'-':1}]",0,0,1,1); contourAmount = hslider("[31]contourAmount[style:knob]",0.0,0.0,1.0,0.001); fAttack = hslider("[32]fAttack[style:knob]",1,1,7000,1)*0.001; fDecay = hslider("[33]fDecay[style:knob]",4,1,30000,1)*0.001; fSustain = hslider("[34]fSustain[style:knob]",0.8,0.01,1.0,0.01); fRelease = 10*0.001, fDecay : select2(decayButton); contourPeak = 16.0, (1/16) : select2(reverseContour) : _*cutoff_KeyTrack; filterUp = cutoff_KeyTrack <: _ + contourAmount*filterContour*(contourPeak-_); filterDown = cutoff_KeyTrack <: _ - contourAmount*filterContour*(_-contourPeak); filterContour = en.adsr(fAttack, fDecay, fSustain, fRelease, gate) <: _, si.smoo : select2(decayButton); cutOffCombine = filterUp, filterDown : select2(reverseContour) : modulate(filterModOn) : _/nyquist : limit_range(filterMin,filterMax); filterModOn = checkbox("[35]filterModOn"); modulate(on) = _ <: _, _*(2^(modulation)) : select2(on); emphasis = hslider("[36]emphasis[style:knob]",1,0.707,25.0,0.001); filter = ve.moogLadder(cutOffCombine, emphasis); noiseSelect = checkbox("[37]noiseType"); noiseOn = checkbox("[38]noiseOn"); noiseGain = hslider("[39]noiseGain[style:knob]", 0.0, 0.0, 1.0, 0.01); noise = no.noise, no.pink_noise : select2(noiseSelect)*noiseGain*noiseOn; modLeft = oscThreeSignal, filterContour : select2(checkbox("[40]oscThree_filterEg")); lfoRate = hslider("[41]lfoRate[style:knob]",10.0,0.5,200.0,0.01) ; lfo = os.lf_triangle(lfoRate), os.lf_squarewave(lfoRate) : select2(checkbox("[42]lfoShape")); lowBandLimit = 20; bw3 = 0.7 * ma.SR/2.0 - lowBandLimit; redNoise = no.noise : fi.spectral_tilt(3,lowBandLimit,bw3,-0.25); modNoise = no.pink_noise, redNoise : select2(noiseSelect); modRight = modNoise, lfo : select2(checkbox("[43]noise_lfo")) ; modMix = hslider("[44]modMix[style:knob]",0.0,0.0,1.0,0.01); modAmount = hslider("[45]modAmount[style:knob]",0.0,0.0,1.0,0.01); modulation = (1-modMix)*modLeft + (modMix)*modRight : _*modAmount; load = hslider("[46]load[style:knob]",1.0,1.0,3.0,0.01); output(fdb) = ((oscillators+noise)*load)+fdb; }; process = hgroup("faug", (generateSound ~ fdBackSignal) : drive : _*on*masterVolume) <: _,_ with { powerButton = checkbox("on"); on = 1.0,0.0 : select2(powerButton); masterVolume = hslider("masterVolume[style:knob]",1.0,0.0,1.0,0.01); fdbackOn = checkbox("feedbackOn"); fdback = hslider("feedbackGain[style:knob]",0,0,1,0.01); fdBackSignal = _*fdback*fdbackOn; drive = _ <: drySig, wetSig : + : aa.Ratanh; drySig = _, (1-fdback)*_ : select2(fdbackOn); wetSig = 0.0, _*(2^fdback) : select2(fdbackOn); };
0e51c21fc7d163adda500103b064a8dfca46899a90d6d112a63c306ba2f31754
etiennedemoulin/amplifdisto
filter.dsp
import("stdfaust.lib"); freq = hslider("frequency",1,0.1,3,0.001); drywet = hslider("dry/wet",-1,-1,1,0.001) : si.smoo; drive = hslider("[1] Drive [tooltip: Amount of distortion]",0.5, 0, 1, 0.01); offset = hslider("[2] Offset [tooltip: Brings in even harmonics]",0.6, 0, 1, 0.01); dry_wet(x,y) = *(wet) + dry*x, *(wet) + dry*y with { wet = 0.5*(drywet+1.0); dry = 1.0-wet; }; disto = ef.cubicnl_nodc(drive:si.smoo,offset:si.smoo) :> _; //2ch random generator noise = no.multinoise(2) : ba.latch(os.oscrs(freq)),ba.latch(os.oscrs(freq)) : fi.lowpass(1,freq),fi.lowpass(1,freq); // select one of the two output channels of p channel1(p) = p : _,!; channel2(p) = p : !,_; ampdisto(channel) = disto : fi.resonbp(channel(noise)*2000+4000,10, 1); //filters with noise as input process = no.noise <: _,_,ampdisto(channel1), ampdisto(channel2) : dry_wet :> _; //process = noise;
https://raw.githubusercontent.com/etiennedemoulin/amplifdisto/b21a8986f61d01101d10915e92a811b71ef676b0/filter.dsp
faust
2ch random generator select one of the two output channels of p filters with noise as input process = noise;
import("stdfaust.lib"); freq = hslider("frequency",1,0.1,3,0.001); drywet = hslider("dry/wet",-1,-1,1,0.001) : si.smoo; drive = hslider("[1] Drive [tooltip: Amount of distortion]",0.5, 0, 1, 0.01); offset = hslider("[2] Offset [tooltip: Brings in even harmonics]",0.6, 0, 1, 0.01); dry_wet(x,y) = *(wet) + dry*x, *(wet) + dry*y with { wet = 0.5*(drywet+1.0); dry = 1.0-wet; }; disto = ef.cubicnl_nodc(drive:si.smoo,offset:si.smoo) :> _; noise = no.multinoise(2) : ba.latch(os.oscrs(freq)),ba.latch(os.oscrs(freq)) : fi.lowpass(1,freq),fi.lowpass(1,freq); channel1(p) = p : _,!; channel2(p) = p : !,_; ampdisto(channel) = disto : fi.resonbp(channel(noise)*2000+4000,10, 1); process = no.noise <: _,_,ampdisto(channel1), ampdisto(channel2) : dry_wet :> _;
def3d2e93c5ee517d36e043be3e0acaf7298929f1bf82d822de5ac808ab67f7e
Primatebuddy/MyStuff
noise.dsp
import("stdfaust.lib"); ctFreq = hslider("[0]cutoffFrequency",500,50,10000,0.01); q = hslider("[1]q",5,1,30,0.1); gain = hslider("[2]gain",1,0,1,0.01); t = button("[3]gate"); process = no.noise : fi.resonlp(ctFreq,q,gain)*t;
https://raw.githubusercontent.com/Primatebuddy/MyStuff/ce67052f1878b0daa0c075b1849628438213b17c/Faust/noise.dsp
faust
import("stdfaust.lib"); ctFreq = hslider("[0]cutoffFrequency",500,50,10000,0.01); q = hslider("[1]q",5,1,30,0.1); gain = hslider("[2]gain",1,0,1,0.01); t = button("[3]gate"); process = no.noise : fi.resonlp(ctFreq,q,gain)*t;
0783982fae1e40c1ba03edee97f9b1ad7010581d16fd2a20de1206f8a24e1f6f
resonantdsp/SwankyAmpFaust
TriodeGrid.dsp
// Swanky Amp tube amplifier simulation // Copyright (C) 2020 Garrin McGoldrick // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. import("stdfaust.lib"); import("common.dsp"); triode_grid = environment { // High pass frequency for the signal coming into the tridoe, this is the // result of the capacitor after the input signal and also means we don't // have to worry about signal biases. This has an audible impact on the // signal and can be used to shape it into the desired tone. hp_freq = nentry("hp_freq",0,0,1,1); // Observed a soft compression on the upper portion of the signal before // grid conduction regime. This is well modelled by `cap_comp`. Suspect // this is the result of some capacitance between grid and plate? tau = nentry("tau",0,0,1,1); ratio = nentry("ratio",0,0,1,1); smooth = nentry("smooth",0,0,1,1); level = nentry("level",0,0,1,1); cap = nentry("cap",0,0,1,1); clip = nentry("grid_clip",0,0,1,1); corner = nentry("grid_corner",0,0,1,1); // Convert to `cap_comp` parameters tau1 = tau : 1.0 / (ba.sec2samp(_) + 1); tau2 = tau * ratio : 1.0 / (ba.sec2samp(_) + 1); tau3 = tau * smooth : 1.0 / (ba.sec2samp(_) + 1); full = _ : fi.highpass(1, hp_freq) <: _, max(0, _ - level) : _, calc_charge_cap(tau1, tau2, cap) : _, si.smooth(1 - tau3) : - : soft_clip_up(corner, clip) : _; }; process = triode_grid.full;
https://raw.githubusercontent.com/resonantdsp/SwankyAmpFaust/2d44bc706394aced5126d5eb0902c33aaac66c54/dsp/TriodeGrid.dsp
faust
Swanky Amp tube amplifier simulation Copyright (C) 2020 Garrin McGoldrick This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. High pass frequency for the signal coming into the tridoe, this is the result of the capacitor after the input signal and also means we don't have to worry about signal biases. This has an audible impact on the signal and can be used to shape it into the desired tone. Observed a soft compression on the upper portion of the signal before grid conduction regime. This is well modelled by `cap_comp`. Suspect this is the result of some capacitance between grid and plate? Convert to `cap_comp` parameters
import("stdfaust.lib"); import("common.dsp"); triode_grid = environment { hp_freq = nentry("hp_freq",0,0,1,1); tau = nentry("tau",0,0,1,1); ratio = nentry("ratio",0,0,1,1); smooth = nentry("smooth",0,0,1,1); level = nentry("level",0,0,1,1); cap = nentry("cap",0,0,1,1); clip = nentry("grid_clip",0,0,1,1); corner = nentry("grid_corner",0,0,1,1); tau1 = tau : 1.0 / (ba.sec2samp(_) + 1); tau2 = tau * ratio : 1.0 / (ba.sec2samp(_) + 1); tau3 = tau * smooth : 1.0 / (ba.sec2samp(_) + 1); full = _ : fi.highpass(1, hp_freq) <: _, max(0, _ - level) : _, calc_charge_cap(tau1, tau2, cap) : _, si.smooth(1 - tau3) : - : soft_clip_up(corner, clip) : _; }; process = triode_grid.full;
475a4ce987bc4dd124bf1ba9bf431b54a52076a4b0166a75990e011520c52310
luke1241/MUSS3640_Vocal_Synth
glottalPulse.dsp
import("stdfaust.lib"); inFreq = hslider("Frequency", 110, 20, 1000, 1); alpha0Slide = hslider("a_0", 0.2, 0.01, 2.0, 0.001); alpha1Slide = hslider("a_1", 0.19, 0.01, 2.0, 0.001); avSlide = hslider("Av", 1.0, 0.0, 2.0, 0.1); t0Slide = hslider("T0", 1.0, 0.01, 2.0, 0.001); teSlide = hslider("Te", 1.2, 0.00, 4.0, 0.001); jitterGainSlide = hslider("Jitter Gain", 0.0, 0.0, 0.1, 0.001); jitterFreqSlide = hslider("Jitter Freq", 20, 1, 100, 1); noiseSlide = hslider("Noise", 0.001, 0.0, 1.0, 0.001); noiseColSlide = hslider("Noise Colour", 20000, 20, 24000, 1); pressureSlide = hslider("Pressure", 1.0, 0.0, 1.0, 0.001); inharmonicSlide = hslider("Inharmonics", 1.0, 0.0, 5.0, 0.001); ihRatioSlide = hslider("Inharmonic Ratio", 1.0, 0.0, 5.0, 0.01); jitter = os.osc(jitterFreqSlide)*jitterGainSlide; Av = avSlide; //Amplitude of voicing T0 = t0Slide; //Glottal time interval //Tp = alpha0*T0; //Glottal opening time //Tc = alpha1*T0; //Glottal closing time //Te = Tc + Tp; //Glottal closed time alpha0 = alpha0Slide + jitter; //Increasing slope alpha1 = alpha1Slide + jitter; //Decreasing slope phasor(freq) = (+(freq/ma.SR) ~ ma.frac); sinewave = sin(phasor(freq)*2*ma.PI); freq = inFreq + (os.osc(inFreq*ihRatioSlide)*inharmonicSlide) + (os.osc(inFreq*ihRatioSlide*1.5)*inharmonicSlide); /* * REF: * Stochastic models of glottal pulses from the Rosenberg and * Liljencrants-Fant models with unified parameters * * E. Cataldo, D. Bahiano * * <https://www.sciencedirect.com/science/article/pii/S0885230821000322> (pg 3) * * Params: * -Av = Amplitude of voicing * -T0 = Glottal time interval * -Te = Glottal closed time * -a0 = Increase slope constant * -a1 = Decrease slope constant */ rosenbergModel(freq, Av, T0, Te, a0, a1) = ba.if(rCond2_(t_), rosenberg1_(-t_), rosenberg2_(-t_)) * rCond3_(t_) with { t_ = (phasor(freq)*pressureSlide) + (no.noise*noiseSlide : fi.highpass(1, noiseColSlide)); Tp_ = a0*T0; Tc_ = a1*T0; Te_ = Te; rosenberg1_(t_) = 0.5*Av*(1-cos(ma.PI*t_/Tp_)) * rCond1_(t_); rosenberg2_(t_) = Av*cos(((ma.PI*(t_-Tp_))/(2*Tc_))) * rCond2_(t_); rCond1_(t_) = 0 < t_ < Tp_; rCond2_(t_) = Tp_ < t_ < Te_; rCond3_(t_) = (Te_ < t_ < T0); }; process = rosenbergModel(freq, Av, T0, teSlide, alpha0, alpha1) <: _,_;
https://raw.githubusercontent.com/luke1241/MUSS3640_Vocal_Synth/3586a6599ddb5db726d7c420f53aa9ccb161de75/glottalPulse.dsp
faust
Amplitude of voicing Glottal time interval Tp = alpha0*T0; //Glottal opening time Tc = alpha1*T0; //Glottal closing time Te = Tc + Tp; //Glottal closed time Increasing slope Decreasing slope * REF: * Stochastic models of glottal pulses from the Rosenberg and * Liljencrants-Fant models with unified parameters * * E. Cataldo, D. Bahiano * * <https://www.sciencedirect.com/science/article/pii/S0885230821000322> (pg 3) * * Params: * -Av = Amplitude of voicing * -T0 = Glottal time interval * -Te = Glottal closed time * -a0 = Increase slope constant * -a1 = Decrease slope constant
import("stdfaust.lib"); inFreq = hslider("Frequency", 110, 20, 1000, 1); alpha0Slide = hslider("a_0", 0.2, 0.01, 2.0, 0.001); alpha1Slide = hslider("a_1", 0.19, 0.01, 2.0, 0.001); avSlide = hslider("Av", 1.0, 0.0, 2.0, 0.1); t0Slide = hslider("T0", 1.0, 0.01, 2.0, 0.001); teSlide = hslider("Te", 1.2, 0.00, 4.0, 0.001); jitterGainSlide = hslider("Jitter Gain", 0.0, 0.0, 0.1, 0.001); jitterFreqSlide = hslider("Jitter Freq", 20, 1, 100, 1); noiseSlide = hslider("Noise", 0.001, 0.0, 1.0, 0.001); noiseColSlide = hslider("Noise Colour", 20000, 20, 24000, 1); pressureSlide = hslider("Pressure", 1.0, 0.0, 1.0, 0.001); inharmonicSlide = hslider("Inharmonics", 1.0, 0.0, 5.0, 0.001); ihRatioSlide = hslider("Inharmonic Ratio", 1.0, 0.0, 5.0, 0.01); jitter = os.osc(jitterFreqSlide)*jitterGainSlide; phasor(freq) = (+(freq/ma.SR) ~ ma.frac); sinewave = sin(phasor(freq)*2*ma.PI); freq = inFreq + (os.osc(inFreq*ihRatioSlide)*inharmonicSlide) + (os.osc(inFreq*ihRatioSlide*1.5)*inharmonicSlide); rosenbergModel(freq, Av, T0, Te, a0, a1) = ba.if(rCond2_(t_), rosenberg1_(-t_), rosenberg2_(-t_)) * rCond3_(t_) with { t_ = (phasor(freq)*pressureSlide) + (no.noise*noiseSlide : fi.highpass(1, noiseColSlide)); Tp_ = a0*T0; Tc_ = a1*T0; Te_ = Te; rosenberg1_(t_) = 0.5*Av*(1-cos(ma.PI*t_/Tp_)) * rCond1_(t_); rosenberg2_(t_) = Av*cos(((ma.PI*(t_-Tp_))/(2*Tc_))) * rCond2_(t_); rCond1_(t_) = 0 < t_ < Tp_; rCond2_(t_) = Tp_ < t_ < Te_; rCond3_(t_) = (Te_ < t_ < T0); }; process = rosenbergModel(freq, Av, T0, teSlide, alpha0, alpha1) <: _,_;
a3a105df4e78b6475b1128eecc317bceceb7d99cc7d55880e0f953f9257168bd
grame-cncm/faustdoc
exfaust2.dsp
import("stdfaust.lib"); freq = hslider("frequency[midi:keyoff 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
https://raw.githubusercontent.com/grame-cncm/faustdoc/a54d79beea1d5c64fc9a99d45ac24690c7ade7b2/docs/manual/midi/exfaust2/exfaust2.dsp
faust
import("stdfaust.lib"); freq = hslider("frequency[midi:keyoff 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
1309b048157059c7823d112a224c2a350cb4dfd8a8070b15e4545a949b6ba11d
grame-cncm/faustdoc
exfaust4.dsp
import("stdfaust.lib"); freq = hslider("frequency[midi:keypress 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/midi/exfaust4/exfaust4.dsp
faust
import("stdfaust.lib"); freq = hslider("frequency[midi:keypress 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
606c47c7edf522cbb9683e434b6854b056591ac746ebe284b22d3bce06b4c80d
grame-cncm/faustdoc
exfaust1.dsp
import("stdfaust.lib"); freq = hslider("frequency[midi:keyon 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/midi/exfaust1/exfaust1.dsp
faust
import("stdfaust.lib"); freq = hslider("frequency[midi:keyon 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
fef71cd29780cb3ffd8ccdfc5bc11bf62437ad8744657d7a418e7404de167d2a
grame-cncm/faustdoc
exfaust0.dsp
import("stdfaust.lib"); freq = hslider("frequency[midi:ctrl 11]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/midi/exfaust0/exfaust0.dsp
faust
import("stdfaust.lib"); freq = hslider("frequency[midi:ctrl 11]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
31d1c3430350c139ee540e586a6c6f4e55065d54d55831dae5f637ec7b868630
grame-cncm/faustdoc
exfaust3.dsp
import("stdfaust.lib"); freq = hslider("frequency[midi:key 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/midi/exfaust3/exfaust3.dsp
faust
import("stdfaust.lib"); freq = hslider("frequency[midi:key 62]",200,50,1000,0.01) : si.smoo; process = os.sawtooth(freq);
dbbd2dfdde553ae2c6c2bb9518ac922d2732d17366bc93d773305cde812c7405
grame-cncm/faustdoc
exfaust31.dsp
import("stdfaust.lib"); // A frequency aliasing phenomenon if one goes beyond SR/2 process = os.osc(hslider("freq", 440, 20, 20000, 1)) * hslider("gain", 0.1, 0, 1, 0.01);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-04-10-faust-101/exfaust31/exfaust31.dsp
faust
A frequency aliasing phenomenon if one goes beyond SR/2
import("stdfaust.lib"); process = os.osc(hslider("freq", 440, 20, 20000, 1)) * hslider("gain", 0.1, 0, 1, 0.01);
e6639109ec8bdf5db67cc27aa31dcb797ae8416892693f68f697a654b39e4478
grame-cncm/faustdoc
exfaust8.dsp
import("stdfaust.lib"); ctFreq = hslider("cutoffFrequency",500,50,10000,0.01); q = hslider("q",5,1,30,0.1); gain = hslider("gain",1,0,1,0.01); process = no.noise : fi.resonlp(ctFreq,q,gain);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/quick-start/exfaust8/exfaust8.dsp
faust
import("stdfaust.lib"); ctFreq = hslider("cutoffFrequency",500,50,10000,0.01); q = hslider("q",5,1,30,0.1); gain = hslider("gain",1,0,1,0.01); process = no.noise : fi.resonlp(ctFreq,q,gain);
6ec977dece12571cdfe5421384b7fcad44b01092b3c777f9d4852abd3517654b
grame-cncm/faustdoc
exfaust32.dsp
import("stdfaust.lib"); //---------------------------------------------------------------------- // partial(f,n); // f = frequency in Hz // n = partial number starting at 1 partial(n,f) = os.osc(f*n) * hslider("partial %n", 0.25, 0, 1, 0.01); process = sum(i, 4, partial(i+1, hslider("freq", 440, 20, 8000, 0.001)));
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-04-10-faust-101/exfaust32/exfaust32.dsp
faust
---------------------------------------------------------------------- partial(f,n); f = frequency in Hz n = partial number starting at 1
import("stdfaust.lib"); partial(n,f) = os.osc(f*n) * hslider("partial %n", 0.25, 0, 1, 0.01); process = sum(i, 4, partial(i+1, hslider("freq", 440, 20, 8000, 0.001)));
db6b1352c3ad84a13b5fe2a4684bd569e34da5c99ad047b0806d17788eb08dee
grame-cncm/faustdoc
exfaust47.dsp
import("stdfaust.lib"); // FM: Frequency modulation FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1), hslider("amp modulation", 0, 0, 1, 0.01) ) <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-04-10-faust-101/exfaust47/exfaust47.dsp
faust
FM: Frequency modulation
import("stdfaust.lib"); FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1), hslider("amp modulation", 0, 0, 1, 0.01) ) <: _,_;
264ce99b9b9dcf2bdd58c2378fa6c4aecc93f7da54648ab1ff3b058452b4df8d
grame-cncm/faustdoc
exfaust23.dsp
import("stdfaust.lib"); // FM: Frequency moulation FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1), hslider("amp modulation", 0, 0, 1, 0.01) ) <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-03-24-faust-citi/exfaust23/exfaust23.dsp
faust
FM: Frequency moulation
import("stdfaust.lib"); FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1), hslider("amp modulation", 0, 0, 1, 0.01) ) <: _,_;
b123e4630e1ce8cf89d423d8c661bc544183ae6253b5ccd9cfe48fcfcb9b1885
grame-cncm/faustdoc
exfaust10.dsp
import("stdfaust.lib"); ctFreq = hslider("[0]cutoffFrequency",500,50,10000,0.01) : si.smoo; q = hslider("[1]q",5,1,30,0.1) : si.smoo; gain = hslider("[2]gain",1,0,1,0.01) : si.smoo; t = button("[3]gate") : si.smoo; process = no.noise : fi.resonlp(ctFreq,q,gain)*t;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/quick-start/exfaust10/exfaust10.dsp
faust
import("stdfaust.lib"); ctFreq = hslider("[0]cutoffFrequency",500,50,10000,0.01) : si.smoo; q = hslider("[1]q",5,1,30,0.1) : si.smoo; gain = hslider("[2]gain",1,0,1,0.01) : si.smoo; t = button("[3]gate") : si.smoo; process = no.noise : fi.resonlp(ctFreq,q,gain)*t;
f178b1581145e71570e1c1a8a8297df1d7c02a6ff725ab4aedd9c8a02789b05d
orchidas/Music-256A
tremolo.dsp
import("stdfaust.lib"); gain = hslider("gain",1,0,1,0.01) : si.smoo; gate = button("gate"); tremolo = *(1-depth*(os.osc(freq)*0.5+0.5)) with{ freq = hslider("frequency",5,0.1,15,0.01) : si.smoo; depth = hslider("depth",0,0,1,0.01) : si.smoo; }; process = hgroup("tremolo", par(i,2,tremolo*gain*gate));
https://raw.githubusercontent.com/orchidas/Music-256A/46c465a3f004a00723088f918106a854af863d08/ofEffectsChain/src/faust/tremolo.dsp
faust
import("stdfaust.lib"); gain = hslider("gain",1,0,1,0.01) : si.smoo; gate = button("gate"); tremolo = *(1-depth*(os.osc(freq)*0.5+0.5)) with{ freq = hslider("frequency",5,0.1,15,0.01) : si.smoo; depth = hslider("depth",0,0,1,0.01) : si.smoo; }; process = hgroup("tremolo", par(i,2,tremolo*gain*gate));
17e5b389c93701c2dbc2db8ee76739fb731d2572c95956ba89b7e1805cecf685
monodon-monoceros/modal_spring_reverb
springreverb.dsp
import("stdfaust.lib"); // Non Linear Pre Gain dwell = _*gain : ma.tanh with{ gain = hslider("[0] Dwell[style:knob]", 1,0,20,0.001) : si.smoo; }; // Predelay predelay = de.sdelay(0.2*ma.SR,4096, length*ma.SR) with{ length = 0.001*hslider("Preday[unit:ms][style:knob]", 0,0,200, 0.1):si.smoo; }; // Linear Modal Spring Model modalreverb = sum(i,N, fi.resonhp(modes((i+1+15)),q,1/N)) // + 15 in modes function because of filter stability with{ q = hslider("[1] Damping[style:knob]", 500, 50 ,5000,1) : si.smoo; //damping = 0.001; 0.00005 -0.01, q = 1/(2*damping); // Material constant - sqrt(E/rho), Steel = 5063, rubber = 60, concrete = 2357 material = hslider("[2] Material[unit:m/s][style:knob]", 5063,4000,6000,1) : si.smoo; length = hslider("[3] Length[unit:m][style:knob]", 2.5,1.5,7.5,0.001) : si.smoo; // length of unwounded wire radius = 0.000175; // in [m] modes(n) = ma.PI/4 * material * radius * (1/length^2) * n^2; // in [Hz] N = 300; // Number of Modes // N 447 modes in range (0-22050Hz) for steel, 2,5m length and radius of 0.175 mm }; // Cutoff Transition Frequency cofilter = fi.lowpass6e(cutoff) with{ cutoff = hslider("[4] Cutoff [unit:Hz][style:knob]", 4500,1000,15000, 0.01):si.smoo; }; //Effectline fxline = predelay : dwell <: modalreverb : fi.lowpass6e(cutoff); //Dry-Wet Signal Mixer drywet(fx) = _ <: _, fx : *(1-w) , *(w) :> _ with { w = hslider("[5] Dry-Wet[style:knob]", 0.5, 0, 1, 0.01):si.smoo; }; process = drywet(fxline) <: _,_; // To Do: Button to "kick" the Springs // kick= 5000*button("Kick"); // fxline = _+kick: ...
https://raw.githubusercontent.com/monodon-monoceros/modal_spring_reverb/bba6fbed15950a89b09df84416557dc7a80b3f97/faust_jan/springreverb.dsp
faust
Non Linear Pre Gain Predelay Linear Modal Spring Model + 15 in modes function because of filter stability damping = 0.001; 0.00005 -0.01, q = 1/(2*damping); Material constant - sqrt(E/rho), Steel = 5063, rubber = 60, concrete = 2357 length of unwounded wire in [m] in [Hz] Number of Modes N 447 modes in range (0-22050Hz) for steel, 2,5m length and radius of 0.175 mm Cutoff Transition Frequency Effectline Dry-Wet Signal Mixer To Do: Button to "kick" the Springs kick= 5000*button("Kick"); fxline = _+kick: ...
import("stdfaust.lib"); dwell = _*gain : ma.tanh with{ gain = hslider("[0] Dwell[style:knob]", 1,0,20,0.001) : si.smoo; }; predelay = de.sdelay(0.2*ma.SR,4096, length*ma.SR) with{ length = 0.001*hslider("Preday[unit:ms][style:knob]", 0,0,200, 0.1):si.smoo; }; with{ material = hslider("[2] Material[unit:m/s][style:knob]", 5063,4000,6000,1) : si.smoo; }; cofilter = fi.lowpass6e(cutoff) with{ cutoff = hslider("[4] Cutoff [unit:Hz][style:knob]", 4500,1000,15000, 0.01):si.smoo; }; fxline = predelay : dwell <: modalreverb : fi.lowpass6e(cutoff); drywet(fx) = _ <: _, fx : *(1-w) , *(w) :> _ with { w = hslider("[5] Dry-Wet[style:knob]", 0.5, 0, 1, 0.01):si.smoo; }; process = drywet(fxline) <: _,_;
5643592273a755e36aa9e5fc507ce9d9704a5e8b09d5754bbd351ab5ce5962b4
Corredor1230/varikeyTests
FaustSynth.dsp
import("stdfaust.lib"); freq1=hslider("Frequency[scale:log]",200,20,20000,1):si.smoo; freq2=hslider("Frequency2[scale:log]",300,20,20000,1):si.smoo; filtCutoff=vslider("Cutoff [scale:log]",1000,20,20000,1):si.smoo; lowPass=fi.lowpass(3,filtCutoff); gain=hslider("Gain",0.1,0,1,0.01):si.smoo; oscillator(x,y)=(os.sawtooth(x)*gain):lowPass; process = oscillator(freq1),oscillator(freq2);
https://raw.githubusercontent.com/Corredor1230/varikeyTests/763b98510f2df460bbdeaff7dc219bcbd5e15c5f/ExampleCode/TestSynth/Source/faust/FaustSynth.dsp
faust
import("stdfaust.lib"); freq1=hslider("Frequency[scale:log]",200,20,20000,1):si.smoo; freq2=hslider("Frequency2[scale:log]",300,20,20000,1):si.smoo; filtCutoff=vslider("Cutoff [scale:log]",1000,20,20000,1):si.smoo; lowPass=fi.lowpass(3,filtCutoff); gain=hslider("Gain",0.1,0,1,0.01):si.smoo; oscillator(x,y)=(os.sawtooth(x)*gain):lowPass; process = oscillator(freq1),oscillator(freq2);
6a34bb593e8fae02c3046ca23150d31777f1e5857ce655b1af3965eb5b768886
grame-cncm/smartfaust
sampler_crybaby2_v0.1.dsp
declare name "sfCrybaby"; declare version "1.4"; declare author "Christophe Lebreton"; declare license "BSD & STK-4.3"; declare copyright "SmartFaust - GRAME(c)2013-2018"; import("stdfaust.lib"); //-------------------- MAIN ------------------------------- process = _<:_,crybaby_ios:dry_wet_mono; //-------------------- PARAMETERS ------------------------------- lowpassmotion = fi.lowpass(N,fc) with { //fc= hslider("h:motion filter/high_cut [hidden:1]",10,0.01,10,0.01); fc=10; N= 1; // order of filter }; // direct from effect.lib ( "Julius O. Smith ") and adapted by Christophe Lebreton for ios crybaby_ios = ve.crybaby(wah) with { wah = hslider("v:sfPlayer parameter(s)/[1] Wah parameter[acc:0 0 -10 0 10][color: 255 0 0 ][hidden:1]",0,0,1,0.01):fi.lowpass(1,1); //[accx:1 0 0. 0] }; // Dry Wet avec expression en % //////////////////////////////////////// drywet = hslider ("v:sfPlayer parameter(s)/ DryWet [acc:1 0 -10 0 10][color: 255 255 0 ] [hidden:1]", 0, 0, 100, 1):*(0.02):-(1): fi.lowpass(1,1); //[accy:1 0 0 0] dry_wet_mono(x) = *(wet) + dry*x with { wet = 0.5*(drywet+1.0); dry = 1.0-wet; };
https://raw.githubusercontent.com/grame-cncm/smartfaust/0a9c93ea7eda9899e1401402901848f221366c99/src/sfPlayer/sampler_crybaby2_v0.1.dsp
faust
-------------------- MAIN ------------------------------- -------------------- PARAMETERS ------------------------------- fc= hslider("h:motion filter/high_cut [hidden:1]",10,0.01,10,0.01); order of filter direct from effect.lib ( "Julius O. Smith ") and adapted by Christophe Lebreton for ios [accx:1 0 0. 0] Dry Wet avec expression en % //////////////////////////////////////// [accy:1 0 0 0]
declare name "sfCrybaby"; declare version "1.4"; declare author "Christophe Lebreton"; declare license "BSD & STK-4.3"; declare copyright "SmartFaust - GRAME(c)2013-2018"; import("stdfaust.lib"); process = _<:_,crybaby_ios:dry_wet_mono; lowpassmotion = fi.lowpass(N,fc) with { fc=10; }; crybaby_ios = ve.crybaby(wah) with { }; dry_wet_mono(x) = *(wet) + dry*x with { wet = 0.5*(drywet+1.0); dry = 1.0-wet; };
2721f1d09a5c2ba4ac1a27950c455a28fb04e021df0e92a3fba3c1eba9700ebf
grame-cncm/faustdoc
exfaust5.dsp
import("stdfaust.lib"); ctFreq = 500; q = 5; gain = 1; filter = fi.resonlp(ctFreq,q,gain); process = no.noise <: filter,filter;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/quick-start/exfaust5/exfaust5.dsp
faust
import("stdfaust.lib"); ctFreq = 500; q = 5; gain = 1; filter = fi.resonlp(ctFreq,q,gain); process = no.noise <: filter,filter;
0b154dbf9d69b0058384421feb62064ecf4ca7a58386dea60279e1d4744410c7
grame-cncm/faustdoc
exfaust20.dsp
import("stdfaust.lib"); nBands = 8; filterBank(N) = hgroup("Filter Bank",seq(i,N,oneBand(i))) with { oneBand(j) = vgroup("[%j]Band %a",fi.peak_eq(l,f,b)) with { a = j+1; // just so that band numbers don't start at 0 l = vslider("[2]Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("[1]Freq",(80+(1000*8/N*(j+1)-80)),20,20000,0.01) : si.smoo; b = f/hslider("[0]Q[style:knob]",1,1,50,0.01) : si.smoo; }; }; process = filterBank(nBands);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/syntax/exfaust20/exfaust20.dsp
faust
just so that band numbers don't start at 0
import("stdfaust.lib"); nBands = 8; filterBank(N) = hgroup("Filter Bank",seq(i,N,oneBand(i))) with { oneBand(j) = vgroup("[%j]Band %a",fi.peak_eq(l,f,b)) with { l = vslider("[2]Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("[1]Freq",(80+(1000*8/N*(j+1)-80)),20,20000,0.01) : si.smoo; b = f/hslider("[0]Q[style:knob]",1,1,50,0.01) : si.smoo; }; }; process = filterBank(nBands);
b19f28c1145f6b18908867bcceefca75b1470a16977dd5cefa490aaff3367890
grame-cncm/smartfaust
sfMoulin.dsp
declare name "sfMoulin"; declare version "1.02"; declare author "Christophe Lebreton"; declare license "BSD & STK-4.3"; declare copyright "SmartFaust - GRAME(c)2013-2018"; import("stdfaust.lib"); import("moulin_v0.1.lib"); //-------------------- MAIN ------------------------------- process = vgroup( "select your sample 1 to 8",(player_A, player_B, player_C, player_D, player_E, player_F, player_G, player_H) :multiselect(8, select_sample):fi.dcblockerat(50):*(Maccel)):*(out) with { out = checkbox ("v:sfMoulin/ON/OFF"):si.smooth(0.998); }; ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Accelerometer Part /////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Usage: _:*(Maccel):_ // this function is useful for smooth control from accelerometers accel_x = hslider("v:sfMoulin parameter(s)/acc_x [acc:0 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1); //[accx:1 0 0 0] accel_y = hslider("v:sfMoulin parameter(s)/acc_y [acc:1 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1); //[accy:1 0 0 0] accel_z = hslider("v:sfMoulin parameter(s)/acc_z [acc:2 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1); //[accz:1 0 0 0] lowpassfilter = fi.lowpass(N,fc) with { //fc=hslider("high_cut [hidden:1]",0.5,0.001,10,0.1); fc=0.5; N= 1; // order of filter }; lowpassmotion = fi.lowpass(N,fc) with { //fc= hslider("high_cut [hidden:1]",10,0.01,10,0.01); fc=10; N= 1; // order of filter }; //fb=hslider("low_cut [hidden:1]",15,0.1,15,0.01); fb=15; dc(x)=x:fi.dcblockerat(fb); //offset = hslider ("thr_accel [hidden:1]",9.99,0,9.99,0.01); offset =9.99; quad(x)=dc(x)*dc(x); Accel = quad(accel_x),quad(accel_y),quad(accel_z):> sqrt:-(offset):/((10)-(offset)):max(0.):min(1.); // Maccel mean Motion with accelerometer //Maccel = Accel:lowpassfilter:min(1.); Maccel = Accel:an.amp_follower_ud (env_up,env_down) with { env_up = 0; env_down = hslider ( "v:sfMoulin parameter(s)/fade_out[acc:1 0 -10 0 10][color: 255 255 0 ][hidden:1]", 130,0,1000,1)*0.001: fi.lowpass(1,1); }; // Taccel mean Trigger from accelerometer alike a shock detection to start ( send 1 )and from end of motion from Maccel ( send 0 ) // it is necessary here to set to 1 when there is a shock via accelero // the sound is playing in loop and stops from a level : Maccel < specific level. // the volume associated with the sound via Maccel must also be at 0 from this threshold // Trig_up and trig_donw detect a transition up and down from each thresholds trig_up(c) = s with { //threshold_up = hslider ("thr_up",0.99,0.5,1,0.001); threshold_up = 0.999; s = ((c'<= threshold_up)&(c > threshold_up)); }; trig_down(c) = (-1) * s with { //threshold_down = hslider ("thr_down",0.1,0.,8,0.01); threshold_down = 0.0001; s = ((c'>= threshold_down)&(c < threshold_down)); }; Taccel = ((Accel:trig_up),(Maccel:trig_down):+):(+:max(0):min(1))~_; ///////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////// // Play buffer /////// select_sample = int (nentry("v:sfMoulin/Select Sample[style:menu{'1':1;'2':2;'3':3;'4':4;'5':5;'6':6;'7':7;'8':8}]", 1, 1, 8, 1)):-(1); multiselect(n,s) = par(i,n, *(i==int(s))) :> _; //speed = hslider ("speed playback [accy:1 0 0 0][color: 255 100 255 ]",0,-10,10,0.01): lowpass(1,1); //speed = 1; // version with gyro //speed = vslider ("speed [gyroy:1 0 0 0][color: 0 255 0 ][hidden:1]",1,-3,3,0.001):smooth(0.998):max(-1):min(1); // version with accelero speed = Maccel:max(-1):min(1); player(size)= (int)((0):+~(+(speed): * (Taccel): fmod(_,max(1,size)))):abs: int; player_A = player( soundFileSize_sampleA) : readSoundFileA; player_B = player( soundFileSize_sampleB) : readSoundFileB; player_C = player( soundFileSize_sampleC) : readSoundFileC; player_D = player( soundFileSize_sampleD) : readSoundFileD; player_E = player( soundFileSize_sampleE) : readSoundFileE; player_F = player( soundFileSize_sampleF) : readSoundFileF; player_G = player( soundFileSize_sampleG) : readSoundFileG; player_H = player( soundFileSize_sampleH) : readSoundFileH; ////////////////
https://raw.githubusercontent.com/grame-cncm/smartfaust/0a9c93ea7eda9899e1401402901848f221366c99/src/sfMoulin/sfMoulin.dsp
faust
-------------------- MAIN ------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////// Accelerometer Part /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// Usage: _:*(Maccel):_ // this function is useful for smooth control from accelerometers [accx:1 0 0 0] [accy:1 0 0 0] [accz:1 0 0 0] fc=hslider("high_cut [hidden:1]",0.5,0.001,10,0.1); order of filter fc= hslider("high_cut [hidden:1]",10,0.01,10,0.01); order of filter fb=hslider("low_cut [hidden:1]",15,0.1,15,0.01); offset = hslider ("thr_accel [hidden:1]",9.99,0,9.99,0.01); Maccel mean Motion with accelerometer Maccel = Accel:lowpassfilter:min(1.); Taccel mean Trigger from accelerometer alike a shock detection to start ( send 1 )and from end of motion from Maccel ( send 0 ) it is necessary here to set to 1 when there is a shock via accelero the sound is playing in loop and stops from a level : Maccel < specific level. the volume associated with the sound via Maccel must also be at 0 from this threshold Trig_up and trig_donw detect a transition up and down from each thresholds threshold_up = hslider ("thr_up",0.99,0.5,1,0.001); threshold_down = hslider ("thr_down",0.1,0.,8,0.01); /////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////// Play buffer /////// speed = hslider ("speed playback [accy:1 0 0 0][color: 255 100 255 ]",0,-10,10,0.01): lowpass(1,1); speed = 1; version with gyro speed = vslider ("speed [gyroy:1 0 0 0][color: 0 255 0 ][hidden:1]",1,-3,3,0.001):smooth(0.998):max(-1):min(1); version with accelero //////////////
declare name "sfMoulin"; declare version "1.02"; declare author "Christophe Lebreton"; declare license "BSD & STK-4.3"; declare copyright "SmartFaust - GRAME(c)2013-2018"; import("stdfaust.lib"); import("moulin_v0.1.lib"); process = vgroup( "select your sample 1 to 8",(player_A, player_B, player_C, player_D, player_E, player_F, player_G, player_H) :multiselect(8, select_sample):fi.dcblockerat(50):*(Maccel)):*(out) with { out = checkbox ("v:sfMoulin/ON/OFF"):si.smooth(0.998); }; lowpassfilter = fi.lowpass(N,fc) with { fc=0.5; }; lowpassmotion = fi.lowpass(N,fc) with { fc=10; }; fb=15; dc(x)=x:fi.dcblockerat(fb); offset =9.99; quad(x)=dc(x)*dc(x); Accel = quad(accel_x),quad(accel_y),quad(accel_z):> sqrt:-(offset):/((10)-(offset)):max(0.):min(1.); Maccel = Accel:an.amp_follower_ud (env_up,env_down) with { env_up = 0; env_down = hslider ( "v:sfMoulin parameter(s)/fade_out[acc:1 0 -10 0 10][color: 255 255 0 ][hidden:1]", 130,0,1000,1)*0.001: fi.lowpass(1,1); }; trig_up(c) = s with { threshold_up = 0.999; s = ((c'<= threshold_up)&(c > threshold_up)); }; trig_down(c) = (-1) * s with { threshold_down = 0.0001; s = ((c'>= threshold_down)&(c < threshold_down)); }; Taccel = ((Accel:trig_up),(Maccel:trig_down):+):(+:max(0):min(1))~_; select_sample = int (nentry("v:sfMoulin/Select Sample[style:menu{'1':1;'2':2;'3':3;'4':4;'5':5;'6':6;'7':7;'8':8}]", 1, 1, 8, 1)):-(1); multiselect(n,s) = par(i,n, *(i==int(s))) :> _; speed = Maccel:max(-1):min(1); player(size)= (int)((0):+~(+(speed): * (Taccel): fmod(_,max(1,size)))):abs: int; player_A = player( soundFileSize_sampleA) : readSoundFileA; player_B = player( soundFileSize_sampleB) : readSoundFileB; player_C = player( soundFileSize_sampleC) : readSoundFileC; player_D = player( soundFileSize_sampleD) : readSoundFileD; player_E = player( soundFileSize_sampleE) : readSoundFileE; player_F = player( soundFileSize_sampleF) : readSoundFileF; player_G = player( soundFileSize_sampleG) : readSoundFileG; player_H = player( soundFileSize_sampleH) : readSoundFileH;
22f66ef8f2094087bb364d4b901fca4d27a010ec1701f17a56a50e2e995fa3fc
grame-cncm/smartfaust
sample_player_v0.1a.dsp
declare name "Sample_player_v0.1"; declare version "1.01"; declare author "Christophe Lebreton"; declare license "BSD"; declare copyright "SmartFaust - GRAME(c)2013-2018"; import("stdfaust.lib"); import("sample_v0.1.lib"); //-------------------- MAIN ------------------------------- process = vgroup( "select your sample 1 to 10",(player_A, player_B, player_C, player_D, player_E, player_F, player_G, player_H, player_I, player_J) :multiselect(10, select_sample):fi.dcblockerat(50):*(Maccel)); ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Accelerometer Part /////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Usage: _:*(Maccel):_ // this function is useful for smooth control from accelerometers accel_x = hgroup ("v:sfPlayer parameter(s)/accel [hidden:1]", vslider("acc_x [acc:0 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1)); accel_y = hgroup ("v:sfPlayer parameter(s)/accel [hidden:1]", vslider("acc_y [acc:1 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1)); accel_z = hgroup ("v:sfPlayer parameter(s)/accel [hidden:1]", vslider("acc_z [acc:2 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1)); lowpassfilter = fi.lowpass(N,fc) with { //fc=hslider("high_cut [hidden:1]",0.5,0.001,10,0.1); fc=0.5; N= 1; // order of filter }; lowpassmotion = fi.lowpass(N,fc) with { //fc= hslider("h:motion filter/high_cut [hidden:1]",10,0.01,10,0.01); fc=10; N= 1; // order of filter }; //fb=hslider("low_cut [hidden:1]",15,0.1,15,0.01); fb=15; dc(x)=x:fi.dcblockerat(fb); //offset = hslider ("thr_accel [hidden:1]",9.99,0,9.99,0.01); offset=9.99; quad(x)=dc(x)*dc(x); Accel = quad(accel_x),quad(accel_y),quad(accel_z):> sqrt:-(offset):/((10)-(offset)):max(0.):min(1.); // Maccel mean Motion with accelerometer //Maccel = Accel:lowpassfilter:min(1.); Maccel = Accel:an.amp_follower_ud (env_up,env_down) with { env_up = hslider ( "v :sfPlayer parameter(s)/fade_in [acc:1 0 -10 0 10][color: 255 255 0 ][hidden:1]", 130,0,1000,1)*0.001:fi.lowpass(1,1); //[accy:1 0 130 0] env_down = hslider ( "v:sfPlayer parameter(s)/fade_out[acc:1 0 -10 0 10][color: 255 255 0 ][hidden:1]", 130,0,1000,1)*0.001:fi.lowpass(1,1); //[accy:1 0 130 0] }; // Taccel mean Trigger from accelerometer alike a shock detection to start ( send 1 )and from end of motion from Maccel ( send 0 ) // it is necessary here to set to 1 when there is a shock via accelero // the sound is playing in loop and stops from a level : Maccel < specific level. // the volume associated with the sound via Maccel must also be at 0 from this threshold // Trig_up and trig_donw detect a transition up and down from each thresholds trig_up(c) = s with { //threshold_up = hslider ("thr_up",0.99,0.5,1,0.001); threshold_up = 0.999; s = ((c'<= threshold_up)&(c > threshold_up)); }; trig_down(c) = (-1) * s with { //threshold_down = hslider ("thr_down",0.1,0.,8,0.01); threshold_down = 0.0001; s = ((c'>= threshold_down)&(c < threshold_down)); }; Taccel = ((Accel:trig_up),(Maccel:trig_down):+):(+:max(0):min(1))~_; ///////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////// // Play buffer /////// select_sample = int (nentry("v:sfPlayer parameter(s)/Select Sample[style:menu{'1':1;'2':2;'3':3;'4':4;'5':5;'6':6;'7':7;'8':8;'9':9;'10':10}]", 1, 1, 10, 1)):-(1); multiselect(n,s) = par(i,n, *(i==int(s))) :> _; //speed = hslider ("speed playback [accy:1 0 0 0][color: 255 100 255 ]",0,-10,10,0.01): lowpass(1,1); speed = 1; player(size)= (int)((0):+~(+(speed): * (Taccel): fmod(_,max(1,size)))):abs: int; player_A = player( soundFileSize_sampleA) : readSoundFileA; player_B = player( soundFileSize_sampleB) : readSoundFileB; player_C = player( soundFileSize_sampleC) : readSoundFileC; player_D = player( soundFileSize_sampleD) : readSoundFileD; player_E = player( soundFileSize_sampleE) : readSoundFileE; player_F = player( soundFileSize_sampleF) : readSoundFileF; player_G = player( soundFileSize_sampleG) : readSoundFileG; player_H = player( soundFileSize_sampleH) : readSoundFileH; player_I = player( soundFileSize_sampleI) : readSoundFileI; player_J = player( soundFileSize_sampleJ) : readSoundFileJ; ////////////////
https://raw.githubusercontent.com/grame-cncm/smartfaust/0a9c93ea7eda9899e1401402901848f221366c99/src/sfPlayer/sample_player_v0.1a.dsp
faust
-------------------- MAIN ------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////// Accelerometer Part /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// Usage: _:*(Maccel):_ // this function is useful for smooth control from accelerometers fc=hslider("high_cut [hidden:1]",0.5,0.001,10,0.1); order of filter fc= hslider("h:motion filter/high_cut [hidden:1]",10,0.01,10,0.01); order of filter fb=hslider("low_cut [hidden:1]",15,0.1,15,0.01); offset = hslider ("thr_accel [hidden:1]",9.99,0,9.99,0.01); Maccel mean Motion with accelerometer Maccel = Accel:lowpassfilter:min(1.); [accy:1 0 130 0] [accy:1 0 130 0] Taccel mean Trigger from accelerometer alike a shock detection to start ( send 1 )and from end of motion from Maccel ( send 0 ) it is necessary here to set to 1 when there is a shock via accelero the sound is playing in loop and stops from a level : Maccel < specific level. the volume associated with the sound via Maccel must also be at 0 from this threshold Trig_up and trig_donw detect a transition up and down from each thresholds threshold_up = hslider ("thr_up",0.99,0.5,1,0.001); threshold_down = hslider ("thr_down",0.1,0.,8,0.01); /////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////// Play buffer /////// speed = hslider ("speed playback [accy:1 0 0 0][color: 255 100 255 ]",0,-10,10,0.01): lowpass(1,1); //////////////
declare name "Sample_player_v0.1"; declare version "1.01"; declare author "Christophe Lebreton"; declare license "BSD"; declare copyright "SmartFaust - GRAME(c)2013-2018"; import("stdfaust.lib"); import("sample_v0.1.lib"); process = vgroup( "select your sample 1 to 10",(player_A, player_B, player_C, player_D, player_E, player_F, player_G, player_H, player_I, player_J) :multiselect(10, select_sample):fi.dcblockerat(50):*(Maccel)); accel_x = hgroup ("v:sfPlayer parameter(s)/accel [hidden:1]", vslider("acc_x [acc:0 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1)); accel_y = hgroup ("v:sfPlayer parameter(s)/accel [hidden:1]", vslider("acc_y [acc:1 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1)); accel_z = hgroup ("v:sfPlayer parameter(s)/accel [hidden:1]", vslider("acc_z [acc:2 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1)); lowpassfilter = fi.lowpass(N,fc) with { fc=0.5; }; lowpassmotion = fi.lowpass(N,fc) with { fc=10; }; fb=15; dc(x)=x:fi.dcblockerat(fb); offset=9.99; quad(x)=dc(x)*dc(x); Accel = quad(accel_x),quad(accel_y),quad(accel_z):> sqrt:-(offset):/((10)-(offset)):max(0.):min(1.); Maccel = Accel:an.amp_follower_ud (env_up,env_down) with { }; trig_up(c) = s with { threshold_up = 0.999; s = ((c'<= threshold_up)&(c > threshold_up)); }; trig_down(c) = (-1) * s with { threshold_down = 0.0001; s = ((c'>= threshold_down)&(c < threshold_down)); }; Taccel = ((Accel:trig_up),(Maccel:trig_down):+):(+:max(0):min(1))~_; select_sample = int (nentry("v:sfPlayer parameter(s)/Select Sample[style:menu{'1':1;'2':2;'3':3;'4':4;'5':5;'6':6;'7':7;'8':8;'9':9;'10':10}]", 1, 1, 10, 1)):-(1); multiselect(n,s) = par(i,n, *(i==int(s))) :> _; speed = 1; player(size)= (int)((0):+~(+(speed): * (Taccel): fmod(_,max(1,size)))):abs: int; player_A = player( soundFileSize_sampleA) : readSoundFileA; player_B = player( soundFileSize_sampleB) : readSoundFileB; player_C = player( soundFileSize_sampleC) : readSoundFileC; player_D = player( soundFileSize_sampleD) : readSoundFileD; player_E = player( soundFileSize_sampleE) : readSoundFileE; player_F = player( soundFileSize_sampleF) : readSoundFileF; player_G = player( soundFileSize_sampleG) : readSoundFileG; player_H = player( soundFileSize_sampleH) : readSoundFileH; player_I = player( soundFileSize_sampleI) : readSoundFileI; player_J = player( soundFileSize_sampleJ) : readSoundFileJ;
291cde17bf535078509e955113ae27e7fe0169039004cd70712f244d430d16c1
Corredor1230/varikeyTests
SimpleSynth.dsp
import("stdfaust.lib"); declare options "[midi:on]"; declare options "[nvoices:8]"; freq = hslider("freq", 440, 60, 1000, 1); gain = hslider("gain", 0.5, 0, 1, 0.01); gate = checkbox("gate"); att = vslider("att", 15, 10, 1500, 1) / 1000; dec = vslider("dec", 15, 10, 1500, 1) / 1000; sus = vslider("sus", 0.5, 0, 1, 0.001); rel = vslider("rel", 60, 10, 5000, 1) / 1000; envelope(attack, decay, sustain, release, gate) = _ * en.adsr(attack, decay, sustain, release, gate); masterGain(gain) = _ , _: par(i,2, _*gain / 5.5); process = os.osc(freq) <: par(i,2, envelope(att,dec,sus,rel,gate)): masterGain(gain);
https://raw.githubusercontent.com/Corredor1230/varikeyTests/973893526e548ad5bfb987845c5021a5fef992ec/SynthTests/PolyTest/Source/SimpleSynth.dsp
faust
import("stdfaust.lib"); declare options "[midi:on]"; declare options "[nvoices:8]"; freq = hslider("freq", 440, 60, 1000, 1); gain = hslider("gain", 0.5, 0, 1, 0.01); gate = checkbox("gate"); att = vslider("att", 15, 10, 1500, 1) / 1000; dec = vslider("dec", 15, 10, 1500, 1) / 1000; sus = vslider("sus", 0.5, 0, 1, 0.001); rel = vslider("rel", 60, 10, 5000, 1) / 1000; envelope(attack, decay, sustain, release, gate) = _ * en.adsr(attack, decay, sustain, release, gate); masterGain(gain) = _ , _: par(i,2, _*gain / 5.5); process = os.osc(freq) <: par(i,2, envelope(att,dec,sus,rel,gate)): masterGain(gain);
244cfa9aa8854f55a4dbf15ad9d798ceb0af89996596da57e94c79fcd16331a4
luke1241/MUSS3640_Vocal_Synth
dspVowelTable.dsp
import("stdfaust.lib"); //https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib values = environment { f(0) = (800,400,350,450,325,600,400,250,400,350,660,440,270,430,370,800, 350,270,450,325,650,400,290,400,350); // formant 0 freqs f(1) = (1150,1600,1700,800,700,1040,1620,1750,750,600,1120,1800,1850,820,630, 1150,2000,2140,800,700,1080,1700,1870,800,600); // formant 1 freqs f(2) = (2800,2700,2700,2830,2530,2250,2400,2600,2400,2400,2750,2700,2900,2700,2750, 2900,2800,2950,2830,2700,2650,2600,2800,2600,2700); // formant 2 freqs f(3) = (3500,3300,3700,3500,3500,2450,2800,3050,2600,2675,3000,3000,3350,3000,3000, 3900,3600,3900,3800,3800,2900,3200,3250,2800,2900); // formant 3 freqs f(4) = (4950,4950,4950,4950,4950,2750,3100,3340,2900,2950,3350,3300,3590,3300,3400, 4950,4950,4950,4950,4950,3250,3580,3540,3000,3300); // formant 4 freqs g(0) = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); // formant 0 gains g(1) = (0.630957,0.063096,0.100000,0.354813,0.251189,0.446684,0.251189,0.031623, 0.281838,0.100000,0.501187,0.199526,0.063096,0.316228,0.100000, 0.501187,0.100000,0.251189,0.281838,0.158489,0.501187,0.199526,0.177828, 0.316228,0.100000); // formant 1 gains g(2) = (0.100000,0.031623,0.031623,0.158489,0.031623,0.354813,0.354813,0.158489, 0.089125,0.025119,0.070795,0.125893,0.063096,0.050119,0.070795, 0.025119,0.177828,0.050119,0.079433,0.017783,0.446684,0.251189,0.125893, 0.251189,0.141254); // formant 2 gains g(3) = (0.015849,0.017783,0.015849,0.039811,0.010000,0.354813,0.251189,0.079433, 0.100000,0.039811,0.063096,0.100000,0.015849,0.079433,0.031623, 0.100000,0.010000,0.050119,0.079433,0.010000,0.398107,0.199526,0.100000, 0.251189,0.199526); // formant 3 gains g(4) = (0.001000,0.001000,0.001000,0.001778,0.000631,0.100000,0.125893,0.039811, 0.010000,0.015849,0.012589,0.100000,0.015849,0.019953,0.019953, 0.003162,0.001585,0.006310,0.003162,0.001000,0.079433,0.100000,0.031623, 0.050119,0.050119); // formant 4 gains bw(0) = (80,60,50,70,50,60,40,60,40,40,80,70,40,40,40,80,60,60,40,50, 50,70,40,70,40); // formant 0 bandwidths bw(1) = (90,80,100,80,60,70,80,90,80,80,90,80,90,80,60,90,100,90,80,60, 90,80,90,80,60); // formant 1 bandwidths bw(2) = (120,120,120,100,170,110,100,100,100,100,120,100,100,100,100, 120,120,100,100,170,120,100,100,100,100); // formant 2 bandwidths bw(3) = (130,150,150,130,180,120,120,120,120,120,130,120,120,120,120, 130,150,120,120,180,130,120,120,130,120); // formant 3 bandwidths bw(4) = (140,200,200,135,200,130,120,120,120,120,140,120,120,120,120, 140,200,120,120,200,140,120,120,135,120); // formant 4 bandwidths }; /*INPUT/API*/ gate = button("gate") : ba.toggle; //Voice Envelope Control voiceAttack = vslider("t:voice/h:envelope/voiceAttack", 0.01, 0.01, 2.0, 0.01); voiceDecay = vslider("t:voice/h:envelope/voiceDecay", 0.01, 0.01, 2.0, 0.01); voiceSustain = vslider("t:voice/h:envelope/voiceSustain", 1.0, 0.0, 1.0, 0.01); voiceRelease = vslider("t:voice/h:envelope/voiceRelease", 1.0, 0.01, 5.0, 0.01); //Source Control bpSourcePW = vslider("t:voice/h:source/bpSourcePW", 0.1, 0.001, 0.999, 0.001); bpSourceSelect = vslider("t:voice/h:source/bpSourceSelect", 0, 0, 2, 1); glideTime = vslider("t:voice/h:source/glideTime", 0.0, 0.0, 2.0, 0.001); frequency = vslider("t:voice/h:source/frequency", 100, 20, 1046, 0.1) : si.smooth(ba.tau2pole(glideTime)); noiseSlide = vslider("t:voice/h:source/noise", 0.001, 0.0, 1.0, 0.001); t0Slide = vslider("t:voice/h:source/T0", 0.915, 0.01, 1.0, 0.001); teSlide = vslider("t:voice/h:source/Te", 0.857, 0.00, 4.0, 0.001); pressureSlide = vslider("t:voice/h:source/Pressure", 1.0, 0.0, 1.0, 0.001); //Filter Control voiceType = vslider("t:voice/h:filter/voiceType", 0, 0, 4, 1); vowel = vslider("t:voice/h:filter/vowel", 0, 0, 4, 0.01) : si.smoo; gender = vslider("t:voice/h:filter/gender", 0, 0, 1, 1) : si.smoo; //Fricative Control noiseColourLow = vslider("t:voice/h:fricative/noiseColourLow", 20, 20, 20000, 1); noiseColourHigh = vslider("t:voice/h:fricative/noiseColourHigh", 20000, 20, 20000, 1); noiseAttack = vslider("t:voice/h:fricative/noiseAttack", 0.01, 0.01, 2.0, 0.01); noiseDecay = vslider("t:voice/h:fricative/noiseDecay", 0.01, 0.01, 2.0, 0.01); noiseSustain = vslider("t:voice/h:fricative/noiseSustain", 0.0, 0.0, 1.0, 0.001); noiseRelease = vslider("t:voice/h:fricative/noiseRelease", 0.01, 0.01, 3.0, 0.01); //Vibrato Control vibratoGain = vslider("t:voice/h:vibrato/vibratoGain", 0.3, 0.0, 1.0, 0.01); vibratoFreq = vslider("t:voice/h:vibrato/vibratoFreq", 5.0, 0.01, 8.0, 0.01); vibratoAttack = vslider("t:voice/h:vibrato/vibratoAttack", 0.01, 0.01, 2.0, 0.01); vibratoSustain = vslider("t:voice/h:vibrato/vibratoSustain", 1.0, 0.0, 1.0, 0.01); vibratoRelease = vslider("t:voice/h:vibrato/vibratoRelease", 0.01, 0.01, 5.0, 0.01); //Gain Control fofGain = vslider("t:voice/h:mixer/fofGain", 0.5, 0.0, 1.0, 0.01); bpGain = vslider("t:voice/h:mixer/bpGain", 0.5, 0.0, 1.0, 0.01); fricativeGain = vslider("t:voice/h:mixer/fricativeGain", 0.5, 0.0, 1.0, 0.01); gain = vslider("t:voice/h:mixer/gain", 0.5, 0.0, 1.0, 0.01); //unisonDetune = hslider("unisonDetune", 0.0, 0.0, 2.0, 0.01); //Global signals nFormants = 5; nUnison = 4; unisonDetune = 0; voiceEffort = pm.vocalEffort(sourceFreq, gender); index = (voiceType * nFormants) + vowel : si.smoo; sourceFreq = frequency + vibratoSignal; getFormantFreq(formantNumber_) = ba.listInterp(values.f(formantNumber_), index); // : pm.autobendFreq(0, sourceFreq, voiceType); getFormantGain(formantNumber_) = ba.listInterp(values.g(formantNumber_), index) : voiceEffort; getFormantBW(formantNumber_) = ba.listInterp(values.bw(formantNumber_), index); getFormantSW(formantNumber_) = pm.skirtWidthMultiplier(vowel, sourceFreq, gender) * getFormantBW(formantNumber_); /*ENVLOPE*/ voiceEnvelope = en.adsr(voiceAttack, voiceDecay, voiceSustain, voiceRelease, gate); /*VIBRATO*/ vibratoSignal = os.osc(vibratoFreq)*vibratoEnvelope; vibratoEnvelope = en.asr(vibratoAttack, vibratoSustain, vibratoRelease, gate); /*FOF*/ //Source Impulse Train fofSource(freq_) = os.lf_imptrain(freq_); //FOF Formant Object fofFormant(formantNumber_) = pm.fofCycle(_freq, _bw, _sw, _gain, 6) with { _freq = getFormantFreq(formantNumber_); _bw = getFormantBW(formantNumber_) : si.smooth(ba.tau2pole(0.001)); _sw = getFormantSW(formantNumber_) : si.smooth(ba.tau2pole(0.001)); _gain = getFormantGain(formantNumber_); }; //FOF Formant Bank fofBank = par(i, nFormants, fofFormant(i)) :> _ <: _,_; //FOF Gain Compensation fofAmplitude = fofBank :> abs : an.amp_follower(0.2) : ba.db2linear; fofGainComp = 30; //fofGainComp = 100; //FOF Process Block fofChain = par(i, nUnison,(fofSource(sourceFreq + ((unisonDetune/nUnison) * i)) <: fofBank : *((1/nUnison)*i), *(1-((1/nUnison)*i)))) :> co.compressor_stereo(5, -30, 0.05, 0.5): *(fofGainComp),*(fofGainComp) : *(voiceEnvelope), *(voiceEnvelope) : *(fofGain),*(fofGain); /*BANDPASS*/ //bpSource(freq_) = rosenbergModel(freq_, 1.0, t0Slide, teSlide, 0.441, 0.224); bpSource(freq_) = square_, saw_, model_ : select3(bpSourceSelect) :> _ with { square_ = os.pulsetrain(freq_, bpSourcePW); saw_ = os.sawtooth(freq_); model_ = rosenbergModel(freq_, 1.0, t0Slide, teSlide, 0.441, 0.224); }; bpFormant(formantNumber_) = fi.bandpass(1, _freqLow, _freqHigh) : *(_gain) with { _freqLow = getFormantFreq(formantNumber_) - (getFormantBW(formantNumber_)/2); _freqHigh = getFormantFreq(formantNumber_) + (getFormantBW(formantNumber_)/2); _gain = getFormantGain(formantNumber_); }; //Bandpass formant bank bpBank = _ <: par(i, nFormants, bpFormant(i)) :> _ <: _,_; bpChain = par(i, nUnison,(bpSource(sourceFreq + ((unisonDetune/nUnison) * i)) <: bpBank : *((1/nUnison)*i), *(1-((1/nUnison)*i)))) :> co.compressor_stereo(5, -30, 0.05, 0.5) : *(10), *(10) : *(voiceEnvelope), *(voiceEnvelope) : *(bpGain), *(bpGain); /*FRICATIVE*/ fricativeSource = no.noise : fi.bandpass(1, noiseColourLow, noiseColourHigh); fricativeEnvelope = en.adsr(noiseAttack, noiseDecay, noiseSustain, noiseRelease, gate); fricativeChain = fricativeSource : bpBank <: *(fricativeGain)*(fricativeEnvelope), *(fricativeGain)*(fricativeEnvelope); /* Glottal Model */ phasor(freq) = (+(freq/ma.SR) ~ ma.frac); rosenbergModel(freq, Av, T0, Te, a0, a1) = ba.if(rCond2_(t_), rosenberg1_(-t_), rosenberg2_(-t_)) * rCond3_(t_) with { t_ = (phasor(freq)*pressureSlide) + (no.noise*noiseSlide : fi.highpass(1, 22000)); Tp_ = a0*T0; Tc_ = a1*T0; Te_ = Te; rosenberg1_(t_) = 0.5*Av*(1-cos(ma.PI*t_/Tp_)) * rCond1_(t_); rosenberg2_(t_) = Av*cos(((ma.PI*(t_-Tp_))/(2*Tc_))) * rCond2_(t_); rCond1_(t_) = 0 < t_ < Tp_; rCond2_(t_) = Tp_ < t_ < Te_; rCond3_(t_) = (Te_ < t_ < T0); }; //process = fofSource : fofBank*fofGain :> *(gain) <: _,_; process = bpChain, fofChain, fricativeChain :> *(gain), *(gain) : _,_;
https://raw.githubusercontent.com/luke1241/MUSS3640_Vocal_Synth/3586a6599ddb5db726d7c420f53aa9ccb161de75/dspVowelTable.dsp
faust
https://github.com/grame-cncm/faustlibraries/blob/master/physmodels.lib formant 0 freqs formant 1 freqs formant 2 freqs formant 3 freqs formant 4 freqs formant 0 gains formant 1 gains formant 2 gains formant 3 gains formant 4 gains formant 0 bandwidths formant 1 bandwidths formant 2 bandwidths formant 3 bandwidths formant 4 bandwidths INPUT/API Voice Envelope Control Source Control Filter Control Fricative Control Vibrato Control Gain Control unisonDetune = hslider("unisonDetune", 0.0, 0.0, 2.0, 0.01); Global signals : pm.autobendFreq(0, sourceFreq, voiceType); ENVLOPE VIBRATO FOF Source Impulse Train FOF Formant Object FOF Formant Bank FOF Gain Compensation fofGainComp = 100; FOF Process Block BANDPASS bpSource(freq_) = rosenbergModel(freq_, 1.0, t0Slide, teSlide, 0.441, 0.224); Bandpass formant bank FRICATIVE Glottal Model process = fofSource : fofBank*fofGain :> *(gain) <: _,_;
import("stdfaust.lib"); values = environment { f(0) = (800,400,350,450,325,600,400,250,400,350,660,440,270,430,370,800, f(1) = (1150,1600,1700,800,700,1040,1620,1750,750,600,1120,1800,1850,820,630, f(2) = (2800,2700,2700,2830,2530,2250,2400,2600,2400,2400,2750,2700,2900,2700,2750, f(3) = (3500,3300,3700,3500,3500,2450,2800,3050,2600,2675,3000,3000,3350,3000,3000, f(4) = (4950,4950,4950,4950,4950,2750,3100,3340,2900,2950,3350,3300,3590,3300,3400, g(1) = (0.630957,0.063096,0.100000,0.354813,0.251189,0.446684,0.251189,0.031623, 0.281838,0.100000,0.501187,0.199526,0.063096,0.316228,0.100000, 0.501187,0.100000,0.251189,0.281838,0.158489,0.501187,0.199526,0.177828, g(2) = (0.100000,0.031623,0.031623,0.158489,0.031623,0.354813,0.354813,0.158489, 0.089125,0.025119,0.070795,0.125893,0.063096,0.050119,0.070795, 0.025119,0.177828,0.050119,0.079433,0.017783,0.446684,0.251189,0.125893, g(3) = (0.015849,0.017783,0.015849,0.039811,0.010000,0.354813,0.251189,0.079433, 0.100000,0.039811,0.063096,0.100000,0.015849,0.079433,0.031623, 0.100000,0.010000,0.050119,0.079433,0.010000,0.398107,0.199526,0.100000, g(4) = (0.001000,0.001000,0.001000,0.001778,0.000631,0.100000,0.125893,0.039811, 0.010000,0.015849,0.012589,0.100000,0.015849,0.019953,0.019953, 0.003162,0.001585,0.006310,0.003162,0.001000,0.079433,0.100000,0.031623, bw(0) = (80,60,50,70,50,60,40,60,40,40,80,70,40,40,40,80,60,60,40,50, bw(1) = (90,80,100,80,60,70,80,90,80,80,90,80,90,80,60,90,100,90,80,60, bw(2) = (120,120,120,100,170,110,100,100,100,100,120,100,100,100,100, bw(3) = (130,150,150,130,180,120,120,120,120,120,130,120,120,120,120, bw(4) = (140,200,200,135,200,130,120,120,120,120,140,120,120,120,120, }; gate = button("gate") : ba.toggle; voiceAttack = vslider("t:voice/h:envelope/voiceAttack", 0.01, 0.01, 2.0, 0.01); voiceDecay = vslider("t:voice/h:envelope/voiceDecay", 0.01, 0.01, 2.0, 0.01); voiceSustain = vslider("t:voice/h:envelope/voiceSustain", 1.0, 0.0, 1.0, 0.01); voiceRelease = vslider("t:voice/h:envelope/voiceRelease", 1.0, 0.01, 5.0, 0.01); bpSourcePW = vslider("t:voice/h:source/bpSourcePW", 0.1, 0.001, 0.999, 0.001); bpSourceSelect = vslider("t:voice/h:source/bpSourceSelect", 0, 0, 2, 1); glideTime = vslider("t:voice/h:source/glideTime", 0.0, 0.0, 2.0, 0.001); frequency = vslider("t:voice/h:source/frequency", 100, 20, 1046, 0.1) : si.smooth(ba.tau2pole(glideTime)); noiseSlide = vslider("t:voice/h:source/noise", 0.001, 0.0, 1.0, 0.001); t0Slide = vslider("t:voice/h:source/T0", 0.915, 0.01, 1.0, 0.001); teSlide = vslider("t:voice/h:source/Te", 0.857, 0.00, 4.0, 0.001); pressureSlide = vslider("t:voice/h:source/Pressure", 1.0, 0.0, 1.0, 0.001); voiceType = vslider("t:voice/h:filter/voiceType", 0, 0, 4, 1); vowel = vslider("t:voice/h:filter/vowel", 0, 0, 4, 0.01) : si.smoo; gender = vslider("t:voice/h:filter/gender", 0, 0, 1, 1) : si.smoo; noiseColourLow = vslider("t:voice/h:fricative/noiseColourLow", 20, 20, 20000, 1); noiseColourHigh = vslider("t:voice/h:fricative/noiseColourHigh", 20000, 20, 20000, 1); noiseAttack = vslider("t:voice/h:fricative/noiseAttack", 0.01, 0.01, 2.0, 0.01); noiseDecay = vslider("t:voice/h:fricative/noiseDecay", 0.01, 0.01, 2.0, 0.01); noiseSustain = vslider("t:voice/h:fricative/noiseSustain", 0.0, 0.0, 1.0, 0.001); noiseRelease = vslider("t:voice/h:fricative/noiseRelease", 0.01, 0.01, 3.0, 0.01); vibratoGain = vslider("t:voice/h:vibrato/vibratoGain", 0.3, 0.0, 1.0, 0.01); vibratoFreq = vslider("t:voice/h:vibrato/vibratoFreq", 5.0, 0.01, 8.0, 0.01); vibratoAttack = vslider("t:voice/h:vibrato/vibratoAttack", 0.01, 0.01, 2.0, 0.01); vibratoSustain = vslider("t:voice/h:vibrato/vibratoSustain", 1.0, 0.0, 1.0, 0.01); vibratoRelease = vslider("t:voice/h:vibrato/vibratoRelease", 0.01, 0.01, 5.0, 0.01); fofGain = vslider("t:voice/h:mixer/fofGain", 0.5, 0.0, 1.0, 0.01); bpGain = vslider("t:voice/h:mixer/bpGain", 0.5, 0.0, 1.0, 0.01); fricativeGain = vslider("t:voice/h:mixer/fricativeGain", 0.5, 0.0, 1.0, 0.01); gain = vslider("t:voice/h:mixer/gain", 0.5, 0.0, 1.0, 0.01); nFormants = 5; nUnison = 4; unisonDetune = 0; voiceEffort = pm.vocalEffort(sourceFreq, gender); index = (voiceType * nFormants) + vowel : si.smoo; sourceFreq = frequency + vibratoSignal; getFormantGain(formantNumber_) = ba.listInterp(values.g(formantNumber_), index) : voiceEffort; getFormantBW(formantNumber_) = ba.listInterp(values.bw(formantNumber_), index); getFormantSW(formantNumber_) = pm.skirtWidthMultiplier(vowel, sourceFreq, gender) * getFormantBW(formantNumber_); voiceEnvelope = en.adsr(voiceAttack, voiceDecay, voiceSustain, voiceRelease, gate); vibratoSignal = os.osc(vibratoFreq)*vibratoEnvelope; vibratoEnvelope = en.asr(vibratoAttack, vibratoSustain, vibratoRelease, gate); fofSource(freq_) = os.lf_imptrain(freq_); fofFormant(formantNumber_) = pm.fofCycle(_freq, _bw, _sw, _gain, 6) with { _freq = getFormantFreq(formantNumber_); _bw = getFormantBW(formantNumber_) : si.smooth(ba.tau2pole(0.001)); _sw = getFormantSW(formantNumber_) : si.smooth(ba.tau2pole(0.001)); _gain = getFormantGain(formantNumber_); }; fofBank = par(i, nFormants, fofFormant(i)) :> _ <: _,_; fofAmplitude = fofBank :> abs : an.amp_follower(0.2) : ba.db2linear; fofGainComp = 30; fofChain = par(i, nUnison,(fofSource(sourceFreq + ((unisonDetune/nUnison) * i)) <: fofBank : *((1/nUnison)*i), *(1-((1/nUnison)*i)))) :> co.compressor_stereo(5, -30, 0.05, 0.5): *(fofGainComp),*(fofGainComp) : *(voiceEnvelope), *(voiceEnvelope) : *(fofGain),*(fofGain); bpSource(freq_) = square_, saw_, model_ : select3(bpSourceSelect) :> _ with { square_ = os.pulsetrain(freq_, bpSourcePW); saw_ = os.sawtooth(freq_); model_ = rosenbergModel(freq_, 1.0, t0Slide, teSlide, 0.441, 0.224); }; bpFormant(formantNumber_) = fi.bandpass(1, _freqLow, _freqHigh) : *(_gain) with { _freqLow = getFormantFreq(formantNumber_) - (getFormantBW(formantNumber_)/2); _freqHigh = getFormantFreq(formantNumber_) + (getFormantBW(formantNumber_)/2); _gain = getFormantGain(formantNumber_); }; bpBank = _ <: par(i, nFormants, bpFormant(i)) :> _ <: _,_; bpChain = par(i, nUnison,(bpSource(sourceFreq + ((unisonDetune/nUnison) * i)) <: bpBank : *((1/nUnison)*i), *(1-((1/nUnison)*i)))) :> co.compressor_stereo(5, -30, 0.05, 0.5) : *(10), *(10) : *(voiceEnvelope), *(voiceEnvelope) : *(bpGain), *(bpGain); fricativeSource = no.noise : fi.bandpass(1, noiseColourLow, noiseColourHigh); fricativeEnvelope = en.adsr(noiseAttack, noiseDecay, noiseSustain, noiseRelease, gate); fricativeChain = fricativeSource : bpBank <: *(fricativeGain)*(fricativeEnvelope), *(fricativeGain)*(fricativeEnvelope); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); rosenbergModel(freq, Av, T0, Te, a0, a1) = ba.if(rCond2_(t_), rosenberg1_(-t_), rosenberg2_(-t_)) * rCond3_(t_) with { t_ = (phasor(freq)*pressureSlide) + (no.noise*noiseSlide : fi.highpass(1, 22000)); Tp_ = a0*T0; Tc_ = a1*T0; Te_ = Te; rosenberg1_(t_) = 0.5*Av*(1-cos(ma.PI*t_/Tp_)) * rCond1_(t_); rosenberg2_(t_) = Av*cos(((ma.PI*(t_-Tp_))/(2*Tc_))) * rCond2_(t_); rCond1_(t_) = 0 < t_ < Tp_; rCond2_(t_) = Tp_ < t_ < Te_; rCond3_(t_) = (Te_ < t_ < T0); }; process = bpChain, fofChain, fricativeChain :> *(gain), *(gain) : _,_;
278aa7fb6dbb3bbde012371fb289f2fe808d9fa7399362d803b8e2ab3f02aa25
striso/striso-control-firmware
synth.dsp
import("stdfaust.lib"); SR = ma.SR; maxmsp = library("maxmsp.lib"); fast = library("fast.lib"); K_f0 = fast.K_f0; HPF = fast.HPF; LPF = fast.LPF; BPF = fast.BPF; note2freq = fast.note2freq; voicecount = 6; halftime2fac(x) = 0.5^(1./(SR*x)); halftime2fac_fast(x) = 1-0.7*(1./(SR*x)); //smooth(c) = *(1-c) : +~*(c); smooth(x) = maxmsp.line(x,2); envdecay(c) = (max:_ * c) ~ _; dotpart(x) = x - int(x); oscss(freq, even_harm) = even_harm*saw-(1-even_harm)*square with { square = os.lf_squarewave(freq)*0.5; saw = os.saw2(freq); }; note = vslider("[0]note[style:knob]",69,0,127,.01); pres = vslider("[1]pres[style:knob]",0,0,1,0.01); vpres = vslider("[2]vpres[style:knob]",0,-1,1,0.01); but_x = vslider("but_x[style:knob]",0,-1,1,0.01); but_y = vslider("but_y[style:knob]",0,-1,1,0.01); acc_abs = vslider("v:accelerometer/acc_abs[style:knob]",1,0,4,0.01) : LPF(K_f0(40),1.31) : LPF(K_f0(40),0.54); acc_x = vslider("v:accelerometer/acc_x[style:knob]",0,-1,1,0.01); acc_y = vslider("v:accelerometer/acc_y[style:knob]",0,-1,1,0.01); acc_z = vslider("v:accelerometer/acc_z[style:knob]",-1,-1,1,0.01); rot_x = vslider("v:gyroscope/rot_x[style:knob]",0,-1,1,0.01); rot_y = vslider("v:gyroscope/rot_y[style:knob]",0,-1,1,0.01); rot_z = vslider("v:gyroscope/rot_z[style:knob]",0,-1,1,0.01); pedal = vslider("v:control/pedal[style:knob]",3/16,0,1,0.01); posDecay = hslider("v:[0]config/posDecay[style:knob]",0.1,0,1,0.01):halftime2fac; negDecay = hslider("v:[0]config/negDecay[style:knob]",0.2,0,1,0.01):halftime2fac; pDecay = hslider("v:[0]config/pDecay[style:knob]",0.05,0,1,0.01):halftime2fac; accDecay = hslider("v:[0]config/accDecay[style:knob]",0.10,0,1,0.01):halftime2fac; wpos = hslider("v:[0]config/wpos[style:knob]",0.05,0,1,0.01); wneg = hslider("v:[0]config/wneg[style:knob]",0.0,0,1,0.01); wpres = hslider("v:[0]config/wpres[style:knob]",0.9,0,1,0.01); filtQ = hslider("v:[1]config2/filtQ[style:knob]",1,0,10,0.01); filtFF = hslider("v:[1]config2/filtFF[style:knob]",1,0,16,0.01); bendRange = hslider("v:[1]config2/bendRange[style:knob]",0.5,0,2,0.01); minFreq = hslider("v:[1]config2/minFreq[style:knob]",200,0,1000,1); bodyFreq = hslider("v:[1]config2/bodyFreq[style:knob]",1000,0,2000,1); filt2Freq = hslider("v:[1]config2/filt2Freq[style:knob]",3000,0,10000,1); filt2Q = hslider("v:[1]config2/filt2Q[style:knob]",2,0.01,10,0.01); filt2level = hslider("v:[1]config2/filt2Level[style:knob]",0.8,0,50,0.01); B = hslider("v:[2]config3/brightness[style:knob]", 0.5, 0, 1, 0.01);// 0-1 t60 = hslider("v:[2]config3/decaytime_T60[style:knob]", 10, 0, 10, 0.01); // -60db decay time (sec) resfact = hslider("v:[2]config3/resfact[style:knob]", 0.03, 0, 1, 0.01); ppOffset = hslider("v:[2]config3/ppOffset[style:knob]", 48, 0, 100, 0.1); ppRange = hslider("v:[2]config3/ppRange[style:knob]", 18, 0, 36, 0.1); bfQ1 = hslider("v:[2]config3/bfQ1[style:knob]",5,0.3,20,0.01); bfQ2 = hslider("v:[2]config3/bfQ2[style:knob]",8,0.3,20,0.01); bfQ3 = hslider("v:[2]config3/bfQ3[style:knob]",8,0.3,20,0.01); bflevel = hslider("v:[2]config3/bflevel[style:knob]",6,0.1,20,0.01); voice(note,pres,vpres,but_x,but_y1) = vosc <: filt, filt2, bfs * bflevel :> _ * level with { even_harm = (acc_x+1)/2; // pitchbend = but_x^3; // freq = note2freq(note+pitchbend*bendRange); freq = note2freq(note); //vosc = oscss(freq, even_harm); vosc = osc_white(freq); resetni = abs(note-note')<1.0; but_y = but_y1 : LPF(K_f0(20),0.71); pluck = but_y^2 : envdecay(select2(pres==0, halftime2fac_fast(0.01), 1)); // decaytime = max(max(min(pluck * 2 - 0.4, 0.5+pluck), min(pres * 16, 0.5+pres)), 0.05) * 64 / note; decaytime = max(min(pres * 16, 0.5+pres*0.5), pedal * 0.2 + 0.01) * 64 / note; vpres1 = max(vpres - 0.02, 0); vplev = vpres1 / (0.5+vpres1);// + min(pres, 0.001); rotlev = min(pres * 2, max(rot_y^2+rot_z^2 - 0.005, 0)); // level = max(vplev : envdecay(resetni*halftime2fac_fast(decaytime)), rotlev) : LPF(K_f0(100), 1);// / (0.2 + note/24); level = (vplev : envdecay(resetni*halftime2fac_fast(decaytime))) + 1.0 * pres^2 : LPF(K_f0(100), 1);// / (0.2 + note/24); vdacc = min(acc_abs,2):envdecay(accDecay); // K = K_f0(max(freq,minFreq)) + filtFF*(level*(1-max(-but_y,0))+max(vdacc-1,0))^2^2; // filt = LPF(K, filtQ+max(-but_y,0)*8) * (1-max(-but_y,0)/2)^2; f = min(max(freq,minFreq) * (1 + filtFF*(level*(1-max(-but_y,0))+max(vdacc-1,0))^2), 16000); filt = fi.svf.lp(f, filtQ+max(-but_y,0)*8) * (1-max(-but_y,0)/2)^2; filt2lev = max(but_y,0) * but_y * pres; // filt2 = BPF(K_f0(filt2Freq*filt2lev+minFreq), filt2Q) * filt2level * filt2lev; filt2 = fi.svf.bp(filt2Freq*filt2lev+minFreq, filt2Q) * filt2level * filt2lev; K1 = select2(rot_y>0, K_f0(900), K_f0(1700)) * (1+0.5*abs(rot_y)); b1 = BPF(K1, bfQ1) * abs(rot_y); K2 = select2(rot_x>0, K_f0(300), K_f0(600)) * (1+0.5*abs(rot_x)); b2 = BPF(K2, bfQ2) * abs(rot_x); K3 = select2(rot_z>0, K_f0(1300), K_f0(2600)) * (1+0.5*abs(rot_z)); b3 = BPF(K3, bfQ3) * abs(rot_z); bfs = _ <: b1, b2, b3 :> _; }; voice_sine(note,pres,vpres,but_x,but_y) = vosc * level with { pitchbend = but_x^3; freq = note2freq(note+pitchbend*bendRange); vosc = os.oscw(freq); level = pres : LPF(K_f0(20),1); }; /* peak(f0, dBgain, Q) = biquad(a0,a1,a2,b1,b2) with { V = 10^(abs(dBgain) / 20); K = tan(ma.PI * f0 / SR); if (peakGain >= 0) { norm = 1 / (1 + 1/Q * K + K * K); a0 = (1 + V/Q * K + K * K) * norm; a1 = 2 * (K * K - 1) * norm; a2 = (1 - V/Q * K + K * K) * norm; b1 = a1; b2 = (1 - 1/Q * K + K * K) * norm; } else { norm = 1 / (1 + V/Q * K + K * K); a0 = (1 + 1/Q * K + K * K) * norm; a1 = 2 * (K * K - 1) * norm; a2 = (1 - 1/Q * K + K * K) * norm; b1 = a1; b2 = (1 - V/Q * K + K * K) * norm; } } */ seed = 1034790774; // no. 62351 in sequence impulse = _ ~ (_ == 0); //myrandom = (+(seed + 12345) *(1103515245)) ~ (-(seed)); //myrandom = +(seed + 12345) ~ (*(1103515245) -(seed)); //myrandom = seed : impulse : (_,_: + : +(12345)) ~ *(1103515245); //myrandom = (+(12345) *(1103515245)) ~ _; //myrandom = (impulse(seed-12345) + 12345) : + ~ (*(1103515245)); RANDMAX = 2147483647.0; //myrandom = prefix(seed,0) : + ~ (*(1078318381)); myrandom = ffunction(int rand_hoaglin (), "fastpow.h", ""); mynoise = myrandom / RANDMAX; // offset to improve spectral shape o = 0;//320;//int(hslider("v:[2]config3/offset[style:knob]", 0, 0, 1<<11, 1)); osc_white1(freq) = s1 + d * (s2 - s1) with { tablesize = 1 << 12; // enough for notes as low as 11 Hz whitetable = rdtable(tablesize, mynoise*2); periodf = float(SR)/freq; period = int(min(periodf * 0.5, tablesize)); inc = period/periodf; loop = _ <: _,((_ > period) * period) :> -; phase = inc : (+ : loop) ~ _; s1 = whitetable(o + int(phase)); s2 = whitetable(o + ((int(phase)+1) % int(period))); d = dotpart(phase); }; // osc_white = os.saw2; osc_white = osc_white1; // white oscilator test to reduce clicks on frequency change inco = hslider("v:[2]config3/inc[style:knob]", 1, 0, 2, 0.01); osc_white2(freq) = s1 + d * (s2 - s1) with { tablesize = 1 << 12; // enough for notes as low as 11 Hz whitetable = rdtable(tablesize, mynoise*2); periodf = float(SR)/freq; inc = inco; period = periodf*inc; loop = _ <: _,((_ > period) * period) :> -; phase = inc : (+ : loop) ~ _; s1 = whitetable(o + int(phase)); s2 = whitetable(o + ((int(phase)+1) % int(period))); jump = phase > int(period); d = select2(jump, dotpart(phase), dotpart(phase) / dotpart(period)); //d = dotpart(phase) * 1.0/dotpart(period); }; // Body Filter bodyFilter = _ <: _ * .7,LPF(K_f0(bodyFreq),0.3) * 2 :> _; mystereoizer(periodDuration) = _ <: _,widthdelay : stereopanner with { W = 0.5; //hslider("v:Spat/spatial width", 0.5, 0, 1, 0.01); A = 0.5; //hslider("v:Spat/pan angle", 0.6, 0, 1, 0.01); widthdelay = de.delay(4096,W*periodDuration/2); stereopanner = _,_ : *(1.0-A), *(A); }; stereo = mystereoizer(SR/440); vmeter(x) = attach(x, envelop(x) : vbargraph("[2]level", 0, 1)); envelop = abs : max ~ -(20.0/SR); process = hgroup("strisy", sum(n, voicecount, vgroup("v%n", (note,pres,vpres,but_x,but_y)) : voice) // : vgroup("v%n", vmeter)) * 1.37 : HPF(K_f0(80),1.31) );// : fi.dcblocker;: stereo:bodyFilter;
https://raw.githubusercontent.com/striso/striso-control-firmware/3ac090451aac0fcdde8aaf4a6f77397a7756726f/synth.dsp
faust
smooth(c) = *(1-c) : +~*(c); 0-1 -60db decay time (sec) pitchbend = but_x^3; freq = note2freq(note+pitchbend*bendRange); vosc = oscss(freq, even_harm); decaytime = max(max(min(pluck * 2 - 0.4, 0.5+pluck), min(pres * 16, 0.5+pres)), 0.05) * 64 / note; + min(pres, 0.001); level = max(vplev : envdecay(resetni*halftime2fac_fast(decaytime)), rotlev) : LPF(K_f0(100), 1);// / (0.2 + note/24); / (0.2 + note/24); K = K_f0(max(freq,minFreq)) + filtFF*(level*(1-max(-but_y,0))+max(vdacc-1,0))^2^2; filt = LPF(K, filtQ+max(-but_y,0)*8) * (1-max(-but_y,0)/2)^2; filt2 = BPF(K_f0(filt2Freq*filt2lev+minFreq), filt2Q) * filt2level * filt2lev; peak(f0, dBgain, Q) = biquad(a0,a1,a2,b1,b2) with { V = 10^(abs(dBgain) / 20); K = tan(ma.PI * f0 / SR); if (peakGain >= 0) { norm = 1 / (1 + 1/Q * K + K * K); a0 = (1 + V/Q * K + K * K) * norm; a1 = 2 * (K * K - 1) * norm; a2 = (1 - V/Q * K + K * K) * norm; b1 = a1; b2 = (1 - 1/Q * K + K * K) * norm; } else { norm = 1 / (1 + V/Q * K + K * K); a0 = (1 + 1/Q * K + K * K) * norm; a1 = 2 * (K * K - 1) * norm; a2 = (1 - 1/Q * K + K * K) * norm; b1 = a1; b2 = (1 - V/Q * K + K * K) * norm; } } no. 62351 in sequence myrandom = (+(seed + 12345) *(1103515245)) ~ (-(seed)); myrandom = +(seed + 12345) ~ (*(1103515245) -(seed)); myrandom = seed : impulse : (_,_: + : +(12345)) ~ *(1103515245); myrandom = (+(12345) *(1103515245)) ~ _; myrandom = (impulse(seed-12345) + 12345) : + ~ (*(1103515245)); myrandom = prefix(seed,0) : + ~ (*(1078318381)); offset to improve spectral shape 320;//int(hslider("v:[2]config3/offset[style:knob]", 0, 0, 1<<11, 1)); enough for notes as low as 11 Hz osc_white = os.saw2; white oscilator test to reduce clicks on frequency change enough for notes as low as 11 Hz d = dotpart(phase) * 1.0/dotpart(period); Body Filter hslider("v:Spat/spatial width", 0.5, 0, 1, 0.01); hslider("v:Spat/pan angle", 0.6, 0, 1, 0.01); : vgroup("v%n", vmeter)) : fi.dcblocker;: stereo:bodyFilter;
import("stdfaust.lib"); SR = ma.SR; maxmsp = library("maxmsp.lib"); fast = library("fast.lib"); K_f0 = fast.K_f0; HPF = fast.HPF; LPF = fast.LPF; BPF = fast.BPF; note2freq = fast.note2freq; voicecount = 6; halftime2fac(x) = 0.5^(1./(SR*x)); halftime2fac_fast(x) = 1-0.7*(1./(SR*x)); smooth(x) = maxmsp.line(x,2); envdecay(c) = (max:_ * c) ~ _; dotpart(x) = x - int(x); oscss(freq, even_harm) = even_harm*saw-(1-even_harm)*square with { square = os.lf_squarewave(freq)*0.5; saw = os.saw2(freq); }; note = vslider("[0]note[style:knob]",69,0,127,.01); pres = vslider("[1]pres[style:knob]",0,0,1,0.01); vpres = vslider("[2]vpres[style:knob]",0,-1,1,0.01); but_x = vslider("but_x[style:knob]",0,-1,1,0.01); but_y = vslider("but_y[style:knob]",0,-1,1,0.01); acc_abs = vslider("v:accelerometer/acc_abs[style:knob]",1,0,4,0.01) : LPF(K_f0(40),1.31) : LPF(K_f0(40),0.54); acc_x = vslider("v:accelerometer/acc_x[style:knob]",0,-1,1,0.01); acc_y = vslider("v:accelerometer/acc_y[style:knob]",0,-1,1,0.01); acc_z = vslider("v:accelerometer/acc_z[style:knob]",-1,-1,1,0.01); rot_x = vslider("v:gyroscope/rot_x[style:knob]",0,-1,1,0.01); rot_y = vslider("v:gyroscope/rot_y[style:knob]",0,-1,1,0.01); rot_z = vslider("v:gyroscope/rot_z[style:knob]",0,-1,1,0.01); pedal = vslider("v:control/pedal[style:knob]",3/16,0,1,0.01); posDecay = hslider("v:[0]config/posDecay[style:knob]",0.1,0,1,0.01):halftime2fac; negDecay = hslider("v:[0]config/negDecay[style:knob]",0.2,0,1,0.01):halftime2fac; pDecay = hslider("v:[0]config/pDecay[style:knob]",0.05,0,1,0.01):halftime2fac; accDecay = hslider("v:[0]config/accDecay[style:knob]",0.10,0,1,0.01):halftime2fac; wpos = hslider("v:[0]config/wpos[style:knob]",0.05,0,1,0.01); wneg = hslider("v:[0]config/wneg[style:knob]",0.0,0,1,0.01); wpres = hslider("v:[0]config/wpres[style:knob]",0.9,0,1,0.01); filtQ = hslider("v:[1]config2/filtQ[style:knob]",1,0,10,0.01); filtFF = hslider("v:[1]config2/filtFF[style:knob]",1,0,16,0.01); bendRange = hslider("v:[1]config2/bendRange[style:knob]",0.5,0,2,0.01); minFreq = hslider("v:[1]config2/minFreq[style:knob]",200,0,1000,1); bodyFreq = hslider("v:[1]config2/bodyFreq[style:knob]",1000,0,2000,1); filt2Freq = hslider("v:[1]config2/filt2Freq[style:knob]",3000,0,10000,1); filt2Q = hslider("v:[1]config2/filt2Q[style:knob]",2,0.01,10,0.01); filt2level = hslider("v:[1]config2/filt2Level[style:knob]",0.8,0,50,0.01); resfact = hslider("v:[2]config3/resfact[style:knob]", 0.03, 0, 1, 0.01); ppOffset = hslider("v:[2]config3/ppOffset[style:knob]", 48, 0, 100, 0.1); ppRange = hslider("v:[2]config3/ppRange[style:knob]", 18, 0, 36, 0.1); bfQ1 = hslider("v:[2]config3/bfQ1[style:knob]",5,0.3,20,0.01); bfQ2 = hslider("v:[2]config3/bfQ2[style:knob]",8,0.3,20,0.01); bfQ3 = hslider("v:[2]config3/bfQ3[style:knob]",8,0.3,20,0.01); bflevel = hslider("v:[2]config3/bflevel[style:knob]",6,0.1,20,0.01); voice(note,pres,vpres,but_x,but_y1) = vosc <: filt, filt2, bfs * bflevel :> _ * level with { even_harm = (acc_x+1)/2; freq = note2freq(note); vosc = osc_white(freq); resetni = abs(note-note')<1.0; but_y = but_y1 : LPF(K_f0(20),0.71); pluck = but_y^2 : envdecay(select2(pres==0, halftime2fac_fast(0.01), 1)); decaytime = max(min(pres * 16, 0.5+pres*0.5), pedal * 0.2 + 0.01) * 64 / note; vpres1 = max(vpres - 0.02, 0); rotlev = min(pres * 2, max(rot_y^2+rot_z^2 - 0.005, 0)); vdacc = min(acc_abs,2):envdecay(accDecay); f = min(max(freq,minFreq) * (1 + filtFF*(level*(1-max(-but_y,0))+max(vdacc-1,0))^2), 16000); filt = fi.svf.lp(f, filtQ+max(-but_y,0)*8) * (1-max(-but_y,0)/2)^2; filt2lev = max(but_y,0) * but_y * pres; filt2 = fi.svf.bp(filt2Freq*filt2lev+minFreq, filt2Q) * filt2level * filt2lev; K1 = select2(rot_y>0, K_f0(900), K_f0(1700)) * (1+0.5*abs(rot_y)); b1 = BPF(K1, bfQ1) * abs(rot_y); K2 = select2(rot_x>0, K_f0(300), K_f0(600)) * (1+0.5*abs(rot_x)); b2 = BPF(K2, bfQ2) * abs(rot_x); K3 = select2(rot_z>0, K_f0(1300), K_f0(2600)) * (1+0.5*abs(rot_z)); b3 = BPF(K3, bfQ3) * abs(rot_z); bfs = _ <: b1, b2, b3 :> _; }; voice_sine(note,pres,vpres,but_x,but_y) = vosc * level with { pitchbend = but_x^3; freq = note2freq(note+pitchbend*bendRange); vosc = os.oscw(freq); level = pres : LPF(K_f0(20),1); }; impulse = _ ~ (_ == 0); RANDMAX = 2147483647.0; myrandom = ffunction(int rand_hoaglin (), "fastpow.h", ""); mynoise = myrandom / RANDMAX; osc_white1(freq) = s1 + d * (s2 - s1) with { whitetable = rdtable(tablesize, mynoise*2); periodf = float(SR)/freq; period = int(min(periodf * 0.5, tablesize)); inc = period/periodf; loop = _ <: _,((_ > period) * period) :> -; phase = inc : (+ : loop) ~ _; s1 = whitetable(o + int(phase)); s2 = whitetable(o + ((int(phase)+1) % int(period))); d = dotpart(phase); }; osc_white = osc_white1; inco = hslider("v:[2]config3/inc[style:knob]", 1, 0, 2, 0.01); osc_white2(freq) = s1 + d * (s2 - s1) with { whitetable = rdtable(tablesize, mynoise*2); periodf = float(SR)/freq; inc = inco; period = periodf*inc; loop = _ <: _,((_ > period) * period) :> -; phase = inc : (+ : loop) ~ _; s1 = whitetable(o + int(phase)); s2 = whitetable(o + ((int(phase)+1) % int(period))); jump = phase > int(period); d = select2(jump, dotpart(phase), dotpart(phase) / dotpart(period)); }; bodyFilter = _ <: _ * .7,LPF(K_f0(bodyFreq),0.3) * 2 :> _; mystereoizer(periodDuration) = _ <: _,widthdelay : stereopanner with { widthdelay = de.delay(4096,W*periodDuration/2); stereopanner = _,_ : *(1.0-A), *(A); }; stereo = mystereoizer(SR/440); vmeter(x) = attach(x, envelop(x) : vbargraph("[2]level", 0, 1)); envelop = abs : max ~ -(20.0/SR); process = hgroup("strisy",
f405b197175647a53aba0497a8c7a1c8a2bb04583efcf3e5db9a085963a4d923
grame-cncm/faustdoc
exfaust85.dsp
import("stdfaust.lib"); tableSize = 1 << 16; sineWave(tablesize) = float(ba.time)*(2.0*ma.PI)/float(tablesize) : sin; triangleOsc(f) = tableSize,sineWave(tableSize),int(os.phasor(tableSize,f)) : rdtable; f = hslider("freq",440,50,2000,0.01); process = triangleOsc(f);
https://raw.githubusercontent.com/grame-cncm/faustdoc/515c59ce7c4e390d3cf0fc518cd0d9f3ef7be262/docs/manual/syntax/exfaust85/exfaust85.dsp
faust
import("stdfaust.lib"); tableSize = 1 << 16; sineWave(tablesize) = float(ba.time)*(2.0*ma.PI)/float(tablesize) : sin; triangleOsc(f) = tableSize,sineWave(tableSize),int(os.phasor(tableSize,f)) : rdtable; f = hslider("freq",440,50,2000,0.01); process = triangleOsc(f);
79fad1b3a4b307e26913237a3791ef96fbfdb963a3d8ed0b5fc4c57ece415ac2
monodon-monoceros/modal_spring_reverb
spring.dsp
declare name "Romulan Spring"; declare author "Dr.-Ing. Jan Abel, Dr.-Ing. Pierre-Hugues Hadacek, Dr.-Ing. Yassine Aïssa, Dr.-Ing. Steven Thiele"; declare course "Digitale Audiosignaleverarbeitung SoSe 21"; declare institution "Beuth Hochschule für Technik"; import("stdfaust.lib"); /*SVF Filter Implementation*/ TO BE DONE TILL MID MAI //ADSR Enveloppe svf_env = en.adsr(en_att,en_dec,en_sus,en_rel); with{ en_att = hslider("Attack[style:knob]",0.5,0.05,10,0.01):si.smoo; en_dec = hslider("Decay[style:knob]",0.5,0.05,10,0.01):si.smoo; en_sus = hslider("Sustain[style:knob]",0.5,0,1,0.01):si.smoo; en_rel = hslider("Release[style:knob]",0.5,0.05,10,0.01):si.smoo; } //Filter Block svf_block = svf_gain*svf_filter*svf_env /*Spring Implementation*/ material = 5063.6968+vslider("[4] Material[style:knob]", 0,-700,1000,1); // Steel - Material constant - sqrt(E/rho) in [m/s] // material = 60; // rubber // material = 2357; //concrete length = 2.5116; // length of wire [m] radius = 0.000175; // radius [m] //damping = 0.001; 0.00005 -0.01 // q = 1/(2*damping); q = vslider("[0] Damping[style:knob]", 500, 50 ,10000,1); // N 447 modes in range (0-22050Hz) for steel, 2,5m length and radius of 0.175 mm N = 50; gain = (1/N)*vslider("[1] Amplitude[style:knob]",1 , 0, 2, 0.001); modes(n) = ma.PI/4 * material * radius * (1/length^2) * n^2; // + 4 in modes function because of filter stability modalreverb = sum(i,N, fi .resonhp(modes((i+1+4)),q,gain)); //Physikalische Parametern spring_block = spring(()*rev_time,()*rev_fb); /* GUI Controls still to be ASSIGNED */ // SVF Filter svf_gain = hslider("Gain[style:knob]",1,1,10,0.1):si.smoo; svf_freq = hslider("Frequency[style:knob]",1,1,10,0.1):si.smoo; svf_res = hslider("Resonance[style:knob]",1,1,10,0.1):si.smoo; // Spring rev_time = hslider("Time[style:knob]",2,0.1,10,0.01):si.smoo; //to assign TO MULTIPLE PARAMETERS? /* Process */ //TEST fxline = fi.highpass(1,10000)<:modalreverb; fxlinefeed =(+ : (fxline))~*(rev_fb); rev_fb = hslider("Feedback[style:knob]",1,0,3,0.01):si.smoo; } /* Dry/Wet */ drywet(fx) = _ <: _, fx : *(1-dry_wet) , *(dry_wet) :> _ with { dry_wet = vslider("[2] Dry-Wet[style:knob]", 1, 0, 1, 0.01):si.smoo; }; // Enter the test chamber Gordon spring_test = drywet(_:fxlinefeed) <:si.bus(2); process = ba.pulsen(1, 10000) : pm.djembe(60, 0.3, 0.4, 1) : spring_test; //romulan_spring = _<:_,(svf_block<:spring_block):si.bus(2); //process = ba.pulsen(1, 10000) : pm.djembe(60, 0.3, 0.4, 1) : romulan_spring;
https://raw.githubusercontent.com/monodon-monoceros/modal_spring_reverb/178454a48270e7c094dfe1d19b8be31a0826f1fe/Pedra/spring.dsp
faust
SVF Filter Implementation ADSR Enveloppe Filter Block Spring Implementation Steel - Material constant - sqrt(E/rho) in [m/s] material = 60; // rubber material = 2357; //concrete length of wire [m] radius [m] damping = 0.001; 0.00005 -0.01 q = 1/(2*damping); N 447 modes in range (0-22050Hz) for steel, 2,5m length and radius of 0.175 mm + 4 in modes function because of filter stability Physikalische Parametern GUI Controls still to be ASSIGNED SVF Filter Spring to assign TO MULTIPLE PARAMETERS? Process TEST Dry/Wet Enter the test chamber Gordon romulan_spring = _<:_,(svf_block<:spring_block):si.bus(2); process = ba.pulsen(1, 10000) : pm.djembe(60, 0.3, 0.4, 1) : romulan_spring;
declare name "Romulan Spring"; declare author "Dr.-Ing. Jan Abel, Dr.-Ing. Pierre-Hugues Hadacek, Dr.-Ing. Yassine Aïssa, Dr.-Ing. Steven Thiele"; declare course "Digitale Audiosignaleverarbeitung SoSe 21"; declare institution "Beuth Hochschule für Technik"; import("stdfaust.lib"); TO BE DONE TILL MID MAI svf_env = en.adsr(en_att,en_dec,en_sus,en_rel); with{ en_att = hslider("Attack[style:knob]",0.5,0.05,10,0.01):si.smoo; en_dec = hslider("Decay[style:knob]",0.5,0.05,10,0.01):si.smoo; en_sus = hslider("Sustain[style:knob]",0.5,0,1,0.01):si.smoo; en_rel = hslider("Release[style:knob]",0.5,0.05,10,0.01):si.smoo; } svf_block = svf_gain*svf_filter*svf_env q = vslider("[0] Damping[style:knob]", 500, 50 ,10000,1); N = 50; gain = (1/N)*vslider("[1] Amplitude[style:knob]",1 , 0, 2, 0.001); modes(n) = ma.PI/4 * material * radius * (1/length^2) * n^2; modalreverb = sum(i,N, fi .resonhp(modes((i+1+4)),q,gain)); spring_block = spring(()*rev_time,()*rev_fb); svf_gain = hslider("Gain[style:knob]",1,1,10,0.1):si.smoo; svf_freq = hslider("Frequency[style:knob]",1,1,10,0.1):si.smoo; svf_res = hslider("Resonance[style:knob]",1,1,10,0.1):si.smoo; fxline = fi.highpass(1,10000)<:modalreverb; fxlinefeed =(+ : (fxline))~*(rev_fb); rev_fb = hslider("Feedback[style:knob]",1,0,3,0.01):si.smoo; } drywet(fx) = _ <: _, fx : *(1-dry_wet) , *(dry_wet) :> _ with { dry_wet = vslider("[2] Dry-Wet[style:knob]", 1, 0, 1, 0.01):si.smoo; }; spring_test = drywet(_:fxlinefeed) <:si.bus(2); process = ba.pulsen(1, 10000) : pm.djembe(60, 0.3, 0.4, 1) : spring_test;
d62be2205aa3705aa989efbf71bc04d8ed5a054de975a35f579edb358e6ce7ae
dblanchemain/metaSurface
filtersFaust.dsp
declare name "filtersFaust"; declare version "0.0"; declare author "JOS, revised by RM"; declare description "Filters mono"; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); re = library("reverbs.lib"); en = library("envelopes.lib"); //================ Butterworth Lowpass/Highpass Filters ====================== // Nth-order Butterworth lowpass or highpass filters // // USAGE: // _ : lowpass(N,fc) : _ // _ : highpass(N,fc) : _ // where // N = filter order (number of poles) [nonnegative constant integer] // fc = desired cut-off frequency (-3dB frequency) in Hz // REFERENCE: // https://ccrma.stanford.edu/~jos/filters/Butterworth_Lowpass_Design.html // 'butter' function in Octave ("[z,p,g] = butter(N,1,'s');") // ACKNOWLEDGMENT // Generalized recursive formulation initiated by Yann Orlarey. LPF=fi.lowpass(3,lfc) with { lfc=vslider("LPF Freq",1000, 20, 20000, 1); }; HPF=fi.highpass(3,hfc) with { hfc=vslider("HPF Freq",1000, 20, 10000, 1); }; filters=vgroup("FILTERS",hgroup("[1]",HPF:LPF)); process = _: filters : _;
https://raw.githubusercontent.com/dblanchemain/metaSurface/f5695b5b58c0d7b41fd9a899cf5a664184d849c7/Plugins/filtersFaust.dsp
faust
================ Butterworth Lowpass/Highpass Filters ====================== Nth-order Butterworth lowpass or highpass filters USAGE: _ : lowpass(N,fc) : _ _ : highpass(N,fc) : _ where N = filter order (number of poles) [nonnegative constant integer] fc = desired cut-off frequency (-3dB frequency) in Hz REFERENCE: https://ccrma.stanford.edu/~jos/filters/Butterworth_Lowpass_Design.html 'butter' function in Octave ("[z,p,g] = butter(N,1,'s');") ACKNOWLEDGMENT Generalized recursive formulation initiated by Yann Orlarey.
declare name "filtersFaust"; declare version "0.0"; declare author "JOS, revised by RM"; declare description "Filters mono"; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); re = library("reverbs.lib"); en = library("envelopes.lib"); LPF=fi.lowpass(3,lfc) with { lfc=vslider("LPF Freq",1000, 20, 20000, 1); }; HPF=fi.highpass(3,hfc) with { hfc=vslider("HPF Freq",1000, 20, 10000, 1); }; filters=vgroup("FILTERS",hgroup("[1]",HPF:LPF)); process = _: filters : _;
f91a4ddd69c5bf187629a757873f043f2090d000f527935e31e86d8261e317f5
grame-cncm/faustdoc
exfaust10.dsp
//################################### frog.dsp ##################################### // A simple smart phone abstract instrument than can be controlled using the touch // screen and the accelerometers of the device. // // ## SmartKeyboard Use Strategy // // The idea here is to use the SmartKeyboard interface as an X/Y control pad by just // creating one keyboard with on key and by retrieving the X and Y position on that single // key using the x and y standard parameters. Keyboard mode is deactivated so that // the color of the pad doesn't change when it is pressed. // // ## Compilation Instructions // // This Faust code will compile fine with any of the standard Faust targets. However // it was specifically designed to be used with faust2smartkeyb. For best results, // we recommend to use the following parameters to compile it: // // // faust2smartkeyb [-ios/-android] frog.dsp // // // ## Version/Licence // // Version 0.0, Feb. 2017 // Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 // MIT Licence: https://opensource.org/licenses/MIT //######################################################################################## declare name "frog"; import("stdfaust.lib"); //========================= Smart Keyboard Configuration ================================= // (1 keyboards with 1 key configured as a pad. //======================================================================================== declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Send Y':'1' }"; //================================ Instrument Parameters ================================= // Creates the connection between the synth and the mobile device //======================================================================================== // SmartKeyboard X parameter x = hslider("x",0,0,1,0.01); // SmartKeyboard Y parameter y = hslider("y",0,0,1,0.01); // SmartKeyboard gate parameter gate = button("gate"); // the cutoff frequency of the filter is controlled with the x axis of the accelerometer cutoff = hslider("cutoff[acc: 0 0 -10 0 10]",2500,50,5000,0.01); //=================================== Parameters Mapping ================================= //======================================================================================== maxFreq = 100; minFreq = 1; freq = x*(maxFreq-minFreq) + minFreq : si.polySmooth(gate,0.999,1); maxQ = 40; minQ = 1; q = (1-y)*(maxQ-minQ) + minQ : si.smoo; filterCutoff = cutoff : si.smoo; //============================================ DSP ======================================= //======================================================================================== process = sy.dubDub(freq,filterCutoff,q,gate) <: _,_;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/examples/smartKeyboard/exfaust10/exfaust10.dsp
faust
################################### frog.dsp ##################################### A simple smart phone abstract instrument than can be controlled using the touch screen and the accelerometers of the device. ## SmartKeyboard Use Strategy The idea here is to use the SmartKeyboard interface as an X/Y control pad by just creating one keyboard with on key and by retrieving the X and Y position on that single key using the x and y standard parameters. Keyboard mode is deactivated so that the color of the pad doesn't change when it is pressed. ## Compilation Instructions This Faust code will compile fine with any of the standard Faust targets. However it was specifically designed to be used with faust2smartkeyb. For best results, we recommend to use the following parameters to compile it: faust2smartkeyb [-ios/-android] frog.dsp ## Version/Licence Version 0.0, Feb. 2017 Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017 MIT Licence: https://opensource.org/licenses/MIT ######################################################################################## ========================= Smart Keyboard Configuration ================================= (1 keyboards with 1 key configured as a pad. ======================================================================================== ================================ Instrument Parameters ================================= Creates the connection between the synth and the mobile device ======================================================================================== SmartKeyboard X parameter SmartKeyboard Y parameter SmartKeyboard gate parameter the cutoff frequency of the filter is controlled with the x axis of the accelerometer =================================== Parameters Mapping ================================= ======================================================================================== ============================================ DSP ======================================= ========================================================================================
declare name "frog"; import("stdfaust.lib"); declare interface "SmartKeyboard{ 'Number of Keyboards':'1', 'Keyboard 0 - Number of Keys':'1', 'Keyboard 0 - Piano Keyboard':'0', 'Keyboard 0 - Static Mode':'1', 'Keyboard 0 - Send X':'1', 'Keyboard 0 - Send Y':'1' }"; x = hslider("x",0,0,1,0.01); y = hslider("y",0,0,1,0.01); gate = button("gate"); cutoff = hslider("cutoff[acc: 0 0 -10 0 10]",2500,50,5000,0.01); maxFreq = 100; minFreq = 1; freq = x*(maxFreq-minFreq) + minFreq : si.polySmooth(gate,0.999,1); maxQ = 40; minQ = 1; q = (1-y)*(maxQ-minQ) + minQ : si.smoo; filterCutoff = cutoff : si.smoo; process = sy.dubDub(freq,filterCutoff,q,gate) <: _,_;
c011a2bf5b11cd62a73efd855362372bdfc817d448ce69fb58db9224abe6eca1
dblanchemain/metaSurface
moogVcfFaust.dsp
declare name "moogVcfFaust"; declare version "0.0"; declare author "RM"; declare description "moogVcfFaust mono"; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); re = library("reverbs.lib");//---------------------------------------------------- // Author: Romain Michon // License: LGPL //-------------------------`(dm.)moog_vcf_demo`--------------------------- // Illustrate and compare all three Moog VCF implementations above. // // #### Usage // // ``` // _ : moog_vcf_demo : _; // ``` //------------------------------------------------------------ moog_vcf = vcfarch : *(outgain) with{ mvcf_group(x) = vgroup("MOOG VCF (Voltage Controlled Filter) [tooltip: See Faust's vaeffects.lib for info and references]",x); cb_group(x) = mvcf_group(hgroup("[0]",x)); archsw = cb_group(checkbox("[1] Use Biquads [tooltip: Select moog_vcf_2b (two-biquad) implementation, instead of the default moog_vcf (analog style) implementation]")); bqsw = cb_group(checkbox("[2] Normalized Ladders [tooltip: If using biquads, make them normalized ladders (moog_vcf_2bn)]")); freq = mvcf_group(hslider("[1] Corner Frequency [unit:PK] [tooltip: The VCF resonates at the corner frequency (specified in PianoKey (PK) units, with A440 = 49 PK). The VCF response is flat below the corner frequency, and rolls off -24 dB per octave above.]", 25, 1, 88, 0.01) : ba.pianokey2hz) : si.smoo; res = mvcf_group(hslider("[2] Corner Resonance [style:knob] [tooltip: Amount of resonance near VCF corner frequency (specified between 0 and 1)]", 0.9, 0, 1, 0.01)); outgain = mvcf_group(hslider("[3] VCF Output Level [unit:dB] [style:knob] [tooltip: output level in decibels]", 5, -60, 20, 0.1)) : ba.db2linear : si.smoo; vcfbq = _ <: select2(bqsw, ve.moog_vcf_2b(res,freq), ve.moog_vcf_2bn(res,freq)); vcfarch = _ <: select2(archsw, ve.moog_vcf(res^4,freq), vcfbq); }; process = _: moog_vcf : _;
https://raw.githubusercontent.com/dblanchemain/metaSurface/f5695b5b58c0d7b41fd9a899cf5a664184d849c7/Plugins/moogVcfFaust.dsp
faust
---------------------------------------------------- Author: Romain Michon License: LGPL -------------------------`(dm.)moog_vcf_demo`--------------------------- Illustrate and compare all three Moog VCF implementations above. #### Usage ``` _ : moog_vcf_demo : _; ``` ------------------------------------------------------------
declare name "moogVcfFaust"; declare version "0.0"; declare author "RM"; declare description "moogVcfFaust mono"; import("stdfaust.lib"); ma = library("maths.lib"); ba = library("basics.lib"); de = library("delays.lib"); si = library("signals.lib"); an = library("analyzers.lib"); fi = library("filters.lib"); os = library("oscillators.lib"); no = library("noises.lib"); ef = library("misceffects.lib"); co = library("compressors.lib"); ve = library("vaeffects.lib"); pf = library("phaflangers.lib"); moog_vcf = vcfarch : *(outgain) with{ mvcf_group(x) = vgroup("MOOG VCF (Voltage Controlled Filter) [tooltip: See Faust's vaeffects.lib for info and references]",x); cb_group(x) = mvcf_group(hgroup("[0]",x)); archsw = cb_group(checkbox("[1] Use Biquads [tooltip: Select moog_vcf_2b (two-biquad) implementation, instead of the default moog_vcf (analog style) implementation]")); bqsw = cb_group(checkbox("[2] Normalized Ladders [tooltip: If using biquads, make them normalized ladders (moog_vcf_2bn)]")); freq = mvcf_group(hslider("[1] Corner Frequency [unit:PK] [tooltip: The VCF resonates at the corner frequency (specified in PianoKey (PK) units, with A440 = 49 PK). The VCF response is flat below the corner frequency, and rolls off -24 dB per octave above.]", 25, 1, 88, 0.01) : ba.pianokey2hz) : si.smoo; res = mvcf_group(hslider("[2] Corner Resonance [style:knob] [tooltip: Amount of resonance near VCF corner frequency (specified between 0 and 1)]", 0.9, 0, 1, 0.01)); outgain = mvcf_group(hslider("[3] VCF Output Level [unit:dB] [style:knob] [tooltip: output level in decibels]", 5, -60, 20, 0.1)) : ba.db2linear : si.smoo; vcfbq = _ <: select2(bqsw, ve.moog_vcf_2b(res,freq), ve.moog_vcf_2bn(res,freq)); vcfarch = _ <: select2(archsw, ve.moog_vcf(res^4,freq), vcfbq); }; process = _: moog_vcf : _;
973c9e4bbc15960dcd9629b5dee1d5a7b4ce4fd7f6089a83803c1dcc29b45782
grame-cncm/faustdoc
exfaust0.dsp
import("stdfaust.lib"); process = testsource <: _, RMS(n).sliding, RMS(n).fixpoint, RMS(n).block, RMS(n).overlap(4) with { n = 10000; testsource = os.osc(40) * lfo(1) * hslider("level", 1, 0, 1, 0.01); lfo(f) = os.osc(f)/2+0.5; }; RMS(n) = environment { // The 4 implementations to test sliding = horms(( _ <: _, @(n) : - : +~_ )); fixpoint = horms(( float2fix(16) : _ <: _, @(n) : -: +~_ : fix2float(16) )); block = horms(( + ~ *(phase != 0) : capture(phase == (n-1)) )); overlap(c) = horms(( + ~ *(phase%w != 0) <: par(i, c, capture( phase == (w*(i+1) - 1) )) :> _ with { w = n/c; } )); // high order rms with summation function as parameter horms(summation) = S:M:R with { S = ^(2); M = summation : /(n); R = sqrt; }; // helpers float2fix(p) = *(2^p) : int; fix2float(p) = float : /(2^p); phase = 1 : (+,n:%)~_; capture(b) = select2(b)~_; };
https://raw.githubusercontent.com/grame-cncm/faustdoc/8380354cc02118f89200fe2c0187696d53ba1957/docs/tutorials/summation/exfaust0/exfaust0.dsp
faust
The 4 implementations to test high order rms with summation function as parameter helpers
import("stdfaust.lib"); process = testsource <: _, RMS(n).sliding, RMS(n).fixpoint, RMS(n).block, RMS(n).overlap(4) with { n = 10000; testsource = os.osc(40) * lfo(1) * hslider("level", 1, 0, 1, 0.01); lfo(f) = os.osc(f)/2+0.5; }; RMS(n) = environment { sliding = horms(( _ <: _, @(n) : - : +~_ )); fixpoint = horms(( float2fix(16) : _ <: _, @(n) : -: +~_ : fix2float(16) )); block = horms(( + ~ *(phase != 0) : capture(phase == (n-1)) )); overlap(c) = horms(( + ~ *(phase%w != 0) <: par(i, c, capture( phase == (w*(i+1) - 1) )) :> _ with { w = n/c; } )); horms(summation) = S:M:R with { S = ^(2); M = summation : /(n); R = sqrt; }; float2fix(p) = *(2^p) : int; fix2float(p) = float : /(2^p); phase = 1 : (+,n:%)~_; capture(b) = select2(b)~_; };
151f00a3e1608e1eff6df714be9fe05489e81877fcc9523c0cce8d6596ed8c9c
beelisais2793/FX
fm.dsp
import("stdfaust.lib"); import("maths.lib"); declare options "[midi:on]"; // Declaring main process knobs c_f = nentry("freq",200,40,2000,0.01) : si.polySmooth(gate,0.999,2); m_gain = nentry("gain",1,0,1,0.01) : si.polySmooth(gate,0.999,2); gate = button("gate") : si.smoo; glob_att = hslider("Global_Attack", 0.01, 0, 1, 0.01):si.smoo; glob_rel = hslider("Global_Release", 0.1, 0, 5, 0.01):si.smoo; //Mod Freq'S as fixed multiples of Carrier Frequency mod_freq1 = 1/4*c_f; mod_freq2 = 3/4*c_f; mod_freq3 = 1/2*c_f; mod_freq4 = 2*c_f; mod_freq5 = 3*c_f; mod_freq6 = 4*c_f; // Index for amount of FM Modulation per Osci index_max = 2000; index1 = hgroup("[1]Index Mods",index1) with{ index1 = vslider("[0]index1", 1, 1, index_max, 0.5); }; index2 = hgroup("[1]Index Mods",index2) with{ index2 = vslider("[1]index2", 1, 1, index_max, 0.2); }; index3 = hgroup("[1]Index Mods",index3) with{ index3 = vslider("[2]index3", 1, 1, index_max, 0.2); }; index4 = hgroup("[1]Index Mods",index4) with{ index4 = vslider("[3]index4", 1, 1, index_max, 0.2); }; index5 = hgroup("[1]Index Mods",index5) with{ index5 = vslider("[4]index5", 1, 1, index_max, 0.2); }; index6 = hgroup("[1]Index Mods",index6) with{ index6 = vslider("[5]index6", 1, 1, index_max, 0.2); }; //Define the modulating frequencies with individual envelopes & volumes///////////////////////////////// /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// ////////////////////////////////////////////// /////////////////////////////////// //------> /////----MODFREQ1----------/////////////////////////////////////// ///////////////////////////////////////////////////////////////// modFreq1 = ((os.osc(mod_freq1)*index1)); a1 = hgroup("[3]Mod Attacks[style:knob]",a1) with{ a1 = hslider("[0]Attack1[style:knob]", 0.001, 0.001, 1.5, 0.01); }; d1 = hgroup("[3]Mod Decays[style:knob]", d1) with{ d1 = hslider("[0]Decay1[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s1 = hgroup("[3]Mod Sustains[style:knob]", s1) with{ s1 = hslider("[0]Sustain1[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r1 = hgroup("[3]Mod Releases[style:knob]", r1) with{ r1 = hslider("[0]Release1[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq1_g = modFreq1* hgroup("[1]Vol Mod1", modvol1) with{ modvol1 = hslider("[1]I1[style:knob]",0, 0, 1, 0.01):si.smoo; }; /////----MODFREQ2----------/////////////////////////////////////// ///////////////////////////////////////////////////////////////// modFreq2 = (os.osc(mod_freq2)*index2); a2 = hgroup("[3]Mod Attacks[style:knob]",a2) with{ a2 = hslider("[0]Attack2[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d2 = hgroup("[3]Mod Decays[style:knob]", d2) with{ d2 = hslider("[0]Decay2[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s2 = hgroup("[3]Mod Sustains[style:knob]", s2) with{ s2= hslider("[0]Sustain2[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r2 = hgroup("[3]Mod Releases[style:knob]", r2) with{ r2 = hslider("[0]Release2[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq2_g = modFreq2* hgroup("[1]Vol Mod1", modvol2) with{ modvol2 = hslider("[1]I2[style:knob]",0, 0, 1, 0.01):si.smoo; }; /////----MODFREQ3----------/////////////////////////////////////// ///////////////////////////////////////////////////////////////// modFreq3 = (os.osc(mod_freq3)*index3); a3 = hgroup("[3]Mod Attacks[style:knob]",a3) with{ a3 = hslider("[0]Attack3[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d3 = hgroup("[3]Mod Decays[style:knob]", d3) with{ d3 = hslider("[0]Decay3[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s3 = hgroup("[3]Mod Sustains[style:knob]", s3) with{ s3= hslider("[0]Sustain3[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r3 = hgroup("[3]Mod Releases[style:knob]", r3) with{ r3 = hslider("[0]Release3[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq3_g = modFreq3* hgroup("[1]Vol Mod1", modvol3) with{ modvol3 = hslider("[1]I3[style:knob]",0, 0, 1, 0.01):si.smoo; }; /////----MODFREQ4----------/////////////////////////////////////// ///////////////////////////////////////////////////////////////// modFreq4 = (os.osc(mod_freq4)*index4); a4 = hgroup("[3]Mod Attacks[style:knob]",a4) with{ a4 = hslider("[0]Attack4[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d4 = hgroup("[3]Mod Decays[style:knob]", d4) with{ d4 = hslider("[0]Decay4[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s4 = hgroup("[3]Mod Sustains[style:knob]", s4) with{ s4= hslider("[0]Sustain4[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r4 = hgroup("[3]Mod Releases[style:knob]", r4) with{ r4 = hslider("[0]Release4[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq4_g = modFreq4* hgroup("[1]Vol Mod1", modvol4) with{ modvol4 = hslider("[1]I4[style:knob]",0, 0, 1, 0.01):si.smoo; }; /////----MODFREQ5----------/////////////////////////////////////// ///////////////////////////////////////////////////////////////// modFreq5 = (os.osc(mod_freq5)*index5); a5 = hgroup("[3]Mod Attacks[style:knob]",a5) with{ a5 = hslider("[0]Attack5[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d5 = hgroup("[3]Mod Decays[style:knob]", d5) with{ d5 = hslider("[0]Decay5[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s5 = hgroup("[3]Mod Sustains[style:knob]", s5) with{ s5= hslider("[0]Sustain5[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r5 = hgroup("[3]Mod Releases[style:knob]", r5) with{ r5 = hslider("[0]Release5[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq5_g = modFreq5* hgroup("[1]Vol Mod1", modvol5) with{ modvol5 = hslider("[1]I5[style:knob]",0, 0, 1, 0.01):si.smoo; }; /////----MODFREQ6----------/////////////////////////////////////// ///////////////////////////////////////////////////////////////// modFreq6 = (os.osc(mod_freq6)*index6); a6 = hgroup("[3]Mod Attacks[style:knob]",a6) with{ a6 = hslider("[0]Attack6[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d6 = hgroup("[3]Mod Decays[style:knob]", d6) with{ d6 = hslider("[0]Decay6[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s6 = hgroup("[3]Mod Sustains[style:knob]", s6) with{ s6= hslider("[0]Sustain6[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r6 = hgroup("[3]Mod Releases[style:knob]", r6) with{ r6 = hslider("[0]Release6[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq6_g = modFreq6* hgroup("[1]Vol Mod1", modvol6) with{ modvol6 = hslider("[1]I6[style:knob]",0, 0, 1, 0.01):si.smoo; }; //////////////////////////////////////////////////////////////////////////// ////Processsing algorithm////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////7 ///////////////////////////////////////////////////////////////7 /////////////////////////////////////////////////////////// ///Added a djembe for plucky attack////////////// FM = (os.osc((c_f + modFreq1)))*en.adsre(a1,d1,s1,r1,gate), (os.osc((c_f + modFreq2)))*en.adsre(a2,d2,s2,r2,gate), (os.osc((c_f + modFreq3)))*en.adsre(a3,d3,s3,r3,gate),(os.osc((c_f + modFreq4)))*en.adsre(a4,d4,s4,r4,gate),(os.osc((c_f + modFreq5)))*en.adsre(a5,d5,s5,r5,gate),(os.osc((c_f + modFreq6)))*en.adsre(a6,d6,s6,r6,gate):>_; //FX!!/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// //Resonant Lowpass Fitler with LFO FM_ResLof = FM: hgroup("[4]ResLoFilter_del", fi.resonlp(resFreq, q, 1)) with{ ctFreq = hslider("[0]CutOff Freq[style:knob]", 2000, 50, 6000, 0.1); q = hslider("[1]Q[style:knob]", 5, 1, 30, 0.1); lfoFreq = hslider("[2]LFO_Freq[style:knob]", 10, 0.1, 30, 0.01); lfoDepth = hslider("[3]LFO_Depth[style:knob]", 500, 1, 10000, 1); resFreq = ctFreq + os.osc(lfoFreq)*lfoDepth : max(30); }; process = FM_ResLof*en.ar(glob_att,glob_rel,gate) *1/6*m_gain <:_,_;
https://raw.githubusercontent.com/beelisais2793/FX/f481f00c8426b55cf585cf11c0cfd40810ad419e/Faust/DSP/fm.dsp
faust
Declaring main process knobs Mod Freq'S as fixed multiples of Carrier Frequency Index for amount of FM Modulation per Osci Define the modulating frequencies with individual envelopes & volumes///////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// //////////////////////////////////////////// ///////////////////////////////// ------> ///----MODFREQ1----------/////////////////////////////////////// /////////////////////////////////////////////////////////////// ///----MODFREQ2----------/////////////////////////////////////// /////////////////////////////////////////////////////////////// ///----MODFREQ3----------/////////////////////////////////////// /////////////////////////////////////////////////////////////// ///----MODFREQ4----------/////////////////////////////////////// /////////////////////////////////////////////////////////////// ///----MODFREQ5----------/////////////////////////////////////// /////////////////////////////////////////////////////////////// ///----MODFREQ6----------/////////////////////////////////////// /////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //Processsing algorithm////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////7 /////////////////////////////////////////////////////////////7 ///////////////////////////////////////////////////////// /Added a djembe for plucky attack////////////// FX!!/////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// Resonant Lowpass Fitler with LFO
import("stdfaust.lib"); import("maths.lib"); declare options "[midi:on]"; c_f = nentry("freq",200,40,2000,0.01) : si.polySmooth(gate,0.999,2); m_gain = nentry("gain",1,0,1,0.01) : si.polySmooth(gate,0.999,2); gate = button("gate") : si.smoo; glob_att = hslider("Global_Attack", 0.01, 0, 1, 0.01):si.smoo; glob_rel = hslider("Global_Release", 0.1, 0, 5, 0.01):si.smoo; mod_freq1 = 1/4*c_f; mod_freq2 = 3/4*c_f; mod_freq3 = 1/2*c_f; mod_freq4 = 2*c_f; mod_freq5 = 3*c_f; mod_freq6 = 4*c_f; index_max = 2000; index1 = hgroup("[1]Index Mods",index1) with{ index1 = vslider("[0]index1", 1, 1, index_max, 0.5); }; index2 = hgroup("[1]Index Mods",index2) with{ index2 = vslider("[1]index2", 1, 1, index_max, 0.2); }; index3 = hgroup("[1]Index Mods",index3) with{ index3 = vslider("[2]index3", 1, 1, index_max, 0.2); }; index4 = hgroup("[1]Index Mods",index4) with{ index4 = vslider("[3]index4", 1, 1, index_max, 0.2); }; index5 = hgroup("[1]Index Mods",index5) with{ index5 = vslider("[4]index5", 1, 1, index_max, 0.2); }; index6 = hgroup("[1]Index Mods",index6) with{ index6 = vslider("[5]index6", 1, 1, index_max, 0.2); }; modFreq1 = ((os.osc(mod_freq1)*index1)); a1 = hgroup("[3]Mod Attacks[style:knob]",a1) with{ a1 = hslider("[0]Attack1[style:knob]", 0.001, 0.001, 1.5, 0.01); }; d1 = hgroup("[3]Mod Decays[style:knob]", d1) with{ d1 = hslider("[0]Decay1[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s1 = hgroup("[3]Mod Sustains[style:knob]", s1) with{ s1 = hslider("[0]Sustain1[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r1 = hgroup("[3]Mod Releases[style:knob]", r1) with{ r1 = hslider("[0]Release1[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq1_g = modFreq1* hgroup("[1]Vol Mod1", modvol1) with{ modvol1 = hslider("[1]I1[style:knob]",0, 0, 1, 0.01):si.smoo; }; modFreq2 = (os.osc(mod_freq2)*index2); a2 = hgroup("[3]Mod Attacks[style:knob]",a2) with{ a2 = hslider("[0]Attack2[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d2 = hgroup("[3]Mod Decays[style:knob]", d2) with{ d2 = hslider("[0]Decay2[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s2 = hgroup("[3]Mod Sustains[style:knob]", s2) with{ s2= hslider("[0]Sustain2[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r2 = hgroup("[3]Mod Releases[style:knob]", r2) with{ r2 = hslider("[0]Release2[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq2_g = modFreq2* hgroup("[1]Vol Mod1", modvol2) with{ modvol2 = hslider("[1]I2[style:knob]",0, 0, 1, 0.01):si.smoo; }; modFreq3 = (os.osc(mod_freq3)*index3); a3 = hgroup("[3]Mod Attacks[style:knob]",a3) with{ a3 = hslider("[0]Attack3[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d3 = hgroup("[3]Mod Decays[style:knob]", d3) with{ d3 = hslider("[0]Decay3[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s3 = hgroup("[3]Mod Sustains[style:knob]", s3) with{ s3= hslider("[0]Sustain3[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r3 = hgroup("[3]Mod Releases[style:knob]", r3) with{ r3 = hslider("[0]Release3[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq3_g = modFreq3* hgroup("[1]Vol Mod1", modvol3) with{ modvol3 = hslider("[1]I3[style:knob]",0, 0, 1, 0.01):si.smoo; }; modFreq4 = (os.osc(mod_freq4)*index4); a4 = hgroup("[3]Mod Attacks[style:knob]",a4) with{ a4 = hslider("[0]Attack4[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d4 = hgroup("[3]Mod Decays[style:knob]", d4) with{ d4 = hslider("[0]Decay4[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s4 = hgroup("[3]Mod Sustains[style:knob]", s4) with{ s4= hslider("[0]Sustain4[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r4 = hgroup("[3]Mod Releases[style:knob]", r4) with{ r4 = hslider("[0]Release4[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq4_g = modFreq4* hgroup("[1]Vol Mod1", modvol4) with{ modvol4 = hslider("[1]I4[style:knob]",0, 0, 1, 0.01):si.smoo; }; modFreq5 = (os.osc(mod_freq5)*index5); a5 = hgroup("[3]Mod Attacks[style:knob]",a5) with{ a5 = hslider("[0]Attack5[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d5 = hgroup("[3]Mod Decays[style:knob]", d5) with{ d5 = hslider("[0]Decay5[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s5 = hgroup("[3]Mod Sustains[style:knob]", s5) with{ s5= hslider("[0]Sustain5[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r5 = hgroup("[3]Mod Releases[style:knob]", r5) with{ r5 = hslider("[0]Release5[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq5_g = modFreq5* hgroup("[1]Vol Mod1", modvol5) with{ modvol5 = hslider("[1]I5[style:knob]",0, 0, 1, 0.01):si.smoo; }; modFreq6 = (os.osc(mod_freq6)*index6); a6 = hgroup("[3]Mod Attacks[style:knob]",a6) with{ a6 = hslider("[0]Attack6[style:knob]", 0.001, 0.001, 1.5, 0.01):si.smoo; }; d6 = hgroup("[3]Mod Decays[style:knob]", d6) with{ d6 = hslider("[0]Decay6[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; s6 = hgroup("[3]Mod Sustains[style:knob]", s6) with{ s6= hslider("[0]Sustain6[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; r6 = hgroup("[3]Mod Releases[style:knob]", r6) with{ r6 = hslider("[0]Release6[style:knob]",0.001, 0.001, 1.5, 0.01):si.smoo; }; modFreq6_g = modFreq6* hgroup("[1]Vol Mod1", modvol6) with{ modvol6 = hslider("[1]I6[style:knob]",0, 0, 1, 0.01):si.smoo; }; FM = (os.osc((c_f + modFreq1)))*en.adsre(a1,d1,s1,r1,gate), (os.osc((c_f + modFreq2)))*en.adsre(a2,d2,s2,r2,gate), (os.osc((c_f + modFreq3)))*en.adsre(a3,d3,s3,r3,gate),(os.osc((c_f + modFreq4)))*en.adsre(a4,d4,s4,r4,gate),(os.osc((c_f + modFreq5)))*en.adsre(a5,d5,s5,r5,gate),(os.osc((c_f + modFreq6)))*en.adsre(a6,d6,s6,r6,gate):>_; FM_ResLof = FM: hgroup("[4]ResLoFilter_del", fi.resonlp(resFreq, q, 1)) with{ ctFreq = hslider("[0]CutOff Freq[style:knob]", 2000, 50, 6000, 0.1); q = hslider("[1]Q[style:knob]", 5, 1, 30, 0.1); lfoFreq = hslider("[2]LFO_Freq[style:knob]", 10, 0.1, 30, 0.01); lfoDepth = hslider("[3]LFO_Depth[style:knob]", 500, 1, 10000, 1); resFreq = ctFreq + os.osc(lfoFreq)*lfoDepth : max(30); }; process = FM_ResLof*en.ar(glob_att,glob_rel,gate) *1/6*m_gain <:_,_;
78feaf1ebec9360bd54c2ec0ac9f671892d38ec2c76a37164bd50e3a5eb1a7dc
gretadeidda/programmazione
oscillatori.dsp
import("stdfaust.lib"); fader1 =vslider("[01] volume1",0., 0., 1., 0.01); fader2 =vslider("[02] volume2",0., 0., 1., 0.01); fader3 =vslider("[03] volume3",0., 0., 1., 0.01); fader4 =vslider("[04] volume4",0., 0., 1., 0.01); fader5 =vslider("[05] volume5",0., 0., 1., 0.01); fader6 =vslider("[06] volume6",0., 0., 1., 0.01); fader7 =vslider("[07] volume7",0., 0., 1., 0.01); fader8 =vslider("[08] volume8",0., 0., 1., 0.01); fader9 =vslider("[09] volume9",0., 0., 1., 0.01); fader10 =vslider("[10] volume10",0., 0., 1., 0.01); fader11 =vslider("[11] volume11",0., 0., 1., 0.01); fader12 =vslider("[12] volume12",0., 0., 1., 0.01); fader13 =vslider("[13] volume13",0., 0., 1., 0.01); fader14 =vslider("[14] volume14",0., 0., 1., 0.01); fader15 =vslider("[15]volume15",0., 0., 1., 0.01); fader16 =vslider("[16] volume16",0., 0., 1., 0.01); f1=440; osc1=os.osc(f1*1); osc2=os.osc(f1*2); osc3=os.osc(f1*3); osc4=os.osc(f1*4); osc5=os.osc(f1*5); osc6=os.osc(f1*6); osc7=os.osc(f1*7); osc8=os.osc(f1*8); osc9=os.osc(f1*9); osc10=os.osc(f1*10); osc11=os.osc(f1*11); osc12=os.osc(f1*12); osc13=os.osc(f1*13); osc14=os.osc(f1*14); osc15=os.osc(f1*15); osc16=os.osc(f1*16); process = hgroup("mixer", osc1 *(fader1), osc2 *(fader2), osc3 *(fader3), osc4 *(fader4), osc5 *(fader5), osc6 *(fader6), osc7 *(fader7), osc8 *(fader8), osc9 *(fader9), osc10 *(fader10), osc11 *(fader11), osc12 *(fader12), osc13 *(fader13), osc14 *(fader14), osc15 *(fader15), osc16 *(fader16) ): +,+,+,+,+,+,+,+ : +,+,+,+ : +,+; //varore di inizializzazione valore minimo valore massimo e step incrementare //valore i inizializzazione il valore in cui vogliamo posizionare il cursore nel momento in cui accedi il programma //step incrementare la definizione della grandezza che separano il gradino di passaggio tra il valore minimo al massimo //un suono con spettro armonico contine frequenze armoniche multiple intere della frequenza fondamentale
https://raw.githubusercontent.com/gretadeidda/programmazione/f067bb517530c42dbb3bd4eb967d2af35cf75230/oscillatori.dsp
faust
varore di inizializzazione valore minimo valore massimo e step incrementare valore i inizializzazione il valore in cui vogliamo posizionare il cursore nel momento in cui accedi il programma step incrementare la definizione della grandezza che separano il gradino di passaggio tra il valore minimo al massimo un suono con spettro armonico contine frequenze armoniche multiple intere della frequenza fondamentale
import("stdfaust.lib"); fader1 =vslider("[01] volume1",0., 0., 1., 0.01); fader2 =vslider("[02] volume2",0., 0., 1., 0.01); fader3 =vslider("[03] volume3",0., 0., 1., 0.01); fader4 =vslider("[04] volume4",0., 0., 1., 0.01); fader5 =vslider("[05] volume5",0., 0., 1., 0.01); fader6 =vslider("[06] volume6",0., 0., 1., 0.01); fader7 =vslider("[07] volume7",0., 0., 1., 0.01); fader8 =vslider("[08] volume8",0., 0., 1., 0.01); fader9 =vslider("[09] volume9",0., 0., 1., 0.01); fader10 =vslider("[10] volume10",0., 0., 1., 0.01); fader11 =vslider("[11] volume11",0., 0., 1., 0.01); fader12 =vslider("[12] volume12",0., 0., 1., 0.01); fader13 =vslider("[13] volume13",0., 0., 1., 0.01); fader14 =vslider("[14] volume14",0., 0., 1., 0.01); fader15 =vslider("[15]volume15",0., 0., 1., 0.01); fader16 =vslider("[16] volume16",0., 0., 1., 0.01); f1=440; osc1=os.osc(f1*1); osc2=os.osc(f1*2); osc3=os.osc(f1*3); osc4=os.osc(f1*4); osc5=os.osc(f1*5); osc6=os.osc(f1*6); osc7=os.osc(f1*7); osc8=os.osc(f1*8); osc9=os.osc(f1*9); osc10=os.osc(f1*10); osc11=os.osc(f1*11); osc12=os.osc(f1*12); osc13=os.osc(f1*13); osc14=os.osc(f1*14); osc15=os.osc(f1*15); osc16=os.osc(f1*16); process = hgroup("mixer", osc1 *(fader1), osc2 *(fader2), osc3 *(fader3), osc4 *(fader4), osc5 *(fader5), osc6 *(fader6), osc7 *(fader7), osc8 *(fader8), osc9 *(fader9), osc10 *(fader10), osc11 *(fader11), osc12 *(fader12), osc13 *(fader13), osc14 *(fader14), osc15 *(fader15), osc16 *(fader16) ): +,+,+,+,+,+,+,+ : +,+,+,+ : +,+;
cb6682dcb3a09744a758f2890a0da07f91a64d13b45a22ec3ad4b1eaa8640524
grame-cncm/faust
foo.dsp
import("stdfaust.lib"); process = os.osc(400)*vslider("vol1", 0.5, 0, 1, 0.01),os.osc(600)*nentry("vol2", 0.5, 0, 1, 0.01);
https://raw.githubusercontent.com/grame-cncm/faust/66cdb528642fdf3d607fec1b7ea7f386d7b709a4/tests/interp-tests/foo.dsp
faust
import("stdfaust.lib"); process = os.osc(400)*vslider("vol1", 0.5, 0, 1, 0.01),os.osc(600)*nentry("vol2", 0.5, 0, 1, 0.01);
f94aec462f5f0fdb02f10381bece75b82b72a2625a4dae28f0036e5af3cf2531
OceanSwift/Faust-Course-Examples
3 OP Simple FM Example.dsp
import("stdfaust.lib"); gain = hslider("[4]gain[style:knob]",1,0,1,0.01); gate = button("[5]gate"); freq = hslider("freq",440,50,2000,0.01); dxOscA = os.osc(freq)*envelope with{ envelope = hgroup("[0]Envelope",en.adsr(attack,decay,sustain,release,gate)) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; }; }; dxOscB = os.osc(freq+dxOscA*mod2)*envelope2 with{ mod2 = hslider("[2]Mod2[style:knob]",50,1,2000,1); envelope2 = hgroup("[1]Envelope2",en.adsr(attack,decay,sustain,release,gate)) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; }; }; dxOscC = os.osc(freq+dxOscB*mod3)*envelope3 with{ mod3 = hslider("[5]Mod3[style:knob]",50,1,2000,1); envelope3 = hgroup("[4]Envelope3",en.adsr(attack,decay,sustain,release,gate)*0.3*gain) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; }; }; myEq = hgroup("[6]Peak Eq",fi.peak_eq(boost,peak,bw)) with{ boost = hslider("[0]Boost[style:knob]",0,-20,20,0.1); peak = hslider("[1]Peak[style:knob]",50,50,1000,1); bw = hslider("[2]Q[style:knob]",100,10,1000,1); }; process = dxOscC : myEq <: dm.zita_light;
https://raw.githubusercontent.com/OceanSwift/Faust-Course-Examples/c3c779ab8257fae9563de4bc09ee71c5346bb1cd/3%20OP%20Simple%20FM%20Example.dsp
faust
import("stdfaust.lib"); gain = hslider("[4]gain[style:knob]",1,0,1,0.01); gate = button("[5]gate"); freq = hslider("freq",440,50,2000,0.01); dxOscA = os.osc(freq)*envelope with{ envelope = hgroup("[0]Envelope",en.adsr(attack,decay,sustain,release,gate)) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; }; }; dxOscB = os.osc(freq+dxOscA*mod2)*envelope2 with{ mod2 = hslider("[2]Mod2[style:knob]",50,1,2000,1); envelope2 = hgroup("[1]Envelope2",en.adsr(attack,decay,sustain,release,gate)) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; }; }; dxOscC = os.osc(freq+dxOscB*mod3)*envelope3 with{ mod3 = hslider("[5]Mod3[style:knob]",50,1,2000,1); envelope3 = hgroup("[4]Envelope3",en.adsr(attack,decay,sustain,release,gate)*0.3*gain) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; }; }; myEq = hgroup("[6]Peak Eq",fi.peak_eq(boost,peak,bw)) with{ boost = hslider("[0]Boost[style:knob]",0,-20,20,0.1); peak = hslider("[1]Peak[style:knob]",50,50,1000,1); bw = hslider("[2]Q[style:knob]",100,10,1000,1); }; process = dxOscC : myEq <: dm.zita_light;
da3a2c8a2f24fc0cbd1474f479ed1907abe71a90f9efb7a85d9b6946f266f30f
grame-cncm/faustdoc
exfaust10.dsp
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); organ(freq) = (osc(freq) + osc(freq*2) + osc(freq*3))/3; process = organ(f);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/tutorials/basic-osc/exfaust10/exfaust10.dsp
faust
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); organ(freq) = (osc(freq) + osc(freq*2) + osc(freq*3))/3; process = organ(f);
2c8c45f73e1927fcb923031287478ed12e4ca845d42aac882c6d51fd73d157f5
grame-cncm/faustdoc
exfaust11.dsp
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); g = hslider("gain",1,0,1,0.01); t = button("gate"); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); organ(freq) = (osc(freq) + osc(freq*2) + osc(freq*3))/3; process = organ(f)*g*t;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/tutorials/basic-osc/exfaust11/exfaust11.dsp
faust
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); g = hslider("gain",1,0,1,0.01); t = button("gate"); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); organ(freq) = (osc(freq) + osc(freq*2) + osc(freq*3))/3; process = organ(f)*g*t;
815ffecffc37bdb507780b5980fbfeb809903b79e8c3ad547268a8b83556307d
grame-cncm/faustdoc
exfaust12.dsp
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); g = hslider("gain",1,0,1,0.01); t = si.smoo(button("gate")); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); organ(freq) = (osc(freq) + osc(freq*2) + osc(freq*3))/3; process = organ(f)*g*t;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/tutorials/basic-osc/exfaust12/exfaust12.dsp
faust
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); g = hslider("gain",1,0,1,0.01); t = si.smoo(button("gate")); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); organ(freq) = (osc(freq) + osc(freq*2) + osc(freq*3))/3; process = organ(f)*g*t;
5c72e706e0701194d15b56390dc806b16dda39c714c2c9ac04f8e2ab6055c830
grame-cncm/faustdoc
exfaust12.dsp
import("stdfaust.lib"); freq = hslider("freq",440,50,3000,0.01); gain = hslider("gain",1,0,1,0.01); gate = button("gate"); envelope = gain*gate : si.smoo; process = (os.osc(freq) + os.osc(freq*2) + os.osc(freq*3))/(3)*envelope;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/syntax/exfaust12/exfaust12.dsp
faust
import("stdfaust.lib"); freq = hslider("freq",440,50,3000,0.01); gain = hslider("gain",1,0,1,0.01); gate = button("gate"); envelope = gain*gate : si.smoo; process = (os.osc(freq) + os.osc(freq*2) + os.osc(freq*3))/(3)*envelope;
1019646762eb0106a482d264b4dbca9e772e74c9d4462d23c2d17a44aef4b0ce
grame-cncm/faustdoc
exfaust11.dsp
import("stdfaust.lib"); freq = hslider("freq",440,50,3000,0.01); gain = hslider("gain",1,0,1,0.01); gate = button("gate"); envelope = gain*gate : si.smoo; process = os.osc(freq),os.osc(freq*2),os.osc(freq*3) :> /(3)*envelope;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/syntax/exfaust11/exfaust11.dsp
faust
import("stdfaust.lib"); freq = hslider("freq",440,50,3000,0.01); gain = hslider("gain",1,0,1,0.01); gate = button("gate"); envelope = gain*gate : si.smoo; process = os.osc(freq),os.osc(freq*2),os.osc(freq*3) :> /(3)*envelope;
83210efc605055d55d35db7d8cdb3b0960abd76ead6ee056bc9e4720be1e002a
grame-cncm/faustdoc
exfaust2.dsp
import("stdfaust.lib"); decimalpart(x) = x-int(x); phase(f) = f/ma.SR : (+ : decimalpart) ~ _; osc(f) = phase(f) * 2 * ma.PI : sin; process = osc(440);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2018-12-01-paw/exfaust2/exfaust2.dsp
faust
import("stdfaust.lib"); decimalpart(x) = x-int(x); phase(f) = f/ma.SR : (+ : decimalpart) ~ _; osc(f) = phase(f) * 2 * ma.PI : sin; process = osc(440);
50dbb7991cf842d6e72aa2ab76aafc8bbdcc7b406917e1e45d5954459c87aac2
grame-cncm/faustdoc
exfaust4.dsp
import("stdfaust.lib"); decimalpart(x) = x-int(x); phase(f) = f/ma.SR : (+ : decimalpart) ~ _; osc(f) = sin(phase(f) * 2 * ma.PI); process = osc(440);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-03-24-faust-citi/exfaust4/exfaust4.dsp
faust
import("stdfaust.lib"); decimalpart(x) = x-int(x); phase(f) = f/ma.SR : (+ : decimalpart) ~ _; osc(f) = sin(phase(f) * 2 * ma.PI); process = osc(440);
a015ddf36342ad4278ef3630d440c9476d8f82406bf3c44dc19c54c62c1582e5
grame-cncm/faustdoc
exfaust9.dsp
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); process = osc(f);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/tutorials/basic-osc/exfaust9/exfaust9.dsp
faust
import("stdfaust.lib"); f = hslider("freq",440,50,2000,0.01); phasor(freq) = (+(freq/ma.SR) ~ ma.frac); osc(freq) = sin(phasor(freq)*2*ma.PI); process = osc(f);
14bc389e14013d7166a0dbdbde89e6f76dec88a3028c78f400670d003d4a1a8a
grame-cncm/faustdoc
exfaust24.dsp
import("stdfaust.lib"); // FM: Frequency moulation 2 FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1)*(2+envelop2)/3, hslider("amp modulation", 0, 0, 1, 0.01)*(0.5+envelop2)/1.5 ) : *(envelop1) <: dm.freeverb_demo; envelop1 = button("gate") : upfront : en.ar(0.001, 1); envelop2 = button("gate") : upfront : en.ar(0.5, 0.5); upfront(x) = x>x';
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-03-24-faust-citi/exfaust24/exfaust24.dsp
faust
FM: Frequency moulation 2
import("stdfaust.lib"); FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1)*(2+envelop2)/3, hslider("amp modulation", 0, 0, 1, 0.01)*(0.5+envelop2)/1.5 ) : *(envelop1) <: dm.freeverb_demo; envelop1 = button("gate") : upfront : en.ar(0.001, 1); envelop2 = button("gate") : upfront : en.ar(0.5, 0.5); upfront(x) = x>x';
809a5b62c2c84da4aeace65c1253aea815149f2281dda4274eeec69bf76d277c
grame-cncm/faustdoc
exfaust48.dsp
import("stdfaust.lib"); // FM: Frequency modulation 2 FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1)*(2+envelop2)/3, hslider("amp modulation", 0, 0, 1, 0.01)*(0.5+envelop2)/1.5 ) : *(envelop1) <: dm.freeverb_demo; envelop1 = button("gate") : upfront : en.ar(0.001, 1); envelop2 = button("gate") : upfront : en.ar(0.5, 0.5); upfront(x) = x>x';
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-04-10-faust-101/exfaust48/exfaust48.dsp
faust
FM: Frequency modulation 2
import("stdfaust.lib"); FM(fc,fm,amp) = fm : os.osc : *(amp) : +(1) : *(fc) : os.osc; process = FM( hslider("freq carrier", 880, 40, 8000, 1), hslider("freq modulation", 200, 10, 1000, 1)*(2+envelop2)/3, hslider("amp modulation", 0, 0, 1, 0.01)*(0.5+envelop2)/1.5 ) : *(envelop1) <: dm.freeverb_demo; envelop1 = button("gate") : upfront : en.ar(0.001, 1); envelop2 = button("gate") : upfront : en.ar(0.5, 0.5); upfront(x) = x>x';
bb1baea4ed6a806d3182f5215642377924415447ba1daa77bc8a2b6aaf9b704a
grame-cncm/faustdoc
exfaust6.dsp
import("stdfaust.lib"); process = 440 : os.osc;
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/syntax/exfaust6/exfaust6.dsp
faust
import("stdfaust.lib"); process = 440 : os.osc;
2b40181481e1319d6016f126593036572fff182fe0787610fd3e542daa6e209b
grame-cncm/faustdoc
exfaust17.dsp
import("stdfaust.lib"); process = outputs(os.osc(440));
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/syntax/exfaust17/exfaust17.dsp
faust
import("stdfaust.lib"); process = outputs(os.osc(440));
396eefd7f39397f16a43efb563d5bb9b489eeb1dfa2ddbb56995f09e331506e5
grame-cncm/faustdoc
exfaust6.dsp
import("stdfaust.lib"); process = os.osc(440) * hslider("gain", 0.1, 0, 1, 0.01);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-03-24-faust-citi/exfaust6/exfaust6.dsp
faust
import("stdfaust.lib"); process = os.osc(440) * hslider("gain", 0.1, 0, 1, 0.01);
c7a649673d51da8c56eb441ddfddef0df09a629acc06e3905f3fc0aeafafde2f
grame-cncm/faustdoc
exfaust7.dsp
import("stdfaust.lib"); process = os.osc(440 /*a remplacer*/) * hslider("gain", 0.1, 0, 1, 0.01);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-03-24-faust-citi/exfaust7/exfaust7.dsp
faust
a remplacer
import("stdfaust.lib");
f85be004d61c93f1718746591052e5720b20fbd5d9ebf7786043f3919d1862ef
grame-cncm/faustdoc
exfaust30.dsp
import("stdfaust.lib"); process = os.osc(440 /*to replace*/) * hslider("gain", 0.1, 0, 1, 0.01);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-04-10-faust-101/exfaust30/exfaust30.dsp
faust
to replace
import("stdfaust.lib");
c24bce9885d5b4233e94f2010d6b3aaaf05f2f4cc51fd866247cec41643982fb
grame-cncm/faustdoc
exfaust97.dsp
import("stdfaust.lib"); process = par(i,3,os.osc(hslider("Freq%i", 200+i*400, 200, 2000, 1)));
https://raw.githubusercontent.com/grame-cncm/faustdoc/515c59ce7c4e390d3cf0fc518cd0d9f3ef7be262/docs/manual/syntax/exfaust97/exfaust97.dsp
faust
import("stdfaust.lib"); process = par(i,3,os.osc(hslider("Freq%i", 200+i*400, 200, 2000, 1)));
1550c78b46f6a1da7af18ba6df8f194421e595e0944ba9b210536d9b6c7258ee
grame-cncm/faustdoc
exfaust1.dsp
import("stdfaust.lib"); process = os.osc(440); // the "hello world" of computer music
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/syntax/exfaust1/exfaust1.dsp
faust
the "hello world" of computer music
import("stdfaust.lib");
f62d04cade2b05d35587b784b16a2f4b66a6104e78c60491879111d165235442
grame-cncm/faustdoc
exfaust87.dsp
import("stdfaust.lib"); s = nentry("Selector",0,0,1,1) : int; sig = os.osc(440),os.sawtooth(440) : select2(s); process = sig;
https://raw.githubusercontent.com/grame-cncm/faustdoc/515c59ce7c4e390d3cf0fc518cd0d9f3ef7be262/docs/manual/syntax/exfaust87/exfaust87.dsp
faust
import("stdfaust.lib"); s = nentry("Selector",0,0,1,1) : int; sig = os.osc(440),os.sawtooth(440) : select2(s); process = sig;
2dec2c7fd5ad90a5a237c8b9e0b7348f947d98d066780fa595305537d33dcdcb
grame-cncm/faustdoc
exfaust29.dsp
import("stdfaust.lib"); ar(a,r,g) = v letrec { 'n = (n+1) * (g<=g'); 'v = max(0, v + (n<a)/a - (n>=a)/r) * (g<=g'); }; gate = button("gate"); process = os.osc(440)*ar(1000,1000,gate);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/manual/syntax/exfaust29/exfaust29.dsp
faust
import("stdfaust.lib"); ar(a,r,g) = v letrec { 'n = (n+1) * (g<=g'); 'v = max(0, v + (n<a)/a - (n>=a)/r) * (g<=g'); }; gate = button("gate"); process = os.osc(440)*ar(1000,1000,gate);
5105abcc6a20d7d8a8128bbfdad31c429a5a5b8c7dcd6a28976b6374da7359cd
grame-cncm/faustdoc
exfaust33.dsp
import("stdfaust.lib"); // Approximation of a square wave using additive synthesis squarewave(f) = 4/ma.PI*sum(k, 4, os.osc((2*k+1)*f)/(2*k+1)); process = squarewave(55);
https://raw.githubusercontent.com/grame-cncm/faustdoc/493929103510997ef8adb66603d4aba123b2a70d/docs/workshops/2020-04-10-faust-101/exfaust33/exfaust33.dsp
faust
Approximation of a square wave using additive synthesis
import("stdfaust.lib"); squarewave(f) = 4/ma.PI*sum(k, 4, os.osc((2*k+1)*f)/(2*k+1)); process = squarewave(55);