Coder Social home page Coder Social logo

Crash in Ardour about sfizz HOT 8 CLOSED

sfztools avatar sfztools commented on May 16, 2024
Crash in Ardour

from sfizz.

Comments (8)

paulfd avatar paulfd commented on May 16, 2024 1

Could you try with f473539? I did indeed introduce a wrong behavior in this commit...

from sfizz.

alcomposer avatar alcomposer commented on May 16, 2024

Yes this fixed the issue.

from sfizz.

x42 avatar x42 commented on May 16, 2024

What is the motivation here? The sample-rate is passed to the plugin when the plugin is instantiated and must not change. So you can pick it up directly from instantiate (...)

The parameter-option is only for the benefit of GUIs (and it is passed as atom_Float). Support for this was only added recently. Ardour 5.x did no support this option.

from sfizz.

paulfd avatar paulfd commented on May 16, 2024

I seem to recall that e.g. VST can change sample rates on the fly. At least such an option existed in Juce. I assumed this option was there to handle this possibility.

from sfizz.

x42 avatar x42 commented on May 16, 2024

Yes, VST has that option (but almost no VSTs implement this properly. Check e.g. frequency grid-lines in VSTs EQs when changing the rate).

It is also super rare that anyone would change rate of a project while running. That's not click-free, nor realtime-safe, and one cannot do this live anyway. Also many plugins allocate buffers depending on sample-rate, so LV2 opted to just take down and re-instantiate the plugin.

I'm not aware of any LV2 host that allows changing the sample-rate while running. jalv, Ardour, Qtractor don't (maybe Carla does?).

from sfizz.

paulfd avatar paulfd commented on May 16, 2024

I agree it seems overly optimistic to change the sample rate live, but as far as I could see there is really nothing preventing it in the way the "Options" extension is set. The API documentation mentions that the methods are in the "instantiation" threading class but that the options are there to enable changing some parameters of the plugin at runtime.

I don't remember exactly but the reason why I put this code path to change the sample rate was probably because I had an unmap around that told me that the host sent a sample rate option, and figured I probably should handle it somehow :) If I can disregard it it's fine as I already initialize the default sample rate to the parameter passed to the instantiate(...) function. Is it the same for the block size or can this actually change at runtime?

from sfizz.

x42 avatar x42 commented on May 16, 2024

The API documentation mentions that the methods are in the "instantiation" threading class but that the options are there to enable changing some parameters of the plugin at runtime.

Indeed. it's theoretically possible possible that way.

Is it the same for the block size or can this actually change at runtime?

Yes, it can change at runtime. A plugin must also support run(..,n_samples) for any non-negative number of n_samples. The block-size is only an upper bound.

e.g. Ardour splits the cycle when looping or when there's port-automation. So in a single process cycle of 1024 samples, the plugin may be called with run(567); /* parameter or position changes*/ run (457);

from sfizz.

paulfd avatar paulfd commented on May 16, 2024

Ahhh I see that's how this is implemented. It seemed weird to have only a single parameter value per block with automation curves. Thanks :D I aimed at doing it this way though so hopefully I succeeded...

My question however was more related to whether the max sample rate may change by calling set_options(...) after instantiation?

from sfizz.

Related Issues (20)

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.