Re: [Faudiostream-users] How to read from rwtable, process the output, and write back to the same rwtable

2021-03-19 Thread Steven Kraninger
Damien,

Here is a possible feedback scheme. Probably not what you want, but should
get you started.

import("stdfaust.lib");
tableSize = 48000;

recIndex = (+(1) : %(tableSize)) ~ *(record);
readIndex = readSpeed/float(ma.SR) : (+ : ma.frac) ~ _ : *(float(tableSize))
 : int;
readSpeed = hslider("[0]Read Speed",1,0.001,10,0.01);
record = button("[1]Record") : int;

looper = rwtable(tableSize,0.0,recIndex,_,readIndex);

fooSum = _*5 + _;

odLooper = ((_*feedBack + _ : looper) ~ _) : _
with {
feedBack = hslider("[3]OverDub",0.0,0.0,1.0,0.01);
};

process = odLooper;


Steven Kraninger

On Tue, Mar 16, 2021 at 2:02 AM Damien Clarke 
wrote:

> Hi, Faust has been fantastic, but I've recently become completely stuck.
> I'd like to make a looper that can overdub. The sample code for making a
> looper is very close to what I'd like.
>
> import("stdfaust.lib"); tableSize = 48000; recIndex = (+(1) :
> %(tableSize)) ~ *(record); readIndex = readSpeed/float(ma.SR) : (+ :
> ma.frac) ~ _ : *(float(tableSize)) : int; readSpeed = hslider("[0]Read
> Speed",1,0.001,10,0.01); record = button("[1]Record") : int; looper =
> rwtable(tableSize,0.0,recIndex,_,readIndex); process = looper;
> I'd like to change this so that each iteration, it reads the value in the
> rwtable at recIndex, adds the incoming value from process, and writes the
> resulting value back to the rwtable. So then I can hold down the Record
> button and it will overdub the signal as the record head passes multiple
> times over the length of the table. But I can't find a way to do this that
> doesn't create a second rwtable. Like this obviously doesn't work because I
> assume I can't make the two "table" function calls reference the same
> table. (please ignore the fact I'm writing 0 to the table, I also can't
> work out how to not write to the table, so I'm just dumping the incoming
> signal at index 0 for now)
>
>
> import("stdfaust.lib");
> tableSize = 48000;
> recIndex = (+(1) : %(tableSize)) ~ *(record);
> readIndex = readSpeed/float(ma.SR) : (+ : ma.frac) ~ _ : *(float(tableSize
> )) : int;
> readSpeed = hslider("[0]Read Speed",1,0.001,10,0.01);
> record = button("[1]Record") : int;
> table(a,b) = rwtable(tableSize,0.0,a,_,b);
> looper = _ <: table(0,recIndex),_ :> table(recIndex,readIndex);
> process = looper;
>
> Any ideas how to do this? My gut feeling is that it's impossible, or must
> use recursion in a way that I'm not good enough to figure it out. Using @
> isn't an option in this case because I need control over the position of
> the playhead and record head.
>
> This user had a very similar question 12 years ago but with no replies
> https://sourceforge.net/p/faudiostream/mailman/faudiostream-devel/thread/4A26F5CB.8060703%40kymatica.com/#msg22644411
>
> Thanks,
> Damien
>
> ___
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] Csharp backend contributed by Mike Oliphant

2021-03-19 Thread Stéphane Letz
Committed in master-dev branch: 
https://github.com/grame-cncm/faust/commits/master-dev

Stéphane 

___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users