User Tools

Site Tools


mtr:dev:custom_bve_sound

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
mtr:dev:custom_bve_sound [2024/02/17 14:10] – [Note / Troubleshooting] sfsperseverancemtr:dev:custom_bve_sound [2024/08/12 10:51] (current) – Typos and grammar corrections, language neutralized slightly. Also added some more infos to Mono sounds and folder names. chaodee
Line 15: Line 15:
 ===== Prerequisite ===== ===== Prerequisite =====
  
-  - Basic knowledge of adding custom Minecraft sound, [[mtr_extra:making_a_resourcepack|custom trains via resource pack]], and the JSON format.+  - Basic knowledge of adding custom Minecraft sounds, [[mtr_extra:making_a_resourcepack|custom trains via resource pack]], and the JSON format.
   - An existing BVE4/OpenBVE Train   - An existing BVE4/OpenBVE Train
-  - An custom MTR Mod train added with Resource Pack (Livery works as well).+  - custom MTR Mod train added with Resource Pack (Livery works as well).
   - Software that is capable of exporting **.ogg** file (e.g. [[https://www.audacityteam.org|Audacity]])   - Software that is capable of exporting **.ogg** file (e.g. [[https://www.audacityteam.org|Audacity]])
   - //(Optional, but makes life way easier)// Bulk renaming software (**PowerRename** from [[https://github.com/microsoft/PowerToys|PowerToys]], [[https://apps.kde.org/krename/|KRename]] on Linux, etc.)   - //(Optional, but makes life way easier)// Bulk renaming software (**PowerRename** from [[https://github.com/microsoft/PowerToys|PowerToys]], [[https://apps.kde.org/krename/|KRename]] on Linux, etc.)
Line 24: Line 24:
  
   - Make a copy of your BVE/OpenBVE Train folder, **only make changes within the newly made copy, not your original one!**   - Make a copy of your BVE/OpenBVE Train folder, **only make changes within the newly made copy, not your original one!**
-  - Find the folder where the train sound are located. They're either located right in the main train folder (bunch of sound files), or there might be another //sound// folder within the train folder. (They usually contains bunch of **.wav/.flac** file) +  - Find the folder where the train sounds are located. They're either located right in the main train folder (bunch of sound files), or there might be another //sound// folder within the train folder. (They usually contains bunch of **.wav/.flac** file) 
-  - //If you do find another sound folder//, just put all the sound file inside to the main train folder+  - //If you do find another sound folder//, just put all the sound files inside to the main train folder.
   - Delete all other files except ***.wav, *.flac**, **train.dat** and **sound.cfg**   - Delete all other files except ***.wav, *.flac**, **train.dat** and **sound.cfg**
   - Rename **all files** **(Including sound.cfg and train.dat)** in that folder to __lowercase letter file name__. You can do it with most bulk renaming software, or you can manually renaming each one of them   - Rename **all files** **(Including sound.cfg and train.dat)** in that folder to __lowercase letter file name__. You can do it with most bulk renaming software, or you can manually renaming each one of them
Line 36: Line 36:
   - **Explanation of the above config:**   - **Explanation of the above config:**
     - ''MotorNoiseDataType = 4'' indicates that this is a BVE4/OpenBVE format (train.dat) motor sound data.     - ''MotorNoiseDataType = 4'' indicates that this is a BVE4/OpenBVE format (train.dat) motor sound data.
-    - ''MotorVolumeMultiply = 1'' requires some further explanation. Due to the different nature of the two games, sometimes the volume setting used by the train's creator in BVE is a bit quiet when used in Minecraft, so this setting is introduced to "multiply" the volume. However, Minecraft puts a clamp of 100% on the volume that MTR can programatically assign, which makes things complex.So, if the volume assigned in train.dat is moderate, but it's the WAV sound clips themselves that are quiet, then this settings won't have effect. (Let's say the originally assigned volume is 90%, you want to double it to get 180% by this setting, but Minecraft clamps it to 100%, and nearly no boost can be achieved by tweaking this setting.) In this case you need to dial up the volume of the WAV sound clips by the means of sound editing softwares like Audition.On the other hand, if the WAV sound clips are loud enough, but very low volumes are assigned in train.dat, then dialing up this setting would be the way to go. (10% doubled will give you the correct 20%. without hitting the clamp.) 1 represents 100% the original volume, 2 for 200%, etc.+    - ''MotorVolumeMultiply = 1'' requires some further explanation. Due to the different nature of the two games, sometimes the volume setting used by the train's creator in BVE can be quieter when used in Minecraft, so this setting is introduced to "multiply" the volume. However, Minecraft puts a clamp of 100% on the volume that MTR can programatically assign, which makes things complex. If the volume assigned for train.dat is moderate, but it's the WAV sound clips themselves that are quiet, then these settings won't have an effect. (For example if the originally assigned volume is 90%, you want to double it to get 180% by this setting, but Minecraft clamps it to 100%, and nearly no boost can be achieved by tweaking this setting.) In this case you need to dial up the volume of the WAV sound clips by the means of sound editing softwares like Audition.On the other hand, if the WAV sound clips are loud enough, but very low volumes are assigned in train.dat, then dialing up this setting would be the way to go. (10% doubled will give you the correct 20%. without hitting the clamp.) 1 represents 100% the original volume, 2 for 200%, etc.
     - ''DoorCloseSoundLength = 1'' is used to determine the time that the door closing sound should start playing. This should be the length of the sound in seconds. However, due to MTR's limitations, value longer than 1s are not accepted.     - ''DoorCloseSoundLength = 1'' is used to determine the time that the door closing sound should start playing. This should be the length of the sound in seconds. However, due to MTR's limitations, value longer than 1s are not accepted.
   - The end result of sound.cfg should look something like this:   - The end result of sound.cfg should look something like this:
     - {{:mtr:dev:mtr-bve1.png}}     - {{:mtr:dev:mtr-bve1.png}}
-  - Rename your BVE **train folder** to be lowercase and without space. (You may use underscore to replace space), this will be your **Train sound ID** to reference later on! +  - Rename your BVE **train folder** to contain lowercase letters only and without any spaces. (You may use underscores ( _ ) to replace the spaces), this will be your **Train sound ID** to reference later on! 
-  - Import all the .**wav/.flac** sound to an audio editor and convert them to **Mono Channel** +  - Import all the .**wav/.flac** sound to an audio editor and convert them to **Mono Channel**. If the audio has 2 channels (Stereo), then the sounds will play even when you’re out of range with your train. 
-  - Export all the **.wav/.flac** file to **.ogg** file (For Audacity user, use **File > Export > Export Multiple**, and choose ''Ogg Vorbis Files''+  - Export all the **.wav/.flac** files to **.ogg** file (For Audacity users, use **File > Export > Export Multiple**, and choose ''Ogg Vorbis Files''
-  - Copy the train folder to ''Your Resource Pack/assets/mtr/sounds''. (Make the folder if it doesn't exist) +  - Copy the train folder to ''Your Resource Pack((This name will vary if you renamed your resourcepack.))/assets/mtr/sounds''. (Make the folder if it doesn't exist) 
-  - Make a sounds.json file in ''Your Resource Pack/assets/mtr'' if you haven't already, an example could be found [[https://github.com/jonafanho/Minecraft-Transit-Railway/blob/0daf388b7f62868502753c55a3264c545b5dd569/resources/common/normal/assets/mtr/sounds.json|here]].+  - Make a sounds.json file in ''Your Resource Pack ((This name will vary if you renamed your resourcepack.))/assets/mtr'' if you haven't already, an example could be found [[https://github.com/jonafanho/Minecraft-Transit-Railway/blob/0daf388b7f62868502753c55a3264c545b5dd569/resources/common/normal/assets/mtr/sounds.json|here]].
   - Make a sound entry in sounds.json of every file in ''sound.cfg'', the sound ID to put should be ''trainSoundID_filename''   - Make a sound entry in sounds.json of every file in ''sound.cfg'', the sound ID to put should be ''trainSoundID_filename''
   - Your sounds.json in the end should look something like this (I used ''kksp'' as my train directory name):   - Your sounds.json in the end should look something like this (I used ''kksp'' as my train directory name):
mtr/dev/custom_bve_sound.1708179021.txt.gz · Last modified: 2024/02/17 14:10 by sfsperseverance