Re: [Faudiostream-users] First version of JSFX backend added in the compiler

2023-06-19 Thread James Mckernon
Hi, Pretty late but just wanted to add my thanks for this, I will certainly be making use of it for prototyping. I had actually thought some time ago to try to develop a JSFX backend myself; unfortunately I had no idea where to start, so I am glad someone else has undertaken this labour instead.

Re: [Faudiostream-users] multiply two signals with a third

2022-02-27 Thread James Mckernon
On 2/27/22, Jean-Louis Paquelin wrote: > Is this the weekend game? Indeed, I'm having fun. > process = _, _, _ : _, route(2,2,1,2,2,1) : _, (_ <: _, _), _ : *, *; But if you're using route, you don't need the next part: process = _,_,_ : route(3,4,1,1,2,3,3,2,3,4) : *,*; Or to shave off a

Re: [Faudiostream-users] clip a signal/value?

2022-01-26 Thread James Mckernon
Hi, Slightly surprisingly, I couldn't find one in the libraries when I had a look just now, though perhaps it's there under a different name. However, it's quite easy to define: clip(rangemin, rangemax) = max(rangemin) : min(rangemax); min and max are builtin functions which choose the min and

Re: [Faudiostream-users] Pattern matching question

2022-01-13 Thread James Mckernon
On 1/13/22, Jean-Louis Paquelin wrote: > Hello there, > > I can't figure out how the pattern matching works in Faust. > > I've tried the following code: > > lut(2) = 3; > lut(3) = 4; > lut(4) = 2; > lut(n) = n; > > process = hslider("A", 1, 1, 5, 1) : int : lut : hbargraph("B", 1, 5); > > Trying

Re: [Faudiostream-users] Faust IDE questions

2021-11-15 Thread James Mckernon
On 11/15/21, Kjetil Matheussen wrote: > Hm, you might want to consider using Radium as a Faust IDE. Radium > doesn't monitor faust files though to make it convenient to use an > external editor. I should probably add that feature to Radium. Hi Kjetil, Thanks, I may look into that. In any case,

Re: [Faudiostream-users] Faust IDE questions

2021-11-15 Thread James Mckernon
On 11/15/21, Stéphane Letz wrote: > You mean as a PWA (https://fr.wikipedia.org/wiki/Progressive_web_app) or > compiling/deploying the Git version ? I mean deploying the Git version. > Are you able to start Chrome or Firefox with a JACK backend ? I haven't really tried yet, but yes, this is

[Faudiostream-users] Faust IDE questions

2021-11-15 Thread James Mckernon
Hi all, I have generally been a user of FaustLive but have just been looking at the faust IDE, as I got it running locally for the first time. (I had always thought of it primarily as a remote/web service up until now.) I would like to use it as I can see that it's pretty nice; however, I'm not

Re: [Faudiostream-users] variable saw

2021-09-19 Thread James Mckernon
On 9/17/21, Roger Pibernat wrote: > Thanks, I solved it with an envelope and a phasor This should work, but note that it will probably alias somewhat (more noticeable at high or changing frequencies). The advantage of the oscillators in oscillators.lib is that they are band-limited so won't

Re: [Faudiostream-users] variable saw

2021-09-18 Thread James Mckernon
It seems that there isn't one in the standard library. But the triangle wave in the standard library is made by integrating a square wave. Analogously, you can construct a var saw by integrating the pulsetrain oscillator, which is essentially a square wave with duty cycle parameter.

Re: [Faudiostream-users] Parallel operators

2021-09-07 Thread James Mckernon
On 9/7/21, James Mckernon wrote: > I haven't time to work out the details now. Why do I lie like this? I couldn't resist trying it. I think this should be you what you want. ba = library("basics.lib"); bop(op, list) = par(i, ba.count(list), op(ba.take(i + 1,list))); process = (1

Re: [Faudiostream-users] Parallel operators

2021-09-07 Thread James Mckernon
I think it should be possible but I haven't time to work out the details now. I guess it would be defined as a par() of n functions, taking n from the length of its list argument. Each of the n functions would apply the operator to the nth item in the list, leaving the other arg open (so this

Re: [Faudiostream-users] Some questions about using Faust in Windows

2021-09-05 Thread James Mckernon
Hi and welcome. #1 I haven't used faust on windows, can't comment. #2 Your understanding is essentially correct, though the faust project also includes libfaust, which (iiuc) other programs can use to compile and run faust code on the fly, without using an external C compiler (though I guess it

Re: [Faudiostream-users] random value

2021-05-06 Thread James Mckernon
Hi Dario, On 5/6/21, Dario Sanfilippo wrote: > Even if calling an external random function, don't you always have the > problem of calling it with a different seed each time to get a different > stream at each run? Attached is my code relating to this. There's a c++ function, which takes a

Re: [Faudiostream-users] random value

2021-05-06 Thread James Mckernon
Hi Dario, On 5/6/21, Dario Sanfilippo wrote: > Even if calling an external random function, don't you always have the > problem of calling it with a different seed each time to get a different > stream at each run? No, this isn't a problem - I have working code which gives different random

Re: [Faudiostream-users] random value

2021-05-06 Thread James Mckernon
This is a bit of a limitation of faust for generative-type work. Faust's no.noise gives part of what one wants from randomness: the values in its sequence are uncorrelated with each other. However, it fails to give you the other thing one would want: it is deterministic, i.e. it gives the same

[Faudiostream-users] architecture files and -lang

2020-12-27 Thread James Mckernon
I am looking at faust's output options for compilation. I have a couple of questions: 1. The -lang option allows a number of options for output language, including c, cpp, and ocpp. What is ocpp here, and how does it differ from cpp? (Do any of the architecture files included in the distribution

Re: [Faudiostream-users] WaveShaping using multiple functions

2020-11-22 Thread James Mckernon
On 11/22/20, yoann.le.bor...@gmail.com wrote: > In a non functional language, I would have used a classic if/then/else > but, as specified in the faust manual: > "WARNING: since select2 is strict (always evaluating both branches), the > resulting if does not have the usual "lazy" semantic of the

Re: [Faudiostream-users] vsti midi keys not working

2020-11-22 Thread James Mckernon
On 11/22/20, Boenn, Georg wrote: > Success! > > I had to add the nvoices flag in the command line, although it was declared > as an option in the dsp file. > > faust2faustvst -nvoices 8 exfaust14.dsp > > Many thanks for your help! > > Georg Great, glad you got it working. Cheers, James

Re: [Faudiostream-users] vsti midi keys not working

2020-11-21 Thread James Mckernon
On 11/21/20, Boenn, Georg wrote: > Thanks James, > > I have now installed everything locally. > When i run any of the faust2vst scripts i get this compile error from > steinberg code: > > /usr/local/include/vstsdk2.4/public.sdk/source/vst2.x/audioeffect.cpp:512:20: > error:

Re: [Faudiostream-users] vsti midi keys not working

2020-11-21 Thread James Mckernon
On 11/21/20, Boenn, Georg wrote: > Hi James, > > Thanks for getting back. > I have used the online IDE: https://faustide.grame.fr/ I haven't used the IDE so can't really comment on that. I'm not sure which architecture it uses behind the scenes - the same as faust2vst, faust2faustvst, or some

Re: [Faudiostream-users] vsti midi keys not working

2020-11-21 Thread James Mckernon
On 11/21/20, Boenn, Georg wrote: > After building and loading them into Reaper, the instruments using key > messages won't play. What does work is the use of midi controllers inside > the slider labels. But why are the note-on messages not mapped? Hi Georg, How are you compiling them? Do you

Re: [Faudiostream-users] ringing filters in faust

2020-10-31 Thread James Mckernon
(log(0.001) / (decaytime * ma.SR))) * ma.PI / ma.SR; Comments and other solutions (particularly mind-expanding ones) still welcome. On 10/31/20, James Mckernon wrote: > Hi all, > > My filter theory isn't very good; perhaps a filter-savvy faust user > can help me out. > > I'

[Faudiostream-users] ringing filters in faust

2020-10-31 Thread James Mckernon
Hi all, My filter theory isn't very good; perhaps a filter-savvy faust user can help me out. I'm seeking a filter in faust analogous to Ringz in supercollider ( https://doc.sccode.org/Classes/Ringz.html ); that is, a filter whose impulse response is a sinusoidal oscillation at a given frequency,

Re: [Faudiostream-users] How to use par() to Duplicate DSP AND Sliders

2020-10-23 Thread James Mckernon
On 10/23/20, Albert Graef wrote: > It's in the manual: > https://faust.grame.fr/doc/manual/index.html#definitions-with-pattern-matching. > These are expanded at compile time. Basically, Faust uses term rewriting as > its macro engine. The macros are "hygienic", too ( >

Re: [Faudiostream-users] How to use par() to Duplicate DSP AND Sliders

2020-10-23 Thread James Mckernon
On 10/23/20, Brandon Hale wrote: > Thanks Julius! Using i like that makes a lot of sense. I had no idea you > could substitute it like that. > > What does the %03i mean and how does that work? > > Brandon Hale Having just looked this up myself, I can perhaps answer for Julius. >From

Re: [Faudiostream-users] How to use par() to Duplicate DSP AND Sliders

2020-10-23 Thread James Mckernon
On 10/23/20, Julius Smith wrote: > feedback(i) = hslider("feedback %03i",0,0,0.9,0.01); Not the one who asked, but I had no idea this worked! Amazing. ___ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net

Re: [Faudiostream-users] Setup Faustworks on Mac

2020-10-15 Thread James Mckernon
Hi Thomas, I'm not a mac user so I may not be able to help you. Nonetheless, it would probably help us to help you if you paste: - the contents of your /etc/paths file - the result when you run 'echo $PATH' (no quotes) in a terminal - the command you run that leads to the error you see, together

Re: [Faudiostream-users] Guide to sound synthesis

2020-10-13 Thread James Mckernon
O.Z. Hall, Jr a écrit : >> Sebastien, >> >> I can't start for a couple of days, but I could probably help. Je parle >> un peu de francais. >> >> James, >> >> perhaps we could split the document and cross check each other's work. >>

Re: [Faudiostream-users] Guide to sound synthesis

2020-10-12 Thread James Mckernon
Hi Sebastien, Congratulations on the guide; it looks good. My French is only so-so, but I would be interested in working on the translation into English. I wouldn't want to discourage anyone else who wishes to contribute. If there are others, we could perhaps discuss dividing the work. Thanks,

Re: [Faudiostream-users] demand-rate in faust?

2020-08-12 Thread James Mckernon
ondemand looks cool, Yann; thanks for writing that up. I guess it's worth breaking down what makes demand ugens in SC nice to work with. I can think of three properties worth discussing: 1. As already discussed, they respond with a new value when their trigger input is nonzero and reset their

Re: [Faudiostream-users] demand-rate in faust?

2020-08-05 Thread James Mckernon
Hi all, Yann, thanks for giving some thought to this. Indeed, your notes are pretty incomprehensible to me, though I do like how you write the date :) I don't have anything to add to Till's explanation of demand ugens in SuperCollider, except to note that updating/requesting a new value from a

Re: [Faudiostream-users] demand-rate in faust?

2020-07-30 Thread James Mckernon
Hi Yann, Thanks for clarifying your position regarding control and enable, and their intended use. I understand that control poses certain semantic complications. However, I would also respectfully suggest that a (properly-working) control primitive would be a powerful addition to the language,

Re: [Faudiostream-users] demand-rate in faust?

2020-07-18 Thread James Mckernon
On 7/18/20, James Mckernon wrote: > I also couldn't see from a quick inspection the difference between > control and enable, but no matter, peu importe. Ah, now I see: enable also scales its output by the trigger. ___ Faudiostream-users mailin

Re: [Faudiostream-users] demand-rate in faust?

2020-07-18 Thread James Mckernon
On 7/14/20, Dario Sanfilippo wrote: > Hi, Till. > > I'll try to be more clear. > > I'm referring to a control-rate stepped stream as shown in Oleg's example, > where the actual work is performed only if the condition is true, as > opposed to a control-rate stepped stream of the kind that we

Re: [Faudiostream-users] demand-rate in faust?

2020-07-14 Thread James Mckernon
On 7/14/20, Till Bovermann wrote: > Dear James, all, > > your hint helped a lot, thanks, James! I'm glad. > However, after reading this paper > https://hal.archives-ouvertes.fr/hal-02159011/document > > (thanks for the pointer, sletz!) > > I think that computation still happens for every

Re: [Faudiostream-users] demand-rate in faust?

2020-06-29 Thread James Mckernon
On 6/29/20, Till Bovermann wrote: > Dear list, > > I wonder if anyone has a clue how to implement demand-rate in faust. Hi Till, Have you looked at latch and/or sAndH in basics.lib? They may be the closest thing to what you're looking for. Either using those functions directly or looking at

Re: [Faudiostream-users] towards 1-bit DSD dsp in faust — state in a foreign function?

2020-06-04 Thread James Mckernon
On 6/4/20, Oleg Nesterov wrote: > OK, suppose we have > > ffunc_with_state = ffunction(float > c_function_which_uses_static_var_for_state(float), "",""); > > Now, guess what will happen if you do > > process = ffunc_with_state, ffunc_with_state; > > ? > > or > > process =

Re: [Faudiostream-users] towards 1-bit DSD dsp in faust — state in a foreign function?

2020-06-04 Thread James Mckernon
On 6/4/20, Till Bovermann wrote: > Dear list, > > I am currently trying to implement 1bit-synthesis mechanisms in faust and > have some sketches on how to implement that: > > It basically boils down to interpret a stream of integers (of a given > bit-depth, say, 32bits) as a stream of blocks (of

Re: [Faudiostream-users] Pattern matching and lists in Faust

2020-05-26 Thread James Mckernon
On 5/25/20, Yann Orlarey wrote: > Following the recent exchanges, I would like to bring some clarifications > on pattern matching and lists in Faust. > > Strictly speaking, there are no lists in Faust. For example the expression > `()` or `NIL` in Lisp, which indicates an empty list, does not

Re: [Faudiostream-users] Faust as VST in JUCE

2019-12-20 Thread James Mckernon
On 12/20/19, Joachim Schneider wrote: > hello all, > > i built an fx plugin in faust, which i imported to JUCE with faust2api. > i checked the tutorial and managed to get a standalone JUCE application > to run without issues. Then i tried to build a VST2 FX with JUCE, i set > the paths to VST SDK