Re: [Faudiostream-users] Incorrect argument order with recursive composition and named parameters

2016-05-27 Thread Mykle Hansen
All three of those examples compile and open for me, and behave similarly,
using FaustLive on Mac OS.

What platform are you on, and what’s your compile path?

-mykle-

> On May 26, 2016, at 11:20 PM, jimbo1qaz  wrote:
> 
> Does anyone have any insights into this type of buggy behavior?
> 
> Maybe I should look into the source code and write a bugfix myself?
> 
> How easy is it for random users to make Git contributions on Sourceforge? Do 
> you use pull requests, etc? Do you have a fixed list of contributors? Manage 
> patches by email?
> 
> (joke) Faust is a very appropriate name for this language. Using Faust is 
> like dealing with the devil.
> 
> On Sun, May 22, 2016 at 3:19 AM, jimbo1qaz  wrote:
> I found another problem, this time with split composition. The problem here 
> is that I don't have a clean workaround. Make sure to uncomment one line 
> only. Then run "faust -svg" to view the results.
> 
> Why does it seem like function calls and named arguments are horribly buggy? 
> Are those mostly untested, and not considered "idiomatic" Faust?... Does 
> Faust even have idioms, given how obscure the language is?
> 
> import("music.lib");
> 
> // WORKS
> // fir_delay(i, val) = i+val;
> 
> // WORKS
> // fir_delay(i, val) = delay(32, i, val);
> 
> // DOESN'T
> // fir_delay(i, val) = fdelay(32, i, val);
> 
> 
> process = _ <: par(i, 2,
> fir_delay(3-i, _)
> );
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity 
> planning reports. 
> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] BDNF

2016-06-26 Thread Mykle Hansen
Hi,

I have a question: A lot of Faust documentation explains that the compiler
reduces programs to Block Diagram Normal Format (BDNF).  But if there's 
an official grammar or other definition for BDNF somewhere, I can’t
find it.  Can anybody point me to that?

Thanks,
-mykle-
--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] documentation for Faust MIDI support?

2016-05-23 Thread Mykle Hansen
Hello, can I ask some advice?

I’m trying to work out how to get MIDI controller information into
Faust — specifically FaustLive at the moment.  I know that there’s
automatic support for converting MIDI note messages into the 
‘gate’ ‘gain’ and ‘freq’ UI elements .  But I’m trying to
map MIDI knobs on my control surface to vsliders, so I can tweak 
values while I listen.

I’ve been digging through various documentation sources on Faust. 
I thought that somwhere I saw a reference to getting generic MIDI 
knob controller values by putting [midi:*] metadata in UI element 
labels.  Was I dreaming that?  I can’t find it now.  The OSC 
documentation for Faust is quite complete, but I’ve found hardly 
anything about MIDI.  (And I don’t have any OSC hardware. =)  Is
there some standard mapping from MIDI to OSC that people use for this?

Thanks,
-mykle-
--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] Onset/beat detection for Faust?

2016-07-18 Thread Mykle Hansen
Hi,

The richness of the Stanford STK ported to Faust is such that I've gotten used 
to assuming any signal processing tool I could want is in there ... But I'm 
hunting around for some tempo/beat detection algorithm, and not finding it in 
the standard libraries. Am i missing something? I might not have the right 
terminology.  I'm looking ideally for a faust filter that takes a signal in, 
and eventually emits impulses in sync with the detected/predicted beat points 
of the music it's listening to.

Easy to describe, harder to do.  But I've found at least a few published papers 
describing algorithms/approaches for this. And I found aubio, a c++-based open 
source library for doing that kind of detection.  If none of that technology is 
connected to Faust yet, I'd like to make it so!  But first, is anyone else 
working on this?

-mykle-
--
IM IN MY IPHON MISPELIN UR W0RDZ

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] Onset/beat/tempo detection in Faust?

2016-07-18 Thread Mykle Hansen
Hi,

The richness of the Stanford STK ported to Faust is such that I've gotten used 
to assuming any signal processing tool I could want is in there ... But I'm 
hunting around for some tempo/beat detection algorithm, and not finding it in 
the standard libraries. Am i missing something? I might not have the right 
terminology.  I'm looking ideally for a faust filter that takes a signal in, 
and eventually emits impulses in sync with the detected/predicted beat points 
of the music it's listening to.

Easy to describe, harder to do.  But I've found at least a few published papers 
describing algorithms/approaches for this. And I found aubio, a c++-based open 
source library for doing that kind of detection.  If none of that technology is 
connected to Faust yet, I'd like to make it so!  But first, is anyone else 
working on this?

-mykle-
--
IM IN MY IPHON MISPELIN UR W0RDZ
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


Re: [Faudiostream-users] Faustlive says "Impossible to init CoreAudio Client" ?

2016-11-01 Thread Mykle Hansen

>> Le 19 oct. 2016 à 20:18, Mykle Hansen <my...@mykle.com 
>> <mailto:my...@mykle.com>> a écrit :
>> 
>> Hi,
>> 
>> About a year ago, it seemed that the only way to get FaustLive working on 
>> OS X 10.11 was via macports.  Is that still the recommended install method?

> 

> From: Stéphane Letz <l...@grame.fr <mailto:l...@grame.fr>>
> Date: October 19, 2016 at 11:48:57 PM PDT
> 
> Try FaustLive-OSX-2.44.dmg from here : 
> https://sourceforge.net/projects/faudiostream/files/ 
> <https://sourceforge.net/projects/faudiostream/files/>

Hi,

Okay, the FaustLive app from that package seems to work.  Thanks.

However, the DMG still includes Jack 0.90, which is incompatible with El 
Capitan,
and the install instructions still say that Jack must be installed first.

I skipped that part, because I’ve been though this whole rigamarole
with Jack 0.90 and I know it’s not really needed.  But I feel I should point 
out 
that a new user of FaustLive will probably get hung up there.  

Jack is cool, and I wish I could use it on my Mac, but until the jackosx project
is distributing a binary that’s compatible with recent OS versions, you might 
consider leaving it out of this distro, or at least updating the install 
instructions
to explain that it’s optional & not yet supported on 10.11 or 10.12 .

Thanks,
-mykle---
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] FaustLive and MIDI in OS X?

2017-11-24 Thread Mykle Hansen
Hi, 

Does FaustLive support MIDI in OS X these days?  I know the docs
say that it does, but does anybody here have it working?

I’m trying to step through the tutorials, using FaustLive 2.46 with CoreAudio
on OS X 10.11.6 .  I’ve told FaustLive to enable MIDI, but I don’t 
see its virtual MIDI ports appearing the OS.  Audio Midi Setup
doesn’t show anything, and neither does Ableton Live.

I thought maybe I had an old Faust version, so I upgraded with MacPorts
(“ port upgrade faustlive-devel “) … took a while … but when I 
got done, FaustLive appears to still be 2.46? Hmm… is that really
the latest version?

What should I see happening if this is working?  I’m running
midiTest.dsp, and I have a keyboard controller hooked up (which
the OS does detect.)  I’m not sure how Faust is supposed to declare
which MIDI channel it listens on.  At any rate it doesn’t seem to
respond to messages.  Maybe there’s a better .dsp file for testing?

Thanks much for any advice,

-mykle-


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


Re: [Faudiostream-users] Faudiostream-users Digest, Vol 83, Issue 8

2017-10-25 Thread Mykle Hansen

> On Oct 23, 2017, at 1:04 AM, faudiostream-users-requ...@lists.sourceforge.net 
> wrote:
> 
> From: Yann Orlarey 
> Subject: [Faudiostream-users] Online Faust Editor
> 
> We have published a new online Faust Editor at http://faust.grame.fr/editor. 
> 
> It is still experimental, but it can be used to edit, compile and run Faust 
> code from any recent Web Browser with webassembly support. This editor works 
> completely on the client side and it is therefore very convenient for 
> situations with many simultaneous users (workshops, classrooms, etc.). It 
> embeds the latest version of the Faust compiler with an efficient webassembly 
> backend and offers polyphonic MIDI support.
> 
> For more information: 
> http://faust.grame.fr/news/2017/10/20/faust-online-editor.html
> 
> As usual, feedback is welcome.

OMG.  This is so great!  I’ve been following the progress of the
webassembly version of Faust with a lot of interest -- because it
seems like it might be the way to get a Faust program to run on
an IOS device without having to build an app.

So far I haven’t gotten this to work on my phone in Chrome or Safari,
which is weird ‘cause they’re both supposed to support webassembly
and the web audio api.  Nevertheless i’m getting “webassembly not supported”
messages in both browsers.  Is that the expected behavior? 

But it’s working great on the desktop!  For basic developing it seems a
nice interface.  Thanks!

-mykle-
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] link to a program in the online editor?

2018-02-08 Thread Mykle Hansen
Hi,

Question about the online Faust editor: is it possible to
craft a link to the editor that also contains the Faust
code you’d like to see there?  So that I could mail 
someone the link & when it opened in a browser, my code would
be present in the editor?  (I’m trying to show off a program
I wrote to a friend who doesn’t have Faust installed.)

-m-
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


Re: [Faudiostream-users] link to a program in the online editor?

2018-02-10 Thread Mykle Hansen

> On Feb 9, 2018, at 8:20 PM, Yann Orlarey  wrote:
> 
> A more evolved version allowing to control the other parameters of the editor 
> (warning: midi support only in chrome)
> 
> https://faust.grame.fr/editor/?buffer=256=on=4=https://raw.githubusercontent.com/grame-cncm/faust/master-dev/tests/architecture-tests/organ.dsp

Thanks, I’m glad you’re interested in the feature.  I see how you’re
doing it, and I guess I can work that way.  But it’s a little complex, 
because I have to save out my work in the editor to a .dsp file, and then 
upload that file to some web-accessible location.  And then when I’m done I have
to clean up that file … but how do I know when I’m done? 
 
I was thinking more of the ability to write something in the editor, 
then click a button to generate a link containing the code, 
that I could copy & paste into in an email. 
Like sharing a map link in Google Maps.  

If the Faust code is embedded in the link itself, then there’s 
no need to manage some other file on some other server, no question 
of which server to blame (the editor server or the file server?) when 
something doesn’t work right, no complicated management of the privacy
of the file, etc.

(And also: there’s the ability in certain browsers (Safari on iOS for one)
to save a link locally and re-load it without needing network access,
and even assign it an icon in the UI.
So an editor link containing a faust program might (eventually) be the thing
I can launch on this iPod I’m trying to use as an effects pedal …)

That’s my feedback.  Please know that I appreciate these tools a lot!

Thanks for considering this,
-mykle-



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


Re: [Faudiostream-users] compiler hangs on this program?

2018-02-23 Thread Mykle Hansen

> On Feb 22, 2018, at 10:23 AM, Oleg Nesterov <o...@redhat.com> wrote:
> 
> On 02/22, Mykle Hansen wrote:
>> 
>> My latest problem: my Faust program seems to hang the compiler,
>> locking up one CPU on my system until I terminate it.
> ...
> 
>> betanoise(beta) = real, imag : an.ifft(N) : select2(0)
>> with {
>>  N=8192; // 2^13
> 
> Well, an.ifft(8192) needs some time to compile ;)

Aha.  Or rather, d’oh.

> but it seems that you do not really understand what it does. You can't use N 
> > 1,
> inputs(an.ifft(N)) == 2 * N and it must be equal to 2 == outputs(real, imag).

You’re right, I sure don’t. =) I thought N was an evaluation window
size, or something.

I was just experimenting with Bourke’s approach, which I 
get in theory but not in practice.  The signal his code is
feeding to fft(-1) is a complex waveform with exponentially decreasing
magnitude over time (dithered with noise) & random phase.
He runs it through IFFT to convert that into 1/f noise, with
exponentially decreasing power over frequency.  

Peering at analyzers.lib a little deeper now …
am I right that N is the number of evaluation
bins, i.e. as would be produced by a forward FFT
analysis of a signal?  (So 32 would be plenty for audio,
and that compiles quickly enough.)

If so, I guess my whole approach is 90 degrees off —
the magnitudes need to be fed in parallel to ifft(),
not in series.

Does that seem right?  I admit I’ve never done an IFFT before. =)

-mykle-



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


[Faudiostream-users] strange selectn() behavior

2018-02-28 Thread Mykle Hansen
Hi,

I’m looking closer at this strange behavior of ba.selectn().
I’d really like to know if this is expected behavior, 
because it looks like a bug to me.  (I’m seeing this in 
FaustLive version 2.5.17, as installed by MacPorts.)

Basically, if I have N inputs to selectn(), and I use a 
hslider with N possible values to select one of those inputs, 
the chosen input is not selected.  What happens instead 
is hard to characterize.  This code demonstrates the problem:


import("stdfaust.lib");
N=8;
process = par(i, N, (i : hbargraph("[%2i]val %i", 0, N)))   
  : ba.selectn(N, hslider("selector", 0, 0, N-1, 1) )
  : hbargraph("selected val", 0, N)
;


Interestingly, if I use a hslider with N+1 possible values,
everything seems to work as I’d expect. So that’s a workaround, 
although it requires the slider to have one meaningless value.

Can anyone else confirm this?  Is this expected behavior?
Or maybe I’m running a bad version of FaustLive?  Or I’m
missing some other obvious thing?

Much thanks,
-mykle-


> On Feb 27, 2018, at 4:36 AM, faudiostream-users-requ...@lists.sourceforge.net 
> wrote:
> 
> Send Faudiostream-users mailing list submissions to
>   faudiostream-users@lists.sourceforge.net
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.sourceforge.net/lists/listinfo/faudiostream-users
> or, via email, send a message with subject or body 'help' to
>   faudiostream-users-requ...@lists.sourceforge.net
> 
> You can reach the person managing the list at
>   faudiostream-users-ow...@lists.sourceforge.net
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Faudiostream-users digest..."
> Today's Topics:
> 
>   1. Re: compiler hangs on this program? (Mykle Hansen)
>   2. Re: FAUST Compiler for GPGPU? (l...@grame.fr)
> 
> From: Mykle Hansen <my...@mykle.com>
> Subject: Re: [Faudiostream-users] compiler hangs on this program?
> Date: February 26, 2018 at 3:59:32 PM PST
> To: Julius Smith <j...@ccrma.stanford.edu>
> Cc: Oleg Nesterov <o...@redhat.com>, faudiostream-users 
> <faudiostream-users@lists.sourceforge.net>
> 
> 
>> On Feb 23, 2018, at 12:17 PM, Julius Smith <j...@ccrma.stanford.edu> wrote:
>> 
>> Hi Mykle,
>> 
>> Yes, iFFT takes spectral-bin signals in parallel.  Right now they all
>> run at the full audio sampling rate, but later we should be able to
>> downsample as is typical.
> 
> Thanks.  Clearly I have wandered in over my head, math-wise.
> But after reading all weekend, I think I now (sort of) understand 
> the difference between the real and the complex FFT.  Or so I’d like
> to prove to myself, by making this algorithm work in Faust. =)
> 
> Nevertheless, I’m still struggling.  I expect this to work, and it doesn’t:
> 
> import("stdfaust.lib”);
> process = no.noise : an.rtocv(N) : an.fft(N) : par(f, N, (/(denom(f)^beta), _ 
> )) : an.ifft(N) : ba.selectn(N*2, 0)
> with {
>  N=8;
>  hN = N/2;
>  beta = hslider("beta", 1, 0, 3, 0.01);
>  // Convert par() index to appropriate coefficient for pos & neg freqs 
> produced by complex fft
>  // For instance: 0 1 2 3 4 5 6 7 -> 4 3 2 1 1 2 3 4
>  denom(f) = ba.if(f < hN, hN-f, f+1 - hN);
> };
> 
> 
> And while trying to debug that myself, I hit an even bigger snag
> with selectn().  The code below seems pretty straightforward,
> but it does not work at all like I expect, and I haven’t a clue why not:
> 
> 
> import("stdfaust.lib");
> process = par(i, N, (2*i, 2*i+1)) : par(i, 16, hbargraph("[%2i]value %i", 0, 
> 20)) 
>  : ba.selectn(16, pick) : hbargraph("selected value", 0, 20)
> with {
>  N=8;
>  pick = hslider(“pick a value", 0, 0, 15, 1);
> };
> 
> 
> (Possibly this is because selectn() expects an integer?
> The SVG shows me that the hslider is producing floats, 
> even though there’s not a decimal point in this program.)
> 
>> Note that for 1/f noise there is a spectral_tilt function in
>> filters.lib that will provide a 1/f filter for white noise as a
>> special case.  More generally it can provide 1/f^alpha over the entire
>> audio band, for any alpha, to any desired degree of accuracy.
>> Moreover, alpha can be safely modulated over time as that only moves
>> the zeros of the filter.
> 
> Thank you!  For any sort of practical use, I’m sure that would be ideal.
> At the moment I’m just researching the various different approaches to 
> synthesizing 1/f noise.  I expect this one to be the slowest.
> I wanted to see if I could code in Faust, as a learning exercise.  
> (Boy, am I learning …)
> 
>

[Faudiostream-users] Fwd: strange selectn() behavior

2018-02-28 Thread Mykle Hansen
My apologies … seems like I didn't have the latest FaustLive installed.  
I downloaded version 2.46 and ran it directly, and the
behavior is different.   Sorry for the confusion.

-m-

> Begin forwarded message:
> 
> From: Mykle Hansen <my...@mykle.com>
> Subject: strange selectn() behavior
> Date: February 28, 2018 at 10:07:29 AM PST
> To: faudiostream-users@lists.sourceforge.net
> 
> I’m looking closer at this strange behavior of ba.selectn().


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


Re: [Faudiostream-users] strange selectn() behavior

2018-03-01 Thread Mykle Hansen

> On Feb 28, 2018, at 1:39 PM, Julius Smith <j...@ccrma.stanford.edu> wrote:
> 
> Hi Mykle,
> 
> I tried your example with Faust Version 2.5.15 (command line) on a
> Mac, and it works as expected (faust2caqt used).  Nothing strange to
> point to here.

Hi Julius, 

Thanks very much for testing that.  I wish I could say the same.
I just built the same code with faust2caqt + faust 2.5.21, compiled
from source on my machine (OS 10.11, Apple LLVM version 7.3.0 (clang-703.0.31)) 
… and the behavior I see is weird.

By “weird” i should be specific.  I’m expecting that setting the hslider value 
to 0 will set the selected val to 0, 1 to 1, 2 to 2, et cetera.  What it’s
doing instead is this:

vals:   selector:   selected val:
0   0   0
1   1   1
2   2   1
3   3   3
4   4   3
5   5   5
6   6   5
7   7   7


I thought this might be a bug with the version of LLVM on my machine …
but I just built the same code with the Faust Online Compiler
at https://faust.grame.fr/onlinecompiler
(C++/OSX/coreaudit-qt-deployed) and got the same results.

I also downloaded the pre-built FaustLive version 2.46, 
(I couldn’t get macports to install newer than version 2.5.17) .
When I run this code there, it’s also wrong, but differently wrong:
the selected value is always zero, no matter the slider position.

And then I put the same code into the online editor at 
https://faust.grame.fr/editor/,
and ran it there.  And that gives a third incorrect behavior:
all of the val bargraphs equal zero.  (selectn() may be working
properly in this case, but how can the values not be there?)

Maybe one of these behaviors is correct & I just don’t understand
the intricacies … but they can’t all be right, can they?

Yrs befuddledly,
-mykle-

> 
> - Julius
> 
> On Wed, Feb 28, 2018 at 10:07 AM, Mykle Hansen <my...@mykle.com> wrote:
>> Hi,
>> 
>> I’m looking closer at this strange behavior of ba.selectn().
>> I’d really like to know if this is expected behavior,
>> because it looks like a bug to me.  (I’m seeing this in
>> FaustLive version 2.5.17, as installed by MacPorts.)
>> 
>> Basically, if I have N inputs to selectn(), and I use a
>> hslider with N possible values to select one of those inputs,
>> the chosen input is not selected.  What happens instead
>> is hard to characterize.  This code demonstrates the problem:
>> 
>> 
>> import("stdfaust.lib");
>> N=8;
>> process = par(i, N, (i : hbargraph("[%2i]val %i", 0, N)))
>>  : ba.selectn(N, hslider("selector", 0, 0, N-1, 1) )
>>  : hbargraph("selected val", 0, N)
>> ;
>> 
>> 
>> Interestingly, if I use a hslider with N+1 possible values,
>> everything seems to work as I’d expect. So that’s a workaround,
>> although it requires the slider to have one meaningless value.
>> 
>> Can anyone else confirm this?  Is this expected behavior?
>> Or maybe I’m running a bad version of FaustLive?  Or I’m
>> missing some other obvious thing?
>> 
>> Much thanks,
>> -mykle-
>> 
>> 
>>> On Feb 27, 2018, at 4:36 AM, 
>>> faudiostream-users-requ...@lists.sourceforge.net wrote:
>>> 
>>> Send Faudiostream-users mailing list submissions to
>>>  faudiostream-users@lists.sourceforge.net
>>> 
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>  https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>>> or, via email, send a message with subject or body 'help' to
>>>  faudiostream-users-requ...@lists.sourceforge.net
>>> 
>>> You can reach the person managing the list at
>>>  faudiostream-users-ow...@lists.sourceforge.net
>>> 
>>> When replying, please edit your Subject line so it is more specific
>>> than "Re: Contents of Faudiostream-users digest..."
>>> Today's Topics:
>>> 
>>>  1. Re: compiler hangs on this program? (Mykle Hansen)
>>>  2. Re: FAUST Compiler for GPGPU? (l...@grame.fr)
>>> 
>>> From: Mykle Hansen <my...@mykle.com>
>>> Subject: Re: [Faudiostream-users] compiler hangs on this program?
>>> Date: February 26, 2018 at 3:59:32 PM PST
>>> To: Julius Smith <j...@ccrma.stanford.edu>
>>> Cc: Oleg Nesterov <o...@redhat.com>, faudiostream-users 
>>> <faudiostream-users@lists.sourceforge.net>
>>> 
>>> 
>>>> On Feb 23, 2018, at 12:17 PM, Julius Smith <j...@ccrma.stanford.edu> wrote:
>>>> 
>>>> Hi Mykle,
>>>> 
>>>> Y

Re: [Faudiostream-users] normalizing sound generator levels

2018-03-13 Thread Mykle Hansen

> On Mar 12, 2018, at 2:14 PM, Julius Smith <j...@ccrma.stanford.edu> wrote:
> 
> Hi Mykle,
> 
> Thanks for sharing your normalizing gains.  As the author of gnoise
> and pink_noise, I am happy to add two functions to noises.lib such as
> 
> pink_noise_m = pink_noise * 12.5; // Equalizes loudness to that of
> no.noise (thanks Mykle Hansen) - beware clipping!
> 
> gnoisem = gnoise * 0.625; // Equalizes loudness to that of no.noise
> (thanks Mykle Hansen)
> 
> where the "m" suffix means "matched loudness" or something like that.
> Can anyone think of a better naming convention?  Another possibility
> is "z" for zero-db-loudness, etc.

Hi Julius,

That would be great.  But, OTOH, I should mention that I also needed to do this 
for os.oscsin, which has a normalizing coefficient of 0.8 compared to no.noise.
So I think a solution that extends across libraries is worth considering,
if it's not too complicated.

(Also, standardizing everything to the 0dB level of os.oscsin makes at
least as much sense to me as using no.noise .  I have no preference.)

Since the library system was reorganized last year (very nicely
IMO), I’m sure the main language contributors have given though to 
standardizing the names and forms of functions.  So I defer to y’all,
and I would be happy to see any update you suggest.

But if this is a feature that not many people are likely to use, 
one might favor keeping it all in a separate library (zdB.lib ?) that
wraps & re-exports any functions that want normalizing.  Then it can
all be documented in one section, it can address the levels of any
current or future generator in any library, and it won’t clutter the 
rest of the codebase, namespace or documentation.  I would be
happy to contribute that.

Thanks for considering this,
-mykle-


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


Re: [Faudiostream-users] error: invalid operands to binary expression ('float' and 'float')

2019-01-01 Thread Mykle Hansen
Thanks Julius, I see what you mean.  It's just a bit tricky to do,
because this code is generated by the Faust compiler as part
of the faust2caqt script.  It’s pretty awkward to fix the source code
and restart the script halfway through, tho I suppose it’s possible.

I wonder if this is an issue with my compiler version.  
I’m trying to use Apple LLVM version 7.3.0, on OS X 10.11.6.  

Are there C++ compilers that know to promote % to fmod() when float arguments 
are present?  
What’s the current recommended compiler for compiling Faust-generated source?

Thanks,
-mykle-

> 
> On Dec 31, 2018, at 7:17 PM, Julius Smith  wrote:
> 
> Hi Mykle,
> 
> I think the compiler means to convert % to fmod() for floating-point
> args.  I suggest using fmod() explicitly in place of "%" in your
> source for now as a workaround.

> - Julius
> 
> On Mon, Dec 31, 2018 at 7:36 AM Mykle James Hansen  wrote:
>> 
>> Hi, can I ask some advice?
>> 
>> I’m trying to compile a 60-line Faust program into a standalone app,
>> but Faust is generating some code that won’t compile on my system.
>> The code tries to use a float as the argument to the modulo
>> operator (%), yielding the error message in the subject line.
>> Anybody seen this before?
>> 
>> I’m experiencing this when I try to run faust2caqt — it dies with
>> a compiler error:
>> 
>>> looper3.cpp:16736:56: error: invalid operands to binary expression ('float' 
>>> and 'float')
>>>fRec4[0] = ((float(iSlow3) * (fRec1[0] + fRec4[1])) 
>>> % fTemp2);
>>>~~~ 
>>> ^ ~~
>>> looper3.cpp:16737:42: error: invalid operands to binary expression ('float' 
>>> and 'float')
>>>ftbl0[int((iTemp1?((fRec4[0] + -1.0f) % 
>>> fTemp2):131071.0f))] = fRec0[1];
>>>   ~~ ^ ~~
>>> 
>> 
>> But the problem's not just faust2caqt.  Running just ‘faust looper3.dsp’ 
>> also generates those lines.
>> 
>> OTOH, I am able to run this same Faust program in FaustLive no
>> problem, and I can also run it in the online editor.
>> 
>> I just pulled and built the latest Faust compiler (master branch) to see if
>> that would help, but that didn’t seem to make a change.
>> Any advice would be most appreciated.
>> 
>> Yrs stumpedly,
>> -mykle-
>> 
>> ___
>> Faudiostream-users mailing list
>> Faudiostream-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
> 
> 
> 
> -- 
> 
> Julius O. Smith III 
> Professor of Music and, by courtesy, Electrical Engineering
> CCRMA, Stanford University
> http://ccrma.stanford.edu/~jos/



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


Re: [Faudiostream-users] Faust dropping short MIDI notes?

2019-01-30 Thread Mykle Hansen

> On Jan 30, 2019, at 2:47 PM, Stéphane Letz  wrote:
> 
> This standard MIDI handling code may drop some MIDI events. You can more a 
> more robust path (using a queue of incoming events) that is used when dealing 
> with MIDI synchronization messages  (start, stop, clock…)
> 
> You can « force »  that MIDI sync path by explicitly adding an appropriate 
> metata like in the following line: 
> 
> on = button("[midi:key 60][midi:clock]on »);
> 
> Can you try that and report? If this solve your problem, then we may have to 
> switch this more robust mode on by default…

Ah ok … so this is an issue of the time-resolution of UI events.  
It makes sense that your suggestion would work, but alas,
I tried it & it didn't seem to change anything. 
Faust is still dropping more than half the events.

My modified test program is below — can you double-check my syntax?

-m-

——


declare author "Mykle Hansen";
declare name "short Midi note example";
declare options "[midi:on]";

import ("stdfaust.lib");   

//on = button("[midi:key 112]on");
on = button("[midi:key 112][midi:clock]on"); // sletz suggestion:

count = +( on > on' ) ~ _ : hbargraph("# of button presses", 0, 10);

process = os.oscsin(440 + count ) * on;



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