NRPN Support

Started by klerg,

klerg

Hello

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

Thanks a lot

Falcosoft

Quote from: klergHello

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

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

Quote from: FalcosoftI 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

@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

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

#6
Quote from: Ian @ un4seenIt 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

klerg

#7
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.

Falcosoft

Quote from: klerg...
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

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

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

#11
Quote from: klerg...
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.

klerg

Quote from: FalcosoftNo, 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

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:

QuoteNRPN 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:

Quote01H 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


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

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

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

Quote from: klergI 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").

Quote from: klergAppreciate 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.

Quote from: klergWhat 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

Quote from: Ian @ un4seenYes, it does (see "Filter cutoff from 100Hz to 8000Hz").

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

Quote from: Ian @ un4seenYes, it will be included in the next release.

Sounds good, and when will that next release be ?

Quote from: Ian @ un4seen"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

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.