Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44863 - Timidity++ -> use of env variable TIMIDITY_PCM_NAME for ALSA
Summary: Timidity++ -> use of env variable TIMIDITY_PCM_NAME for ALSA
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-16 10:15 UTC by Stefan Briesenick (RETIRED)
Modified: 2004-03-19 11:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Briesenick (RETIRED) gentoo-dev 2004-03-16 10:15:59 UTC
Hi!

the ALSA backend of Timidity++ uses always the device 'default'. You can change this with the environment variable TIMIDITY_PCM_NAME (there's no commandline option for this).

For example:

export TIMIDITY_PCM_NAME="mycard"
timidity ... file.mid

This variable should be setable in /etc/conf.d/timidiy for the AlSA sequencer daemon:

TIMIDITY_OPTS="-B2,8 -Os -s48000"
TIMIDITY_PCM_NAME="mycard"

then /etc/init.d/timidity could look like this (see the line with export):

start() {
        ebegin "Starting Timidity Virtual Midi Sequencer"
        test -n "$TIMIDITY_PCM_NAME" && export TIMIDITY_PCM_NAME
        start-stop-daemon --start --quiet --background \
                --make-pidfile --pidfile /var/run/timidity.pid \
                --exec /usr/bin/timidity -- -iA ${TIMIDITY_OPTS}
        eend $?
}

so you can specify an ALSA device especially for the Timidity daemon. Furthermore an /etc/env.d/XXtimidity with this variable would be fine to set the device for commandline use.

should be easy to implement and would help alot!

thanks in advance.

Reproducible: Always
Steps to Reproduce:
1. timidty -Os file.mid
   -> will use 'default'

2. TIMIDITY_PCM_NAME="mycard" timidty -Os file.mid
   -> will use 'mycard'
Comment 1 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-19 00:38:51 UTC
oh cool =)  I'll take care of this this weekend...
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-19 09:52:13 UTC
alright.  it's in portage.  I also version bumped timidity.
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2004-03-19 11:35:16 UTC
thanks. works great! ;)

I try to check, if there're further environment variables available (study source code). If, they could be included the same way.