Author Topic: [fixed in v0.102] Hanging notes...pfm3  (Read 7566 times)

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
[fixed in v0.102] Hanging notes...pfm3
« on: December 24, 2020, 11:34:45 AM »
Xavier, I have quite a lot of hanging notes on my preenfm3 with my midi bass controller. I know it sends a lot of midi data (down the usb port, it acts as a host) but it works reliably with a waldorf pulse 2, a blofeld, a moog Minitaur and all axoloti stuffi built. Would you consider looking at the midi code in axoloti for example? It is open source built on a "similar" hardware and as I said rock solid.
« Last Edit: January 10, 2021, 04:37:38 PM by Xavier »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: Hanging notes...pfm3
« Reply #1 on: December 24, 2020, 01:33:28 PM »
Out of curiosity, what is your midi bass control that acts as a USB host ?

Do you also have hanging notes if you do the same thing through Din5 ?
Would be great if you can save to a midi file the reproduces the problem. (Or an pure data patch ;) ?)

« Last Edit: December 24, 2020, 05:11:31 PM by Xavier »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: Hanging notes...pfm3
« Reply #2 on: December 24, 2020, 06:56:23 PM »
Hanging Notes to my experience are more often a voice allocation problem in the sound engine than a midi driver problem.
And they are always complicated to catch.

But i just found and fix one hanging note problem thanks to this  PureData patch that floods midi with notes and control change :)
I used the one you sent me as a template  :)
(I will share it soon).

But i cannot say your problem is the same.
« Last Edit: December 24, 2020, 06:58:12 PM by Xavier »

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #3 on: December 24, 2020, 09:47:02 PM »
Will try asap. This brings me to the next question, what are the steps to compile  the firmware on Linux? So I can test stuff quicker, once it's up on GitHub :)

I think I once sent you a PD test patch for hanging notes on the pfm2

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #4 on: December 24, 2020, 09:53:48 PM »
One thing I observed:

On every other synth I use, if I ever get a hanging note, hitting it again will unstuck it, since the note off will reset that note, no matter how many ons came in before. On pfm3 this does not work. I think most synths use an array of bools [128] in size and every midi note gets a 1 or 0 depending if there was a note on or off at that pitch... Don't know if that makes sense in the pfm3 case, will look a the code later :)

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #5 on: December 25, 2020, 01:40:29 AM »
Out of curiosity, what is your midi bass control that acts as a USB host ?

Do you also have hanging notes if you do the same thing through Din5 ?
Would be great if you can save to a midi file the reproduces the problem. (Or an pure data patch ;) ?)

it is a bass midi controller made from a teensy 3.6 board that acts as a usb-host. it has a 8-port hub connected as a floor unit where i can connect synths to it.

will try with din5 and report back.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: Hanging notes...pfm3
« Reply #6 on: December 25, 2020, 09:49:32 PM »
On every other synth I use, if I ever get a hanging note, hitting it again will unstuck it

That's exactly what it should do with the preenfm.
I just fixed a bug because of which a midi note that is in some situation stored as 255. So when new note are played [0:127] it does not see it's the same note, and the note is not terminated.

It was occuring only with super short notes. So not sure how often it can occur in real situation. But my PureData patch triggered this bug. The pfm2 has the same bug BTW :/

Can you try this firmware 0.101z ?
https://drive.google.com/file/d/1G8al0cANieZdNVr_cxoeevwUjQX-x3Ny/view?usp=sharing

Let me know,
Thanks a lot,

« Last Edit: December 25, 2020, 10:28:33 PM by Xavier »

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #7 on: December 26, 2020, 12:40:00 AM »
well well...

this fixes my hanging notes! and it makes sense, since when i slide on my "bass" a lot of short notes get sent after each other (which i slur with a little glide on overlapping notes)

there is a slight problem now when i play in mono or unison mode.

if i play fast lines with rather short notes some don't get played.


lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #8 on: December 26, 2020, 10:36:14 AM »
Do you have a sort of buffer for the last played notes in mono and unison mode?

I have to check again later, but maybe that is the issue in mono playing.

What i mean:

If I press more then one note in mono mode, the latest (or highest, some synths have an option for that) will sound. If I release one key, the pitch should jump back to the one key that is still held, even if there is no new note on command...

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: Hanging notes...pfm3
« Reply #9 on: December 26, 2020, 11:12:58 AM »
Do you have a sort of buffer for the last played notes in mono and unison mode?

I have to check again later, but maybe that is the issue in mono playing.

What i mean:

If I press more then one note in mono mode, the latest (or highest, some synths have an option for that) will sound. If I release one key, the pitch should jump back to the one key that is still held, even if there is no new note on command...

In Mono and Unison you have some options in the second Engine page.

So the answer depends on the "Glide" parameter.
If glide is "Overlap" or "Always", while at least one note is pressed, the sound glides. The base note is the still the same until it's released, then the base note become the latest pressed key (the one it was gliding to). So, no, it doesn't have a buffer of ALL pressed keys, only the base note and the note it glides to.
If glide is "Off", no buffer. It just plays the new note it receives.

So if the sound does not come back to the note that is still pressed, i assume you have "glide" to "Off". no ?

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #10 on: December 26, 2020, 11:34:08 AM »
Could well be! I just browsed assume presets, while trying to make hanging notes :) will check again. Interesting approach, with the glide enabling held and released keys. Does it also prevent the adsr from firing on every new note? So just fire the adsr on non overlapping notes?

Will report back.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: Hanging notes...pfm3
« Reply #11 on: December 26, 2020, 11:36:51 AM »
Could well be! I just browsed assume presets, while trying to make hanging notes :) will check again. Interesting approach, with the glide enabling held and released keys. Does it also prevent the adsr from firing on every new note? So just fire the adsr on non overlapping notes?

While it's gliding, it does not re-trigger the env on new note, it's a smooth frequency glide :).
All Envs stay in the "Sustain" (ADSR) state.

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #12 on: December 26, 2020, 11:49:15 AM »
Out of curiosity, what happens if I held down more then two keys in mono mode?

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2257
    • View Profile
Re: Hanging notes...pfm3
« Reply #13 on: December 26, 2020, 12:24:29 PM »
Out of curiosity, what happens if I held down more then two keys in mono mode?

Keep in mind that only 2 notes are in memory. The Base note, and the last note it was gliding to.

So here is how it works :

1 . The first key your press is the based note (A)
2 . Then you press and hold other notes (B, C, D). It will glide to B, then C then D. The base note will remain A untill it's released.

From this point A,B,C,D are hold down but B and C are not in memory anymore, so B and C don't have any impact on future actions:

3.1.    If you release D,  it will glide back to A .
3.2.    If you release A, the base note will become D. So D will become the return note of future notes until it's releaed.
3.3.    If you release A and D the sound stop (although B & D are still pressed).

3.3 is not ideal, but it's a corner case to my opinion.
« Last Edit: December 26, 2020, 12:28:32 PM by Xavier »

lokki

  • Sr. Member
  • ****
  • Posts: 383
    • View Profile
Re: Hanging notes...pfm3
« Reply #14 on: December 26, 2020, 04:20:18 PM »
Thanks for the clear explanation.
I played a little with the synth, I never got a hanging note!
This is a great improvement, thanks!

As for the mono handling of multiple notes, is there a reason it depends on glide?

You could turn on all of this simply if a patch is set to mono independently of glide, no?

I still get some missing notes and I guess it happens, when more then two notes are on. Would you consider a buffer for mono handling? It could contain maybe the last 5 notes...