2

I'm using timidity to convert MIDI files to ogg vorbis files. However, the output is musically different.

By musically different, I mean they are in the different key. They are also played in different speed.

I'm using a custom soundfont file, the following is the entirety of my config file.

$ cat /usr/local/share/timidity/timidity.cfg
dir /usr/local/share/timidity/soundfonts
soundfont Touhou.sf2
# source fluid3gm.cfg
# trysource fluid3gs.cfg
# source fluid_altassign.cfg

The MIDI file in question may be obtained from here (Direct download). The soundfont here.

For reference, to my ears, the first few notes are

G bE C bE G [C] G bE [D] [C]

([x] = higher x)

when invoked like this: $ timidity ./th07_04.mid.

When outputted to OGG file via -Ov, the first few notes are

#F D {B} D #F B #F D [#C] B

({x} = lower x)

Any ideas why?


Here is my current test results, H means Higher (G...) and L means Lower (#F...)

Software macOS Monterey Fedora 36 Windows 11
Straight from timidity H L L
Output to file L L L

Thus, the music is only higher when its set to directly output on macOS.

7
  • I have no idea why, but you can test if this is related to ogg vorbis or to file output vs. direct sound by trying other formats (e.g. -Ow, -OF)
    – dirkt
    Commented Aug 5, 2022 at 5:06
  • @dirkt Ow is the same, so I wrote -Ox in the title
    – Lily White
    Commented Aug 5, 2022 at 6:21
  • Does the same thing happen if you don't use a custom soundfont? Does the same thing happen with a completely unrelated midi file? If yes, can you use a tool to determine the actual frequencies in the WAV file without playing it? E.g. Audacity has a FFT feature. (The purpose of those tests is to narrow down the place where it goes wrong, by exchanging parts of the whole process).
    – dirkt
    Commented Aug 5, 2022 at 6:44
  • @dirkt I tested (with the same config) on another Fedora box I have, the output is the same as -Ov produces (even when I listen to timidity directly) here on my Mac.
    – Lily White
    Commented Aug 6, 2022 at 1:36
  • 1
    @dirkt You misunderstood me. I just tested on Windows and the result is Lower. Thus, the bug is reproduced if and only if the program is being run on mac, and set to direct output to sound.
    – Lily White
    Commented Aug 9, 2022 at 5:06

0

You must log in to answer this question.

Browse other questions tagged .