• Welcome to PiBoSo Official Forum. Please login or sign up.
 
March 28, 2024, 06:39:00 PM

News:

GP Bikes beta21c available! :)


MaxSCL - A tool to edit .scl files (engine sounds)

Started by HornetMaX, February 22, 2015, 01:07:54 AM

Previous topic - Next topic

HornetMaX

Quote from: Corrie on February 28, 2015, 05:39:05 PM
Hey, MaX, I'm working wit your tool for sounds in Kart Racing-Pro, and when I load a .scl file from KRP, there is an error:
it will not work with anything except GPB at the moment.

The reason is that I need to parse the physics files (tyres, and .cfg of th ebike/car/kart) to get the gear ratios, masses and inertias.

So at the moment it's GPB only. In the future, it should be relatively easy to adpt it to KRP, WRS and MXB.

MaX.

Eagle

Sorry max, i can't find the word to describe that. But there's i saw the program side and the scl text box have difficulties to adapt themselves and sometimes, saves don't take in memory the new parameters.

HornetMaX

Quote from: Wh1t34Gl3(SAS) on February 28, 2015, 09:53:45 PM
Sorry max, i can't find the word to describe that. But there's i saw the program side and the scl text box have difficulties to adapt themselves and sometimes, saves don't take in memory the new parameters.
You can try in french, if it's any easier.

Anyway, do you understand correctly how the thing works ? When you modify the text in the editor, nothing is taken into account until you "Update" (ctrl+u). That's why in the editor panel you have an "{UPDATE}" thing appearing as soon as you touch the text editor.

MaX.

Eagle

Cannot find words in french either, or i would be able to answer. ^^'

Yes i understood how it worked, not really long to, only the settings are quite difficult to adjust.

HornetMaX

Quote from: Wh1t34Gl3(SAS) on March 01, 2015, 05:08:48 PM
Cannot find words in french either, or i would be able to answer. ^^'

Well, you can appreciate it's gonna be a bit difficult for me to help in that case.

Quote from: Wh1t34Gl3(SAS) on March 01, 2015, 05:08:48 PM
Yes i understood how it worked, not really long to, only the settings are quite difficult to adjust.

I'm lost: did you find a bug in the tool or you're just having trouble obtaining what you want ?

MaX.

Eagle

I'm a little lost in all of that.. :\


I don't have trouble using it, if i have some, it's only because i'm bad at it, not your program's fault.

Just reported minor bug in program/scl text box. Sometimes, parameters can be set in the program side, sometimes it doesn't save, so we are obliged to set them in the text box then ctrl-u.

And sometimes, saving in one doesn't save in the other.

*mindblow*

Again, nothing to be worried of, it doesn't stop me to reach my goal. :)

HornetMaX

Quote from: Wh1t34Gl3(SAS) on March 01, 2015, 11:16:24 PM
Just reported minor bug in program/scl text box. Sometimes, parameters can be set in the program side, sometimes it doesn't save, so we are obliged to set them in the text box then ctrl-u.

And sometimes, saving in one doesn't save in the other.
I still think you haven't understood how it works (but it's not entirely your fault).

If you edit the text manually, then you have to do a ctrl-u (update) to have your changes taken into accuont.

If you change some parameters in the lineedit fields (above the text editor), then the changes are immediately taken into account, the editor is updated, but the file is not saved: you have to do a ctrl+s for that.

There's only one "save", and it regards the text editor: it saves the content to a file. There's no such a thing as "saving in one doesn't save in the other". The "save" command is a "text edit" command and it's unique.

One way to understand how the whole thing works: take the provided example .scl and look how the thing reacts to changes in the text editor (as soon as you do a change you'll see, aside the file name, a '*' indicating the file is modified an needs to be saved an a 'UPDATE' indicating that you've done changes not yet taken into consideration (so you need to do a ctrl-u).

If you still find something suspect and describe the exact steps I will have a look: a bug is always possible.

I was sure that having two ways to modify the same thing would have been a source of confusion, but I haven't figured out a better way to present the thing.

MaX.

Eagle

I have understood how it works. I have no problem editing everything. When i'll have time and new sounds i'll try and see if it happens again. Count it as nothing for now.

HornetMaX

v1.1 out.

Clarification: RefPitch is only used to show the sample's Min and MaxPitch in RPM: MinPitch_in_RPM = MinPitch * RefPitch * MaxRPM (same for MaxPitch_in_RPM).

In v1.0 of MaxSCL, when showing all values in RPM and changing the RefPitch, the Min/MaxPitch (absolute, not RPMs) were automatically adapted to keep their corresponding values in RPM unchanged. Maybe this is too confusing, so in v1.1 I've put a button to do that. The idea is:

  • You define the sample volume envelope (in particular, it's first and last point)
  • You set the sample RefPitch (absolute or in RPM)
  • You click on recompute and the min/maxPitch of the sample are set so that their value in RPM matches the envelope start and end points (in RPM).

If later on you modify the volume envelope's 1st and/or last point, just clicking again on "recompute" will fix the min/maxPitch accordingly. Should be clearer like this.

Also, RefPitch is now optional when parsing a .scl, so that .scl with no refPitch can still be loaded and played (refPitch will default to 1.0). Be careful however: if no refPitch is set, the recompute of min/maxPitch will likely not be correct. Not a big deal: if you don't know what your refPitch is, you're doing tricky things anyway :)

MaX.

Warlock

Thank you.

there are some missing files in the folder, i took them from V1.0  ;)

libsndfile-1.dll
sfml-audio-2.dll
sfml-system-2.dll
sfml-window-2.dll

HornetMaX

Quote from: Warlock on April 23, 2015, 12:17:09 AM
there are some missing files in the folder, i took them from V1.0  ;)
Smart move. Yours, not mine. I guess I was ... err .. distracted :)

It's now fixed. Thx for reporting.

MaX.

h106frp

Any idea why i would not have any sound?

Demo file loads and plays OK but no audio output. I get a slider added to the win sound mixer but i cannot hear any output.

Win7 64 bit and realtek on board HD audio.

Thanks.

HornetMaX

Ouch, no, no idea really.

Using v1.1 ? Clean install from the archive ?

Can you post a video showing you using the tool with the windows sound mixer open ?

MaX.


h106frp

Don't panic!

Went back to the included demo sound file and it plays OK now  :)

I was looking at the RGV500 file and have no sound with that file  ???

Now to work out how the sound file works.