VOGONS


First post, by canadacow

User metadata
Rank Member
Rank
Member

On http://www.artworxinn.com/alex I have the current source listed. Its the wincvs.zip file. I have given it this name because I intend to post it to Sourceforge so I, i8hreg and others can collaborate better on the source. With this said, this version of the source is very much a work in progress and may take a little bit of time to compile on your side. Good luck. Hopefully I'll have something more solid by the end of the weekend. Thanks for putting up with me!

Reply 1 of 12, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Right on dude - you rock!

Reply 2 of 12, by runderwo

User metadata
Rank Newbie
Rank
Newbie

Thanks for putting up with me!

Oh please. Do you have any idea how happy your efforts are going to make a lot of people? 😀

Reply 3 of 12, by Snover

User metadata
Rank l33t++
Rank
l33t++

Cool.

...yes, that's all I have to say.

Yes, it’s my fault.

Reply 4 of 12, by runderwo

User metadata
Rank Newbie
Rank
Newbie

ok, I hacked and built the latest source, and spent a few hours trying to get something decent. I'm really not sure what the emulator is expecting when I call the MT32_CallBack function though. I give it a byte buffer and a length that is the number of frames I want, divided by 2. I put some debug output in MT32_CallBack so I can see that the synth is "waking up" when it is sent data, but I'm only getting garbage from the sound output once it does (and eventually alsa died with EPIPE).
source

Reply 5 of 12, by runderwo

User metadata
Rank Newbie
Rank
Newbie

Alright, I wrapped some more code around this and it seems to be working a lot better. There is a lot of audible underruns though, and I don't know if they are at the sound device or if the MT32 is doing something strange. Check out main.cpp:
project

Reply 6 of 12, by canadacow

User metadata
Rank Member
Rank
Member

Doh, should have pointed this out. StdAfx.h is only needed as an include when compiling in Visual C as a driver. Sorry I haven't been more active. My job has me pretty busy at the moment.

Reply 7 of 12, by runderwo

User metadata
Rank Newbie
Rank
Newbie

oh, I've hacked around the build system ok. I'm just trying to figure out why the sound is stuttery and clicky when it comes out. Is my 800MHz Celeron not fast enough for it? Also, some of the voices like the french horn and such seem rather distorted. (Drums sound excellent though)

Reply 8 of 12, by canadacow

User metadata
Rank Member
Rank
Member

hmmm... what sampling rate are you using?

Reply 9 of 12, by runderwo

User metadata
Rank Newbie
Rank
Newbie

44.1KHz... thats what I passed to alsa and also what I put in the params struct passed to the emulator....
Can you perhaps download the mt32 Synth object that's in the core directory, link it with your own code, and see if it works properly? I'm wondering if there isn't some weird optimization/platform bug i'm running into (there are lots of warnings when it compiles about improper assignments)

Reply 10 of 12, by canadacow

User metadata
Rank Member
Rank
Member

The waveforms.raw is dependent on the sampling rate you have it set to. The waveforms.raw file that comes with my DosBox distribution is set to 32Khz where as the driver has a file set to 44Khz. There is an exposed function in my synth library that allows you to recalibrate this file (though it takes time to redo the math) I'm pretty sure that this what you're hearing that's wrong. (I'm going to reinstall Linux tonight and test your code too, btw.)

Reply 11 of 12, by runderwo

User metadata
Rank Newbie
Rank
Newbie

Doh! That would be the problem most likely. Giving it a shot now...
Testing mt32d is easy if you have DOSEMU installed. Under your ~/.dosemu/run directory there should be a dosemu-midi fifo. Just point mt32d to that fifo.
Do you have an instant messenger of any sort or use IRC? I can be found on ICQ at 10317253 or meet on IRC if you want

Reply 12 of 12, by runderwo

User metadata
Rank Newbie
Rank
Newbie

Yeah that definitely fixed the instrument problems, now I need to just figure out the stalling problem and we're all set....