Starbound

Starbound

Hoenn Trumpet
Out of tune
If you switch from the hoenn trumpet to the regular one -- or any other instrument, for that matter -- while playing a song you'll hear how severely out of tune it is. In fact, each ogg file seems to be the C below the note its name is. This tuning.config brings that in line:

{ "fadeout" : 0.1, "mapping" : { //basic piano key index (+20) "108" : { "f" : 4186.01 }, "107" : { "f" : 3951.07 }, "106" : { "f" : 3729.31 }, "105" : { "f" : 3520.00 }, "104" : { "f" : 3322.44 }, "103" : { "f" : 3135.96 }, "102" : { "f" : 2959.96 }, "101" : { "f" : 2793.83 }, "100" : { "f" : 2637.02 }, "99" : { "f" : 2489.02 }, "98" : { "f" : 2349.32 }, "97" : { "f" : 2217.46 }, "96" : { "f" : 2093.00, "file" : "/sfx/instruments/$instrument$/a7.ogg" }, "95" : { "f" : 1975.53 }, "94" : { "f" : 1864.66 }, "93" : { "f" : 1760.00 }, "92" : { "f" : 1661.22 }, "91" : { "f" : 1567.98 }, "90" : { "f" : 1479.98 }, "89" : { "f" : 1396.91 }, "88" : { "f" : 1318.51 }, "87" : { "f" : 1244.51 }, "86" : { "f" : 1174.66 }, "85" : { "f" : 1108.73 }, "84" : { "f" : 1046.50, "file" : "/sfx/instruments/$instrument$/a6.ogg" }, "83" : { "f" : 987.767 }, "82" : { "f" : 932.328 }, "81" : { "f" : 880.000 }, "80" : { "f" : 830.609 }, "79" : { "f" : 783.991 }, "78" : { "f" : 739.989 }, "77" : { "f" : 698.456 }, "76" : { "f" : 659.255 }, "75" : { "f" : 622.254 }, "74" : { "f" : 587.330 }, "73" : { "f" : 554.365 }, "72" : { "f" : 523.251, "file" : "/sfx/instruments/$instrument$/a5.ogg" }, "71" : { "f" : 493.883 }, "70" : { "f" : 466.164 }, "69" : { "f" : 440.000 }, "68" : { "f" : 415.305 }, "67" : { "f" : 391.995 }, "66" : { "f" : 369.994 }, "65" : { "f" : 349.228 }, "64" : { "f" : 329.628 }, "63" : { "f" : 311.127 }, "62" : { "f" : 293.665 }, "61" : { "f" : 277.183 }, "60" : { "f" : 261.626, "file" : "/sfx/instruments/$instrument$/a4.ogg" }, "59" : { "f" : 246.942 }, "58" : { "f" : 233.082 }, "57" : { "f" : 220.000 }, "56" : { "f" : 207.652 }, "55" : { "f" : 195.998 }, "54" : { "f" : 184.997 }, "53" : { "f" : 174.614 }, "52" : { "f" : 164.814 }, "51" : { "f" : 155.563 }, "50" : { "f" : 146.832 }, "49" : { "f" : 138.591 }, "48" : { "f" : 130.813, "file" : "/sfx/instruments/$instrument$/a3.ogg" }, "47" : { "f" : 123.471 }, "46" : { "f" : 116.541 }, "45" : { "f" : 110.000 }, "44" : { "f" : 103.826 }, "43" : { "f" : 97.9989 }, "42" : { "f" : 92.4986 }, "41" : { "f" : 87.3071 }, "40" : { "f" : 82.4069 }, "39" : { "f" : 77.7817 }, "38" : { "f" : 73.4162 }, "37" : { "f" : 69.2957 }, "36" : { "f" : 65.4064, "file" : "/sfx/instruments/$instrument$/a2.ogg" }, "35" : { "f" : 61.7354 }, "34" : { "f" : 58.2705 }, "33" : { "f" : 55.0000 }, "32" : { "f" : 51.9131 }, "31" : { "f" : 48.9994 }, "30" : { "f" : 46.2493 }, "29" : { "f" : 43.6535 }, "28" : { "f" : 41.2034 }, "27" : { "f" : 38.8909 }, "26" : { "f" : 36.7081 }, "25" : { "f" : 34.6478 }, "24" : { "f" : 32.7032, "file" : "/sfx/instruments/$instrument$/a1.ogg" }, "23" : { "f" : 30.8677 }, "22" : { "f" : 29.1352 }, "21" : { "f" : 27.5000 } } }
Naposledy upravil Jorhlok; 20. pro. 2016 v 1.49
< >
Zobrazeno 15 z 5 komentářů
firubii  [vývojář] 22. pro. 2016 v 14.25 
It's not out of tune. I ripped the sound directly from the game files. It just sounds different from the regular trumpet.
No, it really is out of tune. Each of those files contains a C note, not an A note that the tuning.config expects. An A note is some sort of power of two up or down of 440 Hz.

There's three different tests you can do in audacity with one of the files.
1. Select a section after the first bit where it's unstable and select the effect "Pitch Change." It does an analysis to estimate the frequency of the note. It's not accurate on the low pitch files a2.ogg and below because it's detecting too much of the harmonics.

2. Add a new track along side the old one and generate a sine wave of the target frequency. That's those decimal values in tuning.config. If you generate 440 Hz (A4) next to the sound in a4.ogg, you'll hear a chord, not the two sounds merging together as one. You're going to need the volume to be the same for both sounds.

3. Measure the wavelength. It's most accurate if you do more than one period.
Number of periods / total length of time in seconds = frequency in Hz

Many applications that take sound samples like this assume C as the base note as it's typically regarded as the first note in an octave. It's the "do" in "do re mi fa so la ti do." This is why it was no surprise to me how simple the problem and solution are.
Well if anybody's interested they can now subscribe to this to put it in tune.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=827912235
This only contains the tuning.config above.
firubii  [vývojář] 28. pro. 2016 v 10.40 
I'll fix it if it's actually out of tune. Thanks for fixing it, by the way.

EDIT: Now uploading to the Workshop.

EDIT 2: Uploaded.
Naposledy upravil firubii; 28. pro. 2016 v 10.50
Neat. I got rid of my fixer mod since it's useless now. Cheers!
< >
Zobrazeno 15 z 5 komentářů
Na stránku: 1530 50