Reply 20 of 78, by Reckless
- Rank
- Oldbie
Do you plan to merge the updates into the standalone driver codebase? I know that this is less interesting to most users but for those who would like to use this outside of Dosbox..
Do you plan to merge the updates into the standalone driver codebase? I know that this is less interesting to most users but for those who would like to use this outside of Dosbox..
wrote:Do you plan to merge the updates into the standalone driver codebase? I know that this is less interesting to most users but for those who would like to use this outside of Dosbox..
No, I don't. I am not familiar with the driver codebase.
Awesome 😀
Also seems to unbreak the Theme for Stunts/4D Sports Racing.
Still sounds a bit off (sadly can't compare it to an original MT32) but otherwise this sounds really great compared to earlier builds of MUNT
You seem to be overcompensating for the volume being too high by lowering the volume contrast.
Code like that should be modifiable.
if(velocity>100) velocity=100; // FIXME: noise fix on some games
In synth.cpp, you might want to try changing the following in partial.cpp
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)leftvol) >> 15);
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)rightvol) >> 15);
to
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)leftvol) >> 16);
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)rightvol) >> 16);
Having it at 15 causes crackle in really high volume music notes. (This is without your "if(velocity>100) velocity=100" changes that reduces the max volume.) Maybe it can help a bit with the noise issue.
EDIT: restoring what I undid
wrote:You seem to be overcompensating for the volume being too high by lowering the volume contrast. Code like that should be modifiab […]
You seem to be overcompensating for the volume being too high by lowering the volume contrast.
Code like that should be modifiable.
if(velocity>100) velocity=100; // FIXME: noise fix on some games
In synth.cpp, you might want to try changing the following in partial.cpp
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)leftvol) >> 15);
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)rightvol) >> 15);
to
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)leftvol) >> 16);
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)rightvol) >> 16);
Having it at 15 causes crackle in really high volume music notes. (This is without your "if(velocity>100) velocity=100" changes that reduces the max volume.) Maybe it can help a bit with the noise issue.
Yes, it does but isn't is too low when using >> 16?
If you see first page of this thread, you'll see a change from >> 16 to >> 15 for increasing volume level. That is also part of ScummVM.
It was tested with Exult not DOSBox. It doesn't have a completely up to date changes with ScummVM. The volume isn't too low for me there. It really depends on the music though.
I changed some of the code that ScummVM has and the crackle doesn't appear anymore. I tried to edit it away before you replied.
EDIT: I was using the wrong bin. The crackle still happens. It's early morning here and I haven't gone to be yet.
It just seems weird to force a volume increase and then lower the higher volumes in a patch that states it is trying to increase accuracy. That could be fixed with a configuration for people who want the volume increase over accuracy.
wrote:It's early morning here and I haven't gone to be yet.
It is early morning here, too (about 4:40 AM). 😀 I will go asleep now.
Here is a link to the change to volume level.
http://scummvm.svn.sourceforge.net/viewvc/scu … =20450&r2=29378
That is really weird. Let me know if you get something interesting or finds another solution. Thanks for the information.
Wow, I couldn't even spell "bed" properly.
With
if(velocity>119) velocity=119;
I no longer get crackle. That seems like a much more acceptable volume cutoff. Hopefully it works in the games you had problems with.
(6.3% max volume loss vs 21.26%)
After testing more songs, 119 isn't low enough.
I currently have it set at
if(velocity>116) velocity=116;
I'll have to go through more songs and reply back.
Edit: For Ultima 7 Part 2 Serpent Isle, I had to drop it way down on song 50.
if(velocity>104) velocity=104;
Seems like clamping velocity instead of overall volume level would be a bigger hit to accuracy, as it's ignoring/munging the input data...
Could you lower the sfx volume instead? That shouldn't be too hard if it is using another card type. Is there a way to separate sfx volume data from the music if both are using MT-32 emulation?
Oooh! Always excited to see progress with Munt. I've been distracted with so many other projects it's rare for me to have time to revisit it. Even now I'm on the road and can't very easily test your changes.
Welcome to the broken rubix cube that is MT-32 emulation. Get one thing right for most instruments find that a hand full are still wrong. Correct for the edge cases, fixing sound for some and breaking others. *sigh*
Hi, canadacow. Glad to see you here.
I reverted the volume modification from ScummVM and removed all hacks for noise fix now. (but you'll encounter a bit low volume level)
I found ScummVM is focusing only on MT-32, so there could be something missing for CM-64 emulation.
Hmm, I'm using the CM32 roms, might need to check whether it all sounds correcter with the mt32 ones...
Unfortunately, I got around to testing and you might still hear crackle on some tracks. Track 50 in Serpent Isle still crackles a little bit. Tracks like these are probably pretty rare. What you have as a default now is probably good for most games.
For no quality loss.
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)leftvol) >> 17);
*partialBuf++ = (Bit16s)(((Bit32s)*mixedBuf * (Bit32s)rightvol) >> 17);
This was needed to reduce the volume if at >> 16. (~2.36% max volume loss)
if(velocity>124) velocity=124;
This is still with Exult but should be the same result as DOSBox (even though Exult might not patch it properly). I'll have to build DOSBox with the patch. Then use U7Wizard to set a music egg to play the track and finally start the game to test.
EDIT: DOSBox doesn't have the crackle on track 50. It does happen at one point in the starting menu. I haven't tested any other music since it is a pain.
The cuttoff for that is:
if(velocity>125) velocity=1256;
[code]
Can't compile it on OS X 🙁
/usr/bin/g++-4.2 -arch i386 -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/opt/local/include -O2 -arch i386 -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include -O2 -arch i386 -MT midi.o -MD -MP -MF .deps/midi.Tpo -c -o midi.o midi.cpp
In file included from midi.cpp:79:
midi_mt32.h: In function ‘int MT32_Thread(void*)’:
midi_mt32.h:91: warning: comparison is always true due to limited range of data type
midi_mt32.h: In member function ‘virtual void MidiHandler_mt32::PlayMsg(Bit8u*)’:
midi_mt32.h:213: warning: comparison is always true due to limited range of data type
In file included from midi.cpp:84:
midi_coreaudio.h: In member function ‘virtual bool MidiHandler_coreaudio::Open(const char*)’:
midi_coreaudio.h:57: warning: ‘AUGraphNewNode’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673)
midi_coreaudio.h:57: warning: ‘AUGraphNewNode’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673)
midi_coreaudio.h:63: warning: ‘AUGraphNewNode’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673)
midi_coreaudio.h:63: warning: ‘AUGraphNewNode’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673)
midi_coreaudio.h:73: warning: ‘AUGraphGetNodeInfo’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:687)
midi_coreaudio.h:73: warning: ‘AUGraphGetNodeInfo’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:687)
midi_mt32.h: In function ‘void cpuID(unsigned int, unsigned int*)’:
midi_mt32.h:13: error: can't find a register in class ‘BREG’ while reloading ‘asm’
midi_mt32.h:13: error: ‘asm’ operand has impossible constraints
make[3]: *** [midi.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Pure guessing but that may be asm code for CPU-ID stuff, could try to google if you
find something nice that works on macs for that or hack it out.
Here is cpuID reference used in the munt code.
http://stackoverflow.com/questions/2901694/pr … hyper-threading
This code seems to be for MacOS but I haven't tested it yet.
http://stackoverflow.com/questions/853798/pro … s-from-mac-os-x
You may use midi_mt32.h from v4 instead if it is okay to always utilize multithreaded support.
yes, with midi_mt32.h from v4 it compiled. Thanks
Intro for Ultima 7 with Dosbox+Mt32emu is slightly wrong, the bird chirping is very muted and not the right sound... Otherwise it sounds a lot closer than Exult's usage of a real MT32 (we are doing something wrong there) 😀