[Preston] ALSA Demo -- Planned and Possible Demo Items

Matthew T. Atkinson matthew at agrip.org.uk
Mon Jun 7 15:19:49 BST 2004


'ellow,

OK, I've written it all up now.  The file is attached (can I do that on
PLUG? -- suppose we'll find out).

It covers all the areas we talked about plus some other stuff that
people talked to me about afterwards.

Hope it helps but if you have any questions/problems/suggestions, please
let me know :-).

bye just now,


-- 
Matthew T. Atkinson <matthew at agrip.org.uk>
-------------- next part --------------
PLUG ALSA Demo -- Instructions & Info
======================================

This file shows how I set up the various things that I demonstrated at
the PLUG meeting.  It also has some extra information that may be of
use to you (specifically, alternatives to MPD for those that need to
swap the client and server 'round).

Topics covered:
 * ALSA
 * MPD (and alternatives)
 * netBeep
 * Filter Networks

Any questions, please gimme a shout.


Setting Up ALSA
================

These destructions are peculiar to Debian/Sid but will be very similar
on other distros.

1. apt-get install alsa-source alsa-base.  Answer the questions as
appropriate (i.e. whether to build ISA support and which chip-set
you're using).
2. Go into the kernel configuration (e.g. make menuconfig).  Go down
to the ``Sound'' menu and access it.  Disable all but sound support
(the very top option).  Personally I compile it in so that there are no
potential problems with loading modules in the wrong order.
3. Build the kernel and modules.  This can be done with ``make-kpkg
kernel-image modules-image'' on Debian.
4. Install and reboot.  You may need to update your GRUB (or LILO) set-up.
5. Set up the auto-loading of the ALSA modules (e.g. with /etc/modules,
modconf or hotplug).
6. Set up the mixer -- it starts with most things muted.  A good mixer
is gnome-alsamixer but KDE also has an ALSA mixer app available for it.

You should then tell some of your audio programs that you're using ALSA --
e.g. aRts, XMMS.


Playing MIDI Files
===================

In Hardware
------------

1. apt-get install awesfx
2. Grab the .SF2 file(s) from your SB Driver CD
3. sfxload <filename>.SF2
4. aplaymidi --list (to show the ports available).  Pick the first port
that has ``WaveTable'' in the title.
5. aplaymidi midifile.midi --port 65:0 (for example)

In Software
------------

1. apt-get install timidity
2. (optional) install voice banks
3. timidity midifile.mid

Timidity can be used for those who don't have WaveTable sound cards.
It can also understand a number of other formats and voice bank types so
may be worth a look.  Apparently it can also be used as an ALSA sequencer
device, now, too.


MPD and Alternatives
=====================

You can use MPD when you have a box connected to many speakers in your
house to have music throughout it.  If you have a phone/PDA/notebook/other
box, you can control this server box remotely.

When Not to use MPD - Alternatives
-----------------------------------

MPD is _not_ for file-servers that don't have sound hardware/speakers
attached.  If you have a number of separate desktop machines that want
to get music from a share on a file-server, you can do this:

1. Install LUFS -- So amazing it should be in Linux natively.
http://lufs.sf.net/
2. Mount the remote FTP/HTTP/SSH share on your desktop.
3. Use XMMS/Rhythmbox/Totem/Noatun/JuK to play the files in this
directory.

You can probably use the VFS layer of your chosen desktop but they are
all at the wrong layer in the system and are much less efficient and
capable than LUFS.  Give LUFS a look -- it really is an amazing system.

Using MPD and Clients
----------------------

MPD is useful for a music server that is connected to a sound system.
It will be remote-controlled from anywhere else on your network.

So, you can set up MPD by:

0. Set up /etc/apt/sources.list -- MPD is not (yet) in
Debian.  Check first (``apt-cache search mpd'').  If it still
isn't there, you'll need to add some sources to your list.  See
http://www.mail-archive.com/debian-mentors@lists.debian.org/msg13277.html
for details.
1. apt-get install mpd
2. Edit config file (may not be necessary -- depends on if you want
multiple users and access control).

To set up PHPmp

1. apt-get install phpmp
2. Make sure that there is an index.php entry in apache's indexes
config item.
3. un-comment the php actions in httpd.conf (if not done already)

To set up gmpc

1. apt-get install gmpc
2. Connect (might be nice to set the ``auto-connect'' option in
preferences).
3. Use the graphical playlist editor to add tracks

You can also search for tracks in both the GNOME and web interfaces.
You can just telnet in if you like -- so most phones and PDAs should be
fine with controlling the music, too!


netBeep
========

As mentioned, the current version is a beta but is very stable and will
be released as 0.2.0 very soon (just waiting for the co-developer to
finish exams in Loughborough :-)).

If anyone can make up some new tunes, please do so and send them to us
(you will be credited, of course).  If anyone could record some of this
stuff running in a lab of, say, five or more computers, that would be
really cool!

You can get netBeep from the website at http://netbeep.agrip.org.uk/
Remember to pick up the latest 0.1.9x or 0.2.0 version.

netBeep requires the ``beep'' package.  Debian will get this for you
automatically.  On other distros, you may need to download it.

For info on everything (literally) relating to netBeep, please read
http://netbeep.agrip.org.uk/manual/


Filter Networks
================

Filter Networks can be used for sound synthesis and are easy to create
in GLAME and BEAST.  The GLAME web page has a very good tutorial at
http://glame.sourceforge.net/manual.var#Gottagetbetter

The three topics, starting with the first one that link points to, should
give you a good intro.  You may find that you can get more plug-ins
if you install the LADSPA plug-ins package for your distribution.
Examples of such packages (in Debian) are:

* cmt -- Computer Music Toolkit (cmt) a collection of LADSPA plugins
* swh-plugins -- Steve Harris's LADSPA plugins


Summary
========

I hope that this has been a decent recap of what we covered in the demo.
Please contact me if you have any queries, problems and/or suggestions.


More information about the Preston mailing list