Timidity.cfg location
#1
I followed the wiki in the wiki closely, and I have come to the conclusion that XBMC is not translating its special:// path correctly before passing it to timidity.

Or can someone enlighten me if the low level libs like timidity etc understand what "special://" means (I highly doubt this)

The error in the log clearly states that timidity cannot find the config file that was passed to it in its arguments. I looked at the timidity source code and found the exact error message, and it is being passed an argument (config path) that it can't understand.

I searched the dev forum for timidity and came up with nothing related to this.

I'm building a branch of openelec and xbmc just so I can examine this bug further, but I wanted to post the question here.

Regards,
Mark
Reply
#2
Don't be shy. If you have a log, make it available.
The alternative is to send us your HDD, of course, but publishing seems easier.
Reply
#3
they understand special and the entire vfs. we inject replacement posix-io functions, through a linker script on linux et al, through the crafted dll loader on windows.
Reply
#4
hanks for the info. I think that's pretty cool about the io functions.

It was a hunch anyway Smile

14:00:01 T:3033339648 ERROR: TimidityCodec: cannot init codec: TiMidity: Can't read any configuration file.
Please check special://xbmc/system/players/paplayer/timidity/timidity.cfg
14:00:01 T:3033339648 ERROR: Failed to initialize MIDI codec. Please make sure you configured MIDI playback according to http://wiki.xbmc.org/?title=HOW-TO:_Setu...or_karaoke
14:00:01 T:3033339648 ERROR: CAudioDecoder: Unable to Init Codec while loading file /storage/Pliki KAR/4 Non Blondes - What's Up.kar
14:00:01 T:3033339648 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder
14:00:01 T:3033339648 ERROR: Playlist Player: skipping unplayable item: 5, path [/storage/Pliki KAR/4 Non Blondes - What's Up.kar]


OpenELEC:~/.xbmc # ls -lh
total 24
drwxr-xr-x 85 root root 4.0K Jan 8 01:56 addons
drwxr-xr-x 2 root root 4.0K Jan 7 14:53 media
drwxr-xr-x 2 root root 4.0K Jan 7 13:58 sounds
drwxr-xr-x 3 root root 4.0K Jan 10 05:39 system
drwxr-xr-x 3 root root 4.0K Jan 10 14:00 temp
drwxr-xr-x 9 root root 4.0K Jan 10 06:23 userdata

OpenELEC:~/.xbmc # ls -lh system/players/paplayer/timidity/timidity.cfg
-rwxr-xr-x 1 root root 2 Jan 10 05:45 system/players/paplayer/timidity/timidity.cfg

OpenELEC:~/.xbmc # ls -lh system/players/paplayer/timidity
total 241616
-rwxr-xr-x 1 root root 235.9M Jan 8 03:34 soundfont.sf2
-rwxr-xr-x 1 root root 2 Jan 10 05:45 timidity.cfg
OpenELEC:~/.xbmc #
Reply
#5
special://xbmc/system is not your user profile, but in the actual kodi install path
Reply
#6
Would http://kodi.wiki/view/Karaoke#MIDI_playback be of help?
Reply
#7
as i wrote this code back in the xbox days it did not matter, you could easily write to system paths. it should ideally read stuff from userdata these days. however, i'm not very tempted to change it though, as the whole thing will be redone using addons in mainline soon (i hope).

edit: seems i already did this at some point. follow the wiki Smile
Reply
#8
(2015-01-12, 10:05)Koying Wrote: Would http://kodi.wiki/view/Karaoke#MIDI_playback be of help?

Interesting. I have read that page several times, and indeed remember reading the exact paragraph that is in, but it was not there.

Wonder if i was reading an old wiki link. Because I read the bit about the timidity version number (which is just below those lines).

Disclaimer: Don't gripe at me for using an appletv mk1, it's what i have on hand.

So I'm using an apple tv with openelec 4.2.1 and Kodi 13.2.

The "xbmc" system folders are part of the read only file system in openelec "/usr/share/xbmc/...".

i copied the files to userdata/timidity and it played the file. Thanks for the tip. However, playback was staticy... I'm probably not going to put much more effort into this appletv and buy a raspberry. But the atv case is so nice and the connections are all lined up nicely on the back.... sigh... that's a different thread Smile

However, my quest is to build a karaoke box, not a media streaming box. So I *must* have analog audio to send the mic mixer. Raspberry doesn't even have analog audio...

Again, thanks. Maybe I'll try a smaller soundfont file. Can't explain the static.
Reply
#9
Revisiting this thread because the replies do not address my question

so, going back to the beginning

the error message from timidity is

14:00:01 T:3033339648 ERROR: TimidityCodec: cannot init codec: TiMidity: Can't read any configuration file.
Please check special://xbmc/system/players/paplayer/timidity/timidity.cfg

Specifically I want to know where this path is supposed to be on the physical openelec file system.

The timidity code is simply echoing the file path passed to it from XBMC.

Then the posix file handling routines map the special://xbmc/ file path accordingly. And this is specified in the wiki as the following location:
/usr/share/xbmc which under openelec maps to /usr/share/kodi


Under /usr/share/kodi there is system/players but no paplayer folder. And this is a read only file system.

I desire to use a timidity.cfg file so that I can test using freepats instead of a sound font due to poor midi playback (crackling and popping).

http://kodi.wiki/view/Special_protocol

2 Linux default mappings

special://xbmc - /usr/share/xbmc when installed from a binary package (ie PPA, rpm, deb, etc). /usr/local/share/xbmc when compiled (unless you specify an alternate prefix)
special://home - /home/[username]/.xbmc (Note the '.', this directory is hidden so you may need to enable hidden files in your file manager to see it).

It would seem that a more correct location that XBMC would be passing to Timidity is special://home not special://xbmc

Also, I'm wondering if the file paths inside the timidity.cfg should actually be:

dir special://home/blah blah blah

I can't know for sure if physical file paths specified inside a config file like this (say /storage/timidity) would work as normally would under a regular linux install.
Reply
#10
correct, it maps to
Code:
/usr/share/kodi/system/players/paplayer/timidity/timidity.cfg

but as listed in the wiki
Quote:For revisions after 35301 copy it into timidity subdirectory in your home userdata folder, i.e. something like ~/.xbmc/userdata/timidity/soundfont.sf2
which on oe translates to
Code:
/storage/.kodi/userdata/timidity/soundfont.sf2
this also applies to timidity.cfg, it will first look for a sf2 file, then a cfg.
Reply
#11
Ok, so we have come full circle.

Yes it works with soundfont but on a rpi it stutters and Cant play at all. On a vm with kodibuntu it plays but sound is aweful. Popping and cracking. Interestingly, sa me exact results on an appletv mk1.

So i was attempting to use freepats instead of soundfont. And that is where im stuck. I put all the parts in the right places, but the error persists.

The cfg has the line

Dir /storage/......

Im wondering if that ought to be

Dir special://....
Reply
#12
Thanks btw for the reply...

But i have to say, being a developer myself, things like this drive me nuts. Quite a leap from special://xbmc/system to what amounts to special://home Wink cheers for confusing error msgs.

Ill detach my logical cortex and follow your lead.
Reply
#13
log was added on xbox where it was the only dir read.

i checked the code. it is indeed a complete mess.
only a soundfont will be read from the userdata dir. the code to read config files was never updated. in the process of adding that a soundfont was even made mandatory :/

with a soundfont i get crappy sound on my mainline (oe) machine as well, constant static. not sure why that happens.

in my fork i use fluidsynth as timidity just sucks in comparison which is why i haven't noticed this. however, the timidity addon will still have the same issues as it is a straight port of the code so i have to fix it up. stay tuned, i will backport the patches to mainline so you can build your own if you can.
Reply
#14
meh.

i have fixed the cfg reading. however, the static noise is only there with mainline, not in my fork. since the only difference between my timidity and mainline timidity is that i have quelled some warnings, the bug must be outside the timidity code. thus mainline can fix their own shit ;P

patch for cfg reading: http://paste.ubuntu.com/9847924/
Reply

Logout Mark Read Team Forum Stats Members Help
Timidity.cfg location0