Giter Club home page Giter Club logo

faustide's People

Contributors

bubobubobubobubo avatar dependabot[bot] avatar dfober avatar fr0stbyter avatar ijc8 avatar nbvdkamp avatar orlarey avatar quidmonkey avatar rmichon avatar sletz avatar zacanger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faustide's Issues

[scale:exp] and [scale:log] behavior has changed and does not seem correct

I am not sure if this is only in the IDE, but the slider scaling has changed to be much more skewed and not really usable.
For instance:
modFreq(j) = hslider("t:EchoMatrix/v:[1]Delays/h:[3]ModFreq/MF U%j[scale:exp][style:knob]", 0.05, 0.0, 10.0, 0.001) : si.smoo ;
Goes from 0 to 9 in the 1st (estimated) 1/20 of the range. This is not how it used to work.

RFE: Text preview of the command(s) used in "Export"

Feature request: When I use the Export button, I would like to have a text preview of what the server is actually executing on its own command line. Then, if there is an error, I can just copy the same code and try it on my own computer.

Add the additional libraries when exporting DSP

In the online faustide, I can include external .lib files and they are included when I run the main .dsp file. But when I want to export the project to vst (or any other destination), the (external) .lib files are not found.

Autocomplete is missing some items

Hi!
As the title said, autocomplete doesn't use the full current library for suggestions which is only a minor annoyance for such a great tool that otherwise provides everything needed to get hooked to Faust.

As an example, typing "co." currently suggests:

  • co.compression_gain_mono
  • co.compressor_lad_mono
  • co.compressor_mono
  • co.compressor_stereo
  • co.limiter_1176_R4_mono
  • co.limiter_1176_R4_stereo
  • co.limiter_lad_N

and misses:

  • peak_compression_gain_mono
  • peak_compression_gain_N_chan
  • FFcompressor_N_chan
  • FBcompressor_N_chan
  • FFFBcompressor_N_chan
  • RMS_compression_gain_mono
  • RMS_compression_gain_N_chan
  • RMS_FFFBcompressor_N_chan
  • RMS_FBcompressor_peak_limiter_N_chan

From what I've seen and understood, autocomplete relies on https://faustlibraries.grame.fr/libs/ (in /src/monaco-faust/FaustLang.ts) but I don't get why it can't find those missing items.

I've tried both the online version and a compiled version without luck.

Best Regards

GUI controls stop working after a few seconds

Hello!
I'm having some issues working with the IDE:
No matter what I program, the GUI elements stop working after a few seconds.
I am talking about very simple programs such as:

import("stdfaust.lib");

volume = vslider("Volume", 0, 0, 1, 0.01): si.smoo;
sig = os.osci(300);

process = sig*volume;

The DSP runs as expected, and it doesn't stop. After a few seconds I just cannot interact with the slider any more. In this example the amplitude value would hang to "the last registered position" of the slider.
No matter which DSP engine I am using (SignalProcessor or AudioWorklet) and which browser I am using (Firefox, Chrome, Chromium)

I am experiencing the same problem with a local installation, which makes me guess that the problem might be related to the browser, but I wouldn't know how to further debug the Issue all by myself.

I am working on a machine running Debian GNU/Linux bookworm/sid
Firefox 91.4.0esr (64-bit)
Chrome Version 96.0.4664.110 (Official Build) (64-bit)

Congratulation for your amazing work! Faust is a real revolution

Allow multiple files to be uploaded at the same time

Right now, clicking on Upload/Edit a local file doesn't allow to upload more than one file.
It would be useful to be able to upload multiple files by shift clicking or even to upload whole folders for bigger projects, as right now files have to be manually selected one by one by clicking Upload/Edit a local file again and again.

Second Bug with effect

From this example:

declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");
envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain;
process = os.sawtooth(freq)*envelope <: _,_;
effect = dm.zita_light;

adding a comment on any line after effect causes the compiler to ignore the definition (here, making the sawtooth sound dry).

declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");
envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain;
process = os.sawtooth(freq)*envelope <: _,_;
//foo
effect = dm.zita_light;

runs normally.

declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");
envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain;
process = os.sawtooth(freq)*envelope <: _,_;
effect = dm.zita_light;
//foo

makes effect disappear.

key function for alternative tuning doesn't work

Reported by @etiennedemoulin.

It doesn't seems to work because I can always hear the same note.
I'm on MacOS 11.6 with the last version of Google Chrome.

import("stdfaust.lib");

freq = hslider("key",60,36,96,1) : midikey2hz
with {
    // quarter tone tuning
    midikey2hz(mk) = 440.0 * pow(2.0, (mk-69.0)/48.0);
};

gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");

process = os.sawtooth(freq) * gain * gate <: _,_;

Mouse wheel scrolling not working in Firefox

A minor thing that makes using the IDE a bit awkward in practice (because I can't get used to it): Mouse wheel scrolling is not working for me in Firefox in the Monaco editor pane. This is under Linux, using browser version:

Version 77.0.1, first offered to Release channel users on June 3, 2020

I verified that this is not specific to my profile, because the problem also exists after creating a fresh Firefox profile.

In general mouse wheel scrolling does work in the Monaco editor, e.g., tested on the official example. I also checked that Faust IDE is already on the latest Monaco editor version 0.20.0.

Side note: Up until ~ a week ago it was still working, but also not quite as intended: When I scrolled the mouse wheel by one tick, the editor would jump ~ 50 lines of code, which was way too fast to be usable. A contributing factor was that I'm using an increased "y_multiplier" in my config to speed up the overall (slow) scrolling speed in Firefox. It looks like the editor already uses a higher scrolling speed, leading to the extreme total speed. Edit: I've found a related open issue/PR for Monaco microsoft/monaco-editor#1861

In any case I assume that the update to version 77.0.1 broke the scrolling, because Faust IDE hasn't changed since then from what I can tell.

Links to documentation (ctrl-d) broken

On https://fausteditor.grame.fr/ when you write code and press the docs button on the left menu or Ctrl-D the IDE opens a new tab to take you to some documentation. Currently this takes you to pages under https://faustlibdoc.grame.fr/ however the docs seemed to have moved to https://faustlibraries.grame.fr/.

Eg. Highlighting ba.pulsen in the editor and pressing Ctrl-D opens https://faustlibdoc.grame.fr/#bapulsen which no longer exists. Correct looking documentation is at https://faustlibraries.grame.fr/libs/basics/#bapulsen.

Unfortunately google doesn't reliably come up with the right page in the top couple links when I search for faust components, so for a new user like me this would be a super useful fix!

Buttons or Checkboxes don't respond to MIDI control

Hey,

I'm having trouble getting buttons or checkboxes to respond to MIDI control. I'm running FaustIDE in Chrome on a Mac and a MIDI controller (sending on channel 1) connected via USB. Its knobs and sliders control GUI knobs and sliders fine. Also 'badges' are appearing next to "MIDI Input" when keys are pressed. But when it comes to buttons, the corresponding GUI buttons never turn on or make an audible difference.

I am following the logic from the MIDI documentation here that says: "When a 7-bit MIDI parameter is used to drive a button or a checkbox, its maximum value (127) maps to 1 ("on") while its minimum value (0) maps to 0 ("off")."

I tried two methods:

  1. MIDI CC with [midi:ctrl]
  • My button is mapped as 'momentary' on CC 58 with an On Value of 127 and an Off Value of 0.
  • In the FaustIDE it is mapped as follows:
    button("[0]Env1 > Amp[midi:ctrl 58 1]")

One thing I noticed, if I turn the button into a checkbox, then press the corresponding button on my MIDI controller, the GUI button no longer responds to a mouse click, so the message is being received at some level.

  1. MIDI note with [midi:key]
  • My button is mapped as 'momentary' and sends a C0 Note with an On Value of 127 and no off value (cannot be set)
  • This appears as MIDI Note 11 on the badge next to "MIDI Input", so I map in the FaustIDE as follows:
    button("[0]Env1 > Amp[midi:key 11 1]")

Using this method with button or checkbox, there is no response on the GUI or audibly and the strange behaviour above is not replicated.

Any ideas? Potential bug or something I'm missing?

Wrong labelling order inside the hgroup

The labelling order of the sliders inside the hgroup it's wrong. I wrote a little piece of code in wich a set of sliders control the amplitude of a set of oscillators. The sliders are ordered in a strange way, they should be ordered like this: amp 1, amp 2 amp 3....... amp 15, amp 16. Instead they are ordered like this: amp 1, amp 10, amp 11 .......... amp 16, amp 2, amp 3.......... I'm using Google Chrome and my operating system it's Windows 10. Here's the code I wrote:

`import("stdfaust.lib");

freq = hslider("freq[unit:hz][scale:log]", 440, 1, 20000, 0.01) : si.smoo;

gain = hslider("gain", 1, 0, 1, 0.01) : si.smoo;

nPartials = 16;

amp(c) = vslider("amp %c", 0, 0, 1, 0.01) : si.smoo;

amplitude(c) = hgroup("amplitude", amp(c));

process = par(i, nPartials, os.osc(freq*(i+1)) * amplitude(i+1)) :> /(nPartials)* gain;`

RFE: Remember last position in SVG

Feature request: If I have "Real-time Compile" enabled and I edit the DSP, then I would like the IDE to remember the most recently viewed position of the SVG. This would save some diving-down clicking each time I change a file.

In Firefox, "MIDI Input" displays "not supported", even if "Computer Keyboard" is selected

In Firefox, "MIDI Input" displays "not supported", even if "Computer Keyboard" is selected.

That message is confusing, because when I hit keys, I can still see that they are being registered in the FaustIDE UI in the upper right, which implies that it's working - just webmidi should be marked as unsupported.

(Although, I can't seem to get "Computer Keyboard" to interact with the DSP smartkeyboard samples - which is the exact same behaviour that I get with Chrome; but it's also the same issue I have with mephisto.lv2 through carla, making me think that smartkeyboard is broken / not wired to MIDI; any ideas?)

Problem with long Filenames and fixed Width of Left Panel Filebrowser

Hello again,

Just a minor Issue, but I've imported a prewritten .dsp file via Drag and Drop into the Online IDE. The Filename has 24 characters without ".dsp".
I would like to rename the file or delete it, but I cannot access the rename/delete button because the end of the filename is hidden. I tried to resize the Window and Fontsize, etc... but I'm not able to get to the buttons.

Maybe you can make the width of the left Panel resizable like it is possible for the right Panel. Or keep a fixed width but overlay the rename/delete Button on top of the Filename.

Thank you very much!
cheers,
steffen

Chrome Version 83.0.4103.116
Mac OS 10.14.6

Uncaught TypeError: r(...).readFile is not a function

I get this error when trying to run locally, and the IDE does not fully load. It seems like it is coming from faust2webaudio (see image for stack trace). Let me know if there is a way to avoid. I am using Chrome on Ubuntu 18.04.
Screenshot from 2021-11-23 13-52-22
.

Accidentally run a intensive patch = cannot open IDE again without clearing local storage

First up, thanks so much for building such a great IDE! I've spent days using it now and it's so fully featured and easy to use.

The one issue I've hit a couple of times is that if you accidentally make a typo that results in a patch that's too heavy to run, then the tab will hang and crash. That's fine, but when you try to go back to the IDE, it automatically loads the last patch AND automatically attempts to run it again, which leads to the tab immediately hanging, so you can't correct the mistake and can really only get back to the IDE using a new private browsing tab or clearing local storage, both of which mean you lose your work.

e.g. For a trivial example I had something like a process = par(i,99,os.oscsin(i * 0.1)) :> _,_, which is quite heavy already. I accidentally typed an extra 9 (so ...,999,...) and now the IDE always crashes.

Multiple Outputs?

Is it possible to send multiple outputs with the Faust Web IDE? I use a Focusrite Scarlett 18i20, which features up to 10 outputs. I would like to send a quad output, and not just a stereo output. I have tried various tests, but none seem to work. Is this possible?

Thanks.

Faust IDE appears broken for Google Chrome

I'm using Linux Mint with: Google Chrome Version 115.0.5790.110 (Official Build) (64-bit)

What I'm seeing is that the menu of projects (with links to library examples, etc.) doesn't work unless I have the developer console open, and then refresh the page.

In addition, I see the following error in the console:

jquery.js:3783 Uncaught xe.ErrnoError.xe.ErrnoErrorcode: "ENOENT"errno: 44message: "No such file or directory"node: undefinedsetErrno: ฦ’ (e)stack: "Error\n    at new xe.ErrnoError.xe.ErrnoError (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:81905)\n    at Object.open (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:75922)\n    at Object.readFile (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:78793)\n    at FileManager.select (https://faustide.grame.fr/index.js:630:66)\n    at new FileManager (https://faustide.grame.fr/index.js:331:10)\n    at _callee13$ (https://faustide.grame.fr/index.js:46827:29)\n    at tryCatch (https://faustide.grame.fr/index.js:45494:17)\n    at Generator.<anonymous> (https://faustide.grame.fr/index.js:45575:22)\n    at Generator.next (https://faustide.grame.fr/index.js:45519:21)\n    at asyncGeneratorStep (https://faustide.grame.fr/index.js:45815:24)"[[Prototype]]: Error
    at Object.ensureErrnoError (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:82149)
    at Object.staticInit (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:82360)
    at o (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:118643)
    at r.o (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:201913)
    at o.next (<anonymous>)
    at https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:202179
    at new Promise (<anonymous>)
    at r.load (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:201995)
    at H.<anonymous> (https://faustide.grame.fr/js/f18d7aafe95d97a4807f.js:10:238375)
    at Generator.next (<anonymous>)
(anonymous) @ jquery.js:3783

Function parameter hints

I believe that this would be extremely helpful for new users in particular. Here is an example of what I mean, taken from the Monaco site:

hint

Polyphonic MIDI "effect" Function

Beginning with this example:

declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");
envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain;
process = os.sawtooth(freq)*envelope <: _,_;
effect = dm.zita_light;

zita_light is a stereo reverberator -- it has two inputs and two outputs, which is why the signal is split at the end of process. It could also have been written like:

process = os.sawtooth(freq)*envelope;
effect = _ <: dm.zita_light;

But this now discards the right channel, as though zita_light only had one output. Whatever reverberator you put into effect, the compiler will attempt to send each input channel to the corresponding channel of the output while ignoring any <: and :> compositions. This:

process = os.sawtooth(freq)*envelope;
effect = _ <: dm.zita_light <: _,_;

still only outputs to the left channel, and this:

process = os.sawtooth(freq)*envelope;
effect = dm.zita_light;

causes the compiler to silently ignore effect, when it should give a sequential composition error.

Invalid output from WAM export (GUI Builder)

I noticed when exporting using GUI Builder in Faust, nothing acutally shows up:

image

I downloaded the ZIP and realized the issue lies in index.js. The generated code expects two files named dspMeta.json and dspModule.wasm (lines 76/77):

image

These files are however named in accordance to the DSP file. In my case, in the IDE I named my file miditut.dsp, and so the actual metadata and module are named miditut.json and miditut.wasm:

image

Sure enough if I change the references in index.js to miditut.json and miditut.wasm respectively, it all loads correctly:

image

wrong SampleRate in Faust Online IDE

Hey!
I'm sorry, I know this is for the Online Editor, not the Online IDE, but I could not find a place to report the Bug that I just found:

In the IDE when I record the Audio Output Stream and save is as a recording (Wav) it gets saved with a Samplerate of 44100khz (regardless of the Samplerate of my System). But my SystemSamplerate was 48000kHz while Recording. The Recorded File is pitched down (and its Metadata says 44100kHz Samplerate).

Maybe somebody can guide me where to address the right people for this. thank you!

add a volume slider independent of the process

An idea that came up during the recent PM workshop (and @sletz pointed out to add an issue here):

add a volume slider to the webIDE independent of the process.

something along the line of

si.bus(outputs(component)) : par (i, outputs(component), _*vol) with h{vol = hslider("vol", 0.1, 0, 1, 0.0001);};

Application Does not Fail Gracefully when faustservicecloud is down

At 1:44, GMT, 2022/9/6, https://faustservicecloud.grame.fr/targets was inaccessible.

At this time, https://faustide.grame.fr was unusable.

  • Run and export buttons did not function
  • MIDI and Audio input were not avaialble

When this happened, I was able to circumvent the problem by blocking the above endpoint in the developer tools. When I did this, the application was again responsive.

It is recommended that a timeout feature be implemented in the case that faustservicecloud becomes unresponsive. Here, a warning can be provided that this is happening.

Thanks! Amazing app!

please report this message and the failing DSP file to Faust developers

//ASSERT : please report this message and the failing DSP file to Faust developers (file: old_occurences.cpp, line: 158, version: 2.54.11, options: -lang wasm-ib -cn 92e9c9e959f44d9758e31c5f4a87681c31399938fae428eecaa6da00b3ecea28 -es 1 -mcd 16 -single -ftz 0 )

import("stdfaust.lib");
//number of signals
N= 6;
//how bad the performer is
scaleTraffic= 1800;
//intensity of the gesture during sustain (sort of vibrato)
energy= hslider("energy", 1, 0.0001, 2, 0.00001);
//brain trigger
sigIn=button("bang"): ba.impulsify:* (energy);
beatDur= 60/ hslider("bpm", 60, 0.01, 600, 0.0001);
atkTime= (3beatDur)/ (10^ energy);
relTime= (3
beatDur)/ (10^ energy);
//route action
routeTo= 0;
envDur= atkTime+ (ma.SR* (3*beatDur)/ (10^ energy)); //last value is sus time.
holdAction= (_!= 0)<: , (@ envDur): ba.on_and_off: ;
trin= sigIn: ba.selectoutn(N, routeTo): par(i, N, atkTime, 1, relTime, holdAction: en.asr:
);

//: leEnv;

//second part
//slow signals in parallel. //they represent the input

//tr: + ~ (<:ba.if(<44100,_+1, 0))
//with{tr= button("bang"):ba.impulsify;};
source= no.multinoise(N) ;
//remove DC offstet (cycles > 20 sec) then RMS
toRMS= par(i, N, fi.lowpass(4,2): fi.dcblockerat(1/ (60/ 3)): ba.slidingRMS(4096));
//deriv of RMS, represent "transientness", find the most transient one at every moment
difference= par(i, N, _<: _- _');
activity= source: toRMS: difference;
// get the index of the most active channel;
iPeak(src)= sum(i,N-1, s(i)< s(i+1))
with{
s(n)= src: ba.selector(n,N);
};
traffic= iPeak(activity)<: _== _':fi.avg_rect(0.2):fi.dcblockerat(20):* (scaleTraffic);
limTra= (ba.if(traffic> 0, traffic,0));
//(ba.)pulse_countdown ORRRRRRRRRR^^^^^^^^???????
delayedThing=source: par(i,N, de.fdelay(44100,(no.lfnoise(32)+1:(0.5limTra))):fi.dcblockerat(1)):>/(N);
process = trin;
//
//iPeak(source);

//seq(i, N-1, ba.if(ba.take(1,sig)> ba.take(2,sig)), )

// process= findMax(par(i,N, no.noise));

// ba.if(_> tak(i+ 1), _, tak(i+ 1))
//suca;
//ba.take(1, (suca)),ba.take(2, (suca)):max;
//lol: iPeak;
// manyDer<: par(i, nsig, _), (mag(nsig)<:si.bus(nsig))
// with{
// nsig= 8;
// source= no.multinoise(nsig);
// manyDer= source: par( i, nsig, der);
// der= _<: _ - _';
// nor(n)= par(i, n, _/ mag(n));
// mag(num)= par(i, num, ^2):> ^(0.5):;
// };

//:>_/ nsig;

MIDI input not working in Faust IDE

At https://faustide.grame.fr/, USB MIDI devices are recognised and displayed in the drop-down list in the upper right corner of the page but they do not appear to do anything. Code that responds to MIDI messages correctly in https://fausteditor.grame.fr/ does not respond to the same devices in Faust IDE.

This has been consistent behaviour for me on Windows 10 / latest Chrome with multiple MIDI devices: keyboards sending note on/off and knobby controllers sending CC messages. It has been the same for every DSP script I've tried -- my own and the built-in examples.

missing js in dist mode

the following files

js/c9bc977960e6a6f7c7bf.js.map 
js/c9bc977960e6a6f7c7bf.js 
js/59f5246d165b91115b41.js 
js/eaadba58d4ed3f96894e.js.map 
js/eaadba58d4ed3f96894e.js 
js/59f5246d165b91115b41.js.map 

are missing when running npm run dist while not with npm run build
Thus the resulting web site doesn't work in dist mode.

npm run dist

When running

npm run dist

(that is using the webpack production mode)
the generated site is incorrect: the 'Examples' menu is empty.

RFE: Don't make UI for freq/gain/gate in poly mode

When I'm prototyping a polyphonic instrument in the IDE, I'm usually using the computer keyboard as MIDI input. This means I don't need the freq, gain, or gate parameters to show up in the GUI. Could there be a toggle (defaulting to off) that would prevent these parameters from being shown in the UI? I have also toyed with the idea of metadata like freq = hslider("freq [hide]", 440, 20, 20000, 1);, but maybe that's not a good idea.

Why isn't the GUI Builder working for most of the Faust progs?

I would like to use the GUI Builder in the Faust IDE for making a custom GUI, but of all the Faust progs I tried in the Faust IDE, only for stonephasor.dsp did the GUI editor appear in the GUI Builder window. For all the rest the GUI Builder window stayed blank. I am running the Faust IDE in Chromium with WebAssembly activated, and running Linux Mint 20.3 as OS.

Trying to compile a bit of (invalid) code makes any subsequent attempt unsuccessful

I tried to compile-run the following code using the web editor:

import("stdfaust.lib");
process = no.gnoise;

As one would expect, this did not compile since no.gnoise should be given an argument. But no error message was displayed.

After modifying my code to something valid, the page still refused to compile-run it. It had to be refreshed to work again.

Examples Dropdown Menu Exceeds Screen Size

The examples menu up top, specifically the Filtering category, extends below my screen. Currently if I want to view everything I have to zoom the page out to uncover the content.

The drop menus need scroll bars, or to work in columns with a horizontal scrollbar for future proofing in case one of the menus somehow gets enough entries to fill the screen this way as well.

Audio degradation over time

I'm trying to use the Faust IDE for making iterative changes to DSP code. The problem I'm facing is that after a few recompilations the audio quality deteriorates significantly. The only way to get out of this is to close the browser tab and start from scratch. The problem is most pronounced with the "Real-Time Compile" feature enabled.

To reproduce, consider this test sequence. In the audio sample attached below I'm changing the line algorithm = 0 back and forth between 0 and 1 to cause recompilations.

import("stdfaust.lib");

synth(gate, freq) = dx.dx7_algo(
    algorithm,
    egR1, egR2, egR3, egR4, egL1, egL2, egL3, egL4,
    outLevel, keyVelSens, ampModSens,
    opMode, opFreq, opDetune, opRateScale,
    feedback, lfoDelay, lfoDepth, lfoSpeed,
    freq, gain, gate
) * outer_gain
with {
  algorithm = 0;
  outer_gain = hslider("h:dx7/v:global/[6]outer gain",0.5,0,1,0.01);
  gain = hslider("h:dx7/v:global/[6]gain",0.8,0,1,0.01);
  feedback = nentry("h:dx7/v:global/[1]feedback",0,0,99,1) : dx.dx7_fdbkscalef/(2*ma.PI);
  lfoDelay = nentry("h:dx7/v:global/[2]lfoDelay",0,0,99,1);
  lfoDepth = nentry("h:dx7/v:global/[3]lfoDepth",0,0,99,1);
  lfoSpeed = nentry("h:dx7/v:global/[4]lfoSpeed",0,0,99,1);
  egR1UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[0]egR1",90,0,99,1));
  egR1(n) = ba.take(n+1,egR1UI);
  egR2UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[1]egR2",90,0,99,1));
  egR2(n) = ba.take(n+1,egR2UI);
  egR3UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[2]egR3",90,0,99,1));
  egR3(n) = ba.take(n+1,egR3UI);
  egR4UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[3]egR4",90,0,99,1));
  egR4(n) = ba.take(n+1,egR4UI);
  egL1UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[4]egL1",0,0,99,1));
  egL1(n) = ba.take(n+1,egL1UI);
  egL2UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[5]egL2",90,0,99,1));
  egL2(n) = ba.take(n+1,egL2UI);
  egL3UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[6]egL3",90,0,99,1));
  egL3(n) = ba.take(n+1,egL3UI);
  egL4UI = par(i,6,nentry("h:dx7/v:[%i]op%i/[7]egL4",0,0,99,1));
  egL4(n) = ba.take(n+1,egL4UI);
  outLevelUI = par(i,6,nentry("h:dx7/v:[%i]op%i/[8]level",95,0,99,1));
  outLevel(n) = ba.take(n+1,outLevelUI);
  keyVelSensUI = par(i,6,nentry("h:dx7/v:[%i]op%i/[9]keyVelSens",1,0,8,1));
  keyVelSens(n) = ba.take(n+1,keyVelSensUI);
  ampModSensUI = par(i,6,nentry("h:dx7/v:[%i]op%i/[10]ampModSens",0,0,99,1));
  ampModSens(n) = ba.take(n+1,ampModSensUI);
  opModeUI = par(i,6,nentry("h:dx7/v:[%i]op%i/[11]opMode",0,0,1,1));
  opMode(n) = ba.take(n+1,opModeUI);
  opFreqUI = par(i,6,nentry("h:dx7/v:[%i]op%i/[12]opFreq",1.0,0.0,2.0,0.01));
  opFreq(n) = ba.take(n+1,opFreqUI);
  opDetuneUI = par(i,6,nentry("h:dx7/v:[%i]op%i/[13]opDetune",1,-10,10,1));
  opDetune(n) = ba.take(n+1,opDetuneUI);
  opRateScaleUI = par(i,6,nentry("h:dx7/v:[%i]op%i/[14]opRateScale",0,0,10,1));
  opRateScale(n) = ba.take(n+1,opRateScaleUI);
};


// Test sequence:
note_length = 0.8;
speed = 1.0;
gate = ba.pulsen(note_length * ma.SR / speed, ma.SR / speed);
// Arpeggio from E2 to E5
freq =
    ba.midikey2hz(40),
    ba.midikey2hz(40 + 4),
    ba.midikey2hz(40 + 7),
    ba.midikey2hz(52),
    ba.midikey2hz(52 + 4),
    ba.midikey2hz(52 + 7),
    ba.midikey2hz(64),
    ba.midikey2hz(64 + 4),
    ba.midikey2hz(64 + 7),
    ba.midikey2hz(76)
    : ba.selectn(N, i) : * (1.0 + vibrato_amplitude + vibrato_amplitude * os.osc(vibrato_speed))
with {
    N = 10;
    i = floor(ma.modulo(ba.samp2sec(ba.time) * speed, N));
    vibrato_amplitude = (0.05946309436 * vibrato_semitone) / 2;
    vibrato_semitone = hslider("vibrato semitone", 0.2, 0.0, 2.0, 0.01);
    vibrato_speed = hslider("vibrato speed", 3, 0.1, 20.0, 0.01);
};

process = gate, freq : synth <: _, _;

In the beginning everything sounds fine. After a few recompilations it starts to crackle, followed by strong stuttering (zipped audio example).

Could this be some kind of resource leak from each compilation?

Browser is Firefox version 77.0.1.

Under Chrome I don't observe a degradation over time, but there I have much more crackling in general.

Add instructions for running editor

It would be awesome if we could add a note to the README.md that mentioned how to server the editor. For example, it could be as simple as npm install -g http-server && http-server ..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.