Jump to content

PinMame Altsound Editor


Recommended Posts

Searching for a altsound/pinsound sound package for SpaceJam I found out none exists.
So I extracted the sounds from the rom using pinmame and created a altsound.csv for the sound files.

I found it a bit complicated to categorize and replace the sounds in the altsound.csv using openoffice, so I decided to create
a small tool to make it more easy for me.

You can find the source and binary here https://github.com/lucky01/Altsound-Editor

You can load a altsound.csv, add sounds to an existing sound command, delete sounds from the list, replace sounds with your own, select from different presets (music,sfx etc) to categorize the sounds, edit the parameters (gain,ducking etc) and save the new altsound.csv again (creates a backup of the original file as altsound.bak) Of course you have the chance to playback the sounds.

Using my tool it was quite easy for me to create the soundset I wanted. If you have any problems feel free to ask for help here in the forum but please don´t send me private messages.

If you think there is missing something, feel free to modify  it as you want. Use as is. No warranty . No support. 

To edit the files I found WaveShop (http://waveshop.sourceforge.net/download.html) more easy to use than Audacity

If you want to create your own soundset I found this site helpful http://altsound.vpin24.com/

  • Like 1
Link to post
Share on other sites

@lucky1 I tried this briefly for fun with a couple of baman tables, DE and forever. I don't know if my procedure is correct or not, but, I believe it is. Saw generated romname-altsound.csv files being generated and dumped wav. But, many of them unplayable and at 1k. Actually, most of them was corrupt in this way.

Link to post
Share on other sites
5 hours ago, Thalamus said:

@lucky1 I tried this briefly for fun with a couple of baman tables, DE and forever. I don't know if my procedure is correct or not, but, I believe it is. Saw generated romname-altsound.csv files being generated and dumped wav. But, many of them unplayable and at 1k. Actually, most of them was corrupt in this way.

When there is no sound for a command a short file with silence is generated before the silence gets detected and it jumps to the next command. 
Basically you can say any soundfile smaller than 4k has no soundcommand. You can delete them and my editor will remove them from the csv list when no soundfile is found in auto mode.

  • Like 1
Link to post
Share on other sites

Tried a new dump yesterday and this time I'm confident that I've done it the way you intended. Quite a lot of samples from btmn_160 have been  dumped. Used your latest version of the editor too and the formatting bug I saw earlier was gone. I read your post about auto, what it meant too late, easy to do manually of course too. Not sure why you have that ref to waveshop.exe in the *.ini - I expect there is hotkey that triggers it or ... ? Not sure, I tried waveshop, since you mentioned it, and I've used Audacity for a while. Is there maybe some advantages to using waveshop that I don't know of ? Fell back to Audacity.

I wonder, and I'm no programmer. Would it be hard to be able to seek for the first second of data, then search the full dump for any matching patterns and maybe output any such finds into a logfile ? There where quite a lot of 4minutes dumps where I can swear that it loops almost all the sample dump, but, it isn't easy to find those patterns. With Audacity at least, it is more of a visual task than anything else.

No matter. Very cool feature @lucky1 - thanks again. ❤️

 

Link to post
Share on other sites
4 minutes ago, Thalamus said:

Tried a new dump yesterday and this time I'm confident that I've done it the way you intended. Quite a lot of samples from btmn_160 have been  dumped. Used your latest version of the editor too and the formatting bug I saw earlier was gone. I read your post about auto, what it meant too late, easy to do manually of course too. Not sure why you have that ref to waveshop.exe in the *.ini - I expect there is hotkey that triggers it or ... ? Not sure, I tried waveshop, since you mentioned it, and I've used Audacity for a while. Is there maybe some advantages to using waveshop that I don't know of ? Fell back to Audacity.

I wonder, and I'm no programmer. Would it be hard to be able to seek for the first second of data, then search the full dump for any matching patterns and maybe output any such finds into a logfile ? There where quite a lot of 4minutes dumps where I can swear that it loops almost all the sample dump, but, it isn't easy to find those patterns. With Audacity at least, it is more of a visual task than anything else.

No matter. Very cool feature @lucky1 - thanks again. ❤️

 

I found waveshop more easy to e.g. cut the samples. Open / Cut / Close. Waveshop in the ini is just an example for a editor program. You may also put audacity there and it should open when you right click on the filename.

I thought about such a loop search feature too, but currently don´t have the time to further investigate.

  • Like 1
Link to post
Share on other sites

I tried to dump a rom with PinMAME32_VC2012 by lucky1 but the ID's seem to be wrong. I only get tons of 3kb files.

Is it possible to manual change the ID's like the manual record option (F5) ?  I noticed if I enter 00 00 00 00 01 ... 02 ... 03 all tracks are played in correct order.

Is it possible for example to change the starting address 10101010 into 00000001 ?

This is how my CSV file looks like

ID,CHANNEL,DUCK,GAIN,LOOP,STOP,NAME,FNAME
0x10101010,,80,50,0,0,0x10101010-,0x10101010-.wav
0x1010110,,80,50,0,0,0x1010110-,0x1010110-.wav
0x1010111,,80,50,0,0,0x1010111-,0x1010111-.wav
...

Link to post
Share on other sites
1 hour ago, klausp said:

I tried to dump a rom with PinMAME32_VC2012 by lucky1 but the ID's seem to be wrong. I only get tons of 3kb files.

Is it possible to manual change the ID's like the manual record option (F5) ?  I noticed if I enter 00 00 00 00 01 ... 02 ... 03 all tracks are played in correct order.

Is it possible for example to change the starting address 10101010 into 00000001 ?

This is how my CSV file looks like

ID,CHANNEL,DUCK,GAIN,LOOP,STOP,NAME,FNAME
0x10101010,,80,50,0,0,0x10101010-,0x10101010-.wav
0x1010110,,80,50,0,0,0x1010110-,0x1010110-.wav
0x1010111,,80,50,0,0,0x1010111-,0x1010111-.wav
...

I already sent you my altsound.csv file where you can see that the Whitestar commands start at FD00 and FE00. 

Link to post
Share on other sites
13 hours ago, lucky1 said:

I already sent you my altsound.csv file where you can see that the Whitestar commands start at FD00 and FE00. 

When I used the address  FD00 I got a bunch of files bigger than 3kb but  after entering  FE00 I only get 3kb files. Is that correct?

Link to post
Share on other sites

What exact rom are you trying to dump ? I think it would be best to use the same one in case there is odd bugs. I should be able to give it a quick run and see if I can reproduce, or I'm getting good dumps.

Link to post
Share on other sites
1 hour ago, Thalamus said:

What exact rom are you trying to dump ? I think it would be best to use the same one in case there is odd bugs. I should be able to give it a quick run and see if I can reproduce, or I'm getting good dumps.

I guess he is talking about spacejam

Link to post
Share on other sites

@lucky1 This is very helpful!  I've been trying to extract audio from both the ICB (ice cold beer) and Zeke's Peak roms using PinMAME, and I made a somewhat similar change to automatically iterate through the memory addresses to detect sound.  My thread is here:

https://www.vpforums.org/index.php?showtopic=27063&page=50

You're implementation is nicer because it's actually recording the audio at the same time, whereas I was simply doing a very fast iteration through each address and simply listening with my ears.  The main problem I'm having with ICB/Zeke's Peak is that I haven't had any luck finding the general region where the sound files might be, so at this stage it's still a guessing game with too many possible combinations to try without having some sort of hint where to start (nothing in the first few thousand addresses from my experiments).  

Are there any tips to figuring out the general region to start?  The lastCommands address seems to potentially give guidance for certain roms, apparently it will list out the last address that was used to play a sound file.  Unfortunately for ICB, its just all 0's.  I do hear a sound when I insert a coin, if there's any way I could determine which address that sound is coming from perhaps that would be a good starting point for me.  Open to suggestions if anyone has them :-)

Link to post
Share on other sites
2 hours ago, mmmmikemmm said:

@lucky1 This is very helpful!  I've been trying to extract audio from both the ICB (ice cold beer) and Zeke's Peak roms using PinMAME, and I made a somewhat similar change to automatically iterate through the memory addresses to detect sound.  My thread is here:

https://www.vpforums.org/index.php?showtopic=27063&page=50

You're implementation is nicer because it's actually recording the audio at the same time, whereas I was simply doing a very fast iteration through each address and simply listening with my ears.  The main problem I'm having with ICB/Zeke's Peak is that I haven't had any luck finding the general region where the sound files might be, so at this stage it's still a guessing game with too many possible combinations to try without having some sort of hint where to start (nothing in the first few thousand addresses from my experiments).  

Are there any tips to figuring out the general region to start?  The lastCommands address seems to potentially give guidance for certain roms, apparently it will list out the last address that was used to play a sound file.  Unfortunately for ICB, its just all 0's.  I do hear a sound when I insert a coin, if there's any way I could determine which address that sound is coming from perhaps that would be a good starting point for me.  Open to suggestions if anyone has them ?

Ice cold beer is a Taito machine which is not supported by altsound. I quess only supported machines display the last commands used and support command injection through pinmame. You may have to add code to get the information you want.

Link to post
Share on other sites
19 hours ago, lucky1 said:

Ice cold beer is a Taito machine which is not supported by altsound. I quess only supported machines display the last commands used and support command injection through pinmame. You may have to add code to get the information you want.

Thanks Lucky1.  I got in touch with Gerrit Volkenborn who's done some great work getting these games working within pinmame.  He said the same thing, the Taito machines use the AY8910 chip which isn't supported  within sound commander.   

Link to post
Share on other sites
  • 3 months later...
On 8/4/2020 at 3:12 PM, lucky1 said:

No idea. Works on my side. Maybe someone else can check.

Checked with RoadKings and did not work as expected, either. Tried with latest pinmame  v3.2 minimal install from sourceforge.
Result:

altsound-rdkng_l4:

ID,CHANNEL,DUCK,GAIN,LOOP,STOP,NAME,FNAME
0x0020,,80,50,0,0,0x0020-rdkng_l4,0x0020-rdkng_l4.wav
0x0101,,80,50,0,0,0x0101-rdkng_l4,0x0101-rdkng_l4.wav

both wavs 1-2kb size.

My workflow:

- start pinmame

- select roadkings and start

- press F4 for sound command mode

- press  del

- enter 0000000008 (sound fx command 0x0008, duration ca. 2sec)

pressed space

-pressed F6

Did I do something wrong? Do I need some special settings for pinmame?

BR MK

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...