Suggested improvements to CDDA support in games?

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

Moderator: ScummVM Team

Post Reply
marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Suggested improvements to CDDA support in games?

Post by marzipan » Fri May 01, 2009 2:32 am

Lately I was thinking about the CDDA support in ScummVM, and how I feel it could be improved somehow in future...

1) Add support for running CDDA tracks from a subdirectory, say named "music", or "CDDA", or whatever would be a better term. It would likely make a game directory look less cluttered IMO.

2) Add some kind of option or something to have ScummVM detect or assume a +1 index number increment in the track numbers. That way having to rename all the audio files afterwards to make their numbers go down one notch wouldn't be necessary. Unless of course EAC (my ripper of choice) has some kind of hidden option to make it go down one notch on the numbers in the case of mixed-mode CDs (read: all games with CDDA)?


I would try and help myself, but alas, I'm no coder by any means! =[ Still, what do you guys think of these ideas?


Cheers.

User avatar
Strangerke
ScummVM Developer
Posts: 333
Joined: Wed Sep 06, 2006 8:39 am
Location: Belgium

Post by Strangerke » Fri May 01, 2009 6:39 am

Isn't this the answer to your question ?
http://scummvm.sourceforge.net/faq.php#id257885

Is so : yes it already works. Just extract the audio track in MP3, Ogg or Flac named track1.mp3, track2.mp3, etc etc (or adequate extension, of course)

jimbob0i0
Posts: 36
Joined: Sat Mar 28, 2009 10:03 am

Post by jimbob0i0 » Fri May 01, 2009 9:11 am

I think this is his point....

Some games had a lot of tracks - some between 30 and 90 - back in the day when redbook audio took off... and that makes for a cluttered directory - hence the request of his for the CDDA extracted tracks to be put in a subdirectory... I imagine that would be fairly easy...

The track numbers was the other bit - since track 1 was data the rest of the tracks would be track 2+ but scummvm looks for them indexed from 1 rather than 2... again this would be a rather easy change...

The key bit for them would be coordination in the release (notes) to inform people of the changes so that currently working stuff isn't broken unexpectedly...

Kirben
ScummVM Developer
Posts: 417
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Re: Suggested improvements to CDDA support in games?

Post by Kirben » Fri May 01, 2009 12:48 pm

marzipan wrote: 1) Add support for running CDDA tracks from a subdirectory, say named "music", or "CDDA", or whatever would be a better term. It would likely make a game directory look less cluttered IMO.
The Extra Path can easily be used for this purpose.
marzipan wrote: 2) Add some kind of option or something to have ScummVM detect or assume a +1 index number increment in the track numbers. That way having to rename all the audio files afterwards to make their numbers go down one notch wouldn't be necessary. Unless of course EAC (my ripper of choice) has some kind of hidden option to make it go down one notch on the numbers in the case of mixed-mode CDs (read: all games with CDDA)?
Could actually lead to more confusion, when problems do occur, since the games actually require the audio tracks to be in that order.

Besides this only needs to be done once for each game, and there aren't that many CD audio tracks in games supported by ScummVM.

User avatar
Longcat
Posts: 986
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat » Fri May 01, 2009 1:54 pm

I agree with Kirben, these "problems" aren't really at all problematic. I would imagine setting up all of ScummVM's audiotrack supported games would take you less than 20 minutes.

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3310
Joined: Mon Oct 31, 2005 7:39 am

Re: Suggested improvements to CDDA support in games?

Post by eriktorbjorn » Fri May 01, 2009 5:37 pm

Kirben wrote: Besides this only needs to be done once for each game, and there aren't that many CD audio tracks in games supported by ScummVM.
The Secret of Monkey Island can be a bit tedious. Of course, on a Unix-like system, you should be able to do something like this in a command shell:

Code: Select all

for num in `seq 2 25` ; do mv track$num.ogg track$(($num - 1)).ogg ; done
I imagine someone could come up with something similar for Windows.

User avatar
bobdevis
Posts: 563
Joined: Fri Jan 16, 2009 10:52 am

Post by bobdevis » Fri May 01, 2009 7:28 pm

There is Windows PowerShell.
It is Microsoft's version of a modern CLI. It has some object orientated tricks as well I believe.
I haven't heard anything about it after it's launch though. I doubt it is really catching on.

User avatar
raina
Posts: 233
Joined: Thu Jan 12, 2006 12:31 pm
Location: Oulu, Finland
Contact:

Post by raina » Tue May 05, 2009 7:25 am

It's not that I care much about this "issue", but couldn't the numbering be nudged forward based on Track 01 being absent while Track 02 is present?

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan » Tue May 05, 2009 7:19 pm

raina wrote:It's not that I care much about this "issue", but couldn't the numbering be nudged forward based on Track 01 being absent while Track 02 is present?
That would probably be easier, come to think of it.

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Re: Suggested improvements to CDDA support in games?

Post by marzipan » Sat Aug 29, 2009 8:59 pm

eriktorbjorn wrote:
Kirben wrote: Besides this only needs to be done once for each game, and there aren't that many CD audio tracks in games supported by ScummVM.
The Secret of Monkey Island can be a bit tedious. Of course, on a Unix-like system, you should be able to do something like this in a command shell:

Code: Select all

for num in `seq 2 25` ; do mv track$num.ogg track$(($num - 1)).ogg ; done
I imagine someone could come up with something similar for Windows.
Well I tried to do this in Windows Powershell just now but it doesn't seem to be able to pick it up all that well...

Code: Select all

Windows PowerShell
Copyright (C) 2006 Microsoft Corporation. All rights reserved.

PS C:\Documents and Settings\MarzSyndrome> e:
PS E:\> cd 0
PS E:\0> for num in `seq 2 25` ; do mv track$num.ogg track$(($num - 1)).ogg ; done
Missing opening '(' after keyword 'for'.
At line:1 char:5
+ for n <<<< um in `seq 2 25` ; do mv track$num.ogg track$&#40;&#40;$num - 1&#41;&#41;.ogg ; done
PS E&#58;\0>
Any suggestions? It might also help to know if it's possible to remove the leading 0 from the name too (unless ScummVM handles '0x' without a problem?).

User avatar
raina
Posts: 233
Joined: Thu Jan 12, 2006 12:31 pm
Location: Oulu, Finland
Contact:

Post by raina » Sat Aug 29, 2009 10:33 pm

Check the PowerShell documentation for the syntax of FOR, it appears to be expecting an expression closed in parentheses.

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan » Sun Aug 30, 2009 2:09 am

This is all I could find on it...

For (Scripting)
[:label] for ([initializer]; [condition]; [iterator]) {}

Example:
for ($i = 0; $i –lt 5; $i++) {Write-Object $i}


Foreach (Scripting)
[:label]
foreach (identifier in collection) {}
Expression | foreach {}
Expression | foreach {BEGIN{} PROCESS{} END{}}

Examples:
$i = 1,2,3
foreach ($z in $i) {Write-Object $z}
Get-Process |foreach {BEGIN{$x=1}
PROCESS{$X++}
END{“$X Processes”}}

This really is hurting my poor brain. >.<


Man, all this aggro because ScummVM expects tracks named differently to most other programs....

User avatar
Kaminari
Posts: 274
Joined: Mon Oct 24, 2005 2:25 am
Location: Paris, France
Contact:

Post by Kaminari » Sun Aug 30, 2009 2:28 am

And there is the odd case of custom mixed mode CDs like the PC Engine games, which have track 01 as an audio warning, track 02 as a data track and the rest of the tracks as audio cues (except for the last track which is usually a dupe of the second track).

Flo
Posts: 58
Joined: Tue Aug 05, 2008 1:50 pm

Post by Flo » Sun Aug 30, 2009 4:34 pm

For Windows, you could simply use a tool like ReNamer to batch rename your audio files to match what ScummVM expects.

Post Reply