GrandOrgue / grandorgue

GrandOrgue software
Other
172 stars 43 forks source link

Pipe release problem with Barton sampleset on grandorgue-3.15.x-x.linux.x86_64 #2004

Open hnb2907 opened 2 months ago

hnb2907 commented 2 months ago

Hi,

I've found a problem with 3.15.x.x when playing the Barton sample sets from Graham Goode. It definitely affects these versions: grandorgue-3.15.0-1.linux.x86_64 grandorgue-3.15.1-0.8.linux.x86_64 grandorgue-3.15.1-1.linux.x86_64

Previous versions have all been perfect. Last version known to be ok was grandorgue-3.14.1-1.linux.x86_64. Going back to this version, all is working again.

My system is Ubuntu Studio, low latency kernel, and JACK. It has the latest "apt-get dist-upgrade" applied to it. It's a reasonably modern PC with 6 cores and 32GB RAM.

It appears that randomly pipes get stuck in "loop" section, and do not jump to "release" when they should. There are 4 circumstances that trigger the problem: 1) playing and releasing notes normally from a MIDI keyboard 2) turning off stops while holding played notes 3) turning on/off the tremulants while holding notes 4) playing a GO MIDI file

The pipes affected are random, at random times. Sometimes after a few seconds, sometimes a few minutes. The longer music is played, the more pipes get affected. Playing a GO MIDI file many times, should be deterministic, but the pipes affected and the time is always different.

While a pipe is stuck playing the loop; playing the same pipe again is normally ok and added to the sound generated, and the stuck previous stuck pipe sample continues to play.

Pressing the "Panic" button stops the sound. But sound does not resume until GO is completely restarted.

There are no errors shown in the log window, or on the CLI stdout/stderr.

I've tried many permutations in Settings / Sound Engine / Sample loading, but no improvement.

The "Demo" organ works perfectly, so I believe this is possibly a new bug with GO 3.15.x.x and the Barton samples.

Please let me know if there's anything to try, or if any more information is required?

Many thanks, Chris.

oleg68 commented 2 months ago

Today I've been playing with Barton and I cannot reproduce this issue. Does it appear with any stops engaged, or with some certain stops?

Could you post here the screenshot of the File->Settings->Audio and File->Settings->MIDI tabs?

hnb2907 commented 2 months ago

Hi,

So far it's definitely affected tuba, diapason, flute, and vdo/string.

Here's the screenshots requested.... Screenshot from 2024-09-09 22-02-35 Screenshot from 2024-09-09 22-03-19

hnb2907 commented 2 months ago

I can share a zip with all of my relevant files, if that helps? Password is "grandorguebarton", link expire in 1 week.

https://hnb2902.plus.com/nextcloud/index.php/s/5omDADYw5BCJ5Pf

hnb2907 commented 1 month ago

Hi,

I've had some other tasks to deal with over the past weeks, and have only today got back to looking at this.

Attached is a midi file recorded using GO v3.14.1-1 on the ubuntu studio PC described above. Please accept my apologies for the bad playing, not enough practice! The MIDI file was recorded using a different "Barton3-????.organ", so the stops are not replayed correctly on "Barton3-7.organ", but it is only the key on/off's that are important to reproduce.

If I play this MIDI file using GO v3.14.1-1 many times, it plays correctly as expected. This is the same expected behaviour when playing from the Rodgers organ console using MIDI-USB to the PC.

Next, I tried latest GO v3.15.1-1. Today I installed this is on a different laptop, running Linux mint debian, and ALSA. Both the Ubuntu studio PC and laptop have the same random "cypher" misbehaviour. The same misbehaviour exists irrespective of playing the Rogers console, or playing a pre-recorded GO MIDI file.

Steps to reproduce:

  1. Load "Barton3-7.organ"
  2. Set a registration similar to the attached screenshot Screenshot from 2024-10-12 13-00-54
  3. Play the attached MIDI file
  4. Eventually a random(?) subset playing pipe samples will get stuck in their wav loop (or some similar sounding problem). Over time, it will be more and more.
  5. You can increase the chance of misbehaviour, by turning on->off->on the 4x Tremulants many times, while notes are held. For me, this can trigger the misbehaviour after a few of seconds, and the more on->off->on cycles, the more notes are affected.

Maybe here is a new clue in the switching between non-tremm'ed and tremm'ed pipe sample wav files? Noting that all of the tremmed pipe samples are wave (not synth).

I did wonder if the convolution reverb, or JACK vs ALSA, played some part, but I can confirm it does not.

This misbehaviour exists on all of the newer GO releases after v3.14.1-1 that I have tried.

2024-10-12-11-28-55.453.mid.zip

Hope that helps some more? :)

Best wishes, Chris.

kwhite-uottawa commented 1 month ago

A "me too". Same symptoms, different sample set. I attach an organ constructed with GoOdf with a single c pipe from Buckerburg and a cipher.mid file of a frantic toddler toggling Tremulant (aka a speeded up recording of me doing the same thing) that should reliably trigger the problem. cipher.zip

hnb2907 commented 1 month ago

A "me too". Same symptoms, different sample set. I attach an organ constructed with GoOdf with a single c pipe from Buckerburg and a cipher.mid file of a frantic toddler toggling Tremulant (aka a speeded up recording of me doing the same thing) that should reliably trigger the problem. cipher.zip

Hi,

I've just tried it with grandorgue-wx32-3.15.1-1.linux.x86_64 and it did the "cypher". I did notice that if you repeat the MIDI playback, the volume of the cypher gets louder, maybe because it is playing many simultaneous copies of the sample?

Do you also get the cyphering when only playing notes and not changing the tremulant state? I get cyphers from playing notes. Switching the trem on/off makes it happen more frequently.

Best wishes, Chris.

kwhite-uottawa commented 1 month ago

Yes, those cyphers do build up!

I don't currently have any other issues. No cyphers during regular use. But my typical VPO is small (Cantorum Duo + Pedal board as console) and I don't usually have enough RAM for GO to include a wave tremulant.

I only noticed the issue with the tremulant cypher when I was evaluating some Buckerburg ranks on the "voicing table."

kwhite-uottawa commented 1 month ago

I did a "git bisect" The commit that causes the issue with cyphers for me is 3aeeddb5bab6668bd9eb2549a28d1e1df3817fff

oleg68 commented 1 week ago

@kwhite-uottawa @hnb2907 I fixed the issue with fast tremulant switching (thank you for https://github.com/user-attachments/files/17450205/cipher.zip), but I still cannot reproduce the issue with the barton. GrandOrgue plays the midi file https://github.com/user-attachments/files/17350000/2024-10-12-11-28-55.453.mid.zip without any problems.

@hnb2907 Could you test the intermediate build with fix ? May be it also fixes your issue?

hnb2907 commented 1 week ago

Hi @oleg68

Thank you for the work on this.

I've tried grandorgue-3.15.2-0.20.x86_64.AppImage on my laptop, playing 2024-10-12-11-28-55.453.mid using a fixed set of stops, and tremulants always on. Unfortunately the cypher problem caused by notes on/off still exists. Obviously this didn't try the trems on/off behaviour,

At the moment, I'm not at home, so I haven't been able to try on the organ console with Ubuntu studio. I need to do this, to properly confirm the behaviour of tremulants on/off and notes on/off.

Could you please confirm the source of the Barton sampleset that you tried please? Was it from my download in https://github.com/GrandOrgue/grandorgue/issues/2004#issuecomment-2339336159 ? I'm wondering if you have some different wav files, which contain a different encoding. My wavs are unchanged from the sampleset provided to me be Graham Goode in 2023. I have found different releases of the Barton sampleset available for download in the past.

I've recreated the download link in case you need it https://hnb2902.plus.com/nextcloud/index.php/s/bmgMpCDbiD6jcDr

Many thanks, Chris.

kwhite-uottawa commented 1 week ago

I can confirm that the Barton sample set still has the cypher issue. I didn't try yours (@hnb2907). I have the sample set from Lars Palo; I don't think it's particular to your sample set.

Fairly easy to demonstrate. Activate the Great Open Diapason 8, and toggle the Main Tremulant as the midi file plays to accumulate those cyphers...

kwhite-uottawa commented 1 week ago

Bzzt (Sorry @oleg68). I tested the wrong GrandOrgue version! After the change to src/grandorgue/sound/GOSoundFader.h

m_IncreasingDeltaPerFrame = 0.0f;

I am no longer able to duplicate the problem reported by @hnb2907.

kwhite-uottawa commented 1 week ago

I tried to duplicate your problem with your version of Barton, but was unsuccessful. I downloaded your (@hnb2907) Barton sample set and used the Barton3-7.organ file in the Barton_Series_v1.0.0 directory. I setup the stops as you illustrated above, and played the 2024-10-12-11-28-55.453.mid file. There were no cyphers using d26bc1d.

With unpatched grandorgue-3.15.2.1: I only get cyphers when toggling the tremulants, I do not get cyphers if I don't touch any tremulants. (i.e. "4." above doesn't happen for me if I leave the tremulants alone, even after 20 minutes into the midi file.)

Here's the first 30-ish seconds of your midi file modified to include the initial stop settings I used. 2024-10-12-11-28-55.453-start.mid.zip

oleg68 commented 1 week ago

@hnb2907 @kwhite-uottawa I reworked the fix. Please test the new version.

hnb2907 commented 1 week ago

Hi,

Good and not-so-good news with this new version

I've been playing the Barton sampleset for approximately 30 minutes, and have also playing a 30 minute pre-recorded MIDI file. So far, no cyphers caused by notes on/off, or trems on/off. :)

Now, the not-so-good news.
The attack(?) of nearly every pipe now has a click/pop sound, maybe on every rank. Each pipe has a different level of this new noise. The noise is most obvious on 8' samples in the 2 or 3 octaves above middle C. I haven't noticed this on any previous version of GO.
Here's some example audio recordings from GO... go pops and clicks.zip
You can download the sampleset wav's for these 2 ranks from here http://hnb2902.plus.com/nextcloud/index.php/s/JcfS3rwiNrFJ6qL I can't remember if these 2 ranks were present in the previous download link I shared. The more stops and couplers enabled, the louder the pops/clicks. I have tried clearing and updating the cache, but no change.

It seems like you are so close! :)

Best wishes, Chris.

kwhite-uottawa commented 1 week ago

@hnb2907 and @oleg68 , I confirm the abrupt attack issue. I'm also hearing tremulant issues with the Barton samples.

scaletrem.zip contains:

Recordings were made in a fresh ubuntu 20.04 virtual machine using the AppImage releases.

hnb2907 commented 1 week ago

Thanks for your additional investigating works @kwhite-uottawa

My Barton hybrid also includes the Friesach trompete 8 and 16 sample wav's. The .organ definition is basically copy&paste from Friesach into Barton. In my Barton hybrid, the trompete rank is on its own windchest, with a synth tremulant. The reason I mention this... The synth trem behaves weirdly. Sometimes off is really off. Sometimes off plays as on with a lower trem depth than configured (but it should be off). Sometimes on plays as on with lower depth than configured. Sometimes on plays as on with the correct depth configured. Repeatedly switching this trem on/off changes the random (mis)behaviour. I thought it was probably a mistake in my .organ definition file, and haven't debugged it yet.

There is also another rank, again on its own windchest with a synth trem. This also has similar wierd tremulant behaviour.

There doesn't seem to be an obvious pattern of what will happen when trem is on or off. I haven't done any investigation to find which version of go are affected or not.

I wonder if this is similar logic, that is causing the wrong wave trem samples to be played, as you have found? Hope this makes sense?

Best wishes, Chris

oleg68 commented 6 days ago
  • Recordings of the versions tried are in the scale-VER.wv wavpack files. Abrupt attacks are apparent in scale-3.15.2-0.21.wv

I could not find any difference between scale-3.14.2-1.wv and scale-3.15.2-1.wv: scaale-3 14 2-1 scale-3 15 2-0 21

Grandorgue seems to be selecting either tremulant-wave or non-tremulant-wave samples when tremulant is active instead of just the tremulant-wave samples

Because your ODF is not correct: you should add Pipe082IsTremulant=0 to:

Pipe082=SoloStrings\105-A.wav
Pipe082IsTremulant=0 ; <----- Add this line and the same to the all other pipes
Pipe082AttackCount=1
Pipe082Attack001=SoloStringsTrem\104-G#.wav
Pipe082Attack001IsTremulant=1
oleg68 commented 6 days ago

@hnb2907

The more stops and couplers enabled, the louder the pops/clicks.

It sounds like your CPU does not give sufficient power for playing with high level of polyphony.

It could be that normally use jack for better latency and polyphony, but the .AppImage version of GrandOrgue lacks jack support and another audio API's require more power.

I suggest you to try the grandorgue-3.15.3-0.6.linux.x86_64.tar.gz version instead of the .AppImage one. You need to reenable jack output. Will the clicks still occur?

hnb2907 commented 6 days ago

Hi @oleg68

I understand your thought, but this is different pop/click sound. Previously I did try to use a PC with a slow/old CPU. It would easily achieve ~100% polyphony, and then generate horrible pops/clicks, and the CPU load would be max'ed out.

In my setup now, I have a Lenovo M720S i5, I think with 6 cores, and 32GB RAM.

With the Barton loaded, the GO polyphony bargraph never gets above ~5%, and the CPU load is probably <5%.

However, these pops/clicks that started after GO 3.15.x sound completely different.
It seems to be something related to the transition from "attack" to "loop" at note on. Has there been some changes between 3.14.x and 3.15.2-0.21, which changes how the offsets in the pipe sample wav files are processed/played at note on? Or maybe the pipe playback starts at the start of the loop, missing the first part of the wav? That is the audible effect is seems to have, and is repeatable at the start of playing the same pipe. This is a new side effect on 3.15.2-0.21, whereas has always sounds perfect.

Thanks, Chris.

oleg68 commented 6 days ago

However, these pops/clicks that started after GO 3.15.x sound completely different. It seems to be something related to the transition from "attack" to "loop" at note on. Has there been some changes between 3.14.x and 3.15.2-0.21

@hnb2907 There was lots of changes in the sound engine and playing the samples between 3.14.2 and 3.15.0. Have you tested 3.15.2-1?

Please test also 3.15.3-0.6 from here

hnb2907 commented 6 days ago

Hi @oleg68

I've now tried 3.15.3-0.6 from your link. This also has the new pop/click sound at note on. It sounds the same as when I tried grandorgue-3.15.2-0.21.linux.x86_64.tar.gz

Attached you should find, as an example for 1 affected pipe:

solostring popclick.zip

Looking at 060-C.wav, and 3.14.wav, and 3.15.wav traces in audacity, in 3.15.x there seems to be added "noise" at note on? 060-C 3 14 3 15

Hopefully that helps? Please let me know if you need any more information. :)

Best wishes, Chris.

hnb2907 commented 6 days ago

Here's another example, this time percussive wav samples for the piano rank. Again, there's some additional "noise" at note on in 3.15.3-0.6 In the .organ definition, this is the tremulant off sample (aka piano without sustain pedal), I believe this is probably [Rank026]

piano popclick.zip

There appears to be something different in the highlighted section at the start of the note playing. There are additional high frequencies, which is probably the click I can hear at note on for this example note sample. 3 14 3 15

Maybe my description of pop/click was misleading, it is possibly better described as a "chiff" :)

Is this possibly what I'm hearing on 3.15.x?

Best wishes, Chris.

oleg68 commented 6 days ago
  • recording of playing this pipe (tremulant off) with grandorgue-3.14.1-1.linux.x86_64 (sounds correct)

  • recording of playing this pipe (tremulant off) with grandorgue-3.15.3-0.6.linux.x86_64.tar.gz.zip

Could you make a bisect and test 3.15.2-1? I'd like to know if my recent modification of fader brings this problem or it have existed before?

kwhite-uottawa commented 5 days ago

Yes, it seems I forgot to select "Load pipes to play when wave tremulant is off" in GoOdf when loading the non-tremulant samples. Wave tremulant works as expected with all GrandOrgue versions when the ODF file is correct.

...keith


From: Oleg Samarin @.***> Sent: 16 November 2024 10:15 To: GrandOrgue/grandorgue Cc: Keith White; Mention Subject: Re: [GrandOrgue/grandorgue] Pipe release problem with Barton sampleset on grandorgue-3.15.x-x.linux.x86_64 (Issue #2004)

Attention : courriel externe | external email

I could not find any difference between scale-3.14.2-1.wv and scale-3.15.2-1.wv: scaale-3.14.2-1.png (view on web)https://github.com/user-attachments/assets/e9255803-d456-43e3-8810-8de15cbfbee1 scale-3.15.2-0.21.png (view on web)https://github.com/user-attachments/assets/c38ace4e-353e-4447-8694-a36e7547d0ec

Grandorgue seems to be selecting either tremulant-wave or non-tremulant-wave samples when tremulant is active instead of just the tremulant-wave samples

Because your ODF is not correct: you should add Pipe082IsTremulant=0 to:

Pipe082=SoloStrings\105-A.wav Pipe082IsTremulant=0 ; <----- Add this line and the same to the all other pipes Pipe082AttackCount=1 Pipe082Attack001=SoloStringsTrem\104-G#.wav Pipe082Attack001IsTremulant=1

— Reply to this email directly, view it on GitHubhttps://github.com/GrandOrgue/grandorgue/issues/2004#issuecomment-2480610223, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2IHKXVTR22QK3K7CU65IRT2A5ORVAVCNFSM6AAAAABN2KSDX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBQGYYTAMRSGM. You are receiving this because you were mentioned.Message ID: @.***>

kwhite-uottawa commented 5 days ago

@oleg68 for the "chiffs" reported by @hnb2907, they are also evident in the scaletrem.zip file I provided earlier. "Chiffs" are audible in scale-3.15.2-0.21.wv, but not in scale-3.15.2-0.20.wv. So, for me, the problem was introduced between 3.5.2-0.20 and 3.5.2-0.21

I could do a bisect, but which repository?

oleg68 commented 5 days ago

"Chiffs" are audible in scale-3.15.2-0.21.wv, but not in scale-3.15.2-0.20.wv. I could do a bisect, but which repository?

I ask to test the official release 3.15.2-1.

3.15.2-0.20 is not interesting for me.

kwhite-uottawa commented 5 days ago

Ah, OK. For me the official release 3.15.2-1 (as recorded in scale-3.15.2-1.wv) does not have the "chiff" issue.

FWIW: I do have the "chiff" issue with 3.15.3-0.6. Here's a waveform comparison of the first note of the recorded scale.mid between 3.15.2-1 on the top and 3.15.3-0.6 on the bottom aligned on the release tail.

compare

oleg68 commented 5 days ago

@kwhite-uottawa Thank you. I'll do more research

hnb2907 commented 4 days ago

"Chiffs" are audible in scale-3.15.2-0.21.wv, but not in scale-3.15.2-0.20.wv. I could do a bisect, but which repository?

I ask to test the official release 3.15.2-1.

3.15.2-0.20 is not interesting for me.

Hi @oleg68,

Official release grandorgue-3.15.2-1.linux.x86_64.tar.gz does not produce the chiff sound with the Barton samples 👍

Thanks, Chris

oleg68 commented 14 hours ago

piano popclick.zip

@hnb2907 I tried to reproduce your issue with the sample from your example and created a test organ. PianoAttack.zip

Unfortunately, I could not reproduce the chiff issue: 3.15.2-1 and 3.15.3-0.6 give the same waveform.

So could you provide me the full testcase (the .organ file and the steps to reproduce)?

hnb2907 commented 8 hours ago

piano popclick.zip

@hnb2907 I tried to reproduce your issue with the sample from your example and created a test organ. PianoAttack.zip

Unfortunately, I could not reproduce the chiff issue: 3.15.2-1 and 3.15.3-0.6 give the same waveform.

So could you provide me the full testcase (the .organ file and the steps to reproduce)?

Hi, I tried 3.15.2-1 again tonight, it does not have the chiff noise. Just to confirm post https://github.com/GrandOrgue/grandorgue/issues/2004#issuecomment-2483899017

However the cypher problem reappears in this version.

Many thanks, Chris

oleg68 commented 2 hours ago

However the cypher problem reappears in this version.