OldSpaceSoundSystem

From RevSpace
Revision as of 09:25, 3 October 2011 by Gmc (talk | contribs)
Jump to navigation Jump to search
Project Space Sound System
Status Completed
Contact gmc
Last Update 2011-10-03


Space Sound System

One server with many soundcards and pulseaudio. One soundcard per room, each with their own amplifier (the amps are also in the server room, and can be switched off individually when there is no music playing). One MPD per room, but with pulseaudio audio can be routed at will. With the network-capabilities of pulseaudio, one can send audio from ones laptop to any room.

Turning the system on

There is no need to touch the hardware in the server room. It is configured to turn on the amplifier that is assigned to the room as soon as you try to play audio to that room. There might be a slight delay (5-20 seconds) as the amplifier switches on, warms up and enables the speaker output relays, so be patient.

Playing music from the library

Each room is assigned a MPD instance, as follows:

  • lounge - host 10.42.66.1 port 6600
  • handwerklokaal - host 10.42.66.1 port 6601
  • hacklab - host 10.42.66.1 port 6602
  • studio - host 10.42.66.1 port 6603

Web front-end

Check out the the main page on the sound server.

Desktop client

There exist clients for mpd for most operating systems, besides the canonical command-line mpc client.

Uploading music

You can mount the music library with something like:

smbmount -o guest,uid=foo \\\\10.42.66.1\\music /home/foo/mnt/spacemusic

The above command may be deprecated. The one below is the replacement.

mount -t cifs -o guest,uid=foo \\\\10.42.66.1\\music /home/foo/mnt/spacemusic

If you are into GUI's, in your operating systems' network browser find the workgroup REVSPACE, which will show a host 'transformer' that has the share 'guest'.

Pulseaudio playback

You can also stream directly to the pulseaudio server using any of these sinks via a pulseaudio tunnel:

  • lounge
  • handwerklokaal
  • hacklab
  • studio

Linux

For example, using mplayer:

mplayer -ao pulse:10.42.66.1:lounge http://85.17.146.164:80/2

OSX

No clue, i don't use it. If you manage to make it work, please document here.

Windows

No clue, i don't use it. If you manage to make it work, please document here.

Volume control

I tend to use pavucontrol from linux:

PULSE_SERVER=10.42.66.1 pavucontrol

The web front-ends also have a volume slider.

System description

Server (labelled chip, actual hostname is transformer, long story...) is at 10.42.66.1. It runs:

  • pulseaudio
  • pulsepower (daemon gmc wrote, needs some improvement)
  • 4 mpd's at ports 6600 through 6603

A series of amplifiers receives line-level audio from the two surround soundcards which are configured as multiple virtual stereo cards. The amplifiers have been hacked to varying degrees to boot up in the on state and with the right source selected automatically, and power is controlled by a USB power socket with 4 outlets.

  • Workshop - use current amplifier (sony mini-set);
  • Main room - use amplifier that is on dj table;
  • Studio - use mini-set that is in there currently;
  • Hacklab - need amp (reuse system that is now on lackbeamermount?);

Future plans

  • Enable RTP sinks, for more stable and portable playback from networked devices
  • Standardize on Velleman 150 amplifier kits
  • Add volume control knobs in all rooms via RS485 space bus
  • Add routing of pulseaudio streams, eg play stream to both studio and lounge simultaneously
  • Add web front-end to mpd's and routing/volume control
  • more...

Known issues

  • The AKAI amplifier can not be power-cycled to quickly; it needs to be off for about 10 seconds before turning on again, or the ne555 circuit will fail to turn on the amp
  • pulseaudio ip tunnels over wifi are unstable/choppy (needs rtp)
  • No security whatsoever, everything is open to everyone

Software

  • ajaxMP web interface for mpd - sadly project is discontinued

Advanced topics

Loopback

load-module module-loopback source=lounge.monitor sink=studio latency_msec=5

Apps that don't support pulseaudio

On your local pulseaudio:

load-module module-null-sink sink_name=virtual

Put in .asoundrc:

pcm.pulse {
    type pulse
    device virtual
}
ctl.pulse {
    type pulse
    device virtual
}

Now configure your app to play to alsa device 'pulse'. You now have the audio on a pulseaudio source 'virtual'. You can cat this to the server for eg:

pacat -v -r -d virtual.monitor | pacat -p -s 10.42.66.1 -d lounge