Author Topic: NRPN Support  (Read 2874 times)

klerg

  • Posts: 34
NRPN Support
« on: 23 Aug '23 - 18:38 »
Hello

Can Non Registered Parameters (NRPNs) for setting the Low Pass Filter be put in BASSMIDI ?

Thanks a lot

Falcosoft

  • Posts: 167
Re: NRPN Support
« Reply #1 on: 24 Aug '23 - 11:50 »
Hello

Can Non Registered Parameters (NRPNs) for setting the Low Pass Filter be put in BASSMIDI ?

Thanks a lot

I do not think Sound Blaster HW specific NRPN's are supported but Low pass Filter/Filter Cut Off frequency can be changed by CC# 74

Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #2 on: 24 Aug '23 - 14:05 »
SoundBlaster NRPN aren't supported but the more common lowpass filter cutoff+resonance NRPN are. A full list of supported NRPN can be found here:

   www.un4seen.com/doc/#bassmidi/implementation.html

klerg

  • Posts: 34
Re: NRPN Support
« Reply #3 on: 25 Aug '23 - 08:22 »

I do not think Sound Blaster HW specific NRPN's are supported but Low pass Filter/Filter Cut Off frequency can be changed by CC# 74

Yes, Bassmidi does not work with the Sound Blaster or AWE32 HW NRPN's that is why I ask if it is possible to support that in some way.


I attached a MIDI that has AWE32 NRPN's but sounds wrong in BASSMIDI. Can BASSMIDI be made to recognize the AWE32 HW NRPN's ?

Thanks again

Falcosoft

  • Posts: 167
Re: NRPN Support
« Reply #4 on: 25 Aug '23 - 12:04 »
@Ian
It seems some of the used NRPN's actually are not AWE specific, and they are also working on SB Live/Audigy (supposedly also on X-Fi but I could not test).
I think most of the functionalities are already implemented in Bassmidi so it is a simple mapping task.
According to my tests at least these are working on all SB HW synths:
NRPN 21 - Filter Cut Off.
NRPN 22 - Resonance filter (Filter-Q)
NRPN 25 - CC# 93 independent Chorus level
NRPN 26 - CC# 91 independent Reverb level


Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #5 on: 25 Aug '23 - 17:54 »
It looks like those AWE32 NRPN may be overriding the SF2-defined values, rather than being applied in addition like the existing NRPN/CC are?

   http://archive.gamedev.net/archive/reference/articles/article445.html

Falcosoft

  • Posts: 167
Re: NRPN Support
« Reply #6 on: 25 Aug '23 - 21:00 »
It looks like those AWE32 NRPN may be overriding the SF2-defined values, rather than being applied in addition like the existing NRPN/CC are?

   http://archive.gamedev.net/archive/reference/articles/article445.html

Hi Ian,
What tests should I do so I can give you a definitive answer to your question?
BTW, I can do tests only on SB Live 5.1 and Audigy 2 ZS. I have no AWE32/64 hardware currently.

Ps: The reverb and chorus level NRPN's definitely ignore CC#91/93.
I have also made a test video with Audigy 2 ZS HW synth and Bassmidi using the same soundfont and the Midi file attached above:
https://youtu.be/t_YBOQPTApg

The used soundfont can be downloaded from here:
http://falcosoft.hu/reality_gmgs_falcomod.zip
« Last Edit: 25 Aug '23 - 21:32 by Falcosoft »

klerg

  • Posts: 34
Re: NRPN Support
« Reply #7 on: 26 Aug '23 - 23:13 »
Yes I'm only using a SB Live! at this time and it works with AWE32 NRPN's, I have an Audigy 2 ZS that also picks up the AWE32 NRPN's. Will try my X-Fi soon and I assume it works.
I hope that is the case and it will not be hard to support AWE32 NRPN, but what is it that needs to be mapped ?

Well, I dug up an old Creative Labs doc called "Developer's Information Pack" for AWE32 and it says this on page 83 or 84:
"Non-Registered Parameter Numbers are used to represent sound or performance parameters, and in the case of the EMU8000, SoundFont Parameters"

https://www.phatcode.net/res/244/files/adip301.pdf

So I think the answer is yes, it does override the 'SF2-defined values' as that is the point of NRPNs compared to Continous Controllers which are an addition. Can this be an issue ?

I have no clue what test needs to be done that will prove the above, but like to help if able.

Appreciate the video, as you can hear a filter on the bass in the Audigy 2 ZS but not with BASSMIDI.
« Last Edit: 26 Aug '23 - 23:18 by klerg »

Falcosoft

  • Posts: 167
Re: NRPN Support
« Reply #8 on: 27 Aug '23 - 03:48 »
...
I hope that is the case and it will not be hard to support AWE32 NRPN, but what is it that needs to be mapped ?
...

If it was true that SB HW NRPN's work the same way as existing ones that are already working in Bassmidi then you could simply map the SB specific NRPN's to the existing ones.
E.g. in the already supported NRPN's list linked above by Ian you can see the following ones:
NRPN 0120 (Filter Cutoff Frequency)   yes (yes means already supported)
NRPN 0121 (Filter Resonance)            yes (yes means already supported)

So if they were working the same way then you could simply map the SB specific NRPN 21 - Filter Cut Off to NRPN 0120 (Filter Cutoff Frequency) and SB specific NRPN 22 - Resonance filter (Filter-Q) to NRPN 0121 (Filter Resonance).

I think Ian asked his question about 'overriding or adding' since currently in Bassmidi both NRPN's and Common Controllers behave similarly which means they alter/modify the SF2 parameters (not completely replacing them).

Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #9 on: 28 Aug '23 - 13:06 »
Yeah, if the AWE32 NRPN are absolute rather than relative then they can't reliably be mapped to the existing NRPN/CC events (which are relative). I suppose an approximation may still be possible so that some effect is heard, ie. convert the absolute values to relative based on some assumed default values.

klerg

  • Posts: 34
Re: NRPN Support
« Reply #10 on: 28 Aug '23 - 16:20 »
It does not look like the SB HW NRPN's work in the same way as the ones in BASSMIDI. Ok now I get what is meant by 'map' in the case but how do you go about doing this ?
Yes, that is the first link posted on the BASSMIDI implementation chart for MIDI

I see my hope is they do work in the same way but it is not proven yet. So, BASSMIDI does not know NRPN 21 for Filter Cut Off and NRPN 22 for Resonance Filter (Filter-Q) but it is NRPN 0120 and 0121. Again, how do you 'map' this ?

My understanding of NRPN messages is that they do override the existing sound settings of a preset or patch. And it is only Common Controllers that alter or modify the SF2 parameters but do not replace them or I might be wrong here.

At this point it appears the AWE32 NRPN are absolute not relative and it seems there is no way to prove that or show this too. So, it is possible to support AWE32 NRPN but it does not look like it will be easy. If you need any help just let me know and I hope to do something to get this recognized and working.

Falcosoft

  • Posts: 167
Re: NRPN Support
« Reply #11 on: 28 Aug '23 - 18:03 »
...
My understanding of NRPN messages is that they do override the existing sound settings of a preset or patch. And it is only Common Controllers that alter or modify the SF2 parameters but do not replace them or I might be wrong here.
...

No, there is no such rule. At least there is no such rule outside of Creative's world. In case of Roland/Yamaha gears NRPNs often simply reflect the same functions that you can achieve also through Common Controllers.
E.g. in case of Roland SC-VA NRPN 01,08 Vibrato Rate is exactly the same function as CC# 76. And NRPN 01,09 Vibrato Depth is the same function as CC# 77.
« Last Edit: 28 Aug '23 - 18:10 by Falcosoft »

klerg

  • Posts: 34
Re: NRPN Support
« Reply #12 on: 30 Aug '23 - 00:45 »
No, there is no such rule. At least there is no such rule outside of Creative's world. In case of Roland/Yamaha gears NRPNs often simply reflect the same functions that you can achieve also through Common Controllers.
E.g. in case of Roland SC-VA NRPN 01,08 Vibrato Rate is exactly the same function as CC# 76. And NRPN 01,09 Vibrato Depth is the same function as CC# 77.


Ok I guess that is good to know. And why would Creative be any different in this case ? I assume this applies to Roland and Yamaha sound cards as well. I wonder why Creative chose NRPN over Common Controllers here.
I see what is meant by that, but how do you 'map' AWE32 NRPN's to BASSMIDI's NRPN, and is any way to find out if the AWE32 NRPN is absolute or relative ?

Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #13 on: 30 Aug '23 - 13:22 »
Roland/Yamaha would have used NRPN because the corresponding CC hadn't been standardised yet at that time. The CC were standardised in GM2, I believe.

The Creative/AWE32 NRPN also predate GM2, but they also behave quite differently to the standard CC, so can't be interchanged. The document that you linked earlier shows that the NRPN are absolute:

Quote
NRPN LSB 21 (Initial Filter Cutoff)
Realtime : Yes
Range : [0, 127]
Unit : 62Hz
Filter cutoff from 100Hz to 8000Hz.

Whereas Roland/Yamaha describe NRPN 0120 (and CC74) like this:

Quote
01H 20H mmH Filter Cutoff Frequency mm:00H–40H–7FH (–64…0…+63)

That means there is no change to the cutoff at 40h (64), with lower values lowering it and higher values raising it, ie. it is relative rather than absolute like in the AWE32 case. That difference means it'll be impossible to accurately map between them, but perhaps an approximation will be possible, so that at least some effect is heard from the AWE32 NRPN. I'll look into it.

klerg

  • Posts: 34
Re: NRPN Support
« Reply #14 on: 31 Aug '23 - 08:32 »

I think you mean Creative used NRPN because at that time 1994 to 1996 there was no such thing as GM2, and so it was not standardised, and that makes sense.

Yes the AWE32 NRPN came out almost four years before GM2, yes I knew that doc somehow explained that the NRPN are absolute, but it is really for 'Developers' and that is why I was not able to confirm.

Can you put the link to where you get this info from ? My guess it is in the MIDI implementation chart for some Roland synth just not sure which one we are looking at. Is it one of the soft synths by chance ? I do not follow you here, but if you need help, let me know. I'd like to hear how close it will sound to the SB AWE32/64, Live!, and Audigy HW, and how long will it take you to do this ?

Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #15 on: 31 Aug '23 - 16:03 »
The NRPN info can be found in the documentation of pretty much any Roland/Yamaha MIDI device. Note it doesn't include any implementation details (eg. on exactly how the cutoff is affected) but does state that it is relative. Here's an example:

   http://cdn.roland.com/assets/media/pdf/AT-20R_30R_MI.pdf

Anyway, here's a BASSMIDI update that translates the AWE32 filter NRPN (21/22) to the existing filter NRPN/CC events:

   www.un4seen.com/stuff/bassmidi.zip

Due to the previously mentioned differences, it's unlikely to sound exactly as the author intended but at least something will be heard :)

klerg

  • Posts: 34
Re: NRPN Support
« Reply #16 on: 1 Sep '23 - 08:00 »
Yes it looks like both Roland and Yamaha MIDI devices have nearly identical NRPN documentation. I do see relative in parenthesis. I wonder if the Creative doc has implementation details and if so, does it say exactly how the cutoff is affected ?

Appreciate it, not bad and better than nothing, do you plan to put out this update in the next release of BASSMIDI ?

What is the difference of absolute and relative ? It sounds quite off from the SB HW. Why is the filter heard much less in this version ?

Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #17 on: 1 Sep '23 - 11:49 »
I wonder if the Creative doc has implementation details and if so, does it say exactly how the cutoff is affected ?

Yes, it does (see "Filter cutoff from 100Hz to 8000Hz").

Appreciate it, not bad and better than nothing, do you plan to put out this update in the next release of BASSMIDI ?

Yes, it will be included in the next release.

What is the difference of absolute and relative ?

"absolute" means the NRPN's value replaces the soundfont's value, while "relative" means the NRPN's value is added to the soundfont's value.

klerg

  • Posts: 34
Re: NRPN Support
« Reply #18 on: 2 Sep '23 - 08:04 »
Yes, it does (see "Filter cutoff from 100Hz to 8000Hz").

Can the BASSMIDI NRPN 0120 go down to 100Hz and if not how low ?

Yes, it will be included in the next release.

Sounds good, and when will that next release be ?

"absolute" means the NRPN's value replaces the soundfont's value, while "relative" means the NRPN's value is added to the soundfont's value.

Yes that is how I figured it worked as well, but does this mean the 'relative' value will always be higher than an 'absolute' one or can you avoid this ?

Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #19 on: 4 Sep '23 - 17:46 »
BASSMIDI's NRPN/CC cutoff range is +/-4 octaves. The AWE32 NRPN conversion assumes a default of 8000Hz, which means the conversion will be accurate if the soundfont sets the cutoff to 8000Hz (or above) and the NRPN sets it to 500Hz (4 octaves below 8000Hz) or above. If the soundfont sets the cutoff below 8000Hz, then the NRPN conversion result will be lower than intended (except possibly for NRPN settings below 500Hz if they're still more than 4 octaves below).

No date has been set yet for the next BASSMIDI release, but you can use the update above in the meantime. It is a "release" build.

klerg

  • Posts: 34
Re: NRPN Support
« Reply #20 on: 6 Sep '23 - 08:00 »
I see and what is the AWE32 NRPN octave range as well ? When the filter frequency is at 8000Hz or above then no filtering is going to be heard. So, if the NRPN is at 500Hz will that be equal to a cutoff of 8000Hz and is that why the filter sounds 'light' and not as 'deep' ? But shouldn't the NRPN conversion sound 'higher' and not 'lower' then intended if the soundfont cutoff is below 8000Hz ? Do you mean to say that the BASSMIDI's NRPN can go down to 100Hz like the AWE32 NRPN's ?

Sure that is fine and hope one will be set soon for that then. Yes, I replaced the bassmidi.dll and it sounds better, but still far off from SB HW.

Ian @ un4seen

  • Administrator
  • Posts: 25596
Re: NRPN Support
« Reply #21 on: 6 Sep '23 - 13:07 »
I see and what is the AWE32 NRPN octave range as well ?

The AWE32 NRPN range is 100Hz to 8000Hz. 100Hz is 6.3 octaves below 8000Hz.

When the filter frequency is at 8000Hz or above then no filtering is going to be heard. So, if the NRPN is at 500Hz will that be equal to a cutoff of 8000Hz and is that why the filter sounds 'light' and not as 'deep' ?

No, an AWE32 NRPN cutoff of 500Hz will still be 500Hz after conversion in BASSMIDI (if the soundfont's cutoff is 8000Hz/off). But an AWE32 NRPN cutoff of 400Hz will also be 500Hz after conversion due to the 4 octave range.

But shouldn't the NRPN conversion sound 'higher' and not 'lower' then intended if the soundfont cutoff is below 8000Hz ? Do you mean to say that the BASSMIDI's NRPN can go down to 100Hz like the AWE32 NRPN's ?

Remember that the standard NRPN/CC cutoff is relative to the soundfont's cutoff, which means a lower soundfont cutoff will result in a lower final cutoff. If the soundfont's cutoff is 1600Hz then the NRPN can go down to 100Hz (4 octaves below 1600Hz).

klerg

  • Posts: 34
Re: NRPN Support
« Reply #22 on: 7 Sep '23 - 07:28 »
The AWE32 NRPN range is 100Hz to 8000Hz. 100Hz is 6.3 octaves below 8000Hz.

Sure is any way to get BASSMIDI'S NRPN up to 6.3 octaves and what will that do ?


No, an AWE32 NRPN cutoff of 500Hz will still be 500Hz after conversion in BASSMIDI (if the soundfont's cutoff is 8000Hz/off). But an AWE32 NRPN cutoff of 400Hz will also be 500Hz after conversion due to the 4 octave range.

Ok, if an AWE32 NRPN cutoff is 500Hz can the soundfont's cutoff not be the same or will it be different, and if so, how ? Does this mean an AWE32 NRPN cutoff of 100 to 400Hz is going to be 500Hz when converted too ?



Remember that the standard NRPN/CC cutoff is relative to the soundfont's cutoff, which means a lower soundfont cutoff will result in a lower final cutoff. If the soundfont's cutoff is 1600Hz then the NRPN can go down to 100Hz (4 octaves below 1600Hz).

When you say standard NRPN/CC cutoff is that BASSMIDI's NRPN/CC cutoff ? If yes, is that not relative to the AWE32 NRPN cutoff as well ? Is the AWE32 NRPN cutoff the same thing as the soundfont's cutoff ? How can that MIDI sound closer to SB HW in BASSMIDI ?

Falcosoft

  • Posts: 167
Re: NRPN Support
« Reply #23 on: 7 Sep '23 - 09:16 »
Do you have other examples where the modified Basmmidi really "sounds off" compared to SB Hardware?
I'm asking since the one example you linked above (The Nervous Filter.mid) sounds pretty good for me with the modified Bassmidi (I tested with various soundfonts).
Notice that almost none of Bassmidi's effects/parameters are axactly the same as on SB Hardware. Reverb/Chorus as well as default modulation parameters etc. are quite different.
So I do not think it's worth the effort to make NRPN filter cut off to work exactly like on SB hardware considering it's a much rarely used effect compared to the mentioned ones.

klerg

  • Posts: 34
Re: NRPN Support
« Reply #24 on: 8 Sep '23 - 08:00 »

I do not have anything else at this time and may need to come up with an example on my own it looks like
Well, the one I linked (The Nervous Filter.mid) only sounds pretty good if you compare it to the un-modified Bassmidi, but not the SB Hardware it is hardly close to that.
Yes, but to me BASSMIDI's effects/parameters sound quite near to the SB Hardware unlike the NRPN. Reverb, Chorus, and modulation is good enough for most things I noticed so far.
I agree it is too much to make the NRPN filter cut off to be exactly like the SB hardware but maybe it can sound closer or the filter will be able to be heard in a greater sense or level.