Hi Romain!

Mmmh not sure why you ran into these issues. You should keep in mind that
> RAM is extremely limited on the Teensy in general so if you try to run
> algorithms allocating a lot of memory (e.g., echo, reverb, etc.) it might
> not work. Some adjustments can be made though to make things work in most
> cases. The "Low-Memory Footprint Zita" on this page:
> https://ccrma.stanford.edu/workshops/faust-embedded-19/ is a good example
> of that. You can find additional information on this topic here as well:
> https://faustdoc.grame.fr/tutorials/teensy/#notes-about-computational-power-and-memory-footprint
>

 any idea why this code (I don't know what could affect the RAM with this
one) doesn't want to run on Teensy 4?
import("stdfaust.lib");

// Pre-filter parameters
pfilterfc = hslider("Cutoff", 20000, 100, 20000, 1.0);
pfilterq = hslider("Resonance", 1.0, 1.0, 8, 0.001) : si.smooth(0.995);

// Distortion parameters
pdrive = hslider("Drive", 8.0, -10.0, 10.0, 0.001) : si.smooth(0.995);
psat = hslider("Saturation", 1.0, 0.0, 1.0, 0.001) : si.smooth(0.995);
pcurve = hslider("Curve", 4.0, 0.1, 4.0, 0.001) : si.smooth(0.995);

// Output parameters
pfeedback = hslider("Feedback", -60, -60, -24, 1) : ba.db2linear :
si.smooth(0.995);
plevel = hslider("Level", -4, -24, 24, 1) : ba.db2linear : si.smooth(0.995);


tanh(x) = x * (27 + x * x) / (27 + 9 * x * x);
transfer(x) = tanh(pcurve * x) / tanh(pcurve);

drive(x) = x : *(pdrive) : +(fol(x)) : max(-3) : min(3) with {
fol = an.amp_follower(0.04);
};

modfilter(x) = x <: _, tap(x) : *(1.0 - psat), *(psat) : + : fi.tf1(b0(x),
b1(x), a1(x)) with {
b0(x) = m(x);
b1(x) = 1.0;
a1(x) = m(x);
m(x) = drive(x) : transfer : *(0.24);
tap(x) = m(x);
};

tf2s(b2,b1,b0,a1,a0,w1) = fi.tf2(b0d,b1d,b2d,a1d,a2d)
with {
c   = 1/tan(w1*0.5/ma.SR) : si.smooth(0.995);
csq = c*c;
d   = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};

resonlp(fc,Q,gain) = tf2s(b2,b1,b0,a1,a0,wc)
with {
wc = 2*ma.PI*fc;
a1 = 1/Q;
a0 = 1;
b2 = 0;
b1 = 0;
b0 = gain;
};

filter = resonlp(pfilterfc, pfilterq, 1.0);

waveshaping = (+ : modfilter : fi.dcblocker) ~ *(pfeedback) : gain with {
gain = *(4.0) : *(plevel);
};

process = filter : waveshaping;

Il giorno dom 28 giu 2020 alle ore 17:32 Romain Michon <[email protected]>
ha scritto:

> Hi guys,
>
> I did the Stanford/Kadenze course and I was hoping to use the Teensy with
>>> Faust but the only thing I could make work was the example. Anything with
>>> audio input/processing hasn't seemed to correctly. Using the Teensy Audio
>>> library worked just fine.
>>>
>>
> Mmmh not sure why you ran into these issues. You should keep in mind that
> RAM is extremely limited on the Teensy in general so if you try to run
> algorithms allocating a lot of memory (e.g., echo, reverb, etc.) it might
> not work. Some adjustments can be made though to make things work in most
> cases. The "Low-Memory Footprint Zita" on this page:
> https://ccrma.stanford.edu/workshops/faust-embedded-19/ is a good example
> of that. You can find additional information on this topic here as well:
> https://faustdoc.grame.fr/tutorials/teensy/#notes-about-computational-power-and-memory-footprint
>
>
>> I'm taking a workshop at Stanford and the instructor recommended Faust
>>>> with Teensy. She had us order Teensy 3.2 and I just wanted to check if that
>>>> will work with FAUST or not as I got mixed information here ps://
>>>> faust.grame.fr/doc/tutorials/ &
>>>> https://www.pjrc.com/store/teensy32.html
>>>>
>>>
> Great to hear from you Suyash ;)! I would definitely not recommend using
> the 3.2 because it doesn't have an FPU (Floating Point Unit). For that
> reason, you'll be able to run a few oscillators at best but not more. I
> recommend using the 3.6, 4.0 or 4.1. Just curious, did Stefanie suggest
> this?
>
> Cheers,
>
> Romain
> _______________________________________________
> Faudiostream-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to