Request for floating point arithmetic version

Developer's Forum for discussion of bugs, code, and other developmental aspects of the Munt Project.

Request for floating point arithmetic version

Postby Spikey » 2016-12-14 @ 15:22

Hey sergm and others,

I would have PM'd you this but you have that feature disabled for some reason.

Basically, I have heard some samples a friend recorded where he tweaked the source code for a project of his and enabled floating point instead of integer, which stopped the MT-32's quantization noise. It was surprisingly improved.

As I record the MT-32's output for my Sierra music website, I would love to have this feature when I use MUNT as a MIDI audio source. Apparently it would not be hard to implement, and I would be very grateful if it could happen.

Regards,
- Spike
User avatar
Spikey
Member
 
Posts: 186
Joined: 2003-2-04 @ 10:36
Location: South Australia

Re: Request for floating point arithmetic version

Postby Jorpho » 2016-12-14 @ 16:26

Since you're recording from Sierra games, might I suggest checking to see if this particular feature is already implemented in ScummVM?
User avatar
Jorpho
l33t++
 
Posts: 7043
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: Request for floating point arithmetic version

Postby collector » 2016-12-14 @ 17:32

ScummVM's MUNT is pretty much a straight implementation of standalone MUNT and is only as recent as the state of MUNT at the time of the last release.
User avatar
collector
l33t
 
Posts: 3936
Joined: 2003-1-15 @ 10:39

Re: Request for floating point arithmetic version

Postby sergm » 2016-12-17 @ 08:57

Spikey, this shouldn't be an issue. It's just a matter of setting a compiler define, so I can easily build something if you provide details which tool you'd like to have and for which platform.

But I still think that enabling this option isn't too advantageous. Perhaps, it's rather specific. See, the library not only creates samples in float format, it uses different algorithm in fact. There are lot more sources of noise aside from quantisation to 16-bit samples. That is, this "float" algorithm creates waves more precisely in terms of mathematics but less accurate in terms of emulation. If this isn't a problem, feel free to use it.
sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Re: Request for floating point arithmetic version

Postby NewRisingSun » 2016-12-17 @ 18:10

I'm happy that MUNT by default tries to be as accurate in its emulation as possible. Emulate the original machine, even its flaws, is the way to go. Nevertheless, listening with headphones exhibits some of the MT-32's flaws, and when given the choice, I prefer the floating-point version for the listening experience.

Listen to the introduction music of Ultima VII Part 2: Serpent Isle, the way it sounds with normal MUNT or a real MT-32/CM module, versus recompiled MUNT with floating point arithmetic. The Synth Brass at the start exhibit the quantization noise very well, which is completely absent in the floating point recording, even as the rest of the track is just as bright.

Having gone through hell getting glib to compile in MingW so I could successfully compile smf2wav with floating point arithmetic (what are you using it for anyway? ;)), I am too burned to install QT to compile the GUI version of MUNT, otherwise I would do it for Spikey.
NewRisingSun
Oldbie
 
Posts: 756
Joined: 2005-9-02 @ 02:26

Re: Request for floating point arithmetic version

Postby sergm » 2016-12-17 @ 20:57

This sounds like you guys would be happy if this compiler switch eventually became a runtime option. Damn, my struggle against muffled sound turns out to be for nothing lol
sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Re: Request for floating point arithmetic version

Postby DOSUserDude » 2016-12-21 @ 16:21

sergm wrote:This sounds like you guys would be happy if this compiler switch eventually became a runtime option. Damn, my struggle against muffled sound turns out to be for nothing lol


I'd take that and a runtime console option as well...
DOSUserDude
Newbie
 
Posts: 7
Joined: 2016-4-17 @ 13:57

Re: Request for floating point arithmetic version

Postby Spikey » 2016-12-26 @ 05:22

Spikey, this shouldn't be an issue. It's just a matter of setting a compiler define, so I can easily build something if you provide details which tool you'd like to have and for which platform.

But I still think that enabling this option isn't too advantageous. Perhaps, it's rather specific. See, the library not only creates samples in float format, it uses different algorithm in fact. There are lot more sources of noise aside from quantisation to 16-bit samples. That is, this "float" algorithm creates waves more precisely in terms of mathematics but less accurate in terms of emulation. If this isn't a problem, feel free to use it.

Sergey,

Awesome, thank you. I am running MUNT mt32emu_qt on Win 7 64-bit.

NewRisingSun and I were talking about this. If you listen to the example he provided, you can objectively hear that the 32-bit recording sounds cleaner and 'better' (at least to me), with no downside that I was aware of.

The point for me is less 'accuracy' for more quality (I don't know that accuracy is how I would describe a technological/hardware limitation, but let's go with it for now). If I am making a recording where there are multiple synthesizers, no one will notice a slight difference in MT-32 timbre on a couple patches, but the overall noise floor being lower and the recording being crisper will be noticeable.

At the very least it's not a bad option to have and it gives people such as myself flexibility.

What is your 'struggle against muffled sound'? As NRS said, I am for accuracy, that's what we want for games. But the example he posted sounds more muffled in the 'accurate' version!

Regards, and thanks for all you guys do.
- Spikey
User avatar
Spikey
Member
 
Posts: 186
Joined: 2003-2-04 @ 10:36
Location: South Australia

Re: Request for floating point arithmetic version

Postby sergm » 2016-12-26 @ 08:10

sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Re: Request for floating point arithmetic version

Postby Kaminari » 2016-12-26 @ 17:27

I'm going to play the devil's advocate, as I can objectively say I can't hear a notable difference between the two recordings above.

The synth brass in Ultima 7 's intro might be a wee tad less noisy, but it could also be a placebo -- for sure I'd never have noticed it if NRS hadn't mentioned that specific part. More options are good, but for me the marginal improvement (if any) isn't justified if that compromises accuracy.
Core2 Quad Q6600 3.0 GHz | Radeon R9 280X 3 GB | DDR2 8.0 GB | Win7-64 SP1
User avatar
Kaminari
Oldbie
 
Posts: 768
Joined: 2002-12-06 @ 01:54

Re: Request for floating point arithmetic version

Postby sergm » 2016-12-26 @ 19:22

I believe this stuff is quite subjective and a matter of personal preference. During development, we rather rely on frequency spectrum of output signals than on ear. But anyway, we provide some other runtime options to change emulation, including accuracy, so this one should also be available. The only problem to implement it is usage of different sample types but this can indeed be solved.
sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Re: Request for floating point arithmetic version

Postby NewRisingSun » 2016-12-28 @ 20:24

The difference becomes easier to hear when you listen with headphones, and when using an old MT-32 control ROM (e.g. v1.07).
NewRisingSun
Oldbie
 
Posts: 756
Joined: 2005-9-02 @ 02:26

Re: Request for floating point arithmetic version

Postby KainXVIII » 2016-12-28 @ 21:22

sergm wrote:Here you are, guys, the build of mt32emu-qt with reduced output noise. Have fun ;)

Why not 2.0 version?
User avatar
KainXVIII
Member
 
Posts: 205
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: Request for floating point arithmetic version

Postby NewRisingSun » 2016-12-29 @ 18:51

Something strange happens when using that QT build with the control ROM for the old MT-32 v1.07. Play INIT.SYX and CHAN9.MID; you'll hear a faint but clearly audible kind of "screaming note" in the reverb of the snare drum. This does not occur when using the CM-32L ROM. The screaming note is even louder and grating when I compile myself smf2wav using the 2.0 sources (see attached CHAN9.FLAC) with the floating point option. As the problem is there in sergm's build as well, I don't think it's due to a mistake in my self-compiled build.
You do not have the required permissions to view the files attached to this post.
NewRisingSun
Oldbie
 
Posts: 756
Joined: 2005-9-02 @ 02:26

Re: Request for floating point arithmetic version

Postby NewRisingSun » 2017-2-03 @ 19:55

@sergm: Have you had a chance to look at this issue yet?
NewRisingSun
Oldbie
 
Posts: 756
Joined: 2005-9-02 @ 02:26

Re: Request for floating point arithmetic version

Postby sergm » 2017-2-04 @ 07:12

Sorry, haven't find a way to reproduce it yet. Tried directly "mt32emu-qt.exe convert CHAN9.wav INIT.SYX CHAN9.MID" with the build mentioned and hear nothing suspicious. Maybe I'm missing something...
You do not have the required permissions to view the files attached to this post.
sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Re: Request for floating point arithmetic version

Postby sergm » 2017-2-04 @ 07:22

...and with smf2wav-float-x64 (using MT-32 ROM 1.07 indeed).
You do not have the required permissions to view the files attached to this post.
sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Re: Request for floating point arithmetic version

Postby NewRisingSun » 2017-2-04 @ 11:42

Why, it's right there in your CHAN9_QT.flac file. It's more faint than in my recording, but definitely there after three seconds. A mid-pitched note with a vibrato at the end. You might have to turn up the volume a bit to hear it.
NewRisingSun
Oldbie
 
Posts: 756
Joined: 2005-9-02 @ 02:26

Re: Request for floating point arithmetic version

Postby sergm » 2017-2-04 @ 16:13

Well, really it is. I had to use "Amplify" tool in Audacity to reveal it. Though, the similar thing is there when converting this MID using the "stock" mt32emu-qt build. Another matter is I can't reproduce it with smf2wav completely, so it's worth more debugging...
sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Re: Request for floating point arithmetic version

Postby sergm » 2017-2-25 @ 18:34

This seems to be a kind of use of uninitialised data. It's very well reproduced on Linux when compiling for debug, so I'm on it. It's shown as
Code: Select all
MT32: "Rhythm (??????????): Start poly (drum 28, timbre 222): midiKey 52, key 52, velo 100, mod 0, exp 100, bend 0"

It just has nothing to do with MT32EMU_USE_FLOAT_SAMPLES definition ;)
sergm
Oldbie
 
Posts: 677
Joined: 2011-2-23 @ 16:37

Next

Return to MT-32 Development

Who is online

Users browsing this forum: No registered users and 1 guest