Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Romain Michon
> > I've got another question regarding tables, hopefully not as silly as >> the last one -> >> >> When creating a table in Faust it produces C++ code with a static global >> variable to hold the data. >> >> `static float ftbl0mydspSIG0[65537];` >> >> (from example `generator/osci.dsp`, using Faust

Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Martin Klang
that would work for us. We have a program size limit of 64k, but 1M heap available, so heap allocation is really important for us. Martin On 08/06/17 13:06, Stéphane Letz wrote: >> Le 8 juin 2017 à 13:39, Kjetil Matheussen a écrit >> : >> >> >> >> On Thu, Jun 8, 2017 at 1:14 PM, Stéphane Let

Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Stéphane Letz
> Le 8 juin 2017 à 13:39, Kjetil Matheussen a écrit : > > > > On Thu, Jun 8, 2017 at 1:14 PM, Stéphane Letz wrote: > The reason is that we want to share a unique table between all instances of > the class. But… it appears that: > > - even if the table is shared, the classInit code is actual

Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Kjetil Matheussen
On Thu, Jun 8, 2017 at 1:14 PM, Stéphane Letz wrote: > The reason is that we want to share a unique table between all instances > of the class. But… it appears that: > > - even if the table is shared, the classInit code is actually called each > time in the instance::init(SR) method, which is rat

Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Kjetil Matheussen
On Thu, Jun 8, 2017 at 12:31 PM, Martin Klang wrote: > I've got another question regarding tables, hopefully not as silly as > the last one -> > > When creating a table in Faust it produces C++ code with a static global > variable to hold the data. > > `static float ftbl0mydspSIG0[65537];` > > (f

Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Martin Klang
Would it be possible to generate a class that contains all tables (and their initialisers) and pass a reference to the instance::init() method? Then it is up to the container to manage the lifecycle and allocation of shared data. Martin On 08/06/17 12:14, Stéphane Letz wrote: > The reason is

Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Stéphane Letz
The reason is that we want to share a unique table between all instances of the class. But… it appears that: - even if the table is shared, the classInit code is actually called each time in the instance::init(SR) method, which is rather stupid…((-; and possibly problematic. - and the memory a

Re: [Faudiostream-devel] Generated sin tables

2017-06-08 Thread Martin Klang
I've got another question regarding tables, hopefully not as silly as the last one -> When creating a table in Faust it produces C++ code with a static global variable to hold the data. `static float ftbl0mydspSIG0[65537];` (from example `generator/osci.dsp`, using Faust 2.0.a73, owl.cpp archite

Re: [Faudiostream-devel] Generated sin tables

2017-06-06 Thread Romain Michon
Hi Martin, Not sure what you're trying to achieve here, but the "standard" sine wave oscillator in Faust (in oscillators.lib) is now based on a resonant filter instead of a table, so if all you're trying to do is generate sine waves, you shouldn't have this problem :). Cheers, Romain On Tue, Ju

Re: [Faudiostream-devel] Generated sin tables

2017-06-06 Thread Martin Klang
On 06/06/17 15:58, Stéphane Letz wrote: > We are not generating any optimized version of math functions based on > lookup tables oh, okay! I think I managed to confuse myself with different versions of patches and Faust. Looking at it again it seems clear that the tables I found are expli

Re: [Faudiostream-devel] Generated sin tables

2017-06-06 Thread Stéphane Letz
> Le 6 juin 2017 à 16:50, Martin Klang a écrit : > > Hello list, this is my first post - Martin in London here! > > I develop the OWL Pedal / Modular, an embedded platform which runs FAUST. > We're trying to get up to speed with the latest version, but have hit a > couple of snags. > > Somewhe

[Faudiostream-devel] Generated sin tables

2017-06-06 Thread Martin Klang
Hello list, this is my first post - Martin in London here! I develop the OWL Pedal / Modular, an embedded platform which runs FAUST. We're trying to get up to speed with the latest version, but have hit a couple of snags. Somewhere between v0.9.85 and 0.9.90 it seems that optimised versions of ma