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
    Can you send me like a sample of the sound and screenshot of your project or something because I’m not sure why it’s not working.
    And send screenshot of your export sound settings
     
  2. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    2021-09-2813.png 2021-09-28.png
     

    Attached Files:

  3. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
  4. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    2021-09-2816.png
    And how do you get to the export settings?
     
  5. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Whats the -50 cents under those two beats supposed to mean?

    Press Ctrl + R and save a random sample.
     
  6. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    It's the pitch they're offset by
     
  7. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Maybe its a bug with FL Studio. What if you just slide the beat down in the piano roll since that works for me.
     
  8. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    what does this part do
    f.write('["art/sound/engine/custom_sound/' + str(rpm) + '.wav", ' + str(rpm) + '],\n')
    f = open('blend_file_contents.txt', 'w')
    How do I change the name of the samples to be EXH_RPM_P? And is there a way to the exported sample loop for a certain amount of time?
    --- Post updated ---
    This is what I get when I open the 5400 rpm sample in edison and if delete all of that empty space it's still not smooth
    2021-09-2819.png

    but at 750 rpms it's fine
    2021-09-2820.png



    --- Post updated ---

    I did that on purpose because I like the sound
     
  9. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    That code generates a file (located in same folder as the Python script) referencing all the sound sample files. Copy and paste those into your sfxBlend2D.json file and remove the very last comma.

    So change line 41 to:
    Code:
    pyautogui.write("EXH_" + str(rpm) + "_P.wav")
    and change line 51 to (replace custom_sound to what the folder is called in your mod folder):
    Code:
    f.write('["art/sound/engine/custom_sound/EXH_' + str(rpm) + '_P.wav", ' + str(rpm) + '],\n')
    Make sure to indent those lines as how they were originally with tab button.
     
  10. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    This is what the sample is like at 5400 rpms for the I6. when i loop play it loop it it doesn't sound like 5400 rpms
     

    Attached Files:

    #50 FFIVGUY, Sep 29, 2021
    Last edited: Sep 30, 2021
  11. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    If you don't mind sending me the FL studio project, I can try to get it to work since I'm not sure why its not working for you.
     
  12. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    Never mind. I got it to work, but after recording a few samples it keeps "Rendering to untitled.wav" and asking me if I want to replace it and it won't export anything else.
     
    #52 FFIVGUY, Oct 16, 2021
    Last edited: Oct 16, 2021
    • Like Like x 1
  13. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    You need to remove the wav files in the exported directory so that new ones can be generated.
     
  14. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    Something weird is happening. I have all the setting correct, but something doesn't seem right
    After recording all of the sample, if I try to increase the tempo while the sound is playing my cpu usage goes through the roof, as well as it snapping back to a 240 bpm no matter what bmp I'm at. When It's saving the samples at different bmps it does a lot of random/unnecessary clicking which could be why it does stuff like that. 2021-10-213.png
    2021-10-21.png 2021-10-212.png
    --- Post updated ---
    But when I recorded some samples (using the same method) but by hand it sounded fine
     

    Attached Files:

    #54 FFIVGUY, Oct 22, 2021
    Last edited: Oct 22, 2021
  15. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Do you find with my script that Windows is playing the asterisk sound effect (that annoying sound effect to tell you you can't do something)? Maybe its that my script is sending keystrokes too quickly. Try setting all the time.sleep function parameters to like 1 second (just replace all time.sleep(x) to time.sleep(1)) to give FL studio enough time to process things.
     
  16. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    That seemed to be better but it stayed at 42 bpm as it was recording the 950_P sample instead of going up. Random stuff keeps happening when it's recording, like windows getting maximized, and randomstuff being clicked even with the slower time.sleep. After Recording all the samples my cpu usage while just messing around with random "cylinder" amounts, shoots up to at least 80%. My cpu usage is fine before recording the samples.
     
  17. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Is the FL Studio maximized and can you send a video of my script exporting the files.
    --- Post updated ---
    Oh and did you uncomment the time.sleep lines as well and set the delay to like 0.5 seconds or whatever (remove the # before the time.sleep())?
    --- Post updated ---
    This is what its supposed to look like when exporting:

    --- Post updated ---
    Also I updated the Python script so there's more delay just in case: https://drive.google.com/file/d/1d96xoSg2moFkwpSVmYC6sT-RRI3BqCrg/view?usp=sharing
     
  18. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    Sorry about the length of the video, the time.sleep was set to 1


    This is what I mean by the cpu usage going through the roof. Before I ran the script it was fine and I could g oall the way to the other side without an issue
     
    #58 FFIVGUY, Oct 22, 2021
    Last edited: Oct 23, 2021
  19. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    539
    Yeah it looks like time.sleep needs to be set much higher than 1 since it looks like FL studio takes quite a while to export the audio. This script shouldn't be causing lag so I think it has to do with your Timebase PPQ setting in the project settings (if you set it too high it will cause lag).

    And I've modified the script again but now it should work since it now gives FL studio 5 seconds to export the audio.

    https://drive.google.com/file/d/1d96xoSg2moFkwpSVmYC6sT-RRI3BqCrg/view?usp=sharing
     
  20. FFIVGUY

    FFIVGUY
    Expand Collapse

    Joined:
    Feb 21, 2018
    Messages:
    556
    My Timebase PPQ setting is 32 2 96
    and in the script: fl_studio_note_length_in_beats = 2 / 96
     
  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