HISE Logo Forum
    • Categories
    • Register
    • Login

    Sample not triggered if MIDI overlaps

    Scheduled Pinned Locked Moved Bug Reports
    76 Posts 6 Posters 7.8k 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 @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.

      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.

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

          so what does this mean??

          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.

              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

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

                  Hey guys. I need a little help writing a script to get around this issue.
                  I'm trying to send a noteOff command directly after a noteOn is triggered.

                  Here's what I'm doing:

                  function onNoteOn()
                  {
                  	noteID = Message.getEventId();
                  	Synth.noteOffByEventId(noteID);
                  }
                  

                  In the console I'm getting an error:

                  Script Processor1:! onNoteOn() - Line 3, column 31: Illegal operation in audio thread: String creation 
                  

                  ¯_(ツ)_/¯

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

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • Dan KorneffD
                      Dan Korneff @Christoph Hart
                      last edited by Dominik Mayer

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

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

                      @Christoph-Hart This is correct.
                      I've made a more simple example that contains only:

                      function onNoteOn()
                      {
                          Console.print("on");
                      }
                      

                      and using this midi file with an overlapping note:
                      midi tes.MID

                      If you overlap midi events of the same note and same channel, the 2nd noteOn command doesn't even make it into the Main Container.
                      If you look at this example, the midi event contains 4 midi notes, but only 3 make it into HISE.

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

                        Chatted with some code slingers the other day who pointed me to here:
                        Screen Shot 2019-01-17 at 5.45.39 AM.png

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

                          The synthesiser class in JUCE is only partly relevant, I think the culprit is the way I am generating event IDs from the MIDI input. The problem is that there is no "correct" solution, as soon as MIDI notes with the same channel and note number overlap, things get into undefined territory.

                          Currently I have only a single slot per note number, the first way would be to change that to a FIFO queue, but there are performance implications that have to be evaluated against the edge case of people not using their piano roll correctly :)

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

                            I've just started going thru all of the JUCE tutorials. Very interesting stuff. Also thumbing thru the HISE code to learn how you're handling these situations. It's all over my head at the moment, but I'm interested to see the solution.

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

                            there are performance implications that have to be evaluated against the edge case of people not using their piano roll correctly

                            man... I think all of my beta testers are the "edge case". :face_with_tears_of_joy: They draw in midi for basic drum beats, then drop a midi note right on top of another note to create their flams. Every. Single. One.

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

                            as soon as MIDI notes with the same channel and note number overlap, things get into undefined territory.

                            I can definitely understand this issue. Once there is an overlap, how does the buffer determine which noteOn/noteOff belongs to which event ID.

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

                              how does the buffer determine which noteOn/noteOff belongs to which event ID.

                              Well, FIFO means First in First out, so the earlier note would automatically get the note off. The other model would be a LIFO (Last in, first out" stack), but I think the result would be super weird.

                              They draw in midi for basic drum beats, then drop a midi note right on top of another note to create their flams. Every. Single. One.

                              It will probably come down to a preprocessor definition that customizes this behaviour on a per project basis. This problem is more apparent on drum based projects, because you don't need your super VA style Saw synth to flam :)

                              R 1 Reply Last reply Reply Quote 1
                              • R
                                rzrsharpeprod @Christoph Hart
                                last edited by

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

                                how does the buffer determine which noteOn/noteOff belongs to which event ID.

                                Well, FIFO means First in First out, so the earlier note would automatically get the note off. The other model would be a LIFO (Last in, first out" stack), but I think the result would be super weird.

                                They draw in midi for basic drum beats, then drop a midi note right on top of another note to create their flams. Every. Single. One.

                                It will probably come down to a preprocessor definition that customizes this behaviour on a per project basis. This problem is more apparent on drum based projects, because you don't need your super VA style Saw synth to flam :)

                                I have just encountered this issue and have gone through this thread to try and find the solution but it seems it may still be unsolved?

                                I hadn't noticed it before as have just been playing notes in with my keyboard to test my plugin.
                                I dragged some MIDI files into the plugin inside FL studio last night and noticed the overlapping notes not playing.
                                The odd thing is that the overlapping notes play the first time around (usually) but once they have gone through their initial 8 bar loop and play the exact same notes again, the overlapping ones don't produce sound. That struck me as really odd as if you just play the 8 bars through once you would think it was working ok.

                                100% of the time if I shorten the notes so that they don't overlap anymore the issue goes away so it looks to be the overlapping that is causing the problem.

                                ustkU 1 Reply Last reply Reply Quote 1
                                • ustkU
                                  ustk @rzrsharpeprod
                                  last edited by

                                  @Christoph-Hart Might this be related to the double notes in the midi player issue happening only once per loop?
                                  https://forum.hise.audio/topic/7311/midi-player-transport-bugs-info-requests/21

                                  Can't help pressing F5 in the forum...

                                  R 1 Reply Last reply Reply Quote 0
                                  • R
                                    rzrsharpeprod @ustk
                                    last edited by

                                    I have now tested this with several different plugins - some with effects and some just a sampler and it happens every time so I don't really know how to get around the issue.

                                    @Christoph-Hart asked earlier if this is a problem with other plugins and I can confirm that I have tried the same MIDI file in addictive keys, several kontakt pianos and some other keys plugins and they all handle the MIDI fine playing all of the notes within the MIDI.
                                    I even tried one of my earlier Maize plugins and that plays fine as well. I tried that because I think I remember somebody saying that Maize uses the Juce framework as well but I could be wrong there?

                                    The issue is quite odd as isn't even consistently dropping the same notes each loop, but in summary:

                                    If I shorten the overlapping notes that 100% gets rid of the issue but obviously I can't ask a user not to have overlapping MIDI notes.

                                    If I don't shorten the overlapping notes, they cut out most of the time but the dropped notes sometimes play if I loop the 8 bar MIDI over & over.

                                    I have tried all of the retrigger modes and none of them solved the issue.

                                    If I set the playback to one shot it seems to get rid of the issue after some brief testing last night (I need to do more) but this changes the sound and gets 'muddy' quickly when multiple notes are played. I presume one shot mode plays the sample in it's entirety and doesn't factor in the MIDI note length as much/at all?
                                    If I play with the ADSR envelope I can get it sounding better but I am not sure this is the solution?

                                    As @Dan-Korneff mentioned in the original mention of this issue, it is literally the last thing stopping release of 2 projects now with a 3rd close to completion.
                                    Until this is resolved they can't be released as it isn't handling the MIDI correctly.

                                    Sorry for the long post, I just wanted to give as much detail about the issue & what I have tried so far

                                    Thanks in advance

                                    R 1 Reply Last reply Reply Quote 1
                                    • R
                                      rzrsharpeprod @rzrsharpeprod
                                      last edited by

                                      Sorry for replying to my own post, but after doing some further testing at the weekend I am still lost and it is making even less sense.

                                      In FL studio, if I use any plugin that I have built in HISE the notes are being dropped unless I stop them from overlapping.
                                      Just to clarify, I don't mean the same note overlapping, but other notes in the chord running into the next bar then stops a note at the start of that next bar from playing.

                                      If I use another plugin such as FL Keys, Addictive keys etc then the exact same MIDI plays fine without dropping notes. This is the same with plugins that I have built in Maize, they don't drop the notes either.
                                      This means that FL is capable of playing the notes, it just isn't for the HISE plugins for some reason.

                                      In Ableton Live, using my HISE built plugin and the same MIDI file, all of the notes play fine which is just bizarre.
                                      If the none HISE plugins also dropped the same notes in FL then I would think it was an FL issue/setting, but as the none HISE ones play fine in FL and it's only the HISE ones have that issue than I am thinking it must be a setting somewhere in the HISE build(s) but I have no idea what.

                                      @Christoph-Hart do you have any idea what may be causing this issue and how I might be able to get around it please?

                                      Thanks in advance

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

                                        @rzrsharpeprod Make a new HISE project, add a sinewave generator, export the plugin. Does this exhibit the same issue?

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

                                        R 1 Reply Last reply Reply Quote 0
                                        • R
                                          rzrsharpeprod @d.healey
                                          last edited by rzrsharpeprod

                                          @d-healey said in Sample not triggered if MIDI overlaps:

                                          @rzrsharpeprod Make a new HISE project, add a sinewave generator, export the plugin. Does this exhibit the same issue?

                                          I just tried this and it does drop the same notes even with just the sine wave generator.

                                          Interestingly I have also been playing with other plugins that I know are built on HISE such as Blaque guitar by NewNation. If I put the same MIDI in there in FL it plays all of the notes!! This means it is possible for HISE to play all of the notes in that MIDI so not sure why my plugins or the simple sine won't?

                                          One last thing that I have also just noticed. The plugin plays the first 4 bars fine, the first dropped note is at the start of the 6th bar. If I start the plugin playing at the 5th bar instead of the beginning, it plays everything and doesn't drop any notes.
                                          Could there be a build up of notes/voices so that a max limit is being reached and won't play or something like that? It is odd that it plays fine if you start there that's for sure.

                                          R 1 Reply Last reply Reply Quote 0
                                          • R
                                            rzrsharpeprod @rzrsharpeprod
                                            last edited by

                                            Hopefully this shows it better than I can explain it.

                                            1st instrument is one of mine. It drops the G# at start f 6th bar if I play from start
                                            If I play from start of 5th bar it plays the G# at the start of the 6th

                                            2nd instrument is just the sinewave generator

                                            3rd instrument is Blaque guitar which is built in HISE and this plays all of the notes

                                            gorangroovesG R 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            22

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.3k

                                            Posts