HISE Logo Forum
    • Categories
    • Register
    • Login

    Sample not triggered if MIDI overlaps

    Scheduled Pinned Locked Moved Bug Reports
    76 Posts 6 Posters 8.0k 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.
    • Dan KorneffD
      Dan Korneff
      last edited by

      @Dominik-Mayer The embedded youtube video feature is awesome!

      Dan Korneff - Producer / Mixer / Audio Nerd

      1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff
        last edited by

        Maybe I could use a Timer to send a noteOff command directly after a noteOn is received?
        What would that look like? Is there an example that shows how the timer works?

        Dan Korneff - Producer / Mixer / Audio Nerd

        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Dan Korneff
          last edited by

          @dustbro That might work but it doesn't solve the problem. This is a very strange issue. It would be good if someone else could recreate it.

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

          Dan KorneffD 1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff @d.healey
            last edited by Dan Korneff

            @d-healey From what I've read on the JUCE forums, this behavior may be by design. Apparently, playing a 2nd note without first receiving a noteOff would result in a midi note stuck on.
            I believe that the first noteOff message isn't received when it gets overlapped by the next note.
            For instance:
            Note on = play 1st sample
            Note on = play 2nd sample
            note off = stop 1st sample
            2nd sample is now stuck on.

            Dan Korneff - Producer / Mixer / Audio Nerd

            1 Reply Last reply Reply Quote 0
            • Dan KorneffD
              Dan Korneff
              last edited by

              I've had a couple beta testers say the instrument would cut out randomly (I guess similar to the video I posted above where the samples get cut off). I'm wondering if this is a result of note on/off messages getting outta whack by overlapping notes?

              Dan Korneff - Producer / Mixer / Audio Nerd

              1 Reply Last reply Reply Quote 0
              • Dan KorneffD
                Dan Korneff
                last edited by

                @Christoph-Hart @d-healey Are there any documents that explain how the Timer works?
                I've been looking at some scripts on the forum, but can't quite wrap my head around it.
                I'd like to experiment with using the noteOn to trigger a noteOff command at a timed interval (maybe 40ms) to see if it stops the issue I'm having.

                Here's what I've been tinkering with, but it's just not working:

                
                const var storeNoteNumber = -1;
                
                inline function AutoNoteOff()
                {
                
                    Synth.startTimer(40);
                };
                
                function onNoteOn()
                {
                    storeNoteNumber = Message.getNoteNumber();
                    
                    AutoNoteOff();
                }
                function onNoteOff()
                {
                    if(Message.getNoteNumber() == storeNoteNumber)
                    {
                        Synth.stopTimer();
                        storeNoteNumber = -1;
                    }
                }
                function onController()
                {
                    
                }
                function onTimer()
                {
                    
                    if(storeNoteNumber != -1)
                    {
                        Synth.noteOff(storeNoteNumber);
                	storeNoteNumber = -1;
                    }
                    else
                    {
                        Synth.stopTimer();
                    }
                }
                
                function onControl(number, value)
                {
                    
                }
                

                Dan Korneff - Producer / Mixer / Audio Nerd

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

                  1. You can‘t change a const var defined number. Use reg instead.
                  2. the startTimer argument is in seconds - this is highly inconsistent with the UI timers which are controlled in milliseconds, but I can‘t change it for backwards compatibility reasons. Use 0.04.
                  Dan KorneffD 1 Reply Last reply Reply Quote 0
                  • Dan KorneffD
                    Dan Korneff @Christoph Hart
                    last edited by

                    @Christoph-Hart

                    Synth.noteOff(storeNoteNumber);
                    

                    This line is giving me an error.
                    Illegal operation in audio thread: String creation

                    Dan Korneff - Producer / Mixer / Audio Nerd

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Dan Korneff
                      last edited by

                      @dustbro said in Sample not triggered if MIDI overlaps:

                      This line is giving me an error.
                      Illegal operation in audio thread: String creation

                      That error message usual means you have a typo in a variable name

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

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

                        Not sure what went wrong here (probably something trivial), but use the event ID obtained by Message.getEventId() and the Synth.noteOffByEventId() method which is far more reliable.

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

                          BTW, a hint about the issue would be just adding Console.print(Message.getNoteNumber()); into the onNoteOn callback to see whether the second overlapping MIDI event reaches the scripting engine or if the problem lies before this (either the DAW itself or the way how HISE processes and prepares these messages).

                          Dan KorneffD 1 Reply Last reply Reply Quote 0
                          • Dan KorneffD
                            Dan Korneff @Christoph Hart
                            last edited by

                            @Christoph-Hart @d-healey Illegal operation in audio thread is being caused by the timer interval.
                            When Synth.startTimer(); is set to anything less than 1, I get the error.

                            Dan Korneff - Producer / Mixer / Audio Nerd

                            1 Reply Last reply Reply Quote 0
                            • Dan KorneffD
                              Dan Korneff @Christoph Hart
                              last edited by

                              @Christoph-Hart said in Sample not triggered if MIDI overlaps:

                              Console.print(Message.getNoteNumber());

                              hmm,.... that sounds way too logical. :grinning_cat_face_with_smiling_eyes:
                              Great idea! the overlapping midi note doesn't make it to the scripting engine. :(

                              Dan Korneff - Producer / Mixer / Audio Nerd

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

                                And you can confirm that this is not a problem with other plugins?

                                Can you test what happens if you overlap notes with different MIDI channels?

                                Dan KorneffD 2 Replies Last reply Reply Quote 0
                                • Dan KorneffD
                                  Dan Korneff @Christoph Hart
                                  last edited by

                                  @Christoph-Hart This is for a drum sampler. I can confirm that overlapping notes do trigger samples in SSD, Superior Drummer, Addictive drums, and Groove Agent.

                                  Dan Korneff - Producer / Mixer / Audio Nerd

                                  1 Reply Last reply Reply Quote 0
                                  • Dan KorneffD
                                    Dan Korneff @Christoph Hart
                                    last edited by

                                    @Christoph-Hart said in Sample not triggered if MIDI overlaps:

                                    Can you test what happens if you overlap notes with different MIDI channels?

                                    Ok... changing the midi channel for an overlapped note will trigger the sampler.

                                    Dan Korneff - Producer / Mixer / Audio Nerd

                                    1 Reply Last reply Reply Quote 0
                                    • Dan KorneffD
                                      Dan Korneff
                                      last edited by

                                      so what does this mean??

                                      Dan Korneff - Producer / Mixer / Audio Nerd

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

                                        HISE processes incoming MIDI messages and creates the event IDs, I suspect there is something fishy going on in this logic.

                                        So just to make sure we use the same conditions:

                                        • HISE 2.0.0 (the app, not compiled plugins). Also is this behaviour new (=> is it not occurring with HISE 1.6.0 or earlier?)
                                        • any DAW / OS
                                        • happens with the minimal example here:
                                        HiseSnippet 743.3oc6W0saSCCE1osFXhsNPBw04E.oF13m6V+eah0QUSY.WMYbNq0hD6PhSgdKOY7HvixdC.6jrkDsntlKXrIHWkym8I4yemexIiCDTHLTDfL1X5Re.YrI1dIWNu2bBiiNrOxnIdDITBAlIPcW5SBCAGjgQ880.Faz.Eec9dcItDNExfPnSDLJbDyiIyPG29MLW2gDGXJyK2t2s8gTAumvUDo3ScbKjOg9YxL3Xhda0vHi6MvgIEA1RhDBQFM5JbVZOW7Udx9OgEx9jKnMrP1pGTB7Pgqilw56Q8lybcFew4NDgLviyTg5IpvSviXNrKwyTiGEufYlG40CiZqhdV4oWqRomUIzCkicMRXmhDBmHWhrHyzgizEXhhQpC4RfGxjKyGt9qR2GiGyjz4ky2ZkvWUf5OMeSC9agGb1Y.UlQ1F3ge3lMR2LgJODay3PbEYLQdZrs46IK.y8ANDnEUqUTT9y0snzesKJeKUpd8SCH7PeQXgGrM3wlJ3ZEIC7cgvv.3KSzQ4738DjfRW578FpNjk5iMQFEDmtzwSDwkEROpu1wj7MGJV0ja+kzonw+6TTEo8Z56Zjiuamv26i6bPe6IocHhu2b.eA3J7gho4iDbg+bAmQymCLAjArYyff7ruziTGoT8wkdQAKJjA2GnjkWAMYyWE4HPQs7vGnNwY16zN9wcIPqu21NJTVn.8i+XB3BjvBkbCnBU3AVUHn95EBtlO2spzjsvIGRy3FB2t+ZRyK3ZRD41MY2DGmVbWPW2FmlvdmPXahSqktKHsqb.n5+aN.zDQjjwmMhn5h+MUmpii7rUycPAES3bvU8hvF0zyNjX2RamL3A2I13WpqzEsz1FoKZcwh2HuCOBMPbpZtIYfvU2y8AwHpyMO9WY1P8OUJaSKzBhaTpJ4oFW3TJUK1OSoNk6wyqrG6TYO1sxd7hJ6wKqrGupxd75U3gd1rNQRgWRomBX7f9DIQkaOfSTYtwY4neCPOMjSO
                                        

                                        It's weird that I can't replicate this because this is nothing that is depending on the DAW or OS.

                                        Dan KorneffD 2 Replies Last reply Reply Quote 1
                                        • Dan KorneffD
                                          Dan Korneff @Christoph Hart
                                          last edited by

                                          @Christoph-Hart I've been experiencing the audio dropout effects for about a year now. I assume it's related and has been happening on all versions.
                                          What's the easiest way to download pre 1.6 to test?
                                          I'm goin to check the 2.0 app on all the Mac + PC combinations I have available here now.

                                          Dan Korneff - Producer / Mixer / Audio Nerd

                                          1 Reply Last reply Reply Quote 0
                                          • Dan KorneffD
                                            Dan Korneff
                                            last edited by

                                            Overlapping example confirmed not working on:

                                            macOS 10.13.6
                                            Reaper 5.961
                                            HISE 2.0 AU crashes GarageBand on load

                                            windows 10
                                            Reaper 5.961
                                            Cubase 9.5.41

                                            Dan Korneff - Producer / Mixer / Audio Nerd

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

                                            17

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.6k

                                            Posts