Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2012 09:52:53 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Gary Aitken <ah@dreamchaser.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: audio playback with variable tempo
Message-ID:  <20121214095253.25bc9b40.freebsd@edvax.de>
In-Reply-To: <50CA6B43.4070305@dreamchaser.org>
References:  <50C912D4.6060305@dreamchaser.org> <20121213075126.4d021d07.freebsd@edvax.de> <50CA6B43.4070305@dreamchaser.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Dec 2012 16:56:51 -0700, Gary Aitken wrote:
> On 12/12/12 23:51, Polytropon wrote:
> > On Wed, 12 Dec 2012 16:27:16 -0700, Gary Aitken wrote:
> >> Can anyone suggest an audio playback application that allows you to vary the
> >> tempo?  I've used audacity on win systems, but I don't see that in ports.
> > 
> > Except that audacity actually _is_ in ports, if you just
> > require "adjustable" speed (without editing / saving the
> > original file), you could use "mplayer -speed <n> <file>",
> > or use "mplayer <file>" and use the [ ] and { } keys to
> > adjust the speed (if you have OSD on, key 'o') you can
> > see the speed (if the file contains video; if not, the
> > output will be text only for information purposes).
> 
> Thanks.  
> Speed is not what I want to adjust, as it changes the pitch.
> The playback timing needs to be adjusted so everything has the same pitch,
> but just comes out faster or slower.

Oh, I see. No problem - Audacity can do that. (And as it has
been suggested, if you need to apply batch operation, you
can use sox, also in ports.)




> However, I'm a little confused on what all the devices are related to audio.
> 
> For the default device, which I've set to unit 3 (for pcm3), 
> I see the following in /dev:  dsp3.0 mixer3
> What are each of these associated with?
> The mixer itself shows the following devices:
>   vol, pcm, mix, rec, igain, ogain, monitor
> Can someone point me to documentation on what these are and how they interact?  
> It's not obvious to me what the difference between vol and ogain,
> or rec and igain, are, for example.  What is mix mixing, and what does 
> monitor do?  A schematic would be helpful...

If I remember correctly, monitor is a monitor channel for the
inputs, so this channel contains what will be recorded (even
though only one of its sources can be recorded at a time).
It lets you listen to the recording source.

The manpage mentions several mixer devices:

     The list of mixer devices that may be modified are:

           vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix, pcm2,
           rec, igain, ogain, line1, line2, line3, dig1, dig2, dig3, phin,
           phout, video, radio, and monitor.

     Not all mixer devices are available.

True, my sound card doesn't have all of them. :-)



> For device /dev/dsp4, there is a dsp4.0 and dsp4.1, 
> which I thought would be the separate left and right channels;
> but I only see a dsp3.0, not a dsp3.1, and there is definitely stereo sound.
> pcm3 is an analog device, and pcm4 is digital; 
> does that have anything to do with it?

That would probably be documented in the actual sound driver's
documentation, as pcm and mixer are interfaces to the driver
functionality (FreeBSD kernel mixer <-> hardware driver).

Because of use the source Luke, I found "use igain for the mic
20dB boost" in /usr/src/sys/dev/sound/pcm/ac97.c. Maybe there
are more hints to what the mixer devices actually do in the
source tree. I also assume the functionality depends on what
the hardware implements in reality, which may differ from
device to device.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121214095253.25bc9b40.freebsd>