1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

Engine sounds exported from FL Studio sounds worse in BeamNG

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by angelo234, Sep 19, 2021.

  1. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Well anyways when the script isn't running, the script won't cause lag since its not running regardless of it causing a little lag when running. You probably made some changes to the project and is the most likely reason its lagging.
     
  2. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    I managed to successfully get all of the samples in-game, but at about 4000 rpm the beginning and the end of the sample are not at the same decibel level which is causing it to click.
    2021-11-16.png
     
  3. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    can I get some help with this please?
     
  4. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Sorry I forgot to reply to your post. And I've made another Python script that fades in and out all audio samples in a folder since I ran into the same issue as I couldn't find a solution with FL Studio. You'll have to play around with the fade in/out times but just aim for a very small time.

    Here's the link to the GitHub repo I just made (download all the files, install the dependencies in the README and run the script with the .bat file): https://github.com/angelo234/fade-in-out-audio-loops
     
  5. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    What do I do with the fix_loop_samples.py file? How do I specify it to fix all of the samples in a folder? And where do I edit the fade in/out times?
     
  6. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    The .bat file is the one that runs the fix_loop_samples.py file so all you have to do is double click on the .bat file rather than having to type py fix_loop_samples.py in the command prompt to launch it. When you run the script, it will prompt you to specify the folder containing the files and input the fade in/out times in the command prompt that opens up. Basically I made it so you don't need to edit the python script at all.
     
  7. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    Thanks that worked!... but what is a good value to use for the fade, because I used 0.5 but it sounds like it's sputtering now
     
  8. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    A good value is gonna be way less than that so like < 0.01 or even < 0.005, because you just want to get rid of the clicking and not change how the whole thing sounds.
     
  9. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    I tried with values like that but it didn't seem to make much of a difference
     
  10. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Hmm try experimenting around with values above that range I guess? Honestly I think the tool I made that fades in from zero decibels and fades out to zero decibels isn’t the best solution since it changes what the start and end of the loop sounds like. I think it’d be better to somehow seamlessly fade the start and end decibel values but I’m not so sure how to do that.
     
  11. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    It would have to act like it is when it is playing in fl studio
     
  12. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    I found a workaround. If you set the declicking mode to generic and click on cut self, it allows you to record at any temp (rpm) without getting all of the clicking, but starts clicking later though.
    And what does this mean, return rpm * bpm_divide_rpm # use for now.
     
    #72 FFIVGUY, Dec 30, 2021
    Last edited: Dec 31, 2021
  13. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    The comment is just saying that the code to the left is meant to be used temporarily until I can figure out how to use different variables that would require less guesswork to calculate the BPM from the engine RPM.
     
    • Like Like x 1
  14. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Been reading through this as this thread was only brought to my attention today... figured I would drop this here if it would be of any use to any of you.

     
  15. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    I exported a whole bunch of samples, but a bunch of them ended up being exported at the same tempo because it doesn't seem to change the tempo when exporting some samples

     
    #75 FFIVGUY, Jan 12, 2022
    Last edited: Jan 12, 2022
  16. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Problem is that the script is expecting that the exporting of the file takes at max 5 seconds, when it took like 15 seconds for the first exporting lol. So just change that last time.sleep(5) to time.sleep(20) or something. Note the value you input into time.sleep just needs to be greater than the delay of the associated action so its never a bad thing to make the time.sleep values big, just means you'll have to wait a little longer.
     
  17. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    everything is fine, but when it's rendering it is dreadfully slow. These are my settings.
    2022-01-12.png



    And here's the video showing what's happening.
     
  18. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Well it looks like you're exporting 51 seconds of audio (idk if you meant to do that) and you're exporting on all HQ settings so that's probably why it takes so long. Maybe you can lower the resampling quality a bit, but like I said before just make the time.sleep value larger and it'll work just fine.
     
  19. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    do you know if there is a way to make 2-stroke engine sounds in fl studio?
     
  20. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Idk I guess the same way you'd do it for a 4-stroke?
     
  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