Zeit Radio (The Zeidio): How to add custom music

Discussion in 'Mods and Skins' started by DaddelZeit, May 18, 2022.

  1. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,084
    Here's a tutorial on how to add custom music to my radio mod:
    All that is required is a MP3 or WAV file, a cover image is optional. I recommend using Visual Studio Code or NotePad++ to edit the track table, as these support JSON syntax detection. There are two ways to add these files to the game:
    1. Userfolder.
    Create a folder called "art" directly in your userfolder, the folder that contains your "mods" folder. In the newly created "art" make another folder called "zeitRadio". Put your files there.
    Easy to access, however files will be removed with the next cache clear
    2. Mod zip.
    Unpack the mod through the game: search for "Radio", and click "unpack". Then, move your files to "mods/unpacked/zeit_radio/art/zeitRadio". Repack the mod through the game by clicking on the same button used to unpack.
    Files will not be removed with the next cache clear. This is the preferred method.

    (both methods above require these steps)
    Navigate to "settings/zeit/radio" and open "trackTable.json". Do not edit "trackTableDefault.json" inside the mod itself. This contains default songs.
    Song entry format is as follows (without <> brackets):
    Code:
    "<song id>":{
      "artist":"<artist name>",
      "coverUrl":"<cover url, if no custom cover use art/zeitRadio/empty.png>",
      "duration":<song duration in seconds>,
      "name":"<song display name>",
      "url":"<audio file path (format: art/zeitRadio/xyz.xyz)>",
      "volCoef": <increases volume>
    },
    Example:
    Code:
      "drip_fountain":{
        "artist":"gabester, CaptainZoll",
        "coverUrl":"art/zeitRadio/drip_fountain.png",
        "duration":66,
        "name":"Drip Fountain",
        "url":"art/zeitRadio/drip_fountain.mp3",
        "volCoef":4
      },
    "volCoef" is not a required attribute, however it can be used for especially quiet songs.
    An entry may not support special characters and square/curly brackets. This will break things.
    It is best to stick to latin characters.
    A song has to be in a playlist to be available for you to play.

    To change playlists (required when adding/removing songs) find a section called "playlists".
    Code:
    "<playlist id, must be number!>":[
      "song id1",
      "song id2",
      "song id3",
    ]
    Multiple Playlists:
    Code:
    "1":[
      "song id1",
      "song id2",
      "song id3",
    ],
    "2":[
      "song id1",
      "song id2",
      "song id3",
    ]
    (filled in)
    Code:
    "1":[
      "lightrunner",
      "dicta",
      "ample_descent",
    ],
    "2":[
      "fall_fountain",
      "splendid_misanthropy",
      "credits"
    ]
    Playlists can be added or removed, as long as their ids are numbers and there is at least one playlist. There is no limit to how many playlists you can add.
    Remember to check for syntax errors and save the json.

    If there's any questions please ask in this thread.
     
    #1 DaddelZeit, May 18, 2022
    Last edited: May 28, 2022
    • Like Like x 9
  2. Duh anime addict

    Duh anime addict
    Expand Collapse

    Joined:
    Aug 5, 2021
    Messages:
    534
    Nice!
     
  3. 1993 MAZDA MIATA

    1993 MAZDA MIATA
    Expand Collapse

    Joined:
    Nov 19, 2021
    Messages:
    98
    i cant get it to work no matter what
     
    #3 1993 MAZDA MIATA, May 18, 2022
    Last edited: May 18, 2022
  4. imma EL Camino

    imma EL Camino
    Expand Collapse

    Joined:
    Mar 30, 2021
    Messages:
    34
    okay i need help i dont know if this is right or if it works at all, there was no Track.table so i just made a new one and put the folowing code in and i dont know whats wrong because its not working, and yes i do (i think) have the correct files in place
     

    Attached Files:

    • Screenshot218.png
    • Screenshot220_LI.jpg
    #4 imma EL Camino, May 19, 2022
    Last edited: May 19, 2022
  5. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,084
    The track table is in 0.24/settings/zeit/radio, not in the mod. Also, the <> brackets are not allowed in JSON syntax, I just put them into the tutorial to make it clear that it's a template. The playlist requires you to enter the song id, not name.
     
  6. Nanandmic567

    Nanandmic567
    Expand Collapse

    Joined:
    Oct 3, 2021
    Messages:
    111
    I just tried recently and it's alright to listening, but I have some question about the internet streaming radio URLs (Or any other media URL available) because I like to listens these a lot. But the limitation to uses only just MP3/WAV medias aren't enough for me... So, this was just a thought about that.
     
  7. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,084
    I cannot access external resources outside of beamng.com (and that also only through angular/UI stuffs) so no, unfortunately not possible.
     
    • Agree Agree x 1
  8. Argicity

    Argicity
    Expand Collapse

    Joined:
    Apr 7, 2021
    Messages:
    9
    Kinda frustrating that i edited some tracks and i saved it but it all dissapeared once i got into the game. I dont know if its the mod that did that or something but it would be cool if theres an automatic coder like the guy in the Mod Review said
     
  9. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,084
    The file should only be overridden again if there was a JSON syntax error.
    I'll look into somehow making it an automatic process, or to avoid having the user edit the file manually. Whether that be through a UI app in game or an external program, I don't know.
     
    • Agree Agree x 1
  10. GEKA

    GEKA
    Expand Collapse

    Joined:
    Oct 28, 2021
    Messages:
    31
    I moved the music to a file according to the instructions in the preferred way and edited it according to the template, saved it then packed it and went into the game.
    But the music was not detected.
    I opened the json file again to find errors, but it turned out that the game deletes all changes in the "trackTable.json" immediately after the game is launched.:(
    Why can this be and how can it be fixed?
     
  11. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,084
    Please check if you make any syntax errors inside the trackTable.json. The game cannot read the file if there are errors and will replace it with the default because of this.
    I recommend using NotePad++ or Visual Studio Code to edit JSONs as those have good syntax detection.
    I apologise for not having made a tool to do all the technical stuff and only requiring the user to put in the name, author etc.
     
  12. imma EL Camino

    imma EL Camino
    Expand Collapse

    Joined:
    Mar 30, 2021
    Messages:
    34
    sorry im a little stupid but where do i find the song id?
     
  13. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,084
    You can just make that up. It's the text that's right before the curly brackets where you put in your song info.
     
  14. Wild Hog

    Wild Hog
    Expand Collapse

    Joined:
    Oct 30, 2016
    Messages:
    953
    It works but the balance is all wrong for me, it only really comes out the left channel plus it sounds pretty muffled
     
    • Like Like x 1
    • Agree Agree x 1
  15. DaddelZeit

    DaddelZeit
    Expand Collapse

    Joined:
    Jul 17, 2019
    Messages:
    3,084
    Yes this unfortunately is because of how the game works. I might be able to set the sounds to 2D rather than 3D, however this would mean that the radio either simply wouldn't play at all when outside or always play outside at any distance, just quiet. The muffling is part of the driver cam sound muffling which is hardcoded into the game engine sadly.
     
    • Agree Agree x 1
  16. Wild Hog

    Wild Hog
    Expand Collapse

    Joined:
    Oct 30, 2016
    Messages:
    953
    Weird, 'cause it starts out sounding fine sometimes but as soon as you do anything (restore car position, switching camera etc.) it get's muffled
     
  17. OmegaWolf543

    OmegaWolf543
    Expand Collapse

    Joined:
    May 22, 2022
    Messages:
    1
    I cannot for the life of me get this to work. the song displays on the radio correctly, and plays, but there's no sound. I've changed the volume, and I've also made sure my mp3 file was correct and functioning, so that's not the issue. I've also made sure that I coded it correctly, and everything displays properly, but no sound
     
  18. Ilovecarcrash101

    Ilovecarcrash101
    Expand Collapse

    Joined:
    Sep 5, 2013
    Messages:
    96
    Code:
      "playlists":{
        "1":[
          "lightrunner",
          "dicta",
          "ample_descent",
          "fall_fountain",
          "splendid_misanthropy",
          "credits",
          "drip_fountain"
        ]
      },
     END??
      "splendid_misanthropy":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/splendid_misanthropy.jpg",
        "duration":338,
        "name":"Splendid Misanthropy",
        "url":"art/zeitRadio/splendid_misanthropy.mp3",
        "volCoef":3
      }
    Why does an entry for a specific song appear after song definition & playlist?
    That's confusing.

    Also your explaination should be improved in the post. At first you say it only requires to add WAV or MP3 Files to add to one of those locations, but you didn't mentioned that it needs a json defintion in order to work.

    And
    should be highlighted to bold.

    Also what about duration value? Which values can't be ignored, which don't?

    And for a lot of none modding experienced people, it should be mentioned that Notepad++ or VS as you say, should be used to edit. I useally do, but just saying.
    Spending more time into the tutorial should result in less confusing discussions.

    And for makeing it more easier, i recommend building a simple tool which allows to add multiplie song files all at once to the tool and then maybe have a list of those selected files where each entry have a button to add a specific cover image. And in the and it saves all those entrys.
     
    #18 Ilovecarcrash101, May 25, 2022
    Last edited: May 25, 2022
    • Like Like x 2
  19. PowerstrokeHD

    PowerstrokeHD
    Expand Collapse

    Joined:
    Feb 5, 2021
    Messages:
    1,661
    never mind.
    I cant read
     
    #19 PowerstrokeHD, May 27, 2022
    Last edited: May 27, 2022
  20. Ilovecarcrash101

    Ilovecarcrash101
    Expand Collapse

    Joined:
    Sep 5, 2013
    Messages:
    96
    Ok here is my explaination of how to add your own music. For me it kinda worked. Some songs don't play and song length seems to a bit off, idk why. But here it is.


    To add your own song to the Zeit radio mod, you have to:
    1. Install the mod
    2. Unpack the mod via the in game menu
    3. Go to the unpacked mods folder ...\0.24\mods\unpacked\zeit_radio\art\zeitRadio\
    4.
    Place your MP3 or WAV file into that folder
    5. Start the game again and pack the mod with your added songs
    6. Now go to 0.24\settings\zeit\radio\ and open the trackTable.json with Notepad++ or Visual Studio
    7.
    Add a song definition after the already existing one and don't forget to add "}" for each new entry
    Code:
    "<song id>":{
      "artist":"<artist name>",
      "coverUrl":"<cover url, if no custom cover use art/zeitRadio/empty.png>",
      "duration":<song duration in seconds>,
      "name":"<song display name>",
      "url":"<audio file path (format: art/zeitRadio/xyz.xyz)>",
      "volCoef": <increases volume>
    },
    duration value is defining the max. length of each song.

    Example:
    Code:
    "iran":{
        "artist":"A Flock Of Seagulls",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":237,
        "name":"I Ran",
        "url":"art/zeitRadio/A Flock Of Seagulls - I Ran.mp3"
      },
    In my case the A Flock Of Seagulls - I Ran.mp3 file is 3 minutes and 57 seconds long. So to caculate the duration value for this song, i have to know first how long 3 minutes are in seconds. Which is 180 seconds. And now a add the 57 seconds to it and got a value of 237 which i set in "duration".
    In other words 180+57=237 seconds. Correct me if i did it wrong :).

    8. Add your newly defined song to the playlist section. If you don't want to add your song to the playlist that comes with the mod. Create a new one. In my case:
    Code:
    "2":[
          "iran",
        ]
    
    "iran" is the name of the id that i gived the song. Make it simple and lower cased like the other entrys.
    9. Now if you are done with your playlist, just safe the file and run the game.
    10. Done :D

    Example of the trackTable.json in 0.24\settings\zeit\radio before any editing:

    Code:
    "ample_descent":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/ample_descent.jpg",
        "duration":278,
        "name":"Ample Descent",
        "url":"art/zeitRadio/ample_descent.mp3",
        "volCoef":3
      },
      "credits":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/lonle.jpg",
        "duration":261,
        "name":"Lonle",
        "url":"art/zeitRadio/lonle.mp3"
      },
      "dicta":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":35,
        "name":"Dicta Loop (Old Menu Music)",
        "url":"music_menu"
      },
      "drip_fountain":{
        "artist":"gabester, CaptainZoll",
        "coverUrl":"art/zeitRadio/drip_fountain.png",
        "duration":66,
        "name":"Drip Fountain",
        "url":"art/zeitRadio/drip_fountain.mp3",
        "volCoef":4
      },
      "fall_fountain":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/fall_fountain.jpg",
        "duration":288,
        "name":"Fall Fountain",
        "url":"art/zeitRadio/fall_fountain.mp3",
        "volCoef":3
      },
      "lightrunner":{
        "artist":"TDK",
        "coverUrl":"art/zeitRadio/lightrunner.png",
        "duration":1206,
        "name":"Lightrunner Loop",
        "url":"event:>Music>synthwave"
      },
      "playlists":{
        "1":[
          "lightrunner",
          "dicta",
          "ample_descent",
          "fall_fountain",
          "splendid_misanthropy",
          "credits",
          "drip_fountain"
        ]
      },
      "splendid_misanthropy":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/splendid_misanthropy.jpg",
        "duration":338,
        "name":"Splendid Misanthropy",
        "url":"art/zeitRadio/splendid_misanthropy.mp3",
        "volCoef":3
      }

    Example of 3 added songs to the trackTable.json in 0.24\settings\zeit\radio\
    Code:
    {
      "ample_descent":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/ample_descent.jpg",
        "duration":278,
        "name":"Ample Descent",
        "url":"art/zeitRadio/ample_descent.mp3",
        "volCoef":3
      },
      "credits":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/lonle.jpg",
        "duration":261,
        "name":"Lonle",
        "url":"art/zeitRadio/lonle.mp3"
      },
      "dicta":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":35,
        "name":"Dicta Loop (Old Menu Music)",
        "url":"music_menu"
      },
      "drip_fountain":{
        "artist":"gabester, CaptainZoll",
        "coverUrl":"art/zeitRadio/drip_fountain.png",
        "duration":66,
        "name":"Drip Fountain",
        "url":"art/zeitRadio/drip_fountain.mp3",
        "volCoef":4
      },
      "fall_fountain":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/fall_fountain.jpg",
        "duration":288,
        "name":"Fall Fountain",
        "url":"art/zeitRadio/fall_fountain.mp3",
        "volCoef":3
      },
      "lightrunner":{
        "artist":"TDK",
        "coverUrl":"art/zeitRadio/lightrunner.png",
        "duration":1206,
        "name":"Lightrunner Loop",
        "url":"event:>Music>synthwave"
      },
      "iran":{
        "artist":"A Flock Of Seagulls",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":237,
        "name":"I Ran",
        "url":"art/zeitRadio/A Flock Of Seagulls - I Ran.mp3"
      },
      "takeonme":{
        "artist":"A-ha",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":224,
        "name":"Take On Me",
        "url":"art/zeitRadio/A ha Take On Me.mp3"
      },
      "allthatshewants":{
        "artist":"Ace Of Base",
        "coverUrl":"art/zeitRadio/empty.png",
        "duration":209,
        "name":"All that she wants",
        "url":"art/zeitRadio/Ace of Base - All that she wants.mp3"
      },
      "playlists":{
        "1":[
          "lightrunner",
          "dicta",
          "ample_descent",
          "fall_fountain",
          "splendid_misanthropy",
          "credits",
          "drip_fountain"
        ]
        "2":[
          "iran",
          "takeonme",
          "allthatshewants",
        ]
      },
      "splendid_misanthropy":{
        "artist":"gabester",
        "coverUrl":"art/zeitRadio/splendid_misanthropy.jpg",
        "duration":338,
        "name":"Splendid Misanthropy",
        "url":"art/zeitRadio/splendid_misanthropy.mp3",
        "volCoef":3
      }
    }

    But:
    This mod currently doesn't support none english letters. So i encounter issues with songs that had letters in the song name or file name like "ä,ö,ü" or "ù". Also don't have any cling signs in your file names like sometimes songname [1998].mp3. Remove anything like that and don't forget to update your zeit mod package according to that if you had already songs put in there with these sings.
    If you have such letters in the file names, your whole game UI will go broken. Your car will spawn with broken suspension and such. If you have these letters in the song name description like for the "artist" name or "name", then you will not having problems to load the game. But the music player will show you a "?" warning emoji sign.
     
    #20 Ilovecarcrash101, May 27, 2022
    Last edited: May 28, 2022
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice