Unable to create Timidity++ MIDI device

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
m8f
 
 
Posts: 1449
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Unable to create Timidity++ MIDI device

Post by m8f »

Hello! Getting problems with timidity.
GZDoom: 3.3.0.
OS: Debian GNU/Linux 9/stable/Stretch, x86_64.
On GZDoom start on fresh config, switching to timidity produces the following message in console:

Code: Select all

Unable to create Timidity++ MIDI device. Falling back to FluidSynth
Then sound is played with FluidSynth, but Timidity++ remains set it Sound Options.

Also, I seem not to be able to set Timidity config, as Select Configuration menu is empty:
Screenshot from 2018-03-26 08-10-14.png
Screenshot from 2018-03-26 08-10-22.png
What can I do to investigate why Timidity is not working on my system? I can build GZDoom and try to debug, if this will help.
You do not have the required permissions to view the files attached to this post.
_mental_
 
 
Posts: 3819
Joined: Sun Aug 07, 2011 4:32 am

Re: Unable to create Timidity++ MIDI device

Post by _mental_ »

TiMidity++ can use .sf2 soundfonts or .zip archive with GUS patches and timidity.cfg in it.
The list of search directories is here. Put .sf2 or .zip into one of those and you will be able to select configuration in menu.
Or you can add new entries to the list in gzdoom.ini file.
User avatar
m8f
 
 
Posts: 1449
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Unable to create Timidity++ MIDI device

Post by m8f »

The problem is solved locally by to steps:
1. setting timidity_config to "/etc/timidity/timidity.cfg". Maybe this is my fault, and I should have put my config in some path that would be automatically found.
2. Changing the config. It was:

Code: Select all

# Instrument configuration file for timidity
# $Id: timidity.cfg,v 1.7 2005/09/03 19:26:03 hmh Exp $

# You can change just about every option in TiMidity++ using
# This config file.  Please refer to the timidity.cfg(5) manpage
# for more details

## If you have a slow CPU, uncomment these:
opt EFresamp=d          #disable resampling
opt EFvlpf=d            #disable VLPF
opt EFreverb=d          #disable reverb
opt EFchorus=d          #disable chorus
opt EFdelay=d           #disable delay
opt anti-alias=d        #disable sample anti-aliasing
opt EWPVSETOZ           #disable all Midi Controls
opt p32a                #default to 32 voices with auto reduction
opt s32kHz              #default sample frequency to 32kHz
opt fast-decay          #fast decay notes

## If you have a moderate CPU, try these:
#opt EFresamp=l
#opt EFreverb=g,42
#opt EFchorus=s
#opt s32kHz
#opt p64a

# Disabling some of the Midi Controls can help with the CPU usage a lot.
# The same goes to the VLPF, sample anti-aliasing and effects such as
# reverb and chorus

# By default, try to use the instrument patches from freepats:
# source /etc/timidity/freepats.cfg

# alternatively, you can use the fluid-soundfont:
#source /etc/timidity/fluidr3_gm.cfg
#source /etc/timidity/fluidr3_gs.cfg

soundfont /home/allkromm/Dropbox/music/roland-sc-55.sf2
And there were errors on opt lines after "## If you have a slow CPU, uncomment these:". On 3.2.5, when external timidity (version 2.13.2 by the way) was used, these options were parsed without errors.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49204
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Unable to create Timidity++ MIDI device

Post by Graf Zahl »

Timidity's config can either point to a .sf2 file, to a zipped GUS patch set, to a .cfg file using an absolute path or to any of the sound fonts the engine finds in its soundfonts/ folder.

The 'opt' instructions are no longer parsed because the entire front end from timdity.exe has been removed. The ones that are of some use can be controlled via CVARs now but many of Timidity's options have little to no use in the content of an integrated MIDI synth.
I honestly never expected some configs to contain values here.
User avatar
m8f
 
 
Posts: 1449
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Unable to create Timidity++ MIDI device

Post by m8f »

OK. My setup was just not usual. It happens :)

Regarding empty Select Configuration menu. Should it look like this (screenshots in OP)?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49204
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Unable to create Timidity++ MIDI device

Post by Graf Zahl »

Normally not. But on Linux the search path may not be set up properly. That needs to be investigated by a Linux user, though.
BTW, you can add your own directories if you edit the INI.
User avatar
m8f
 
 
Posts: 1449
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Unable to create Timidity++ MIDI device

Post by m8f »

Oh!
I found out that soundfont is installed in /opt/gzdoom/gzdoom.sf2, and this path is not listed in default paths in [SoundfontSearch.Directories] section in ini. Is it an issue in Debian/Ubuntu GZDoom package?
User avatar
Rachael
Posts: 13883
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Unable to create Timidity++ MIDI device

Post by Rachael »

Likely is but I can't say for sure.

Very little communication happens between our team and the guy who builds those. The path should probably be marked, on our end, though.
_mental_
 
 
Posts: 3819
Joined: Sun Aug 07, 2011 4:32 am

Re: Unable to create Timidity++ MIDI device

Post by _mental_ »

m8f wrote:And there were errors on opt lines after "## If you have a slow CPU, uncomment these:". On 3.2.5, when external timidity (version 2.13.2 by the way) was used, these options were parsed without errors.
It looks like our internal TiMidity++ is older than this external one.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49204
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Unable to create Timidity++ MIDI device

Post by Graf Zahl »

Our internal Timidity++ is 2.14, which was the latest version I could find.

The problem with the 'opt' lines is simply that the feature backing them was removed in favor of CVAR control.
The options parser was one huge mess of code I did not want to deal with.
User avatar
m8f
 
 
Posts: 1449
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Unable to create Timidity++ MIDI device

Post by m8f »

_mental_ and Graf Zahl, thanks for the help!
As for me, CVAR control is quite sufficient.
I didn't know that timidity's config can point to a .sf2 file directly, without specifying it through .cfg. If I knew, I wouldn't even look into configs.
Another thing that made me confused is that directory with gzdoom.sf2 wasn't in the path search list.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49204
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Unable to create Timidity++ MIDI device

Post by Graf Zahl »

Timidity++ itself cannot, but since this runs under our own control, in that case it can simply synthesize a config pointing to the sound font. It probably could have been done better but this was less work for the same end result.

Return to “Closed Bugs [GZDoom]”