VOGONS


MT-32 emulation

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 62 of 148, by canadacow

User metadata
Rank Member
Rank
Member

Yeah, I'm pretty sure. I've verified this with an examination of the sample output from both an MT-32 and my program. What you are hearing is the high frequency noise that tends to be removed through a comb filter normally implemented during the chorus or reverb phase of synthesis.

Reply 63 of 148, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
Nicht Sehr Gut wrote:

*ack* That's precisely what killed me about COBOL...documentation. He's probably like me, "forget the documentation...just work! WORK!!"

Anything more tedious than "properly document the code" is to "properly document the code" and it still doesn't work. I want it work before I start documenting. Of course, once it's working, I usually don't feel like documenting it. This is probably why I've yet to learn to program.

Yeah well I've had the "document document document!" mentality pounded into me in the last four years of university (I just earned my BSCS this week!), so now I believe in it - especially if I want other people to be able to understand what I was thinking when I wrote something.

And I'm not just talking about putting comments in your code. Writing up some kind of document describing your reasoning for high-level approaches in your work can be just as helpful and crucial to understanding things as a comment explaining why you put a loop on line 32.

Reply 64 of 148, by Nicht Sehr Gut

User metadata
Rank l33t
Rank
l33t

Originally posted by HunterZ Writing up some kind of document describing your reasoning for high-level approaches in your work can be just as helpful and crucial to understanding things as a comment explaining why you put a loop on line 32.

I'm afraid that's far too reasonable and logical a response. I must insist that you stay with within the parameters of "casual disregard" as is standard here...

Reply 65 of 148, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
Nicht Sehr Gut wrote:

I'm afraid that's far too reasonable and logical a response. I must insist that you stay with within the parameters of "casual disregard" as is standard here...

*** 😜 ***

And that's all I have to say about that.

Reply 66 of 148, by canadacow

User metadata
Rank Member
Rank
Member

What's this fascination with documentation? What's there to document? I've made a good deal of headway into my emulator but very little of it is solid yet. Again, there's no point in documenting a low pass filter or FFT pitch scale. If you want to know what those are, go to your public library and check out a few books on DSP (or better yet, just search the net). That stuff is all pretty standard and there's no surprises in my implementation of those things. Where I'm pioneering, however, is in the interpretation of the SysEx parameters.

Reply 68 of 148, by MajorGrubert

User metadata
Rank Member
Rank
Member
HunterZ wrote:

Yeah well I've had the "document document document!" mentality pounded into me in the last four years of university (I just earned my BSCS this week!), so now I believe in it - especially if I want other people to be able to understand what I was thinking when I wrote something.

Yeah, I had that too. It's something from the old school of programming. Take a look at: http://www.pbm.com/~lindahl/real.programmers.html (it's the only online copy I know that has the credits). Then try to figure out your way of coding.

Real Programmers don't need comments-- the code is obvious.

And congratulations for your BSCS. Welcome to the team.

Regards,

Major Grubert

Athlon 64 3200+/Asus K8V-X/1GB DDR400/GeForce FX 5700/SB Live! 5.1

Reply 69 of 148, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
MajorGrubert wrote:

Yeah, I had that too. It's something from the old school of programming.

Well I don't know how "modern" this school was, but they are 100% into object-oriented stuff.

And congratulations for your BSCS. Welcome to the team.

Thanks. Now I have the fun of trying to find a job in the post-"dot-bomb" market 🙄

[edit]OMG I just checked that link. The world has changed! I first learned real programming in C, which even now is "old-school" (FORTRAN is something that most people have barely even heard of now, let alone programmed in).

Last edited by HunterZ on 2003-05-26, 16:49. Edited 1 time in total.

Reply 70 of 148, by MajorGrubert

User metadata
Rank Member
Rank
Member
HunterZ wrote:

OMG I just checked that link. The world has changed! I first learned real programming in C, which even now is "old-school" (FORTRAN is something that most people have barely even heard of now, let alone programmed in).

Well, try to stay away from the "real programming", no matter what languages you learned, and remember this quote:

The determined Real Programmer can write Fortran programs in any language.

Major Grubert

Athlon 64 3200+/Asus K8V-X/1GB DDR400/GeForce FX 5700/SB Live! 5.1

Reply 71 of 148, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
MajorGrubert wrote:

Well, try to stay away from the "real programming", no matter what languages you learned, and remember this quote:

My software engineering professor this last semester told us the same thing: programmers who have used one language for too long and are forced to learn a new one often end up just writing programs in the old language using the new language because they can't or won't wrap their minds around the different way of thinking that spawns each new programming language. That's why I'm trying to stay open-minded and even curious about languages such as Java and C-sharp instead of always sticking to C and C++

Anyways I don't want to take over this thread...Maybe this should/could be moved elsewhere?

Reply 72 of 148, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
canadacow wrote:

What's this fascination with documentation? What's there to document?

Someone else brought it up - I just put in my two cents sermon on documentation.

Looking at your site, it seems like what would be useful in terms of documentation is a write-up or something of the things you've done that you're unsure of, so that others can look it over and think about it. You've mentioned a lot of them here, so I guess that's the same thing as long as people are willing to sift through it here.

I listened to your MP3s and I think it's pretty damned cool that you've got what's there so far. I'm pretty excited about an MT-32 emulator just like everyone else so I wish you the best of luck (and keep doing things in the way that is most comfortable and productive for you! We're just a peanut gallery here so take us with a grain of salt)

Reply 73 of 148, by canadacow

User metadata
Rank Member
Rank
Member
HunterZ wrote:

Looking at your site, it seems like what would be useful in terms of documentation is a write-up or something of the things you've done that you're unsure of, so that others can look it over and think about it.

If I had time beyond what I spending programming my emulator, I'd do that. Only I don't think I'd see much return from it since I haven't gotten that much help with implementing the mathematical stuff anyway. What would help me the most, however, is if someone were to record (at 32000hz, since that is the sampling rate of the MT-32.) unmodified partials in the order they appear on an MT-32. I lost my ebay bid on an MT-32 and as such I'm still without an MT-32 to do this myself.

Reply 75 of 148, by Spikey

User metadata
Rank Oldbie
Rank
Oldbie

One thing I also noticed was you haven't sorted out reverb. Something you'll know if ya love Sierra music (like myself) is that MT-32 soundtracks can be made or broken by the reverb setting.

And I honestly can't believe this idea is put forward by canadacow, yet he/she has no MT-32. Sigh. 😀

Just listened to canadacow's mp3's..
That emulation is hideous.
No reverb/chorus. Unimpressed so far, mate. The MT-32 soundfont still leads at this stage.

Personally, I'd like to see this song emulated. Legend of Kyrandia 1- Outside Brandon's Home <- is the MT-32 version, recorded at 48 KHz, 192 kbps, reverb 10.

Query (For Colin/Vlad and then canadacow separately): How the heck are you going to deal with SysEx instruments?

2nd Query (as above): What's the point of keeping MT-32 piano? It's utterly awful. I don't see the point of you guys going out of your way to emulate it. Same goes for Overdrive, Distortion Guitars. (But mainly Acou Piano 1/2/3, Honkytonk, Elec Piano 1/2/3)

I'm impressed, keep it up lads. Nice idea. Once the project is finished, what will be able to be done with it exactly?
(Even though I own a MT-32, possibilities are still there)

Personally, I'd like to see Roland GS emulators.

Regards,
- Alistair
http://www.sierramusic.tk

Reply 76 of 148, by Zorbid

User metadata
Rank Member
Rank
Member

Why oh why didn't you use the correct term (read the one I know 😉) from the beginning. You talk about partials, I know some stuff about harmonics 😀

Now that the sound is clean, it's pretty obvious that the partials are problematic.

Note, before I start explaining, his is based on memories of my physics course, when I was 17, and on personnal expermienting. So I will most probably not use a very standard vocaulary and conventions... It may be inacurate, too, but I don't think so. I consider the root note as the first partial of a sound.

1. String instruments (See the picture for more details.) have all the partials (at least picked and hit strings, e.g. guitar an piano. I think it's the same for violins, but I'm not sure):

1*root frequency
2*root frequency (exactly one octave above the root)
3*root frequency (more or less one octave and one quint above, see below why it's more or less)
4*root (exactly two octaves above the root)
5*root (more or less two octaves and one major third above)
6*root (more or less two octaves and one quint above)
7*
8 ...

2. pipes with both ends open (Flutes, oboe, organ...):
Root+odd partials

3.pipes with only one end open("Pan flute" (literal transaltion from french, picture yourself a south american indian with a colorful poncho, playing El Condor Passa😁)):
Root+even partials

EDIT: now that I think of it, I think that it's the opposite: a pipe with 1 end open has root+odd, and a pipe with 2 ends open has root+even. It sounds more logical this way, too.

Xylophone, timbals, triangle, other stuff (mostly percussive instruments), I don't know :p

I don't know if every instrument of a given kind uses all the partials described above. What I'm sure though is that a instrument from the second category will never produce an even partial. (The same for the 3rd cat. and Odd partials).

About the more or less:
An octave is 12 half tones
A quint is 7
So, if you take a note, the note thats 7 octaves above == the one that's 12 quints above == the note 84 half tones above.
If the quint frequency was 3/2 the one of the root note, this wouldn't be true.
(((3/2)^12)=129,74...)!=((2^7)=128).

So, if you filter out the root freqency and the first two even harmonics, the third harmonic, that now sounds as if it was the root freqency, but it will not be in tune with the rest of the instruments unless you perform a slight pitch shift on it.

The same is true for every partial tht's not a power of two.
For example, the major third : (((5/4)^3)=1,953125) != 2

The first instrument of the monkey tune: The bass note should be an E. It sounds like a slightly detuned G#. I think it's because every partial below the 5* is filtered out, and it shouldn't.

The flute sound of the main melody has too much partials. try patern n°2 and n°3, it should sound much better. BTW, the ADSR curve of that sound is not correct. Does this depend on the time dependent envelope filter? I have no clue what it is suposed to do.

I hope it helps.

I'll be looking for some help on the mathematical side. I have some engeneers friends. If they can't help themselves, they may know someone interrested in music sythesis who has a good mathematical background. It may not be before a month, because I've little time, and almost no internet access ATM: it's the exams. My sister and my brother need the main computer almost at full time to study. I've typed this on a laptop that has no internet connection, then copied it on the main one to post it.

Attachments

  • partials.png
    Filename
    partials.png
    File size
    89.21 KiB
    Views
    2100 views
    File license
    Fair use/fair dealing exception
Last edited by Zorbid on 2003-05-27, 12:27. Edited 1 time in total.

Reply 77 of 148, by Snover

User metadata
Rank l33t++
Rank
l33t++
Spikey wrote:

One thing I also noticed was you haven't sorted out reverb. Something you'll know if ya love Sierra music (like myself) is that MT-32 soundtracks can be made or broken by the reverb setting.

And I honestly can't believe this idea is put forward by canadacow, yet he/she has no MT-32. Sigh. 😀

See the earlier analogy by Vlad:

Originally posted by vladr
It is clear that a "true" MT-32 emulation will not happen before I solder together the digital recording rig. Once that is done it will be obvious what the exact envelope functions are, how the square and triangular waves are really generated, what the filter characteristics are, what the PCM sample format is, how PCM samples are resampled/interpolated, whether the MT-32 reverb and chorus effects are linear or not and what their FIR is if they are, indeed, linear, etc. But until then canadacow's DosBox-specific emulation will have to do, just as Tatsuyuki's code "had to do" before Jarek's "true" emulation came along replacing Tatsuyuki's code.

Just listened to canadacow's mp3's..
That emulation is hideous.
No reverb/chorus. Unimpressed so far, mate. The MT-32 soundfont still leads at this stage.

Well, he's only been working on it for, uh, two weeks, so I'd say it's pretty good for that amount of time. 😁

Personally, I'd like to see this song emulated. Legend of Kyrandia 1- Outside Brandon's Home <- is the MT-32 version, recorded at 48 KHz, 192 kbps, reverb 10.

All in due time, my friend. It will come together eventually.

Query (For Colin/Vlad and then canadacow separately): How the heck are you going to deal with SysEx instruments?

Um, maybe you aren't quite understanding this. We're emulating the MT-32 -- hardware, everything. SysEx commands will be interpreted just the way the actual MT-32 does it, only virtually.

2nd Query (as above): What's the point of keeping MT-32 piano? It's utterly awful. I don't see the point of you guys going out of your way to emulate it. Same goes for Overdrive, Distortion Guitars. (But mainly Acou Piano 1/2/3, Honkytonk, Elec Piano 1/2/3)

Yes yes, they might be horrible, but something probably still uses them and the goal of this project is to make (eventually) a 100% perfect emulation of the MT-32.

I'm impressed, keep it up lads.


Uhh..

That emulation is hideous.
No reverb/chorus. Unimpressed so far, mate.


Hee.

Nice idea. Once the project is finished, what will be able to be done with it exactly?

Play games with MT-32 soundtrack. If you've already got an MT-32, not such a big deal, but for us without one, watch out. And when your hardware eventually dies, this'll still be kicking around the bits (uhh, 'till Palladium hits, that is).

Personally, I'd like to see Roland GS emulators.

There is one. It's called "Microsoft GS Wavetable SW Synth" and it is included in every version of Windows since Windows 2000.

Yes, it’s my fault.

Reply 78 of 148, by Spikey

User metadata
Rank Oldbie
Rank
Oldbie

Snover,

Yes yes, they might be horrible, but something probably still uses them and the goal of this project is to make (eventually) a 100% perfect emulation of the MT-32.

But I don't understand. Why make an imperfect replica? Why not expand on the original MT-32 and use Sound Canvas piano samples in place?
Piano converts exactly from MT-32/GM. It's a good idea, IMO.
Emulating the MT-32's faults as well as it's successes is hardly smart.
Personally speaking, recording Sierra soundtracks it's annoying to have to record a MT-32 track with piano muted and a Sound Canvas track with piano.
But I doubt game players would want 'nostalgic' MT-32 piano anyway.

Next..
I was referring to your project when I said I was impressed, and canadacow's when I said I was unimpressed. You must feel special quoting my posts to contradict myself 😉 (Actually, I do it all the time myself. But what the hell.)

And finally:

quote: -------------------------------------------------------------------------------- Personally, I'd like to see Roland GS em […]
Show full quote

quote:
--------------------------------------------------------------------------------
Personally, I'd like to see Roland GS emulators.
--------------------------------------------------------------------------------

There is one. It's called "Microsoft GS Wavetable SW Synth" and it is included in every version of Windows since Windows 2000.

If that's what the quality of your MT-32 emulation is going to be like, I'm outta here.
Ever actually used that so-called synth? It's not a synth, random crappy samples thrown together. It sounds awful. A 2MB soundfont does a better job.
Wow, it might have 2 or 3 instruments recorded from Roland synths.
Seriously, before I bought my soundcard I had to use it for 6 months.
It's hideous, and gives General MIDI a bad name.

Anyways, enough for now.

- Alistair

Reply 79 of 148, by canadacow

User metadata
Rank Member
Rank
Member
Zorbid wrote:

Why oh why didn't you use the correct term (read the one I know 😉) from the beginning. You talk about partials, I know some stuff about harmonics 😀

Thanks, but what your idea of a partial and what a "partial" means for the Roland L/A synthesizers are two different things. In Roland trademarked terminology, a "partial" was 1/4 of a sound. Each partial could be either be a synthesized square, sawtooth, or PCM wave. Each partial had its own pitch, filter and amplifier envelope. The synthesizer then mixes these partials to make the sounds you hear. The filtering, you speak of, of course, is built into each partials TVF parameters. The difficulting in emulating is not knowing what to filter, but what the SysEx filter parameters mean.