HISE Logo Forum
    • Categories
    • Register
    • Login

    Switching wavetable files causes crash when there is a pitch modulator present.

    Scheduled Pinned Locked Moved Solved Bug Reports
    11 Posts 5 Posters 569 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.
    • CyberGenC
      CyberGen
      last edited by CyberGen

      This one took my a while to track down but I think I finally found the culprit.
      Basically, if you have an active pitch modulator of any kind in the chain and you try to switch wavetable files (while sound is playing).... kaboom!

      I was hoping someone would please help me confirm it. I put together a snippet with everything you need to recreate it. You just need to provide a few of your own wavetables and use the comboBox to switch the wavetables while sound is playing. I am using an ahdsr envelope to modulate the pitch, but you can use any other modulator to try it out.
      wavetablecrash.gif

      HiseSnippet 2116.3oc6asEabbUFdFaOowacyEZRaHPfQqRk1HYsZWaW6DRS8D6ccra8lXx5llpBDFOyY28fmcNCybV6rDhTk3h5KEdEjPBdrhG.jJBId.hE8ghfVohhnHwSFp.0BuDgPhW.L+myLyNy3cy5k8hy1UYevxm+y+47+8c9ubtr1qXSzPNNDaAwQWspERPbLo7UMoklujJ1TXoLLAun5FHp5ZFHGg4pZo53fzEDEG9RLMDGcDA9m6M6bpFplZn.QBBWif0PKiKioARWQ44wFFKnpiVEWNj1SorjFwbdhAoBflgkRIXopstZQzkUYpMjjf3AxpioD67TUJfEwQlinWMeIxllt5eMrCFPIqQZg7vD4JdAhgNCwLoByWBanuhOqcDDDkVIXMXX20fiIkCqiqIOXs3H7NjCFQ30CwghBugi.uzggWpPvqAPRLDjFwERGUJulM1hFzCCOOpzRlTjcAUXYOLTb0UXnyNjz7DPCSZxxpqiVvFZTaDIlNUpwkmLUpyb9XwhAq8NT4MTsk2zIs7Ej4QAIKhnb3wakHNzUbl1gTltLF90KHm0rH1DwFPsvEVOIhp97jxqQlibSlE7QFyFjxVDSnQh30zfanZsR5ffNwTTYm3i6Y0jeIB1LQ7OmY7yvzEaZ.HPtPESMJl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kAC```
      ulrikU 1 Reply Last reply Reply Quote 0
      • ulrikU
        ulrik @CyberGen
        last edited by

        @CyberGen confirmed, it happens here too

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

        CyberGenC 1 Reply Last reply Reply Quote 1
        • CyberGenC
          CyberGen @ulrik
          last edited by

          @ulrik Thank you.

          CyberGenC 1 Reply Last reply Reply Quote 0
          • CyberGenC
            CyberGen @CyberGen
            last edited by CyberGen

            I've tried many different ways to bypass the issue to no avail. Including:

            1- Zeroing out the intensity of the pitch mod before the callback switch and recalling it after.
            2.- Bypassing the entire pitch modulator before the callback switch.
            3.- MidiMuting note before the switch.
            4.- allNotesOff(); before the switch.
            5.- Bypassing the Wavetable Synth before the switch
            6.- All of the above at the same time.

            The crash still happens every time.

            Please let me know if you think of another way to bypass this problem.

            A 1 Reply Last reply Reply Quote 0
            • A
              ally @CyberGen
              last edited by

              @CyberGen This also happens for me but only when the pitch mod is bidirectional. So if you can get away with unidirectional, I'd start there!

              CyberGenC 2 Replies Last reply Reply Quote 1
              • CyberGenC
                CyberGen @ally
                last edited by

                @ally good tip! I hadn't notice that. Thanks for sharing it.

                I don't think I can really get away with using only unidirectional pitch mods though. This is the biggest issue I have with my current project. Switching wavetables must happen without issue for it to really work.

                thank you.

                1 Reply Last reply Reply Quote 0
                • CyberGenC
                  CyberGen @ally
                  last edited by

                  @ally Did you try it with a unidirectional LFO? or pitch mods other than an envelope?
                  I can confirm that if you load a unipolar pitch envelope the crash does not happen. But it seems to be the exception. It is happening to me with other unipolar pitch mods like LFOs and even a simple constant modulator. It is also crashing sometimes when attempting to save the xml while sound is playing.

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    ally @CyberGen
                    last edited by

                    @CyberGen Oh geez, sorry I didn't see this! But I'm working on this again now... just tried a bunch of combinations and here are my findings. There are 3 situations:

                    1. With a unipolar LFO, unipolar constant, bipolar constant, unipolar AHDSR, or bipolar AHDSR (or any combination of these), I can change the wavetable as many times as I want while a voice is playing and it is not crashing. BUT the sound is not actually being swapped out for the currently playing voice. Only the voices that start after the switch use the new wavetable.

                    2. With a bipolar LFO, I can change the wavetable once and it DOES swap out the sound for the currently playing voice. If I keep that same voice going and change the wavetable a second time, it will crash. If I let the voice end before switching wavetables again, it does not crash.

                    3. If I have a bipolar LFO on at the same time as any of the other pitch mods I listed in Situation #1, I get the Situation #1 behavior.

                    Hopefully that gives @Christoph-Hart something to go off of for fixing this... I should also note I updated HISE since my last post in this thread, so that may be why I'm getting different results now. Might update again and see if anything's changed, but gonna try it in an exported plugin next.

                    A 1 Reply Last reply Reply Quote 1
                    • A
                      aaronventure @ally
                      last edited by

                      If you haven't already, make sure to post this in the github issues with a link to this thread so it can be tracked properly; unless Chris gets on top of this today, without being tracked the thread will get buried and the odds of this getting fixed go down.

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

                        Got on top of this today, the problem was that the wavetable loading happened synchronously without any voice handling logic and this created all kinds of weird issues (I guess I haven't used the wavetable synthesiser in this context in a real project).

                        The wavetable loading is now deferred to the sample loading thread so that it shows the exact behaviour as switching sample maps: it kills all voices, then loads the wavetable bank and then unsuspends the audio processing. This should get rid of all weird edge cases with voices playing while swapping the sound.

                        CyberGenC 1 Reply Last reply Reply Quote 6
                        • CyberGenC
                          CyberGen @Christoph Hart
                          last edited by

                          @Christoph-Hart Awesome! Thank you.

                          1 Reply Last reply Reply Quote 0
                          • CyberGenC CyberGen marked this topic as a question on
                          • CyberGenC CyberGen has marked this topic as solved on
                          • First post
                            Last post

                          17

                          Online

                          1.8k

                          Users

                          11.9k

                          Topics

                          103.8k

                          Posts