Author Topic: BASSMIDI note off/on events handling  (Read 630 times)

Zenxia

  • Posts: 132
BASSMIDI note off/on events handling
« on: 11 Jul '21 - 13:35 »
Here's another little tweak for you to try:

   www.un4seen.com/stuff/bassmidi.zip

If it still doesn't match 2.4.12.10, is it better than 2.4.13.18? (the first update I posted in this thread)

Ian you can improve note off/on events handling? 64 voices synth and some sound looks more quiet than other (not is release problem)) i don't want make pseudo reverb.

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #1 on: 12 Jul '21 - 14:29 »
Ian you can improve note off/on events handling?

How would you like to see that improved?

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #2 on: 13 Jul '21 - 18:15 »
Bassmidi Render Synthfont Render Midi Example

1 - Note kills (release curves)
F#4 A5 F#3 and A#3 (rides "Short and long" Maracas and Tambourine) of volume is presented if you touch notes very shortest. See the destiny synthfont render of above.

This is fixes that i want for BASSMIDI Libraries
In synthfont have three type of slopes



I installed soundblaster audigy on my pc and slopes look it as "soundblaster standard".

Direct Music Soft Synth, Synthfont Default uses "Synthfont Standard" that cause slight reverb.

Timidity - Fluidsynth (bassmidi alternative), Microsoft (GS), uses "soundblaster standard"

Bassmidi looks as double of "voice killer" and timidity++ have flag that enables normal voice killer.

2 - Note overlapping Handling


Bassmidi Slope
Bassmidi Seems more quiet piano [Legato]
Synthfont Slope
Synthfont have perfect position of notes, Legato is more notable on piano and rides and tambourine are more notable between other sounds.

Soundblaster uses the third option but doesn't cut instantly.
Bassmidi uses the middle option with cut notes at 0 ms. This is the reason that noteoff delay and legato doesn't work 100% perfect maybe.
« Last Edit: 14 Jul '21 - 16:16 by Zenxia »

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #3 on: 14 Jul '21 - 22:43 »
Event not use linear, still problem between notes.

When play notes simultaneously this samples gets effect of dynamic velocities interval.


Are by default velocity in case of tambourine in others players.
96 53 96 53 96 53 96 53
In bassmidi looks as (more notable when play  normal midi)
96 42 89 48 94 49 92 54

You will not show the difference if play only the channel 10.

Try to make version of bassmidi that hold envelope 10ms before release, when you release key.

ensure that bassmidi release looks as here and doesn't killed with "last note on as note off" at least between the 10 ms hold


if you sucessfully edited you will seems as this
decvoltest.mp3

The last propose maybe help to Bree also, try to make it by default (not all is programmers for test) and if is fine you can add as flag later.
« Last Edit: 15 Jul '21 - 04:42 by Zenxia »

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #4 on: 15 Jul '21 - 15:47 »
Not, not is linear, Linear sound will be pseudo reverb/loudest changing curve. The only of my soundfont that uses linear is series 30 original.

Were you using the same soundfont in both MP3 recordings? If so, please upload that to have a look at (or upload both soundfonts if they're different).

is same soundfont.

This is more notable, is a chiptune GM soundfont.

Destiny Soundblaster and Destiny Bassmidi

Soundblaster is used by timidity++, Microsoft GS, Fluidsynth and beatnik
Bassmidi used by bassmidi.

Below the zipped data

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #5 on: 23 Jul '21 - 16:16 »
When play notes simultaneously this samples gets effect of dynamic velocities interval.


Are by default velocity in case of tambourine in others players.
96 53 96 53 96 53 96 53
In bassmidi looks as (more notable when play  normal midi)
96 42 89 48 94 49 92 54

You will not show the difference if play only the channel 10.

Are you saying that the level of the tambourine is affected by the sound in other MIDI channels? If the other player has floating-point output, you might be hearing the effect of Windows' automatically lowering the volume to prevent clipping/distortion. That will also affect BASSMIDI streams when they're floating-point (using BASS_SAMPLE_FLOAT). 16-bit output won't be affected in the same way because that will already have been clipped (if necessary) before Windows sees it. Another possibility is that the other player has its own compressor effect. The BASS_FX_DX8_COMPRESSOR / BASS_FX_BFX_COMPRESSOR2 effects could be used (via BASS_ChannelSetFX) to do similar with BASSMIDI.

This is more notable, is a chiptune GM soundfont.

One thing I notice about this soundfont is that its samples have a low sample rate, which means there will be quite audible aliasing when they're played with the default linear interpolation. 16 point sinc interpolation should be enabled via the BASS_ATTRIB_MIDI_SRC option for best results.

I did some comparisons of BASSMIDI and SoundBlaster hardware playback, and the volume envelopes looked the same to me but I did notice some strange panning-related volume differences. It looks like SoundBlaster isn't exactly following the MIDI spec panning. I'll try to work out what it's doing.

Try to make version of bassmidi that hold envelope 10ms before release, when you release key.

That isn't in the SF2 spec, and I didn't see any 10ms release delay in my SoundBlaster tests. If you're sure the release should be delayed, please give a specific preset in your soundfont that I should check for this.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #6 on: 16 Aug '21 - 13:45 »
Soundblaster have more performance in sound, the only problem is sometimes detunes (like two instrument playing at same time with same notes and same instrument). this problem is improved in lastest bassmidi, the problem that i talking is the position of notes or skipping. i'm still sure that bassmidi have one problem in this case. the sound is very quiet (this is favorable only for blackmidi) but affect normal midi playback.

Here a two comparison without using any effect between fluidsynth timidity/ Bassmidi

Please solve this issue, you are wrong saying me.

i know that 32 bit attenuates loud sound but this is not case, also reducing volume via sysex you will show issues.

fluidsynth/timidity/microsoft GS doesn't is affected with this.

Show this.

TWSynth/Fluidsynth Sound looks perfectly, without no lagg issues during live playback.

Fluidsynth (noteoff note on perfect position)



Bassmidi random lagg issues, (btw, with cpu throttling disabled) rendered as 16 bit.



I thought that when I was creating the series 30 it was a problem of the soundfont but it was actually Bassmidi's problem.

Fluidsynth uses same decay/release of bassmidi.

Not is more release due if i add more damages the sound and keep lagg/detune problems.

32 bit is nice but this doesn't cause problem on this case, i tried 16 bit and the problem persist.
« Last Edit: 16 Aug '21 - 13:58 by Zenxia »

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #7 on: 19 Aug '21 - 14:08 »
Bassmidi random lagg issues, (btw, with cpu throttling disabled) rendered as 16 bit.

How was that recording produced? Please try with the pre-compiled MIDITEST.EXE example included in the BASSMIDI package for comparison.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #8 on: 30 Aug '21 - 21:11 »
Bassmidi random lagg issues, (btw, with cpu throttling disabled) rendered as 16 bit.

How was that recording produced? Please try with the pre-compiled MIDITEST.EXE example included in the BASSMIDI package for comparison.

Miditest i don't tried but on virtualmidisynth midi converter looks perfect position on/off notes even if i saturates 100% cpu but sound looks quieter than other DLS Synths also detune sound in a specific instruments sometimes.

I tested now with a i5 quad core processor at 2,40GHZ with throttling disabled, but incoherences exist in sound.

The detune between same instruments is improved in 2.4.9+ builds but appear on live playback sometimes and disappears.

Here a Bassmidi
https://mugeminis.ml/downloads/Destiny_Bassmidi.ogg

Fluidsynth/TWSynth/Microsoft GS
https://mugeminis.ml/downloads/Destiny_Fluidsynth.ogg

Bassmidi priority  from my point of view is kill note or stop fastly (slope).

If you observe on fluidsynth (Soundblaster mode) that is the module for that bassmidi is designed. Fluidsynth uses natural release and not cut notes (this is doesn't affected with noteoff option) and bassmidi is very quietest (insist, Favorable for blackmidi but not for normal midi playback).

I mean that if bassmidi want optimize for blackmidi can be limit voices number.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #9 on: 3 Sep '21 - 14:38 »
Bassmidi random lagg issues, (btw, with cpu throttling disabled) rendered as 16 bit.

How was that recording produced? Please try with the pre-compiled MIDITEST.EXE example included in the BASSMIDI package for comparison.

Any changed, i trying to request improvements on note handlings, if you look this doesn't affect fluidsynth but on bassmidi the samples is affected ¿why? what is the exactly problem?

From my point of view with this fix will be 100% stable, look well the sound and look differences.

16 bit and 32 bit doesn't affect in my issue.

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #10 on: 3 Sep '21 - 16:47 »
Are you having problems with BASSMIDI directly or via a MIDI driver? If the latter, it is possible that any problems (especially timing issues) could be introduced by the driver, so please try to reproduce them with BASSMIDI directly, eg. using the MIDITEST.EXE example in the BASSMIDI package.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #11 on: 4 Sep '21 - 02:00 »
Are you having problems with BASSMIDI directly or via a MIDI driver? If the latter, it is possible that any problems (especially timing issues) could be introduced by the driver, so please try to reproduce them with BASSMIDI directly, eg. using the MIDITEST.EXE example in the BASSMIDI package.

Bassmidi directly doesn't seems detunes but sound still very quiet (even Virtual Midi synth midi converter). ¿Maybe a voice killer decay slope problem?

Try soundsets on fluidsynth (or demo of synthfont) and look differences, i love the fluidsynth perfomance that bassmidi currently not reach, i dream that futher bassmidi reach fluidsynth performance.

On fluidsynth my soundfont looks fine but on bassmidi seems a problem anyway.

Please try fluidsynth.
« Last Edit: 4 Sep '21 - 07:23 by Zenxia »

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #12 on: 6 Sep '21 - 12:57 »
Bassmidi directly doesn't seems detunes but sound still very quiet (even Virtual Midi synth midi converter). ¿Maybe a voice killer decay slope problem?

If the overall level is too low then that can be raised via the BASS_ATTRIB_MIDI_VOL setting (or BASS_MIDI_FontSetVolume). If specific preset(s) are too low then please provide a soundfont (and preset number) that you're having the problem with:

   ftp.un4seen.com/incoming/

Voices will only be killed when the voice limit (BASS_ATTRIB_MIDI_VOICES) or CPU limit (BASS_ATTRIB_MIDI_CPU) is hit, so it probably isn't that unless you've lowered either of those settings.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #13 on: 12 Sep '21 - 01:49 »
I have a ramdom problems even in i5 (laptop)

maybe bassmidi note handling.

Try to improve rendering engine of bassmidi and release slope due is more quiet that fluidsynth (soundblaster)

In perfomance timidity is better than bass (never gets detune problem) also in fluidsynth.

In release (or note off) fluidsynth. looks more realistic and natural.

Try to improve this please  ::)

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #14 on: 13 Sep '21 - 13:56 »
I don't hear any obvious problems when playing your attached MIDI file and soundfont with BASSMIDI. Please point out what and where the problem is (what position in the MIDI file). If I recall correctly, you've been mostly/only using BASSMIDI via a MIDI driver, in which case that could be what's causing a problem (especially any timing related). So please make sure you also try BASSMIDI directly.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #15 on: 15 Sep '21 - 05:55 »
I don't hear any obvious problems when playing your attached MIDI file and soundfont with BASSMIDI. Please point out what and where the problem is (what position in the MIDI file). If I recall correctly, you've been mostly/only using BASSMIDI via a MIDI driver, in which case that could be what's causing a problem (especially any timing related). So please make sure you also try BASSMIDI directly.

Ok, Position problem (That causes detune) doesn't appear in bassmidi directly, but the sound is a little more quiet than (Roland DLS or soundblaster) anyway.

This problem doesn't appears in a specific position, is general problem.

This is a comparison, Beatnik DLS add 10ms to the note, Fluidsynth is similar to bassmidi but curve is around 1.66. not velocity is decay/release curve. BASSMIDI use 2.00 maybe?. The processor is very tiny usage (looks as optimized for blackmidi). Synthfont uses more but sound is very accurated.

This can help also in lactency compesation, but the beatnik excites Dynamic Range Experience (Xpress Music). But for soundblaster is better the synthfont (soundblaster mode) slope.
« Last Edit: 15 Sep '21 - 06:03 by Zenxia »

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #16 on: 15 Sep '21 - 16:08 »
So that I can check it myself, please tell what preset you are comparing in your screenshot. Also the note and velocity if it makes a difference.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #17 on: 16 Sep '21 - 04:34 »
So that I can check it myself, please tell what preset you are comparing in your screenshot. Also the note and velocity if it makes a difference.

On the photo i use the soundbank of above and channel 6 of the midi of above).

Look this sound:

https://mugeminis.ml/downloads/Bassmidi.ogg This is quiet.
https://mugeminis.ml/downloads/Synthfont.ogg This is perfectly.

Two uses same decay/release slope but bassmidi notes stop early.






« Last Edit: 16 Sep '21 - 04:43 by Zenxia »

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #18 on: 17 Sep '21 - 13:13 »
Try to add small improvement after note ends like above synthfont.mp3, if you use speaker instead earphones will not see differences.

after fix you will see a nice sound in speakers.

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #19 on: 17 Sep '21 - 13:52 »
On the photo i use the soundbank of above and channel 6 of the midi of above).

I compared the waveforms from BASSMIDI and a SoundBlaster device when playing the first note (F4 with 67 velocity) from channel 6 in that "Roll on.mid" file with that "Lloyd Bank.sf2" soundfont, and they were basically identical. But they didn't look like the waveforms in your screenshot above. Are you sure that's the same preset? Have you also compared with SoundBlaster/Creative output? That is the reference for SF2 and what BASSMIDI is generally trying to emulate.

To avoid any confusion, please create a MIDI file that plays a single note for your comparisons, and if you see a problem then upload that MIDI file along with the soundfont that you used.

Zenxia

  • Posts: 132
Re: BASSMIDI note off/on events handling
« Reply #20 on: 18 Sep '21 - 05:21 »
On the photo i use the soundbank of above and channel 6 of the midi of above).

I compared the waveforms from BASSMIDI and a SoundBlaster device when playing the first note (F4 with 67 velocity) from channel 6 in that "Roll on.mid" file with that "Lloyd Bank.sf2" soundfont, and they were basically identical. But they didn't look like the waveforms in your screenshot above. Are you sure that's the same preset? Have you also compared with SoundBlaster/Creative output? That is the reference for SF2 and what BASSMIDI is generally trying to emulate.

To avoid any confusion, please create a MIDI file that plays a single note for your comparisons, and if you see a problem then upload that MIDI file along with the soundfont that you used.

Here all problem that i found between soundfonts projects (my live on the creative bassmidi softsynth world):

[Lloyd Bank.sf2]
 • Bassmidi (test 1) : looks as fast envelopes quiet sound playback than fluidsynth . (in both same soundfont is used) Solved in midiconverter of coolsoft virtualmidisynth, caused with same position problem

[Mobile 100kB Base.sf2] Samsung Bada!
 • Note width need add 10 ms for solve attenuations between loud and quiet sound, for this you need allow override also "Only kill last note on as noteoff" is unticked Before you will see this omnimidi render more notable the note A5(69) of drumset than this Bassmidi render . I like this because compesates the sample startup ramping and solves completely this problem but sometimes cut this option.
 
[Series 40 1st edition]
 • have issues with unsupported modulator (cc7 to attenuation).

[Qualcomm BREW 2.0]
 • On when you change from 44100 to 22050 i have problem on filter envelopes.
 when i measure on 22050, the effect is more low filtered on 44100, and if i measure in 44100 the sound is less filtered on 22050.
 this doesn't appear on fluidsynth, twsynth, beatnik; also add slight distortion impression, like ADPCM.
 Bassmidi Filtered 22050hz 16bit and Fluidsynth filtered 22050 16 bit on this last is much notable the tambourine ¿Why? idk im sure that use same soundfont in both engines.

I'm learning english, but doesn't is perfectly currently!.

Result= after exahustive analysis. coolsoft bassmidi converter + DSP Normalization + Dynamic Range Compressor by Chris = Beatnik Softsynth XD
« Last Edit: 19 Sep '21 - 10:37 by Zenxia »

Ian @ un4seen

  • Administrator
  • Posts: 23938
Re: BASSMIDI note off/on events handling
« Reply #21 on: 20 Sep '21 - 17:10 »
• On when you change from 44100 to 22050 i have problem on filter envelopes.
 when i measure on 22050, the effect is more low filtered on 44100, and if i measure in 44100 the sound is less filtered on 22050.

Please try enabling 16 point interpolation via the BASS_ATTRIB_MIDI_SRC option and see if that helps (it should reduce muffling of higher frequencies). If you still have this problem (or any others) then please create a MIDI file that plays a single note to reproduce the problem (nothing else), and then upload that and the soundfont. Recordings can be helpful, but I need to be able to reproduce a problem myself to properly investigate it.