MIDI notes hanging

Post your groups/layouts here

MIDI notes hanging

Postby DaveDraper » Mon Jul 09, 2012 6:42 am

I've built myself a little sample player - not a looper, & I couldn't find an existing equivalent, so here is the most basic, stripped down version of what I've done:

SimplerSampler.bgrp
(226.6 KiB) Downloaded 61 times


Trouble is, some of the voices, some of the time, experience hanging MIDI notes. My little toy (portable!) keyboard is sending out note offs, the group is receiving them, but in some cases (well I've tracked down one so far!) the note extractor is not closing the gate on note off. Replace the note extractor (with a note extractor!) & the problem goes away - so far. Curious.

Any ideas why, O knowledgeable ones???

Dave Draper
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby seb@plogue » Mon Jul 09, 2012 10:18 am

If you could provide a MIDI file showing the problem that would help. It might be a bug but it would most likely be related to the timing of incoming events.
seb@plogue
Site Admin
 
Posts: 7883
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal

Re: MIDI notes hanging

Postby DaveDraper » Mon Jul 09, 2012 12:08 pm

Hi Seb

I'm inclined to think it's a timing issue - 16 voices, each 8-note polyphonic etc. Since I'm using this live (so no MIDI files involved normally), I'm not sure what relevance a MIDI file might have! It certainly looks like all the MIDI data is doing its job, just a glitch in the Note extractor.
I've been testing with the slightly more sophisticated version, & every time I get a MIDI hang situation I've dug into the group & replaced the Note Extractor (with another!). Whether it's a result of copying & pasting the basic voice module I'm not sure, but so far everything's working after the substitutions. I think more time is needed before I'm confident this has fixed the problem, but the mystery still remains, I feel! I'll try & produce a MIDI file if it crops up again.
Here is the 'slightly more sophisticated version' :)

16ProgramSampler.bgrp
(298.13 KiB) Downloaded 60 times
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby seb@plogue » Mon Jul 09, 2012 12:22 pm

A MIDI file would record the timing you used when playing, hence giving me a way to always reproduce the problem.
seb@plogue
Site Admin
 
Posts: 7883
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal

Re: MIDI notes hanging

Postby DaveDraper » Tue Jul 10, 2012 2:15 am

Sorry for the delay - attached MIDI file which reproduces the problem on output/sample7, near the end. I then switch to output 6, it doesn't happen, but go back to 7 & it's there again.
SimplerSamplerTest.mid
(1.12 KiB) Downloaded 69 times

The layout I used is:
SamplerTest.bidule
(783.73 KiB) Downloaded 60 times

The only reason the monocontroller is in the picture is to effect the MIDI switch output change; if I use the M-audio mini keystation to do this it also causes the same problem.
I have a vague recollection this morning, of coming up against a similar problem some time ago, of MIDI commands being missed once they got into the data(/audio) realm, & a one sample delay fixed it! I'll look into this - I'm sure it's very simple, but thanks for looking at it.
Dave
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby seb@plogue » Tue Jul 10, 2012 1:00 pm

One thing in the MIDI file jumps to the eye:

Chn: 3 Note On ( 74 - D6): 89
Chn: 3 Note On ( 74 - D6): 85
Chn: 3 Note Off( 74 - D6): 0

2 Note Ons for the same note on the same channel.


I need to check what happens in that case and if there is anything "wrong".
seb@plogue
Site Admin
 
Posts: 7883
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal

Re: MIDI notes hanging

Postby DaveDraper » Tue Jul 10, 2012 1:59 pm

Well spotted there!I'll do some more checking this end, since my M-audio pro-keys 88 doesn't cause this problem, yet the Keystation Mini-32 does!
I also came across discussion of MIDI running status as a possible cause, though the MIDI files I've checked so far (not the one I submitted) all seem to have equal numbers of note ons & note offs (well, note on zeros!).
I did speak to the suppliers of the keyboard today too, & they'll change it if necessary, - I just figured it was somewhere in my crude (so far) efforts with Bidule. As I've tinkered with the design & got more 'sophisticated' the problem seems to have got worse, in spite of reducing the polyphony now to four :)
Hmmm.
Thanks for taking the trouble to look at it.
Dave

PS -could just be my big fingers & very small keys of course :)
Last edited by DaveDraper on Tue Jul 10, 2012 2:49 pm, edited 1 time in total.
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby seb@plogue » Tue Jul 10, 2012 2:29 pm

There is something in the polyphonic adapter that would prevent the voice to shutdown correctly on a double note on. Have to dig a bit deeper to check why that code is there.
seb@plogue
Site Admin
 
Posts: 7883
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal

Re: MIDI notes hanging

Postby DaveDraper » Tue Jul 10, 2012 2:52 pm

Ah, well usually the symptom disappears if I unpolyphonize (to expand the group), but not every time....
D
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby DaveDraper » Wed Jul 11, 2012 12:44 am

Woke up this morning (yeah, yeah, -6am!) with a 'Doh!' moment.
If you're using sustain, or sostenuto, you wouldn't want a second instance of a sustained note killing off the first, right? So that functionality in the polyphonizer code makes sense.
On the other hand, using a 2 & a bit octave toy keyboard, if I'm holding down, say C3, hit the octave down button, & press the C4 key, I get a second instance of C3. Trying this deliberately does seem to create the problem, though I haven't checked thoroughly yet as to whether I can get note ons still hanging even after program (voice) changes to & fro, 'all notes off' panic-button-resets & so on, which can happen.
I strongly suspect this is the root cause though.
Thanks for your invaluable input - glad it doesn't seem to be a bidule bug. :oops:
Dave
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby DaveDraper » Wed Jul 11, 2012 7:14 am

Sounded plausible didn't it? I thought avoiding octave up & down whilst notes on was working, but no.
I put in a 'PCNoteCloser' group; with a MIDI delay of 5 samples, it detects the program change switch of output, sends a note closer message, then the program change. I tried this with a chord held down, switch the program number, lift off the chord, switch back to the 1st program, play a couple of notes, & one still hangs - but not one of the ones I'd played after the switch back! In this example, it was the C#6 which hung, even though I'd only played G5 & A#5!!!:
Screen shot 2012-07-11 at 12.53.17.jpg
Screen shot 2012-07-11 at 12.53.17.jpg (171.33 KiB) Viewed 1465 times

As you can see, the note doesn't show up as 'on' in the screenshot (can't get a MIDI file off 'MIDImonitor' in bidule?), but it keeps on loopin' thar! Even sending those CC(123/121) messages from the keyboard don't fix it. Hit a random key after that & that C# just carries on. Only other thing left to check is is it always the C#....er no, it can be more than one note, seemingly unrelated to the one I hit, & unannounced on the MIDI monitor.
The sampler version is slightly different (a little simpler, but ADSR replaces smoothers), but the problem the same.
NoteCloserTest.bidule
(858.28 KiB) Downloaded 55 times

The mystery remains as to why notes hang, & not the ones I often have played, especially when switching back to an eallier voice (especially one that's hung before).
:(
Dave
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby seb@plogue » Wed Jul 11, 2012 8:46 am

There's no need to do that, the MIDI Switcher will close all notes on the current output when changing the active output.
As I said, after a closer look, i'm convinced that the code in the poly adapter is the culprit and is wrong in the way
it reacts to double note-ons.
seb@plogue
Site Admin
 
Posts: 7883
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal

Re: MIDI notes hanging

Postby DaveDraper » Wed Jul 11, 2012 10:08 am

OK thanks; you know best!
Dave

Errrrr, but then again, I get this UNpolyphonizing & expanding voice 2, monitoring the MIDI input from the switcher, & the gate output from the NoteExtractor......
Screen shot 2012-07-11 at 16.27.29.jpg
Screen shot 2012-07-11 at 16.27.29.jpg (95.62 KiB) Viewed 1459 times

Audio monitor_0 is frozen just after the note on (E5), yet after the note off (E5), audio monitor_1 still shows a +1.000 - the gate hasn't closed, and I'm hearing a G#6 still looping!
At first sight it looks to me like it's the note extractor, but of course I have no way of knowing what may be passing through undetected by the MIDI monitor! Sending that CC(123+121) from the keys shuts it off, but if I hit E5 (or any other note!), back comes the G#6. :?
Just trying to help really :)
Dave
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am

Re: MIDI notes hanging

Postby DaveDraper » Tue Jul 17, 2012 12:22 pm

Several sobering revisions later.....
I decided to go through my samples, resampling everything down to mono where necessary, resampling from 48kHz to 44.1kHz where obvious, & redesigning as basic as possible, my sample player!
Now I have previously tried such refinements as all mono samples (didn't seem to make any difference), but missed different sample rates as a possible cause...!
However!
A paranoid thought occured that if I were checking 'quietist', for stealing mode in the polyphonizer, the quietist note it could steal was a note-on with velocity 0. ie a note-off!
Now I'm sure, Seb, you have not missed this one (note-stealing generates a note-off I imagine...), but polyphonizing with note-stealing = oldest, eg, I don't get the problem! Well, so far at least.
So, changing the polyphonizer's note-stealing algorithm seems to fix it! Which agrees with your (Seb's) analysis of where the root lies. I just hope this observation might help.
I've been half-following Jersmi's polyphonic envelope thread, which might help with the clicks on note-offs, but otherwise, I'm reckoning on trying it out next week on a gig.
Very basic sample-player here.....
NewSampler.bgrp
(189.45 KiB) Downloaded 63 times

I'm sure you're all way ahead of me...:)
dave
DaveDraper
 
Posts: 41
Joined: Tue Mar 01, 2011 7:33 am


Return to Bidule Layouts

Who is online

Users browsing this forum: Bing [Bot] and 2 guests