BASSMIDI Driver

Have questions? Just saying hello? This is the place.
No explicit, hateful, or hurtful language. Nothing illegal.
User avatar
stephenhazel
Posts: 223
Location: Seattle, WA stephen.hazel@gmail.com

Post by stephenhazel » 04-20-11 8:17 pm

Well, I figured out what it was about bassmidi that my app doesn't like.
If you send sysex to it, it'll never call your callback to mark the message processed.

That can be bad - send a sysex, wait for it's completion, wait forever cuz it never completes.
So my app hangs - oops :)

General Midi specs that MasterVolume control be init'd before you start sending notes.
MasterVolume is a "system common system exclusive event" (if that makes sense?)

Anyways, I hacked my app to never send sysex if bassmidi is in the device description.

I notice latency on windows 7 when I used it.

The sounds ARE pretty nice, though!
I think the piano sounds similar to pianissimum.SF2.
But it must be "optimized" for bassmidi, cuz when I listen to the SF2 on a proper
soundblaster soundcard and REGULAR soundfont synth, it sounds pretty "wierd"...

So I think bassmidi is probably an XP only thing.
The audio probably writes to DirectSound or waveout APIs - which means latency on Vista or better.

Which is the reason i'm interested in checkin out it's actual source which i suspect nobody's got...;)

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 04-20-11 9:34 pm

stephenhazel wrote:Well, I figured out what it was about bassmidi that my app doesn't like. If you send sysex to it, it'll never call your callback to mark the message processed. That can be bad - send a sysex, wait for it's completion, wait forever cuz it never completes. So my app hangs - oops :)
That may be similar to a problem that someone reported when using the BASSMIDI driver with the
"vanBasco's Karaoke Player"... it locks up when selecting the BASSMIDI driver, and/or when playing a MIDI file using that player program.

stephenhazel wrote:I notice latency on windows 7 when I used it.
You know, a few times I've heard latency with the BASSMIDI driver. Running Cakewalk Pro v3.01 under Windows XP Pro SP3; seems that when I was hearing latency, if I shut down and restart CWP a few times, the latency would go away (or rather, down to 5ms).

I dunno why it does that... maybe something to do with the dynamic sample caching. IIRC I think I asked the author about that, and he didn't know what the cause would be.

stephenhazel wrote:So I think bassmidi is probably an XP only thing.
The audio probably writes to DirectSound or waveout APIs - which means latency on Vista or better.
I'm thinking prolly DirectSound. It's definitely one of the two though, as you'll notice that the MIDI volume slider in your Windows mixer deosn't adjust the volume of the BASSMIDI driver... the "Wave/MP3" (digital sound) slider seems to.

stephenhazel wrote:The sounds ARE pretty nice, though! I think the piano sounds similar to pianissimum.SF2.
Are you refering to my WeedsGM3 custom soundfont? I've never heard of the pianissimum.SF2 soundfont though... the 8MB grand piano WeedsGM3 I borrowed from a soundfont from the long-since gone "Sonido Media".

stephenhazel wrote:cuz when I listen to the SF2 on a proper soundblaster soundcard and REGULAR soundfont synth, it sounds pretty "wierd"...
It sounds good on mine... dunno why it would sound different on yours. I have a Sound Blaster Live CT4780 (which is what I usually use for MIDI playback/composing/etc...). Bear in mind that the grand piano in WeedsGM3 is highly layered... if the MIDI volumes are extremely loud within any given MIDI file (MIDI CC#7), the piano will sound quite "clunky"; just like a real piano would <grin>. BTW, for real EMU hardware, ensure that you have a bit of "Concert Hall" EAX reverb enabled for the MIDI output.

Have a listen to this MP3 file (one of my own, rather improvised [de]compositions) -> http://www.cmoo.com/snor/weeds/Stuff/Ri ... nist_2.mp3 . Although I'm a musician of various instruments, I'm NO pianist by any sense of the term LOL! Nonetheless, that's the most realistic sounding grand piano soundfont that I've ever heard :)

(edit) Oh, and another (the beginning of the tune) -> http://www.cmoo.com/snor/weeds/Weeds_Mu ... Longer.mp3 .

stephenhazel wrote:But it must be "optimized" for bassmidi
WeedsGM3 was developed strictly on my old AWE32s and my SBLive (over the course of the past four years or so), I only recently discovered this BASSMIDI Driver thing :)

stephenhazel wrote:Which is the reason i'm interested in checkin out it's actual source which i suspect nobody's got...;)
It's now back online here -> http://mudlord.emuxhaven.net/crap/audio/bassmididrv.rar :)

User avatar
stephenhazel
Posts: 223
Location: Seattle, WA stephen.hazel@gmail.com

Post by stephenhazel » 04-20-11 9:59 pm

Hmmm, maybe it's a problem with my dang softsynth.
Kinda custom, but SHOULD be playing .SF2s run through a conversion process (.SF2=>.WAV+preset params in text) ok.

I know there's a liiiiittle bit of difference between audigy and live. In the edit params.

I'll take back the "it sounds a little weird sometimes" comment.
That's probably just my weird softsynth. I keep finding problems with it :/
I just fixed drum presets not being pitch offsetted correctly, for example.

aaaaaanyways, at least bassmidi works now.

User avatar
stephenhazel
Posts: 223
Location: Seattle, WA stephen.hazel@gmail.com

Post by stephenhazel » 04-20-11 10:15 pm

Oh - and that .RAR file doesn't contain all the source for rendering midi...

It has the code for the app that picks the .SF2 to use and it has another dir of source that sets up
a driver around "bassmidi proper".

But, for example, the driver calls BASS_MIDI_StreamEvents with the midi messages.
BASS_MIDI_StreamEvents must contain the guts that renders midi into audio.
And there ain't no code for DOING that in there.
So I suspect that BASS_MIDI_StreamEvents function is in a .DLL without source available.

So if anybody could point me to the source for BASS_MIDI_StreamEvents, THAT'd be cool :)

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 04-20-11 11:53 pm

stephenhazel wrote:Hmmm, maybe it's a problem with my dang softsynth. I'll take back the "it sounds a little weird sometimes" comment. That's probably just my weird softsynth. I keep finding problems with it :/ I just fixed drum presets not being pitch offsetted correctly, for example.
Ahhh, I misunderstood... I thought that you meant that it sounded fine in a softsynth, but strange on a true EMU hardware device (which didn't makes sense to me <grin>; if anything I'd have thought it would have been just the opposite).

Nevertheless, as I'm sure that you know, soundfont soft-synthing will never sound exactly like true EMU hardware devices (or as good as true hardware devices)... but that BASSMIDI driver (as well as XMPLay with the XMPlay MIDI plugin installed) sure comes darn close :)

stephenhazel wrote:Oh - and that .RAR file doesn't contain all the source for rendering midi...
I'm no coder in any sense of the term (short of my numerious extremely CRUDE and SLOPPY DOS QBASIC proggies LOL!), but maybe this is what you're looking for:

http://www.un4seen.com/bass.html
http://www.un4seen.com/download.php?bass24

http://www.un4seen.com/bass.html#addons
http://www.un4seen.com/download.php?bassmidi24

Being that the BASSMIDI Driver uses Ian Luck's (Un4Seen Development's) "BASS" and "BASSMIDI" audio libraries to do it's thing, maybe those are the files that you need?

User avatar
stephenhazel
Posts: 223
Location: Seattle, WA stephen.hazel@gmail.com

Post by stephenhazel » 04-21-11 1:03 am

well, I looked thru all your links.

I could be wrong about this, but it seeeeems to me that
BASS audio library has many facets, but
BASSMIDI is a .dll that you can call into to render midi to audio.
(in real time the way a softsynth usually does)

BassMidiDrv is the code to make a windows midi device that USES
BASSMIDI.dll like the example source that comes with BASSMIDI do.

Plus a config app and install/uninstall .exes


I thought somebody mentioned that the source to bassmidi was based on
Timidity which is open source which would mean bassmidi would need to
be open source.
And I wouldn't mind takin' a peek at that open source to see how it works it's
magic so I can beef up MY softsynth with a little more knowledge on how
different apps do different tweaky things.

But there's only a bassmidi.dll in the 4 links. No midi rendering source.
Oh well, I'm startin' to ramble here.
My code works with ole bassmidi now, and I got win7 anyway so I should be
thinkin about what to add to my app next.
Well, I know what's goin in next, so writin the code for it.

Mmmmm, tomorrow mornin after the coffee kicks in :shock:

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 04-21-11 7:06 am

stephenhazel wrote:I could be wrong about this, but it seeeeems to me that BASS audio library has many facets, but BASSMIDI is a .dll that you can call into to render midi to audio. (in real time the way a softsynth usually does) BassMidiDrv is the code to make a windows midi device that USES BASSMIDI.dll like the example source that comes with BASSMIDI do.
That's my (limited) understanding of the whole schmear. BASS.DLL are Un4Seen Development's (Ian Luck's) audio libraries, while his BASSMIDI.DLL is an "extension" of sorts for BASS.DLL.

The BASSMIDI driver that Kode54 coded simply installs as a Windows MIDI device that accesses the BASS.DLL and BASSMIDI.DLL audio libraries. FYI, Mudlord simply coded the installer/config utility. AFAIK the actuall BASSMIDI Driver itself (BASSMIDIDrv.dll) hasn't changed a bit since it's initial release by Kode54.

stephenhazel wrote:I thought somebody mentioned that the source to bassmidi was based on Timidity which is open source which would mean bassmidi would need to be open source.
I think there's a blurb in one of the source files about Timidity, but I don't know how much of the BASSMIDI driver is based upon it. The BASSMIDI driver uses the BASS.DLL and BASSMIDI.DLL audio libraries to do it's soundfont rendering, which of course, Timidity does not... so I dunno.

Maybe the only portion of the Timidity source that was used was the actual MIDI playback routines, or possibly the way that the BASSMIDI driver installs as an actual Windows MIDI driver device.

stephenhazel wrote:But there's only a bassmidi.dll in the 4 links. No midi rendering source.
You had previously mentioned "BASS_MIDI_StreamEvents", (in my limited coding knowledge) I figured those were calls to the BASS.DLL and BASSMIDI.DLL audio libraries.

Note that the source for those two audio libraries isn't available (only the coding "kits" in the download links that I mentioned previously)... those are retail libraries by Un4Seen; free for non-commercial usage, but require purchase for something that would be paid-for. BTW, you prolly know this already, but that BASS.DLL is used in a TON of shareware and retail games for their audio output.

stephenhazel wrote:Mmmmm, tomorrow mornin after the coffee kicks in :shock:
Hehe, coffee is a MUST <grin>! :)


(edit) P.S. Dunno why I didn't think of this before (especially since I'm a regular over in the XMPlay section LOL!): Ian Luck has his BASS/BASSMIDI message forums here -> http://www.un4seen.com/forum/?board=1.0 , and posts regularly there with answers for folks' questions :)

aria1121
Posts: 1502

Post by aria1121 » 04-22-11 8:36 am

Has FluidR3GM also some downsides?
I've tried lots of soundfonts since I discovered FluidR3, for me, I'll stick to FluidR3.

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 04-22-11 9:00 am

aria1121 wrote:Has FluidR3GM also some downsides?
Other than IM(not so)HO my WeedsGM3 sounds better <grin>? Nope, no downsides :) Other than it's sheer size of it... some folks may have problems with the BASSMIDI driver using Fluid, as well as loading it into true EMU soundfont hardware.

Not to mention (again IM(not so)HO) I think that the grand piano in mine sounds considerably better... being that the sample size is about that same as Fluid's, and mine is layered (IIRC Fluid's is not).

Anyhow, it's mostly a matter of personal preference... I couldn't count how much discussion (as well as heated arguments LOL!)that I've read throughout the years on the Internet as to "what's the BEST soundfont", and such.

Personally IMHO, I think that "SGM-V2.01.sf2" sounds better than fluid (although that one is about 100MB larger in size); and in some respects "General User GS" sounds better (at a fraction of the size).


Anyhoo, some other rather nice sounding soundfonts of interest (sorry, don't have download URLs for all of the them):

Open World's "Chorium Revision A" SoundFont (28.9 megabytes)
http://www.un4seen.com/download.php?ext ... umRevA.rar

Chris Collins' "General User GS" SoundFont (31.3 megabytes)
http://www.schristiancollins.com/generaluser.php

Frank Wen's "Fluid R3 GM" SoundFont (148.4 megabytes)
http://soundfonts.homemusician.net/coll ... ase_3.html

David Shan's "SGM v2.01" SoundFont (247.4 megabytes)
http://www.geocities.jp/shansoundfont

Airfont 340 v1.01
"A340.sf2" (80.5 megabytes)

Airfont 380 Final
"Airfont 380 GM Final.sf2" (275.9 megabytes)

Arachno Soundfont v1.0
"Arachno SoundFont - Version 1.0.sf2" (155.4 megabytes)

Creative Labs GM Release 1.0 (on the Creative Labs X-Fi Windows Vista driver CD)
28MBGM.sf2 (29.7 megabytes)

Papelmedia SF2 GM 2007 (this one is a retail soundfont, and is NOT freeware)
"Papelmedia SF2 GM 2007.sf2" (241.1 megabytes)

Silverspring Gaming v1.5
"SilverSpring15.sf2" (66.9 megabytes)

Sinfonia (not a complete GM soundfont, only includes orchestral instruments)
"Sinfonia.sf2" (45.5 megabytes)


P.S. For extremely small size and nicely balanced, nothing beats the good old "E-mu Systems GM Revision B" soundfont (8MBGM.sf2 - 7.6 megabytes) :)


...and now for the "totally crap!" list <grin>:

Crisis General MIDI v3.0 - that confounded thing is 1.6GB (that's GIGABYTES!) decompressed, and IM(NOT SO)HO really sounds *horrid* (reguardless of it's size)!

Sonido Media GM Release 1.0 (this one is a retail soundfont, and is NOT freeware)
"Sonido GM 24MB.sf2" (25.3 megabytes)
What a TOTAL waste of money!

aria1121
Posts: 1502

Post by aria1121 » 04-22-11 11:05 am

...i take my words back... :D

Okay, right now downloading Crisis GM @ 380KBps and it's gonn' take a while...

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 04-22-11 11:55 am

aria1121 wrote:Okay, right now downloading Crisis GM @ 380KBps and it's gonn' take a while...
Hehe, if I were you, I wouldn't waste your time... I wish that I hadn't when I originally downloaded it <grin>.

aria1121
Posts: 1502

Post by aria1121 » 04-22-11 1:41 pm

Nice, it's downloaded. But now I need to register to their forum to get the password of the RAR file that contains the soundfont. :( Do you guys know it?

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 04-24-11 8:58 am

aria1121 wrote:Nice, it's downloaded. But now I need to register to their forum to get the password of the RAR file that contains the soundfont. :( Do you guys know it?
No idea. It's been quite some time since I downloaded (and then subsequently deleted) that soundfont, I forget.

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 04-29-11 8:29 pm

@All,

Mudlord just released a new version of the BASSMIDI Driver (now officially "version 1.06"). The driver itself has been updated, as well as the configuration utility.

Version history and driver changelist is here -> http://mudlord.emuxhaven.net/crap/audio ... hanges.txt , download URL is the same as before -> http://mudlord.emuxhaven.net/crap/audio/bassmididrv.exe (of course, uninstall the old version before installing the newer version).


User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 05-01-11 8:48 am

aria1121 wrote:Hehe why is "crap" in the URL?
Hehe, that very thing was asked on another message board that I frequent <grin>.

You know, like "stuff", "misc.", etc... :)


aria1121
Posts: 1502

Post by aria1121 » 05-03-11 10:28 am

After some simple Google searches I found the password. So... I'm gonna test it now. Hopefully it was worth the downloadtime. It is an SFPack, so I needed to decompress it with this.

Edit: Compressed size is 611 MB and when uncompressed 1,57 GB!
Edit 2: RESULT - I don't any diffrence between Crisis and Fluid.

User avatar
RichNagel
Posts: 70
Location: Crystal River, Florida

Post by RichNagel » 05-03-11 11:13 am

aria1121 wrote:Edit: Compressed size is 611 MB and when uncompressed 1,57 GB!
Edit 2: RESULT - I don't any diffrence between Crisis and Fluid.
...and like I said previously, CRAP for it's size :wink:

aria1121
Posts: 1502

Post by aria1121 » 05-03-11 12:33 pm

So I wasted the download-time wait, finding the RAR password, getting all that extracted with my crappy laptop, and trying to put it work?

Instant delete.

Post Reply