Dynamic DSP Libraries



  • Thanks for your reply.
    I have one more question.
    If I use a dynamic library which will be loaded in the plugin or standalone app, then shall I have to add such library file(like .dylib) in the installer?
    And if so, where should I have to install such library?



  • On OSX, the library must be at

    Application Support/Company/Product/lib

    On Windows:

    %APPDATA%/Company/Product/dll

    But iOS apps can't use dynamic libraries, so you have to build a static library and link the HISE project with it (this is a bit complicated, but NSK uses this method and it works fine).



  • Hello, @Christoph-Hart!
    I am going to add script fx like following.

    <?xml version="1.0" encoding="UTF-8"?>

    <Processor Type="ScriptFX" ID="ScriptFX" Bypassed="0" Script="function prepareToPlay(sampleRate, blockSize) { vkfx_ampEq.prepareToPlay(sampleRate, blockSize); } function processBlock(channels) { vkfx_ampEq >> channels; } function onControl(number, value) { } ">
    <EditorStates BodyShown="1" Visible="1" Solo="0" onInitOpen="0" prepareToPlayOpen="0"
    processBlockOpen="1" onControlOpen="0" Folded="0"/>
    <ChildProcessors/>
    <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/>
    <Content/>
    </Processor>

    But when I make BASE64 encoded state and call restoreState on runtime, HISE freezes and then crashes.
    I guess it is because of function "processBlock". If I let it empty then it won't crash.
    Please check this issue.



  • Ah yes, it's a deadlock situation where the audio thread holds the compile lock and the message thread the swap lock.

    This is fixed now. However beware the AmpReverb is producing nasty bursts if uninitialised (take a look at the NSK code how I tamed it). Definitely keep your speakers down until you are safe 🙂

    Edit: Set these parameters:

    vkfx_ampEq.setParameter(vkfx_ampEq.Volume, 0.5);
    vkfx_ampEq.setParameter(4, 0.0); // Reverb Level (enum is defect)
    vkfx_ampEq.setParameter(5, 1.0); // Amp Bypass (enum is defect)
    


  • ok, I got. Thanks.



  • Hello, man!
    It still crashes when I add the code "vkfx_ampEq >> channels;" in processBlock function.
    0_1500348971313_upload-b7cce6f4-9ddb-4947-bab7-c3788bc5c2a1
    0_1500349032835_upload-c5f10784-a58c-40fa-a331-c762448021ca



  • Is the crash happening if you compile or if you select the effect with the drop down?



  • It crashes when I compile script.



  • I added "vkfx_ampEq >> channels;" line in processBlock function and then compiled that script first.
    And next I created Base64 encoded state and set it as a const string variable.
    Finally when I compile Midi Script Processor, it freezes and becomes not responding.
    Please resolve this issue asap.



  • I can't reproduce this crash with the latest versions, and it's impossible to fish in the dark with issues like this (I assume it's still the deadlock, but please hook up the debugger to confirm this).

    I've made some tiny changes that decreases the duration that the locks are held, maybe this fixes something.


 

2
Online

424
Users

1.5k
Topics

10.6k
Posts