Legend of Kyrandia enhanced audio

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

User avatar
KainXVIII
Posts: 61
Joined: Mon Feb 11, 2008 10:00 pm
Location: Russia

Post by KainXVIII »

Thanx for the great job, Pix2!
Looking forward for next release =)
User avatar
LordHoto
ScummVM Developer
Posts: 1029
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Post by LordHoto »

Pix2 wrote:The changed source is at:-

http://pix.www.idnet.com/kyrasource.rar

Its still a hack but I've spent some more time on it and its pretty much fully working now. It works with adlib as well as midi, the tracks now loop appropriately and they are pretty much all mapped in with just a few of the smaller ones missing. Also, it will now fall back to adlib/midi if the digital audio is unavailable for any reason.
Usually a diff/patch file is easier to check and merge than complete source files, but it looks really strange that sound_adlib.cpp is modified...
Theres no reason why it can't be made to work - the new code just looks for audio files named lok1, lok2, etc. and will play whatever it finds. Due to lazyness on my part, the oggs need to be named .vog instead of .ogg at the moment.
The filenames etc. suggest you don't use our CD audio player code in sound/ for those tracks?
Pix2
Posts: 100
Joined: Sat Apr 05, 2008 12:02 pm
Contact:

Post by Pix2 »

Give me chance to sort the code out first before I think about patch files. I only posted the source as md5 asked for it - I wouldn't expect anyone to accept it as is.

As you no doubt guessed, I put the music in a new voice channel, rather than using your cd-audio as it was the easiest option at the time. I'll fix that along with everything else when I get the chance.
Pix2
Posts: 100
Joined: Sat Apr 05, 2008 12:02 pm
Contact:

Post by Pix2 »

I've had a word with Alasdair over at the Sierra Music Channel. His opinion is that the game would be better played with the original sound track as his was designed for listening to outside the game. I agree with him so I won't be adding support for it and will stick with the original MT-32 tracks. If anyone else wants to have a go, then please contact him first.

I've finished tidying up the code at any rate and updated the source archive including a patch file this time. I've rehashed the archive with the music tracks also with a new naming scheme since I'm now using the CDAudio player. If I was being picky, I'd probably do some of the sound effects but it doesn't seem strictly neccessary so I'm happy with it for now.
moturimi
Posts: 9
Joined: Mon Oct 09, 2006 8:52 pm

Post by moturimi »

Great work. Although I have a MT-32, it is now possible to listen to the music on my Symbian mobile P1i, if your source code is used officially in later ScummVM versions. That's great.
I know Alistair's opinion, as the soundtrack was designed for the MT-32. That's what he always said on "quest studios" years ago ;-)
But I have to say, some of Alistairs tracks sound much better than the original ones. Maybe I add them for my game version. Cutting the first file (intro) isn't possible, as the track speed (duration 59s vs. 69s) is different.
But for other ogg files it's not a problem.
User avatar
MetaFox
Posts: 54
Joined: Mon Oct 31, 2005 10:44 am

Post by MetaFox »

Nice work, Pix2! It seems to work very well from what I've played of it so far. 8)
Pix2
Posts: 100
Joined: Sat Apr 05, 2008 12:02 pm
Contact:

Post by Pix2 »

I decided not to leave it half done, and have added in all the sound effects now as well as a couple of music tracks that I missed first time round. In theory this should play almost exactly like on a real MT-32 with the exception that the effects won't pan. I've not played through the whole game with it yet though so if there is anything wrong, let ne know. All the links are as before.

I've implemented it as a new sound driver this time since I was replacing the whole lot. To get it to work, edit your game options before launching and choose "Digital MIDI Replacement" for audio. On the off chance this is accepted in some shape or form, I wouldn't mind doing the same for Hand of Fate.
moturimi
Posts: 9
Joined: Mon Oct 09, 2006 8:52 pm

Post by moturimi »

@PIX2@

Thanks so much for this "tuning" I own a MT32 but it's still great to see what people can do with scummvm. Maybe you will tune some other games in the near future.

Please open another threat where you post your great music tuning for LOK1.
I think otherwise many people will never hear anything about your optimation.
User avatar
LordHoto
ScummVM Developer
Posts: 1029
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Post by LordHoto »

Pix2 wrote:All the links are as before.
I looked at your patch and some remarks:
- The patch is against 0.11.1 instead of trunk
- It doesn't conform to our Code Formatting Conventions also check staticres.cpp on how to format static data tables correctly
- I don't see the point in that "EffectsCodecs" code, I mean it would be much cleaner to just make Sound's "SpeechCodecs" code protected instead of private and use that then
- What's that setVolume/getVolume code about? I guess you didn't notice we changed that and introduced updateVolumeSettings instead (of course this is just valid for SVN)
Last edited by LordHoto on Sun Apr 13, 2008 12:10 pm, edited 2 times in total.
Reckless
Posts: 219
Joined: Tue Nov 01, 2005 1:12 am

Post by Reckless »

Wouldn't it have been better to at least start with 'thanks for the contribution and for providing a diff file'? It's a wonder you get [or maintain] any 3rd party involvement in this project :roll:
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

Reckless wrote:Wouldn't it have been better to at least start with 'thanks for the contribution and for providing a diff file'? It's a wonder you get [or maintain] any 3rd party involvement in this project :roll:
Well, any contribution is welcome, and thanks for your work :)

However, bear in mind that we are trying to adhere to some coding standards so that all the code that is written by many different developers can be consistent and of high quality. As for patches, they are always reviewed by the person(s) that know about the relevant part of the code, so that hacks and incorrect code usage can be avoided altogether or kept to a minimum.

That is standard process, not only for your code but for everyone's. Imagine what chaos would happen if all patches would be accepted without any alterations...

In any case, if people submitting patches follow those guidelines, it makes it far easier for us to import the submitted code to ScummVM's code tree, than sit down and correct it or rewrite it in depth :) Time is always limited, and we're all spending a lot of it on this project already...

In any case thanks for your contribution. As for 3rd party contributions, we always get them in our patch tracker, but as mentioned all contributions will have to meet some quality standards, which is a requirement found in almost all open source projects to maintain a quality code base.
Reckless
Posts: 219
Joined: Tue Nov 01, 2005 1:12 am

Post by Reckless »

Don't get me wrong, I absolutely agree 100% with maintaining the project standards and providing feedback on any contribution. I know that English isn't everyone's native language but felt the post lacked a little etiquette :)
Pix2
Posts: 100
Joined: Sat Apr 05, 2008 12:02 pm
Contact:

Post by Pix2 »

I'd agree that I've seen friendlier posts but at least someone took the time to look at it and comment. I think I'll survive.

The patch for my latest attempt is at:-

http://download.yousendit.com/59B6B1F84DE8675A

As far as I'm concerned its correctly formatted this time. Its based on trunk, the get/set volume is removed. Since voicePlay in Sound now supports sfx, I've used that to play the sound effects instead - I've added the ".ogg" extension into supported speech codecs to accomodate this and dropped the effectsCodecs stuff altogether.
trondah
Posts: 23
Joined: Mon Apr 07, 2008 12:53 pm

Post by trondah »

I just tried building, but it failed with an undefined symbol. Some change in trunk broke it? Patch applied clean.

Undefined symbols:
"Kyra::SoundDigitalMidi::SoundDigitalMidi(Kyra::KyraEngine*, Audio::Mixer*)", referenced from:
Kyra::KyraEngine::init() in libkyra.a(kyra.o)

Really nice of you to take the time to make this work and share it with the rest of us. More quality audio for the people, not everybody has an MT-32 or a device that even supports it. Will be putting this in my PSP nightly build once I build cleanly :)
Pix2
Posts: 100
Joined: Sat Apr 05, 2008 12:02 pm
Contact:

Post by Pix2 »

Theres a new file you need to add to the build - sound_digitalmidi.cpp in engine/kyra. If you add that, it should work with any luck.

A PSP build would be great. I only started this to get decent sound on my PSP and haven't got round to trying to compile one for myself.
Post Reply