News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Sound Files Editing (VCE)

Started by Zapper, July 27, 2010, 06:18:39 PM

Previous topic - Next topic

Daniel3D

#75
Quote from: llm on July 11, 2022, 10:26:43 AM
Quote from: Daniel3D on July 10, 2022, 07:37:50 PM
If you remove the corrupted chunk in stressed and replace it with a good one, stressed will update the offsets automatically.

i can't find the coed place in stressed were the VCE file gets rewritten - do you use the raw edit? that just seems to write the bytes that gets loaded to the file - no re-ordering or setting of the offset-table - but im not a stressed pro :)
Stressed has to update the header and offset table. otherwise, every edit would break the file.
(most stunts resources are Chunk based and have the same buildup regardless of the extension)
Stressed can manage all chunk based resource files now it has an escape in raw data.
Stressed loads only the contents of the chunks as raw data the rest of the file it understands.
So you can add, remove and hex-edit chunks without problem.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

I started rereading the tread. The current discussion may shed new light on old information.
Quote from: dstien on December 13, 2011, 02:11:37 PM
VCEs are Stunts resource archives. Working on the MIDI file conversion I identified some values in the MT-32 voices file that holds MIDI controller data:

char *vce = findResource(vceBuf, seq->voices[i].id);

if (vce == NULL) {
  seq->voices[i].enabled = false;
}
else {
  seq->voices[i].enabled   = true;
  seq->voices[i].channel   = vce[0x43];
  seq->voices[i].program   = vce[0x44];
  seq->voices[i].volume    = vce[0x45];
  seq->voices[i].pan       = vce[0x46];
  seq->voices[i].transpose = vce[0x10];
  seq->voices[i].hasHits   = vce[0x25];
}

Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

i think that the "samples" are device orientated - that means the instrument-data for pc, adlib or MT32 sound is completely differenly encoded
in a more direct form for the sound driver - only a guess


Daniel3D

Quote from: llm on July 11, 2022, 02:58:04 PM
i think that the "samples" are device orientated - that means the instrument-data for pc, adlib or MT32 sound is completely differenly encoded
in a more direct form for the sound driver - only a guess
I remember zapper mentioning that the first part of the chunk is different and at a certain point they become the same.
From that and the above info (off which I am not sure if it is related to the chunk itself, but I think so) I gathered that the sound wave itself is the same for all. But that was a big assumption.
I have not checked that. But now that you bring it up. I will check it tonight.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

#79
the first uint16 is 0x5D or 0x64 = size of the data block, then comes a uint16 with 1 - some differences


ADENG1.VCE title. 'ENGI'

         xxxxx yyyy
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FE 00 0B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 00 00 00 FF 7F 0F 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....@.*.........................
  0040:  00 00 00 00 00 07 0F 07 00 0F 16 00 03 00 01 00 00 00 0F 00 00 0F 00 00 00 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....

PCENG1.VCE title: 'ENGI'

         xxxxx yyyyy
  0000:  5D 00 01 00 00 00 00 00 00 00 00 00 14 00 06 00 00 00 00 00 00 00 00 00 00 00 1D 01 22 01 2C 01 ]...........................".,.
  0020:  2C 01 2C 01 2C 01 2C 01 02 00 00 00 FE 7F 5E 01 77 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ,.,.,.,.......^.w...............
  0040:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          .............................

MTENG1.VCE 'ENGI'

  0000:  5D 00 01 00 00 00 00 00 00 00 00 00 00 04 3C 00 0C 00 18 00 00 00 00 00 00 00 00 00 2C 01 2C 01 ].............<.............,.,.
  0020:  2C 01 2C 01 2C 01 2C 01 00 00 00 00 FE 7F B9 00 5A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ,.,.,.,.........Z...............
  0040:  00 00 00 11 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          ......@......................

TDENG1.VCE 'ENGI'

  0000:  5D 00 01 00 00 00 00 00 00 00 00 00 06 00 05 6D E8 00 00 00 00 00 00 00 00 03 00 00 FF 0F FF 0F ]..............m................
  0020:  00 00 00 00 00 00 33 03 02 00 00 00 FE 7F 17 00 3B 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ......3.........;...............
  0040:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          .............................
 
   

Zapper

#80
I'm seeing that you all have harvesting some useful information! :D But let me bring some information that I noted when changing "engine" sound on ADENG1.VCE bytes:

"Instrument data:

Lines (100 byte split)
1: STOP
2: STAR
3: ENGI ->
   Columns (decimal offset)
      300..339: not tested
      343: change pattern (decimal values: 15-31-47)
      344: change pattern (decimal values: 15-22-28-82)
      346: change pitch (decimal values: 3-5-7)
      352:   fadein
      356: fadeout
      358: change pattern (decimal values: 0-6)

4: BLOW
5: SKID
6: SCRA
7: BUMP
8: CRAS
"




These notes can be gathered into a wiki to describe VCE content files.

Zapper

#81
Quote from: Daniel3D on July 08, 2022, 12:08:46 PM
@zapper. You know, I think, more than most of us about how the game processes the sound files. Can you lower the tone of SKI2 so that it is more of a rumble?

@Daniel3D, here you have the file (based on ADENG1.VCE you post before) with a lower tone grass skid sound.

Changes signaled below:


llm


3: ENGI ->
   Columns (decimal offset)
      300..339: not tested
      343: change pattern (decimal values: 15-31-47)
      344: change pattern (decimal values: 15-22-28-82)
      346: change pitch (decimal values: 3-5-7)
      352:   fadein
      356: fadeout
      358: change pattern (decimal values: 0-6)


count that for every instrument-data-block (a' 100 bytes)?
so the 300 offsets is seen from block a 0 offset

the absolute offsets in the file can be easily splitted into logical instrument-data-blocks
(im currently writing a short tool that extracts the instrument blocks and combines these blocks again in VCE a file)

"extract" creates a info-file with the names and order of the instruments-blocks and a single instrument-data-block for each title
"combine" reads such order file and creates a VCE using the datablock files - but without the gaps that sometimes occure


instrument-data block
      0: uint16 block-size - that is known
      2: uint16 unknown - that seems to be always 1
      4..39: not tested
      43: change pattern (decimal values: 15-31-47)
      44: change pattern (decimal values: 15-22-28-82)
      46: change pitch (decimal values: 3-5-7)
      52: fadein
      56: fadeout
      58: change pattern (decimal values: 0-6)



Daniel3D

Quote from: Zapper on July 11, 2022, 06:38:46 PM
Quote from: Daniel3D on July 08, 2022, 12:08:46 PM
@zapper. You know, I think, more than most of us about how the game processes the sound files. Can you lower the tone of SKI2 so that it is more of a rumble?

@Daniel3D, here you have the file (based on ADENG1.VCE you post before) with a lower tone grass skid sound.

Changes signaled below:


Very neat. It sounds better, I only cleaned the end of the file up a bit. But I love it. Nice work.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

#84
added export/import feature to my vce_dump tool

how to use:

vce_dump c:\temp\stunts\PCENG1.VCE

shows VCE content

vce_dump c:\temp\stunts\PCENG1.VCE e c:\temp\stunts\pceng1_vce

exports VCE content into the pceng1_vce folder - only the instrument data is exported in to title-named bin files
the rest information (header,offsets etc) is not needed for importing


pceng1_vce\
  BLOW.bin <- *.bin files containing the instrument-data block for each title
  BUMP.bin
  CRA2.bin
  CRAS.bin
  ENGI.bin
  order.txt <-- contains the ordering of the titles (the names are case insensitive if relevant) - gets read on import
  SCRA.bin
  SKI2.bin
  SKID.bin
  STAR.bin
  STOP.bin


vce_dump c:\temp\stunts\pceng1_vce\new_PCENG1.VCE i c:\temp\stunts\pceng1_vce

create a new_PCENG1.VCE in the pceng1_vce folder based on the order.txt and .bin files

without gaps/dirt but sorted offset table

a very small pocket knife for combining instrument data

just copy the wanted bin files with the correct titles in a folder + a order.txt with the ordering and then import :)

Daniel3D

Quote from: llm on July 12, 2022, 10:49:49 AM
added export/import feature to my vce_dump tool
O wow.
I was messing with music files from other sources (4D boxing mostly) but they didn't seem to work back then.
Now I wonder if they just missed the right instruments.

Now I can make the right collection of instruments in the vce. Then I will try again.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

Quote from: Daniel3D on July 12, 2022, 05:18:39 PM
Now I wonder if they just missed the right instruments.

or contained gaps, dirt or a different ordering, now its easier to check
you can even compare two vce-export folder if the titles with same name are equal etc.

Daniel3D

When I just renamed the adboxms.vce of 4D boxing stunts played the music, but is sounded different.
So I expect that some chunks with the same name contain different instrument data.
So there is room to play.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

just ask if you need a special feature in vce_dump - the dirty cpp code is ease extendible to even dirtier style :)

Daniel3D

Well Mario Andretti's Racing Challenge has the exact same instrument data as STUNTS and a few instruments more.
I can easily make a duplicate adskidms.vce by just renaming the one from Mario Andretti's Racing Challenge.
The order of the instruments does not make a difference, nor does the fact that there are 10 more.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)