HISE Logo Forum
    • Categories
    • Register
    • Login

    Round Robin Crashes Hise Plugin-Solved with the Multimic method

    Scheduled Pinned Locked Moved Bug Reports
    7 Posts 3 Posters 514 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DimitrisSPD
      DimitrisSP
      last edited by DimitrisSP

      Hallo guys!
      I run in a crash when i use Hise plugin [Stereo or Multichannel in both builds (Hise 2.1 build version 650 or Scriptnode)]...checked in Logic and Cubase, while when i use the standalone version i have no problem...

      I am working on a non repeat Round Robin and used a piece of code that @Christoph-Hart posted in another topic, altered that to my needs and it works great! (Created a test project using 1 kick sample for every different round robin...i used 4 round robins).

      The tricky part is that i use 5 samplers for the different mics (kick direct, kick oh, kick room, kick bleed, kick comp) each one with 4 round robins and the random values for every different sampler based on the script have to be the same...

      In order to achieve this i used a slider with (min value=1, max value=4, step size=1).
      In onNoteOn callback i set the value of the slider based on the KickRR inline function (see below)
      and i activate the samplers based on the slider value.(In this way i have all the samplers synced perfectly)

      on init callback

      Engine.setKeyColour(35, 0x643058A4);
      Engine.setKeyColour(36, 0x643058A4);
      
      const var KickRRSlider = Content.getComponent("KickRRSlider");
      
      const var KickDirect = Synth.getChildSynth("KickDirect");
      const var KickOh = Synth.getChildSynth("KickOh");
      const var KickRoom = Synth.getChildSynth("KickRoom");
      const var KickBleed = Synth.getChildSynth("KickBleed");
      const var KickComp = Synth.getChildSynth("KickComp");
      
      const var KickSamplers = [KickDirect, KickOh, KickRoom, KickBleed, KickComp];
      
      for (i = 0; i < 5; i++)
      {
       KickSamplers[i].asSampler().enableRoundRobin(false); 
      }
      
      
      reg lastIndex = -1;
      reg numKickGroups = 4;
      
      inline function KickRR()
      {
          // We have to catch this case, otherwise we'll
          // be stuck in an endless loop later
          if(numKickGroups == 1)
              return 1;
      
          local newIndex = Math.randInt(1, numKickGroups+1);
          
          while(newIndex == lastIndex)
              newIndex = Math.randInt(1, numKickGroups+1);
      
          lastIndex = newIndex;
          return newIndex;    
      }
      

      onNoteOn callback

      function onNoteOn()
      {	
      	KickRRSlider.setValue(KickRR());
      	for (i = 0; i < 5; i++)
              {
                KickSamplers[i].asSampler().setActiveGroup(KickRRSlider.getValue()); 
              }
      	
      }
      

      When i am on the standalone version of Hise everything works great...but when i load the plugin version on Logic or Cubase when i go to press any note it instandly crashes...

      If i comment out this section of code

      function onNoteOn()
      {	
      	KickRRSlider.setValue(KickRR());
      	/*for (i = 0; i < 5; i++)
              {
                KickSamplers[i].asSampler().setActiveGroup(KickRRSlider.getValue()); 
              }*/
      	
      }
      

      there is no problem, no crashes but i have no round robins (of course)...
      Here is a video showing the problem logic crash.gif

      The Crash report is:

      Thread 10 Crashed:: ProcessThread1/1024
      0   libsystem_kernel.dylib        	0x00007fff93294d42 __pthread_kill + 10
      1   libsystem_pthread.dylib       	0x00007fff93382457 pthread_kill + 90
      2   libsystem_c.dylib             	0x00007fff931fa420 abort + 129
      3   libc++abi.dylib               	0x00007fff91d5294a abort_message + 266
      4   libc++abi.dylib               	0x00007fff91d77c2f default_terminate_handler() + 267
      5   libobjc.A.dylib               	0x00007fff92887353 _objc_terminate() + 124
      6   libc++abi.dylib               	0x00007fff91d74d49 std::__terminate(void (*)()) + 8
      7   libc++abi.dylib               	0x00007fff91d74dc3 std::terminate() + 51
      8   com.hartinstruments.HISE      	0x0000000132f7b0a5 hise::ApiClass::ApiClass(int) + 53
      9   com.hartinstruments.HISE      	0x0000000133090df7 hise::ScriptingApi::Sampler::Sampler(hise::ProcessorWithScriptingContent*, hise::ModulatorSampler*) + 103
      10  com.hartinstruments.HISE      	0x00000001330e2db2 hise::ScriptingObjects::ScriptingSynth::Wrapper::asSampler(hise::ApiClass*) + 114
      11  com.hartinstruments.HISE      	0x0000000132fa73e8 hise::ApiClass::callFunction(int, juce::var*, int) + 104
      12  com.hartinstruments.HISE      	0x0000000132fa64e7 hise::HiseJavascriptEngine::RootObject::FunctionCall::getResult(hise::HiseJavascriptEngine::RootObject::Scope const&) const + 4279
      13  com.hartinstruments.HISE      	0x0000000132fa5a78 hise::HiseJavascriptEngine::RootObject::FunctionCall::getResult(hise::HiseJavascriptEngine::RootObject::Scope const&) const + 1608
      14  com.hartinstruments.HISE      	0x0000000132f9eccb hise::HiseJavascriptEngine::RootObject::Expression::perform(hise::HiseJavascriptEngine::RootObject::Scope const&, juce::var*) const + 27
      15  com.hartinstruments.HISE      	0x0000000132fb76d4 hise::HiseJavascriptEngine::RootObject::BlockStatement::perform(hise::HiseJavascriptEngine::RootObject::Scope const&, juce::var*) const + 676
      16  com.hartinstruments.HISE      	0x0000000132fb316d hise::HiseJavascriptEngine::RootObject::LoopStatement::perform(hise::HiseJavascriptEngine::RootObject::Scope const&, juce::var*) const + 781
      17  com.hartinstruments.HISE      	0x0000000132fb76d4 hise::HiseJavascriptEngine::RootObject::BlockStatement::perform(hise::HiseJavascriptEngine::RootObject::Scope const&, juce::var*) const + 676
      18  com.hartinstruments.HISE      	0x0000000132fcbcbe hise::HiseJavascriptEngine::executeCallback(int, juce::Result*) + 398
      19  com.hartinstruments.HISE      	0x0000000132feee15 hise::JavascriptMidiProcessor::runScriptCallbacks() + 789
      20  com.hartinstruments.HISE      	0x0000000132fecbb9 hise::JavascriptMidiProcessor::processHiseEvent(hise::HiseEvent&) + 313
      21  com.hartinstruments.HISE      	0x0000000132d27e13 hise::MidiProcessorChain::processHiseEvent(hise::HiseEvent&) + 131
      22  com.hartinstruments.HISE      	0x0000000132d31741 hise::ModulatorSynth::processHiseEventBuffer(hise::HiseEventBuffer const&, int) + 1473
      23  com.hartinstruments.HISE      	0x0000000132d34686 hise::ModulatorSynthChain::renderNextBlockWithModulators(juce::AudioBuffer<float>&, hise::HiseEventBuffer const&) + 214
      24  com.hartinstruments.HISE      	0x0000000132cafcf7 hise::MainController::processBlockCommon(juce::AudioBuffer<float>&, juce::MidiBuffer&) + 10919
      25  com.hartinstruments.HISE      	0x0000000132a2a9ab JuceAU::Render(unsigned int&, AudioTimeStamp const&, unsigned int) + 3883
      26  com.hartinstruments.HISE      	0x0000000132a3b0f1 AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) + 1137
      27  com.hartinstruments.HISE      	0x0000000132a3201e AUMethodRender(void*, unsigned int*, AudioTimeStamp const*, unsigned int, unsigned int, AudioBufferList*) + 46
      28  com.apple.music.apps.MAAudioEngine	0x00000001119da197 CMDAudioUnit::Process(MDPlugInputBusList const*, MDPlugOutputBusList const*, long, long, long, float const*, eProcessLevel) + 7447
      29  com.apple.music.apps.MAAudioEngine	0x000000011193a0f0 MDPlug::_Process(MDPlugInputBusList const*, MDPlugOutputBusList const*, long, long, long, float const*, eProcessLevel) + 1424
      30  com.apple.music.apps.MAAudioEngine	0x000000011190f41f MD::PluginProcess(MDProcInfo*, MDPlug*, long, long, long, eProcessLevel) + 5247
      31  com.apple.music.apps.MAAudioEngine	0x000000011190d2cd MD::StreamProcessing(eProcessLevel, long, long, long, int) + 14189
      32  com.apple.music.apps.MAAudioEngine	0x000000011190522b MD::Process(eProcessLevel) + 3403
      33  com.apple.music.apps.MAAudioEngine	0x000000011191a516 MD::CallProcessThread(long) + 342
      34  libsystem_pthread.dylib       	0x00007fff9337f93b _pthread_body + 180
      35  libsystem_pthread.dylib       	0x00007fff9337f887 _pthread_start + 286
      36  libsystem_pthread.dylib       	0x00007fff9337f08d thread_start + 13
      

      Has anyone faced this kind of problem? Maybe its a code problem?

      Here is the snippet of the project:

      HiseSnippet 1712.3oc6a01aSbDD9tjbPrAWAH9P+RkVgpTcDlfM4EPJEUmWQQPHV1.EIDBs4t01qx4cOs257RQH0eR8mP+I0+Asyt2c91y03ZhJzWx5Oj3c1Y14Ymc1YdNm3VBtOINlKbbK8hyiHNtW2qy4LY+s6ioLm82wwshWa9PVPa9QTVryVmGgiiIANtty+DkJtkVvQ+529gsvgXlOIWjiyq3TexynCnxbosZ9TZX3d3.xKnCLzd0l66y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niOOXHTYnHM.E2mzITNyreqpmJC.w4lt5yB2fYEt2zqEEJONY7N2DvKbz+4FuoLsp3sa2tPWpbvtf2du9yOsJSn7MIP4VdcjBBFR75kVARimq6k2K8uC5uQyL82VBRHGGTLO+Wat0PHhIJJ8WZpc0lCfFvE7U5NoMIhfkPB.w7dQ6155pia0MZpSWdg.neCACyMzgLBD4kla6sE733tv1Io2io1sFJ5ohU4RZSNAJyWT1yGN.N8YLRnpJoqKH5kwD0oM0GZyInmYps1K0eAVehCOSfdbiwF+fwFuxXiWcrwqM130Ga7CyGmDPO.GoxMVzKHIuX7h8Wc1J1CKSKLrwMzbKZuQtHQhYh7nfsFPFO5yDdvgq7u5mq4KWo14mM39W7nWkxvXGp5zYW1IvkSPhBi2B5Bp6vjIsQATd.mwi5yYT+hWEfT6d8HBSrOwMzlRIbSLWxsa1lDR.Vt4h91lOCXKiEEug+IEKZL6whocd80dIvEoptg9+QKx4uz2hbZgNfkmtfEB7tP9u7y4q6oKniT8e+mBpvSIKg9pY817fFfcfl99Dy1fyon0mLttZrBPcfmVUO32gWoS1HqmoZxFYS53msTvdK88ZN8tym7j5ZlegP23PyT5XfZgBRPetYmfzhdIe.CVxQVxQljiVvi22RLxRLxjXzCrDirDirDirDitLPLprW1ewEK0HK0HSpQWwSnxJrjirjiLHGshkbjkbjkbjkbzkAxQWyaz+DJV1QV1Qlritp2Q5zBK8HK8HC5QqZoGYoGYoGYoGc44yNR8uTmkcjkcTwO6HeUVgkbjkbjA4n0rjirjirjirji9OL4nuDnb.1WvemexWRBEVWTKAPIS+sLrj2ApwnFYesH77pubcmAPup246qtHbOHBOYadvEvlUt.1r5Evl0t.1r9EvlGdAr4QS0FEMgMGJ4CRJRBBZsaRhk6tiRrl24OjTQ6UB
      

      And the project can be downloaded here: Round Robins

      If it is possible please download the project just for testing and maybe reproducing the situation.
      In this way maybe we can see if it's a problem on my system or if it is a Hise bug (or maybe a code problem)

      I have to mention that if i will not press any note and coplile to a finished plugin it compiles without problems loads fine and plays fine...

      Thanks in advance ☺

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        @DimitrisSP said in Round Robin Crashes Hise Plugin:

        The tricky part is that i use 5 samplers for the different mics (kick direct, kick oh, kick room, kick bleed, kick comp) each one with 4 round robins and the random values for every different sampler based on the script have to be the same...

        Nononono :)

        Use multimic samplemaps for mic positions, then you don't need to sync the RR groups with the script.

        DimitrisSPD 1 Reply Last reply Reply Quote 1
        • DimitrisSPD
          DimitrisSP @Christoph Hart
          last edited by DimitrisSP

          @Christoph-Hart said in Round Robin Crashes Hise Plugin:

          Nononono
          Use multimic samplemaps for mic positions, then you don't need to sync the RR groups with the script.

          To be fair i never worked with multimic samples...but the question is...can i have total control over my different mic positions using multimic samples?...I mean to create a secondary full featured mixer with volume faders, panners, solo, mutes, level meters etch...even outputs to route every mic position everywhere i want in the instrument or direct out to Daw?...This can be done with multiple instanses of samplers in a container each one for every different mic position...(let's say Kick Container, Snare Container, Hihat Container, Tom1 Container...etch).

          I know that this is probably overkill (I will need about 50 samplers for that) but i think it's the only way to achieve this...and it is not my imagination...i have done this already in Kontakt (there were a lot of difficulties in that senario but finally i managed to have that working)...and working some months with Hise i know that it will be accomplished even better unless Hise will not let me go so far (I mean performance, crashes, etc)

          Here is a small animation to show exactly what i mean and how far i have to go

          Mixer-Matrix
          Balkan Drummer Mixer-Matrix.gif

          The rest of the instrument
          Balkan Drummer.gif

          Maybe all these features are too much but i wanted to give it a try because for some reasons i don like Kontakt (Most users/customers prefer independent plugins and not Kontakt...and lately Kontakt became extremely Heavy so using so big instruments like Balkan Drummer(about 40 GB of samples plus a ton of features) is not an easy situation.

          Till now i am about at the half of the process of creating Balkan Drummer with Hise, it compiles very well without problems as a AU and VST plugin with 16 stereo outs and the mixer functionality and i can confirm that in Logic and Cubase if i load the same elements in my Hise instance and in my Kontakt instance Hise wins in performance comparison by far 💪

          1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart
            last edited by

            The entire multimic concept is done for this exact use case so I suggest you get familiar with how it works.

            1 Reply Last reply Reply Quote 1
            • d.healeyD
              d.healey
              last edited by

              Yes you can have all standard mic mixer stuff, I made a couple of videos about this

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              1 Reply Last reply Reply Quote 1
              • DimitrisSPD
                DimitrisSP
                last edited by

                Thanks a lot @Christoph-Hart and @d-healey for the suggestion!
                I will definitely check the multimic solution! 👍

                1 Reply Last reply Reply Quote 0
                • DimitrisSPD
                  DimitrisSP
                  last edited by

                  Finally problem solved with the Multimic method (A really great way to control different mic positions)...
                  Thumbs up @Christoph-Hart and @d-healey for the suggestion 👍

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post

                  45

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  102.1k

                  Posts