Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test files for AWE32 NRPN #1434

Merged
merged 4 commits into from
Nov 23, 2024
Merged

Add test files for AWE32 NRPN #1434

merged 4 commits into from
Nov 23, 2024

Conversation

derselbst
Copy link
Member

This adds three test files for the AWE32 NRPN support. ALTITUDE and UPLIFT are using their original soundbanks, converted to SF2 Emu's "SoundFont Librarian" sflib10c.zip utility.

@derselbst
Copy link
Member Author

@mrbumpy409 Could you do me a favor and pls. render Uplift.mid on your Audigy2 and upload it as OGG?
https://github.com/FluidSynth/fluidsynth/tree/awe32-tests/test/manual/awe32_nrpn/Uplift

@klerg Could you pls. render Altitude.mid and Uplift.mid on your SB Live and upload the rendered audio?
https://github.com/FluidSynth/fluidsynth/tree/awe32-tests/test/manual/awe32_nrpn/Altitude
https://github.com/FluidSynth/fluidsynth/tree/awe32-tests/test/manual/awe32_nrpn/Uplift

If possible pls. prefer using the SF2 files in the respective directories, so that it's as close as possible to fluidsynth output. I would like to store the rendered audio for future reference.

@klerg
Copy link

klerg commented Nov 17, 2024

Sure that will be fine, and I may render all the midis with the original banks, as frenetic.mid, Marathon.mid, MYSTRAVE.mid, trancpar.mid, and TRUTH.mid sound totally different, will MP3 be fine ?

@derselbst
Copy link
Member Author

Uplift and Altitude would be sufficient. MP3 is fine as well.

@klerg
Copy link

klerg commented Nov 18, 2024

I see that is fine but it says "Uploads are disabled" what to do here ?

@derselbst
Copy link
Member Author

You need to ZIP them. If it still doesn't work, feel free to send them via e-mail.

@mrbumpy409
Copy link

@mrbumpy409 Could you do me a favor and pls. render Uplift.mid on your Audigy2 and upload it as OGG? https://github.com/FluidSynth/fluidsynth/tree/awe32-tests/test/manual/awe32_nrpn/Uplift

I will try to get this recorded over the next couple of days.

@klerg
Copy link

klerg commented Nov 19, 2024

Same here I will email them very soon and you can put that in the above links

@mrbumpy409
Copy link

mrbumpy409 commented Nov 22, 2024

SBK files converted to SF2 all need further edits in order for the SoundFont to render correctly on a SoundFont 2.01 or 2.04-compliant device. This is also true for version 2.00 SoundFonts such as those created on the Sound Blaster Live!. I have been working on proper conversions of all the songs contained in this archive along with some others that I had collected back in the day. Here is a list of the changes I have had to make across all of the SoundFonts to approximate SoundFont 1.0 / 2.0 behavior:

  1. Disable default velocity→filter cutoff modulator for each instrument (both 2.01 and 2.04 spec versions).
  2. Enable velocity→filter cutoff modulator (2.04 spec version) for any samples with volume envelope attack at 0.008 seconds or greater.
  3. Re-route mod wheel (CC1) and channel aftertouch to modulate modLFO (LFO1) instead of vibLFO (LFO2). (Was CC1 switched over to using vibLFO before SoundFont version 2.01? If someone with a SB Live! could run this test, I would be much obliged.) EDIT: The behavior change was introduced in SoundFont 2.01. Thanks for the test recording, @klerg!
  4. Increase reverb (CC91) and chorus (CC93) controller sensitivity to better match AWE32 fx levels when using Audigy2 or FluidSynth.
  5. Replace ROM samples with RAM copies.
  6. In the original SoundFont implementation, if note was played on a drum kit (MIDI channel 10) on bank 1 or higher that didn't have an assigned sample in the preset, the corresponding note from bank 0 would be played instead. This is not true for SoundFont 2.01 or 2.04 devices, where the notes missing from the bank 1 preset will just play silence. I'm not sure whether this was changed in SoundFont revision 2.0 or 2.01. Anyway, some AWE32 songs rely on this behavior, so the missing percussion sounds must be copied into the SoundFont's percussion preset from a GM bank.
  7. Fix various SoundFont Librarian conversion errors as I encounter them. This part is very hard to do without reference to any AWE32 recordings. For example, I was able to find and fix a very bad pitch error in Tekkniko by Niko Boese thanks to this YouTube video. Without that, I might never have noticed one instrument playing inaudibly 5 octaves below its correct pitch.

Altitude_and_Uplift-Audigy2.zip contains SoundFont 2.01/2.04-compliant versions of both Altitude and Uplift as well as renderings from my Audigy2 ZS.

Uplift

Uplift was a bit of a mess. There were a number of samples in the SoundFont that had out-of-spec loop points (e.g., loop end was set beyond the end of the sample) leading to horribly out-of-tune playback on Audigy2. This affected presets 000:004 HARSH SQUARE and 000:006 SAWTOOTH VIBRATO. I'm not sure how the AWE32 handled the out-of-spec loops, but whatever the case was, Ian Chisholm appears to have tuned the samples around this specific rendering. Once I fixed the loop points, Ian's tuning values were no longer correct and the samples had to be retuned. The instruments containing these samples now play in tune, but if there was any deliberate detuning in the original preset versions, this has been lost. Only access to an AWE32 might reveal the truth.

Uplift.sf2 was also missing percussion samples expected by the MIDI file (see point 6 above), so I copied them over from my AWE32 synthgs.sbk SF2 conversion, which is also included in the above ZIP archive as synthgs-sf2_04-compat.sf2. The Audigy2 ZS recording of Uplift uses synthgs-sf2_04-compat.sf2 as the GM bank, since a couple of tracks require bank 0 GM voices. For the recording, I also used my fixed copy of the MIDI file (Uplift-fixed.mid), which removes the quantization errors that caused frequent "hiccups" in the tempo. It's possible that a few errors might remain, but not enough to be noticeable.

I know the original request was to record the version of Uplift linked by @derselbst above. I can still do this if desired, but it will result in a recording with missing percussion sounds, out-of-tune instruments, and possibly incorrect filter settings, all of which will make it harder to properly compare with AWE32 behavior.

@derselbst
Copy link
Member Author

Wow, many thanks Christian! I admit, the difference is clearly audible! Also thanks for the explanations, I thought it would be worth to store that in the wiki, for future reference:
https://github.com/FluidSynth/fluidsynth/wiki/SoundFont#differentiation-to-sbk--sf1

I would merge this now so I can proceed with #1432 and #1430, though I haven't received @klerg's renderings yet. Looking forward to your SB Live! renderings Klerg, no need to hurry though. Pls use Christians updated SF2 for rendering Uplift and Altitude, which you can find here:

https://github.com/FluidSynth/fluidsynth/raw/51242f7603c4f48141dadedfefed1c9a6e286a34/test/manual/awe32_nrpn/Altitude/Altitude.sf2?download=
https://github.com/FluidSynth/fluidsynth/raw/51242f7603c4f48141dadedfefed1c9a6e286a34/test/manual/awe32_nrpn/Uplift/Uplift.sf2?download=

Additionally, pls do Christian a favor and render his midi file with the Soundfont found here:
https://github.com/mrbumpy409/SoundFont-Spec-Test

If uploading to Github doesn't work, just mail me and I'll forward it.

@derselbst derselbst merged commit 8558d7b into master Nov 23, 2024
54 of 78 checks passed
@derselbst derselbst deleted the awe32-tests branch November 23, 2024 10:23
@derselbst derselbst restored the awe32-tests branch November 23, 2024 10:23
@klerg
Copy link

klerg commented Nov 23, 2024

I had no clue that SBK files need any edits when converted to SF2 so they are able to sound right on a SounfDont 2.0.1 or 2.04 capable device then. I'm pretty sure that the Sound Blaster Live! is a SoundFont 2.01 and not 2.00 sound card as well. It is very good to hear that you are trying to convert the songs in this links and I do not know of too many others but that peaks my interest. Well, I did not expect to see this many changes in order to match the SoundFont 1.0 / 2.0 format but that is not a big deal

  1. I'm not familiar with modulators but will look unto this some more to see why there is a need to disable anything let alone this

  2. So I assume you keep this modulator on but only for samples that have a volume envelope attack of 0.008 or higher and my guess is makes it sound better overall then ?

  3. No clue why SF 2.01 had to re-route Mod wheel (CC1) and channel aftertouch to modLFO (LFO1) to vibLFO (LFO2) Sure I got a SB Live! and can run this test, and will contact you soon on this. Just do not know what to expect from it so will get a hold of you outside of github on this.

  4. I assume the Chorus and Reverb level were more pronounced on the AWE32 than the Audigy2 or Fluidsynth but hope the SB Live! is about the same then

  5. Yes this takes a long time depending on how many

  6. Obviously, the original soundfont specification had this the right way, and not sure why in SoundFont 2.01 and above it was changed for the worse. It makes sense to fall back on bank 0 when bank 1 does not have the required percussion sounds. I cannot see any good reason to take away a feature like this. I bet every AWE32 song here with a Ch.10 track expects this as well. And one will likely need to copy the percussion sounds for every single MIDI in this FTP archive and put them in each bank for all of the songs, which is going to be time-consuming to say the least. If I were to try my hand and convert all of these MIDIs will need to double-check and see if it is really worth it to add the percussion back into that. In the end, I'd probably put the percussion notes as it is usually there for a good reason.

I'm not sure how you pulled off making Altitude and Uplift to be soundfont 2.01 and 2.04 but always nice to know that it can be done and hope it was not too hard at all

Yes Uplift looks pretty tricky to me too. I have seen samples that have loop points that end beyond the size of the sample, and it is always a pain to deal with. And I must say, it does not sound so out of tune on my SB Live! I guess that means it will be easier to render this on an SB Live! than an Audigy2 as it is more compatible with the AWE32 overall. I also have no clue how the AWE32 dealt with samples that were not in tune. Sure the composer of this MIDI did pull off something clever to make it sound the best it can be. Yes, that is a big part of the problem when the loop end points go beyond the sample size. And it can be annoying to retune every sample, one by one. Sure who knows if the original preset had any detuning and the only way to find out is to play it on an AWE32 or AWE64. And while both of these can be found online it will be more difficult to find a PC with an ISA slot

Good call to copy the missing percussion samples in Uplift.sf2 from synthgs.sbk instead of the synthgm.sbk and it is easier to find the percussion sounds in this smaller bank. Yes, it makes sense to put the sf2 conversion of synthgs.sbk in this archive as well. I just used my default GM soundset for bank 0 if that matters at all I hope not in this case then. I'm too familiar with quantization, other than it has something to do with tempo, but nice that you were able to find this and fix it even if it still remains as no one can notice it.

Sure but it looks like with my SB Live! it is better to record the version of Uplift linked in here. It makes no sense to do this if it is going to end with all the issues you mentioned. But my hope is on the SB Live! it will sound closer to the AWE32 and I will be able to confirm this in a better way.

Here is my Altitude and Uplift renderings based on my own Altitude.sf2 and Uplift.sf2, will upload my conversions from @mrbumpy409's in my next post here:;

Altitude and Uplift.zip

@mrbumpy409
Copy link

mrbumpy409 commented Nov 23, 2024

I'm pretty sure that the Sound Blaster Live! is a SoundFont 2.01 and not 2.00 sound card as well.

I'm pretty sure the first SoundFont 2.01-compliant Sound Blaster was the Audigy. The Live! supports SoundFont 2.00 only, as I recall. I believe this will be confirmed when you run my SoundFont spec test on your Live!

  1. So I assume you keep this modulator on but only for samples that have a volume envelope attack of 0.008 or higher and my guess is makes it sound better overall then ?

In SoundFont 2.0 and earlier, velocity-based filtering was enabled by setting the volume envelope attack greater than 0.001, though the threshold seemed to differ between AWE32 and Live! for some reason. On AWE32, it was 8ms or higher attack to enable the filtering, and on Live! it was 7ms? I can't remember for sure, but I'll post back here when I am back home and can check my notes. Anyway, the modulators I add are to emulate this behavior on SoundFont 2.01 and 2.04 devices.

  1. No clue why SF 2.01 had to re-route Mod wheel (CC1) and channel aftertouch to modLFO (LFO1) to vibLFO (LFO2)

The bigger mystery is why CC1 was ever being routed to the multi-purpose LFO in the first place. Routing to the dedicated vibrato LFO just makes more sense. The SoundFont 2.01 standard set this straight. Your test results will reveal if they changed this in SoundFont 2.00 or 2.01.

Sure I got a SB Live! and can run this test, and will contact you soon on this. Just do not know what to expect from it so will get a hold of you outside of github on this.

Thanks, I appreciate it!

  1. Obviously, the original soundfont specification had this the right way, and not sure why in SoundFont 2.01 and above it was changed for the worse. It makes sense to fall back on bank 0 when bank 1 does not have the required percussion sounds. I cannot see any good reason to take away a feature like this. I bet every AWE32 song here with a Ch.10 track expects this as well.

No, only some. I have already copied the missing percussion sounds where necessary for all of the AWE32 songs in the archive linked previously. I just need to figure out the best way to share my converted collection and then create proper documentation, etc. If only I had more free time, I would have done so already.

I'm not sure how you pulled off making Altitude and Uplift to be soundfont 2.01 and 2.04 but always nice to know that it can be done and hope it was not too hard at all

Well, it helps that I spent my teenage years with an AWE32 and Live! sound card, and then migrated to Audigy and then Audigy 2, paying very close attention to the behavior of each. I even created some of my own AWE32 MIDI files (one of which received 6th placing in the Creative Labs international SoundFont composition contest in... I think it was 1997?).

Sure but it looks like with my SB Live! it is better to record the version of Uplift linked in here. It makes no sense to do this if it is going to end with all the issues you mentioned. But my hope is on the SB Live! it will sound closer to the AWE32 and I will be able to confirm this in a better way.

My fixed SoundFont files should be backwards-compatible with SoundFont 2.0 devices like the SB Live!, which should just ignore my custom modulators. So, it will be best to use my fixed SoundFonts on SB Live! as well.

@klerg
Copy link

klerg commented Nov 24, 2024

I hope you are right on this it looks like the SB Live! came out in August 1998, but the SoundFont 2.01 spec was released in July 1998. Yet, the EMU10K1 is dated from 1997, sure I will contact you later to run that test.

Yes, I heard about this in what was most likely one of your detailed and thorough write-ups on SoundFont 2.0 and much more than that. Sure, Creative or E-mu wanted the AWE32 (which is SoundFont 1.0, right?) to sound different in when and where the velocity-filtering starts. No clue on the AWE32, but pretty sure the Live! had that at around 0.007 or so. That's fine, take some time to find out this out. I see that makes sense and the modulators must be needed at this point.

Sure it is good to ask why CC1 is routed to the mod LFO at all and what the goal of that even is. Yes as CC1 is made to adjust the pitch, and vibrato is also related to that as well. Glad that SoundFont 2.01 sorted all this out too. Sure we can get to the spec test fairly soon then.

No problem, I'm happy to try this

I guess some songs have no percussion then ? Nice that you were able to add the necessary percussion sounds back into all of the AWE32 songs then. It will not be hard to share the collection but the documetation may take some time, and I'm sure you are going to find some free time soon and it will be interesting to hear and read up on this

Cool, I was still a kid when the AWE32 came out but was a teenager at the time the Live! was released, I have an Audigy and Audigy 2 ZS just no empty slots on my systems to install them. Nice to know that you made some AWE32 MIDI files and that they made it to 6th place in the Creative Labs competition for SoundFonts and would be awesome to hear them

I see but not sure if that seems to be the case as the files all have the two modulators you mentioned before, yes I guess the SB Live! ignores the modulators then. Ok, here is Altitude and Uplift using your soundfont files recorded on my SB Live!

Altitude and Uplift 2.zip

@mrbumpy409
Copy link

mrbumpy409 commented Nov 25, 2024

I guess some songs have no percussion then ?

I think you're misunderstanding the problem. Most of the percussion sounds used by the AWE32 MIDI files are included in the SoundFont. It's just that sometimes they also try to access sounds that are not a part of the bespoke kit, and it is those percussion sounds that must be manually added back in.

Ok, here is Altitude and Uplift using your soundfont files recorded on my SB Live!

I can hear that you have reverb and chorus disabled on your Live! It would be a better comparison if you recorded these MIDI files with those effects enabled on your card. Also, the previous version of the Uplift recording you shared has lots of audio dropouts. Notice how much shorter it is than your second recording.

Now that I have your comparison files, it appears that the Audigy is playing the wrong percussion sounds in Uplift. Investigating the MIDI file, I can see it is trying to access the drums on channel 10, bank 1, preset 1, but the actual drum samples are on preset 0! On Live and AWE32/64, referencing the missing preset 1 falls back to preset 0 on the same bank, but this does not happen on Audigy.

Once I get back home to my desktop PC, I will fix and share the updated MIDI file as well as a new Audigy2 recording. Besides the missing reverb and chorus, it would seem the other differences I perceive are due to you using a different GM bank (can you confirm?). It would be best to use the synthgs-sf2_04-compat.sf2 bank I shared earlier as the GM bank for a proper comparison across audio cards.

@klerg
Copy link

klerg commented Nov 25, 2024

I do not see that to be the case anymore. Yes, whatever percussion sounds the AWE32 MIDI file feels it has to include is put in the soundfont and that is up to the composer of the music. Sure, back when AWE32 MIDI's were made, as you mentioned before, it would access sounds not part of bank 1 from bank 0, which is a GM soundset. And only SoundFont 2.01, like you said, does not support this, and percussion sounds need to be added in.

Well, chorus and reverb were disabled on my Live! and that was a good catch, but when I turn both on, it does not get recorded and I'm not sure why that is happening. So, for now, I'm not able to get chorus or reverb working at this time. I do not hear any dropouts in my first Uplift recording, and it is only three seconds shorter than Uplift 2 mainly that is due to that much silence at the start of recording Uplift 2 and not nothing else.

Yes, as we determined the Live! to be a Soundfont 2.00 device, like the AWE64, these AWE32 MIDI's mostly sound the same on SB Live! and AWE series also. Sure, as you pointed out already the issues on the Audigy all come from the fact that SoundFont 2.01 has the many shortcomings you listed above with AWE32 MIDI's and anything that uses SoundFont 2.00 and below. That's right, my SB Live! is able to fall back to bank 0 whenever bank 1 is missing any preset, it does not matter what sound that is, percussion, or otherwise as it is SoundFont 2.00 for sure. True, and the best way to play the AWE32 MIDI's is to make it work on SoundFont 2.01 too.

I see that is fine and hope you can get back home soon and send a new MIDI file but do not know what you are going to update in it let's find out soon then. I need help to record chorus and reverb. Yes, I'm using your GeneralUser GS v1.471 on bank 0 and Altiude.sf2 or Uplift.sf2 on bank 1. You make a good point to use this synthgs-sf2_04-compat.sf2 bank so I'll be doing that after you post the new MIDI file and Audigy2 recording then.

@mrbumpy409
Copy link

Well, chorus and reverb were disabled on my Live! and that was a good catch, but when I turn both on, it does not get recorded and I'm not sure why that is happening.

Make sure you are recording using the "What U Hear" mixer recording source. Otherwise, the reverb and chorus won't get recorded.

@klerg
Copy link

klerg commented Nov 25, 2024

Well, I do not have anything called "What U Hear" as a mixer recording source, so looks like will not be able to record chorus and reverb then ?

@mrbumpy409
Copy link

Perhaps it is called "Stereo Mix"? It's been a while since I owned a Live, so I don't remember.

@klerg
Copy link

klerg commented Nov 25, 2024

I do not get "Stereo Mix" either here are all my options: SPDIF-In, CD Digital, MIDI, CD Audio, Line-In, Microphone, Auxiliary, TAD-In, and Wave. MIDI is selected, but effects are not recorded, anything else to try ?

@mrbumpy409
Copy link

mrbumpy409 commented Nov 25, 2024

Are you using the Windows mixer or the Creative Labs mixer? I think you might need to use the latter to see the option as a recording source. Or it might be hidden. Here's a discussion on the matter, if it's of any help: https://www.sevenforums.com/sound-audio/20437-record-what-u-hear.html

What OS are you using?

For me in both Windows 7 and Windows 10, I see "What U Hear" as a recording source in Audacity using the MME driver for my Audigy2.

@klerg
Copy link

klerg commented Nov 25, 2024

I'm using the Windows mixer and Creative Labs mixer too, and the only extra option I get with it is the PC Speaker and nothing else even close to "What U Hear" or "Stereo Mix" That is a good forum topic on this matter, but does not help.

Windows XP SP3

I did nor even know the Audigy2 works on Windows 7, let alone Windows 10, I guess Creative brought back "What u Hear" as a recording source or something like that

@mrbumpy409
Copy link

Here is another fix to the Uplift MIDI file and Audigy2 recording. The MIDI file was attempting to access preset 1 on the percussion channel while the actual percussion sounds are on preset 0. On AW32/Live!, this falls back to bank 1, preset 0, but on SoundFont 2.01 devices, this falls back to bank 0, leading to the wrong percussion sounds being heard.

Until I can get somebody to submit a recording of my SoundFont Spec Test using an AWE32/64 or Live! with reverb and chorus enabled (link to my request here), I will not be able to accurately set reverb and chorus send levels in my AWE32 song conversions, including the two songs I have uploaded here.

@spessasus
Copy link
Contributor

Until I can get somebody to submit a recording of my SoundFont Spec Test using an AWE32/64 or Live! with reverb and chorus enabled (link to my request here), I will not be able to accurately set reverb and chorus send levels in my AWE32 song conversions, including the two songs I have uploaded here.

You should try asking over at VOGONS forum. This is a forum about retro games and music, plenty of people discuss the old soundcards (especially in the category i linked above). You will probably find someone with AWE32 willing to record these :)

@mrbumpy409
Copy link

You should try asking over at VOGONS forum. This is a forum about retro games and music, plenty of people discuss the old soundcards (especially in the category i linked above). You will probably find someone with AWE32 willing to record these :)

That's a great idea, Spessasus! I just posted over there thanks to your suggestion.

@derselbst derselbst deleted the awe32-tests branch December 1, 2024 13:11
@klerg
Copy link

klerg commented Dec 1, 2024

Nice, Uplift.mid basically sounds almost perfect now. Yes, I could tell
the MIDI tries to use the wrong preset for Ch.10 percussion for sure when
everything is on preset 0. That's right the AWE32/Live! falls to bank 1 and
preset 0, but for Audigy and above it goes to bank 0, and that results in the
wrong sounds and we get no sound on them.

I still am not able to record the effects on my Live! card even when they are
enabled, My only option may be to use Total Recorder or something like it that
has a driver for "What U Hear" or 'Stereo Mix' I'd rather not mess with the Live!
drivers until I've went through every other recourse then.

Yes, that is a great tip to ask on VOGONS forum. I'm going to post here for some help on my issues with this Live! Value Dell OEM card and a way to get "What U Hear"as a recording source on Windows XP on here as well

@mrbumpy409
Copy link

Thanks to user @Kuokka77, I was able to measure the AWE64 effects response for internal vs. CC91/93 values (which should also be the same for Sound Blaster Live!, but I will need a recording with FX on that hardware to confirm). From this test, I can ascertain that the CC91/93 modulation of reverb/chorus amount is 400 (40%), compared to the SoundFont 2.01/2.04 default of 200 (20%).

Furthermore, this test allowed me to attempt to balance FluidSynth's effects levels and settings to better match the AWE32/64's "Hall 1" and "Chorus 1" presets. With the SoundFont configured for 40% CC91/93 FX send, the following FluidSynth effects settings should result in a decent effects level correspondence to the AWE32/64:

set synth.reverb.damp 0.3
set synth.reverb.level 0.6
set synth.reverb.room-size 0.65
set synth.reverb.width 0.8
set synth.chorus.depth 4.7
set synth.chorus.level 0.43
set synth.chorus.nr 3
set synth.chorus.speed 0.4

Of course, it will never be a perfect match due to differences between the synthesizers' effects engines. I have also updated my Audigy2 recordings with similar, new FX settings. Here is a zip file containing the following:

  • Altitude-FluidSynth-1427.oggAltitude.mid played using the latest FluidSynth build from the 1427 branch with the updated SoundFont and effects settings above.
  • Altitude-SB Audigy2 ZS.oggAltitude.mid played on Sound Blaster Audigy2 ZS with the updated SoundFont and FX settings.
  • Altitude.sf2 – SoundFont updated for 40% FX modulation via CC91/93.
  • synthgs-sf2_04-compat.sf2 – SoundFont updated for 40% FX modulation via CC91/93.
  • Uplift-fixed-FluidSynth-1427.oggUplift-fixed.mid played using the latest FluidSynth build from the 1427 branch with the updated SoundFont and effects settings above. FluidSynth's internal MIDI player would not play this MIDI file correctly, resulting in the wrong instruments on some tracks. I had to use a separate MIDI player (Sekaiju) for this recording.
  • Uplift-fixed-SB Audigy2 ZS.oggUplift-fixed.mid played on Sound Blaster Audigy2 ZS with the updated SoundFont and FX settings.
  • Uplift.sf2 – SoundFont updated for 40% FX modulation via CC91/93. Note that this SoundFont features some very high internal reverb and chorus values, so the piece is quite effects heavy (especially the "Mega Strings" preset, which is set to 100% internally for both reverb and chorus).

Comparing Audigy2 and FluidSynth playback, I can hear that the NRPN filter control is bringing the cutoff much lower on Audigy2 than FluidSynth (and possibly higher as well?). I may make some tests for this when I have some more time.

@derselbst
Copy link
Member Author

Thanks for the update Chris! Currently, I'm subtracting 1000Hz from the cutoff, because I only had a single hardware rendered comparison tune. I'm open to change this.

@mrbumpy409
Copy link

I will make a proper test for this that I can render using my Audigy2 for comparison. That should make it much easier to match the behavior in FluidSynth. I just need to get through a couple projects and student recitals first.

@klerg
Copy link

klerg commented Dec 12, 2024

I'm glad someone with an AWE64 Gold helped on this as I, and many others
only have an AWE64 Value with 512k RAM. Yes, I tried Total Recorder and Virtual
Audio Cable, but none of them gave me a "What U Hear" recording source. I also
"force" installed the LiveWare 3.0 and LiveDrvUni-Pack drivers, and none of them
gave the elusive "What U Hear" The only other thing to try to get this CT4780 working
is in Windows 98SE as that may enable "What U Hear"

Well, it is nice to know of a way that FluidSynth can be I guess sort of molded to fit
a certain sound card, like the AWE32/64, although I would not use the settings here for every MIDI but only ones that were made for the AWE32/64 like these. And 40% for reverb and chorus does not seem too extreme but it will be noticeable for sure and nice to hear

That's fine, we have no need for anything to be perfect so long as it sounds close enough to the original sound. I see it will be good to hear how the Audigy2 differs from Fluidsynth and also how similar both of them sound as well.

I do not know where to obtain the 1427 branch of Fluidsynth, but it will be great if you could point me to the right place to find this. My Live! Value sounds pretty close to this as well

I really like how Altitude.mid sounds on the Audigy 2 ZS, I have one too but may need to stick it in a VIA chipset

Yes, I see the modulator for 40% reverb and chorus on all the instruments too.

Did you add the modulator of 40% reverb and chorus to every instrument or is there a faster way ?

I see this looks a bug in FluidSynth, where it plays the wrong instruments in Uplift.mid, and I did mention this in a comment from another issue. I may report this as a formal bug I never heard of Sekaiju, but it looks really cool and does come in handy in a lot of cases.

Again, I really like how Uplift.mid sounds on the Audigy 2 ZS, and many points sound better than Fluidsynth which I will bring up later.

Yea, it is rare to find any soundfont with such high reverb and chorus values of 100%. I personally think that is way too high and is going to drown out the sound at some point. But I guess a preset like "Mega Strings" can lend itself to extreme effects levels.

Yes especially in Altitude.mid at around the 1:10 mark up to 2:20 and again from 2:25 up to very close to the end of the piece. The filter cutoff definitely is lower on the Audigy 2 ZS, hopefully is it not by too much, and look forward to your tests to get a better idea on the amount of the filter cutoff.

@mrbumpy409
Copy link

I made a test file for testing the AWE32 filter cutoff NRPN behavior, but there is a FluidSynth issue that is preventing this test from providing the information I need. When setting filter cutoff via AWE32 NRPN, FluidSynth appears to be setting filter emphasis to 0, overriding the value I have specified in the preset. I need this value to not be overridden in order to accurately identify the filter cutoff point in a spectrogram. Let me know if I should file a separate bug report about this. I am experiencing this using the 1427 branch (compiled from before it was merged).

@derselbst
Copy link
Member Author

When setting filter cutoff via AWE32 NRPN, FluidSynth appears to be setting filter emphasis to 0, overriding the value I have specified in the preset

Yes. From my understanding, the NRPN sets an absolute value for its respective generator, i.e. if an NRPN is present, it overrides the value of that SF2 generator during noteon, here:

/* ...unless the default value has been overridden by an AWE32 NRPN */
if (fluid_channel_get_override_gen_default(synth->channel[chan], i, &awe_val))
{
fluid_voice_gen_set(voice, i, awe_val);
}

Currently, it's not possible to undo this override, unless you send a system reset event. If you prefer a differnet way to handle this, feel free to file a new issue.

@mrbumpy409
Copy link

mrbumpy409 commented Dec 18, 2024

IMO, the filter cutoff NRPN shouldn't override filter emphasis. Only the filter emphasis NRPN should do that. On my Audigy2, setting filter cutoff via NRPN has no impact on the filter emphasis.

@mrbumpy409
Copy link

mrbumpy409 commented Dec 19, 2024

I have created an AWE32 filter cutoff (FC) NRPN test: AWE32_FC_NRPN_test.zip

Here are the test results in a spectrogram, Audigy2 on top, FluidSynth on bottom:
image

Here are details on each test and how FluidSynth currently fares. Each test uses a white noise waveform with 24 dB filter emphasis applied within the preset. This emphasis is to make the filter cutoff point more visible when viewed in a spectrogram:

  1. You will hear four filter sweeps, each one using a different filter cutoff in the preset. If the AWE32 FC NRPN is properly implemented, there should be no difference between the four sweeps:

    1. FC = 20000 Hz
    2. FC = 8000 Hz
    3. FC = 2000 Hz
    4. FC = 200 Hz

    FluidSynth result: The wrong filter curve is used, and the filter cutoff NRPN is causing the preset-level filter emphasis to be canceled, so it is hard to measure the actual cutoff point.

  2. You will hear a fifth filter sweep that emulates the AWE32 FC NRPN filter curve via CC1 modulator. The result should be identical to the test 1 sweeps above.

    FluidSynth result: As expected, FluidSynth renders the CC1 modulator correctly. Since this modulator perfectly emulates the AWE32 FC NRPN behavior on Audigy2, perhaps it could be used as a model for correcting the FluidSynth's AWE32 FC NRPN behavior. The configuration is essentially this:

    • Preset filter cutoff = 100 Hz
    • Modulator curve = unipolar linear positive, amount = 7646 (timecents), destination = filter cutoff
  3. You should hear a sustained white noise wave while the filter switches every two seconds through the following values:

    • 0 (100 Hz)
    • 13 (157 Hz)
    • 25 (237 Hz)
    • 38 (371 Hz)
    • 51 (581 Hz)
    • 64 (910 Hz)
    • 76 (1377 Hz)
    • 89 (2156 Hz)
    • 102 (3376 Hz)
    • 114 (5108 Hz)
    • 127 (8000 Hz)

    Each jump in the filter should sound roughly like the interval of a fifth.

    FluidSynth result: Same issue as test 1.

  4. The same as the above test, but with the AWE32 FC NRPN filter curve emulated via CC1 modulator. The result should be identical to test 3 above.

    FluidSynth result: Same conclusion as test 2.

NOTE: I forgot to mention in the documentation, but the test SoundFont can be loaded into either bank 0 or 1.

DominusExult added a commit to DominusExult/fluidsynth-sans-glib that referenced this pull request Dec 27, 2024
* master: (66 commits)
  Add portamento test files
  Restore discovery of libsndfile on Ubuntu (FluidSynth#1454)
  Fix crash on startup when there are no MIDI devices  (FluidSynth#1447)
  Replace VERSIONINFO resource cmake macro (FluidSynth#1449)
  Fix filter processing order in DSP chain (FluidSynth#1444)
  Render the nervous filter with additional soundfonts
  Add Christian's SF2 spec test to regression tests
  Bump testdata ref
  Migrate test files from LFS to submodule
  Delete test files from Git LFS
  Bump to 2.4.1
  Smooth linear filter parameter change (FluidSynth#1432)
  Reenable AWE32 NRPN 23 and 24 (FluidSynth#1430)
  indentation issue
  Disable chorus for Uplift - it's too noisy in the middle part
  Add Klerg's renderings of Altitude and Uplift
  updated cmake build system * debug output for libsndfile, quieter output for pulseaudio * enhanced build summary report * revised building win32 binaries without unicode support
  add cmake output for sndfile issues
  Fix CI builds (FluidSynth#1435)
  Add test files for AWE32 NRPN (FluidSynth#1434)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants