Audiobus: Use your music apps together.

What is Audiobus?Audiobus is an award-winning music app for iPhone and iPad which lets you use your other music apps together. Chain effects on your favourite synth, run the output of apps or Audio Units into an app like GarageBand or Loopy, or select a different audio interface output for each app. Route MIDI between apps — drive a synth from a MIDI sequencer, or add an arpeggiator to your MIDI keyboard — or sync with your external MIDI gear. And control your entire setup from a MIDI controller.

Download on the App Store

Audiobus is the app that makes the rest of your setup better.

Stuck notes - bad MIDI implementation ?

Hi,

I am facing a stuck notes issue with my external keyboard and certain apps.

Normally, when you press/lift up a key, the usual MIDI event pattern is : Note On - Note Off.

My external keyboard is an acoustic piano with an optical sensor rail.
In certain circumstances (when playing very slowly or deeply in the keybed), this can produce double Note On events. So the pattern becomes : Note On - Note On - Note Off.
In that situation, the sound doesn’t stop upon Note Off event and get stuck.
This happens in GarageBand and BeatHawk (UVI) but not in Korg module or Ravenscroft (which is also a UVI app).
So Korg Module handles nicely the double Note-On event whereas GarageBand or BeatHawk don’t.

  1. Who is wrong or right in this situation ? The optical sensor rail producing double Note-On ? Korg Module interpreting it correctly ? BeatHawk opening a 2-voice thread (the first beeing never ended) ?
  2. Is there a MIDI FX app allowing to convert « Note On - Note On - Note Off » pattern into « Note On - Note Off » pattern ?

Thank you !

Comments

  • @Paulo164 said:
    Hi,

    I am facing a stuck notes issue with my external keyboard and certain apps.

    Normally, when you press/lift up a key, the usual MIDI event pattern is : Note On - Note Off.

    My external keyboard is an acoustic piano with an optical sensor rail.
    In certain circumstances (when playing very slowly or deeply in the keybed), this can produce double Note On events. So the pattern becomes : Note On - Note On - Note Off.
    In that situation, the sound doesn’t stop upon Note Off event and get stuck.
    This happens in GarageBand and BeatHawk (UVI) but not in Korg module or Ravenscroft (which is also a UVI app).
    So Korg Module handles nicely the double Note-On event whereas GarageBand or BeatHawk don’t.

    1. Who is wrong or right in this situation ? The optical sensor rail producing double Note-On ? Korg Module interpreting it correctly ? BeatHawk opening a 2-voice thread (the first beeing never ended) ?
    2. Is there a MIDI FX app allowing to convert « Note On - Note On - Note Off » pattern into « Note On - Note Off » pattern ?

    Thank you !

    Does your keyboard have ,'Local on'?
    You maybe getting double notes because it's playing
    the internal sounds as well as sending midi out.

  • Multiple same ‘note on’ events should cancel each other , but still it’s rare ,usually from scenarios like this ,so not all apps can handle it.
    There is @blueveek ’s suite called ‘Midi Tools’ where there is a utility ‘De-Ghost’ , but that’s for double triggering
    Note on , off and same Note on ,off , so I don’t know if it will work in your case .

  • @Korakios said:
    Multiple same ‘note on’ events should cancel each other , but still it’s rare ,usually from scenarios like this ,so not all apps can handle it.
    There is @blueveek ’s suite called ‘Midi Tools’ where there is a utility ‘De-Ghost’ , but that’s for double triggering
    Note on , off and same Note on ,off , so I don’t know if it will work in your case .

    Correct. If the app produces a hanging note after e.g. C3 note on, C3 note on, C3 note off then it doesn't comply to the MIDI standard.

  • @Gravitas said:

    Does your keyboard have ,'Local on'?
    You maybe getting double notes because it's playing
    the internal sounds as well as sending midi out.

    Thanks.
    No, the double note on is created while your are near the keybed. As for triple sensors, when you depress the key and stay between the last 2 sensors and try repeating the note, you may produce as many Note On as you want, the Note off will then be triggered only when lifting up the key to the 1st sensor.
    At least, this is something I can do with my keyboard...

  • @rs2000 said:
    Correct. If the app produces a hanging note after e.g. C3 note on, C3 note on, C3 note off then it doesn't comply to the MIDI standard.

    Ok, so I am legitimate to write to UVI’s support and ask if they can implement MIDI events the right way 😉
    For GarageBand/Apple, I think it’s a battle lost in advance 😏
    Thank you.

  • edited October 17

    @Paulo164 said:

    @rs2000 said:
    Correct. If the app produces a hanging note after e.g. C3 note on, C3 note on, C3 note off then it doesn't comply to the MIDI standard.

    Ok, so I am legitimate to write to UVI’s support and ask if they can implement MIDI events the right way 😉
    For GarageBand/Apple, I think it’s a battle lost in advance 😏
    Thank you.

    It's definitely worth reporting. Even if Apple won't respond, chances are it's going to be fixed in GB released with iOS 17 o:)

  • I'd recommend logging what data your optical sensor rail is sending using a MIDI monitor (MIDI Ox), then email that information to the app developers.

    i.e. - Note Off or Note On with Velocity=0? What other data is being sent?

    I'm not familiar with those acoustic piano MIDI bars, so it would be interesting to see what data it sends.

  • @Paulo164 said:

    @Gravitas said:

    Does your keyboard have ,'Local on'?
    You maybe getting double notes because it's playing
    the internal sounds as well as sending midi out.

    Thanks.
    No, the double note on is created while your are near the keybed. As for triple sensors, when you depress the key and stay between the last 2 sensors and try repeating the note, you may produce as many Note On as you want, the Note off will then be triggered only when lifting up the key to the 1st sensor.
    At least, this is something I can do with my keyboard...

    Just to clarify, when you "try repeating the note", do you expect the note to sound again, without stopping the first note? Like on your piano, you can throw the hammer again without releasing the dampers? That could explain why the apps that work (Module, Ravenscroft) handle it because they are piano-orientated. The other apps are more synth-orientated and don't expect such behavior (multiple strikes) from a MIDI keyboard.

    I can imagine a StreamByter script that would count the Note Ons and convert a Note Off into as many as there were Note Ons. This could be a work-around for incompatible apps.

  • @Paulo164 said:

    Thanks.
    No, the double note on is created while your are near the keybed. As for triple sensors, when you depress the key and stay between the last 2 sensors and try repeating the note, you may produce as many Note On as you want, the Note off will then be triggered only when lifting up the key to the 1st sensor.
    At least, this is something I can do with my keyboard...

    I reread the original comment.

    I was viewing it as a normal keyboard not as
    an acoustic piano with an optical sensor rail.

    My apologies.

  • @Gravitas said:

    @Paulo164 said:

    Thanks.
    No, the double note on is created while your are near the keybed. As for triple sensors, when you depress the key and stay between the last 2 sensors and try repeating the note, you may produce as many Note On as you want, the Note off will then be triggered only when lifting up the key to the 1st sensor.
    At least, this is something I can do with my keyboard...

    I reread the original comment.

    I was viewing it as a normal keyboard not as
    an acoustic piano with an optical sensor rail.

    My apologies.

    No problem, I didn't answer at first because I knew you would probably correct your statement by yourself. What you did :smile:

  • @rs2000 said:

    @Paulo164 said:

    @rs2000 said:
    Correct. If the app produces a hanging note after e.g. C3 note on, C3 note on, C3 note off then it doesn't comply to the MIDI standard.

    Ok, so I am legitimate to write to UVI’s support and ask if they can implement MIDI events the right way 😉
    For GarageBand/Apple, I think it’s a battle lost in advance 😏
    Thank you.

    It's definitely worth reporting. Even if Apple won't respond, chances are it's going to be fixed in GB released with iOS 17 o:)

    I will first wait for UVI's answer. Just to make sure my claim is legitimate. I event don't know what support email I could use for Apple :D

  • @Sequencer1 said:
    I'd recommend logging what data your optical sensor rail is sending using a MIDI monitor (MIDI Ox), then email that information to the app developers.

    i.e. - Note Off or Note On with Velocity=0? What other data is being sent?

    I'm not familiar with those acoustic piano MIDI bars, so it would be interesting to see what data it sends.

    Yes, I will send the screenshot of MIDI Monitor to UVI's support.

  • In the meantime, a simple script could be written in Mozaic or Streambyter to ignore a duplicate Note On.

  • @uncledave said:

    @Paulo164 said:

    @Gravitas said:

    Does your keyboard have ,'Local on'?
    You maybe getting double notes because it's playing
    the internal sounds as well as sending midi out.

    Thanks.
    No, the double note on is created while your are near the keybed. As for triple sensors, when you depress the key and stay between the last 2 sensors and try repeating the note, you may produce as many Note On as you want, the Note off will then be triggered only when lifting up the key to the 1st sensor.
    At least, this is something I can do with my keyboard...

    Just to clarify, when you "try repeating the note", do you expect the note to sound again, without stopping the first note? Like on your piano, you can throw the hammer again without releasing the dampers? That could explain why the apps that work (Module, Ravenscroft) handle it because they are piano-orientated. The other apps are more synth-orientated and don't expect such behavior (multiple strikes) from a MIDI keyboard.

    I can imagine a StreamByter script that would count the Note Ons and convert a Note Off into as many as there were Note Ons. This could be a work-around for incompatible apps.

    Yes, you are perfectly right. Maybe it's on purpose for Korg Module or Ravenscroft as being piano oriented. I don't know to be honest...
    In fact, I don't even have to try to repeat quickly the note on intend (even if that may be what I want) to produce a double Note-On. This happens for example when you hold down a chord and, by moving very slowly your fingers, you barely notice that some of you fingers move up/down about 1/2 millimeters, which is enough to trigger the 2nd Note-on. And you know, on acoustic pianos you have felt just under the key, so that you can depress even further the key after striking the strings (like with an aftertouch keyboard). This could also trigger a second Note-on. Tricky...

  • @Paulo164 said:

    @uncledave said:

    @Paulo164 said:

    @Gravitas said:

    Does your keyboard have ,'Local on'?
    You maybe getting double notes because it's playing
    the internal sounds as well as sending midi out.

    Thanks.
    No, the double note on is created while your are near the keybed. As for triple sensors, when you depress the key and stay between the last 2 sensors and try repeating the note, you may produce as many Note On as you want, the Note off will then be triggered only when lifting up the key to the 1st sensor.
    At least, this is something I can do with my keyboard...

    Just to clarify, when you "try repeating the note", do you expect the note to sound again, without stopping the first note? Like on your piano, you can throw the hammer again without releasing the dampers? That could explain why the apps that work (Module, Ravenscroft) handle it because they are piano-orientated. The other apps are more synth-orientated and don't expect such behavior (multiple strikes) from a MIDI keyboard.

    I can imagine a StreamByter script that would count the Note Ons and convert a Note Off into as many as there were Note Ons. This could be a work-around for incompatible apps.

    Yes, you are perfectly right. Maybe it's on purpose for Korg Module or Ravenscroft as being piano oriented. I don't know to be honest...
    In fact, I don't even have to try to repeat quickly the note on intend (even if that may be what I want) to produce a double Note-On. This happens for example when you hold down a chord and, by moving very slowly your fingers, you barely notice that some of you fingers move up/down about 1/2 millimeters, which is enough to trigger the 2nd Note-on. And you know, on acoustic pianos you have felt just under the key, so that you can depress even further the key after striking the strings (like with an aftertouch keyboard). This could also trigger a second Note-on. Tricky...

    This would rather be done by evaluating release velocity and every single note on message followed by a single note off. You would still be able to play these very slight variations. It's just a matter of how the software evaluates it and how you design your velocity response curve so these tiny differences are still caught.

    i have to admit that I've taken a shortcut when I said that double note on followed by a single note off should never produce hanging notes. Sure, the MIDI standard allows for triggering the same note multiple times and eat up available voices to do that but in practice it just causes more problems than it would be useful so I would highly recommend to reserve only one sound generator voice to the same MIDI note, no matter how many note on messages are received, until a note off message is received. Re-trigger the same note: Yes. Eating up polyphony by duplicate note ons: No.

  • Did your piano bar come with computer software? Or a converter box?
    Possibly increase the input sensitivity threshold, time between note-on events, or another parameter.

    Adjustments to its physical installation might be required, similar to what is required when mounting a pitch-to-MIDI converter on a guitar.

    Good luck.

  • @rs2000 said:

    @Paulo164 said:

    @uncledave said:

    @Paulo164 said:

    @Gravitas said:

    Does your keyboard have ,'Local on'?
    You maybe getting double notes because it's playing
    the internal sounds as well as sending midi out.

    Thanks.
    No, the double note on is created while your are near the keybed. As for triple sensors, when you depress the key and stay between the last 2 sensors and try repeating the note, you may produce as many Note On as you want, the Note off will then be triggered only when lifting up the key to the 1st sensor.
    At least, this is something I can do with my keyboard...

    Just to clarify, when you "try repeating the note", do you expect the note to sound again, without stopping the first note? Like on your piano, you can throw the hammer again without releasing the dampers? That could explain why the apps that work (Module, Ravenscroft) handle it because they are piano-orientated. The other apps are more synth-orientated and don't expect such behavior (multiple strikes) from a MIDI keyboard.

    I can imagine a StreamByter script that would count the Note Ons and convert a Note Off into as many as there were Note Ons. This could be a work-around for incompatible apps.

    Yes, you are perfectly right. Maybe it's on purpose for Korg Module or Ravenscroft as being piano oriented. I don't know to be honest...
    In fact, I don't even have to try to repeat quickly the note on intend (even if that may be what I want) to produce a double Note-On. This happens for example when you hold down a chord and, by moving very slowly your fingers, you barely notice that some of you fingers move up/down about 1/2 millimeters, which is enough to trigger the 2nd Note-on. And you know, on acoustic pianos you have felt just under the key, so that you can depress even further the key after striking the strings (like with an aftertouch keyboard). This could also trigger a second Note-on. Tricky...

    This would rather be done by evaluating release velocity and every single note on message followed by a single note off. You would still be able to play these very slight variations. It's just a matter of how the software evaluates it and how you design your velocity response curve so these tiny differences are still caught.

    i have to admit that I've taken a shortcut when I said that double note on followed by a single note off should never produce hanging notes. Sure, the MIDI standard allows for triggering the same note multiple times and eat up available voices to do that but in practice it just causes more problems than it would be useful so I would highly recommend to reserve only one sound generator voice to the same MIDI note, no matter how many note on messages are received, until a note off message is received. Re-trigger the same note: Yes. Eating up polyphony by duplicate note ons: No.

    Yes, totally agree with you. Maybe that instanciating several voices per Note-on event can be useful for sound engine à la Pianoteq which would allow to stack/accumulate the string vibrations on each hammer stroke prior to Note-off event. But even in this case, the first encountered Note-off should silence all previous Note-on voices to make sens.
    In the case of Beathawk, it seems that the first Note-off only silence the last Note-on (not all the previous ones) and I still think it is a wrong MIDI implementation because I can't see a use case where this could be viable.

  • @Sequencer1 said:
    Did your piano bar come with computer software? Or a converter box?
    Possibly increase the input sensitivity threshold, time between note-on events, or another parameter.

    Adjustments to its physical installation might be required, similar to what is required when mounting a pitch-to-MIDI converter on a guitar.

    Good luck.

    Yes, I have a small app to calibrate and adjust the sensors. But I already optimized the system in order to have the best experience with the factory sound box. I prefer not to change these settings, otherwise it could has other side effects.

  • @espiegel123 said:
    In the meantime, a simple script could be written in Mozaic or Streambyter to ignore a duplicate Note On.

    Indeed ! Instead of trying to change the world, a simple MIDI script would be the best workaround :smile:
    I see Streambyter is free so I am going to give it a try !

  • edited October 18

    @Paulo164 said:

    @espiegel123 said:
    In the meantime, a simple script could be written in Mozaic or Streambyter to ignore a duplicate Note On.

    Indeed ! Instead of trying to change the world, a simple MIDI script would be the best workaround :smile:
    I see Streambyter is free so I am going to give it a try !

    I assume you know some programming, or you wouldn't sound so keen to jump in. StreamByter syntax is a bit idiosyncratic, so RTFM is strongly advised. But I can offer a couple of hints:

    • You could use array J to store counts for each note, say positions J0 to J4F.
    • In a note on/off message, the note number is in M1.
    • You can index the array position for the note as JM1.
    • You can BLOCK the extra note ons, and let the rest slide on through.

    The rest you can probably figure out yourself. Have fun!

  • @uncledave said:

    @Paulo164 said:

    @espiegel123 said:
    In the meantime, a simple script could be written in Mozaic or Streambyter to ignore a duplicate Note On.

    Indeed ! Instead of trying to change the world, a simple MIDI script would be the best workaround :smile:
    I see Streambyter is free so I am going to give it a try !

    I assume you know some programming, or you wouldn't sound so keen to jump in. StreamByter syntax is a bit idiosyncratic, so RTFM is strongly advised. But I can offer a couple of hints:

    • You could use array J to store counts for each note, say positions J0 to J4F.
    • In a note on/off message, the note number is in M1.
    • You can index the array position for the note as JM1.
    • You can BLOCK the extra note ons, and let the rest slide on through.

    The rest you can probably figure out yourself. Have fun!

    Thanks for this quick starting guide :-) Yes, I know programming in several languages (not in audio/midi area, though). Let's hope I will figure out quickly how this one works. At least there is a manual !

  • @Paulo164 said:

    @uncledave said:

    @Paulo164 said:

    @espiegel123 said:
    In the meantime, a simple script could be written in Mozaic or Streambyter to ignore a duplicate Note On.

    Indeed ! Instead of trying to change the world, a simple MIDI script would be the best workaround :smile:
    I see Streambyter is free so I am going to give it a try !

    I assume you know some programming, or you wouldn't sound so keen to jump in. StreamByter syntax is a bit idiosyncratic, so RTFM is strongly advised. But I can offer a couple of hints:

    • You could use array J to store counts for each note, say positions J0 to J4F.
    • In a note on/off message, the note number is in M1.
    • You can index the array position for the note as JM1.
    • You can BLOCK the extra note ons, and let the rest slide on through.

    The rest you can probably figure out yourself. Have fun!

    Thanks for this quick starting guide :-) Yes, I know programming in several languages (not in audio/midi area, though). Let's hope I will figure out quickly how this one works. At least there is a manual !

    For a task like this StreamByter isn't too hard -- but it is a register-based language -- so programming is a little bit like programming in Assembly. Mozaic is a bit easier to learn for some folks.

    In Streambyter, the pseudocode would be something like:

    • initialize UnmatchedNotesArray
    • when a note on event comes in, check to see if there is already an entry for this note
    • if there is a match, block this note [and exit]
    • if there isn't an entry for this note, set UnmatchedNotesArray[this note's number] to 1 [and exit]
    • when a note off event come in, set UnmatchedNotesArray[this note's number] to 0 [and exit]

    Streambyter's basic setup is that whenever a MIDI event comes in, Streambyter runs and you match the incoming event and process it. It is also setup so that you can set up some code that runs only once when the script if first loaded.

    There is also a good forum for SteamByter. It would not surprise me, if someone has already written a script that does just what you want already.

  • @espiegel123 said:

    @Paulo164 said:

    @uncledave said:

    @Paulo164 said:

    @espiegel123 said:
    In the meantime, a simple script could be written in Mozaic or Streambyter to ignore a duplicate Note On.

    Indeed ! Instead of trying to change the world, a simple MIDI script would be the best workaround :smile:
    I see Streambyter is free so I am going to give it a try !

    I assume you know some programming, or you wouldn't sound so keen to jump in. StreamByter syntax is a bit idiosyncratic, so RTFM is strongly advised. But I can offer a couple of hints:

    • You could use array J to store counts for each note, say positions J0 to J4F.
    • In a note on/off message, the note number is in M1.
    • You can index the array position for the note as JM1.
    • You can BLOCK the extra note ons, and let the rest slide on through.

    The rest you can probably figure out yourself. Have fun!

    Thanks for this quick starting guide :-) Yes, I know programming in several languages (not in audio/midi area, though). Let's hope I will figure out quickly how this one works. At least there is a manual !

    For a task like this StreamByter isn't too hard -- but it is a register-based language -- so programming is a little bit like programming in Assembly. Mozaic is a bit easier to learn for some folks.

    In Streambyter, the pseudocode would be something like:

    • initialize UnmatchedNotesArray
    • when a note on event comes in, check to see if there is already an entry for this note
    • if there is a match, block this note [and exit]
    • if there isn't an entry for this note, set UnmatchedNotesArray[this note's number] to 1 [and exit]
    • when a note off event come in, set UnmatchedNotesArray[this note's number] to 0 [and exit]

    Streambyter's basic setup is that whenever a MIDI event comes in, Streambyter runs and you match the incoming event and process it. It is also setup so that you can set up some code that runs only once when the script if first loaded.

    There is also a good forum for SteamByter. It would not surprise me, if someone has already written a script that does just what you want already.

    Nor a programmer but your idea sounds great,will after wait til someone designs one, since hooked notes happens all too often.

  • For Mozaic, several of my scripts do Double Note removal - one of the smaller (less destraction from other features) scripts is for instance my Fail-Safe script

    The Fail-Safe script suppresses the second NoteOn in a „NoteOn,NoteOn,NoteOff“ sequence. Another approach would be to add a NoteOff just before the second NoteOn and to minimally delay the NoteOn to archieve a re-trigger.

  • If scripting fails ,I’m willing to make a patch in puredata and load it via PdParty :)

Sign In or Register to comment.