Linux Sound Support
When it comes to playing music, there are several methods that can be used.
First, don't plan on digitizing a 60 minute music CD as a sound file and storing it on your hard disk. Some simple calculations show the size of the data involved:
60 minutes
x 60 secs/minute
x 44100 samples/second
x 2 channels
x 2 bytes/sample
= more than 635 million bytes!
Small sound samples at low sampling rates are reasonable though:
10 seconds
x 8000 samples/second
x 1 channel
x 1 byte/sample
= 80 thousand bytes
A more compact method of storing music is MOD files. These originated with the Amiga computer, but MOD file editors and players are now available on other systems as well, including Linux. MOD files essentially store a bank of short samples (instruments), and sequencing information (musical notes). These files are of the order of 30K to 300K bytes in size and can represent several minutes of music (i.e. a complete song).
MIDI stands for Musical Instrument Digital Interface, and as the name suggests, is a standard hardware and software protocol for allowing electronic musical instruments to communicate. MIDI files describe songs in terms of keypress events, and can be played using either an internal FM synthesizer on the sound card, or external MIDI devices.
Another, less common, file format is Adagio files. Adagio is a music description language developed at Carnegie Mellon University. Programs to play Adagio files, and convert between Adagio and MIDI files are available.
We can't forget another important application for sound—games! Several graphical games supporting sound run under Linux, including Bdash and Xboing.
To make use of the sound support in the Linux kernel, applications are needed. Several of the important ones are Sox (a utility for converting sound files from one format to another and adding effects), and tracker (a MOD file player). Some graphical programs that run under X are available as well, including xmix (a sound mixer), xplay (a sound player/recorder), and xmp (a MIDI file player).
There are many others, including some interesting applications such as speech synthesis.
Now it's time for me to get up on my soapbox. Sound support in Linux is quite new, and application support is not as complete as for some other operating systems. I envision seeing a complete set of sound tools, that would provide a consistent, graphical user interface for all of the common sound functions. This would help bring Linux to the forefront of multimedia operating systems. Some of the tools that need to be developed are:
sound player/recorder tool
file conversion utility
audio mixer
MOD file player
MOD file editor
MIDI file player and sequencer
FM synthesizer patch editor
text to speech synthesizer (how about support for a /dev/speak device?)
an X window manager supporting sound
Many of these already exist in various forms, and just need more development to be more reliable and consistent. Any volunteers?
An interesting side note is that the author of the Linux sound drivers, Hannu Savolainen, is porting them to other Intel operating systems as well. The package has been dubbed VoxWare, and should make it easier to write sound applications that are portable across several operating systems.
The Linux Sound-HOWTO document provides more information on the topics discussed in this article and provides other references. Look for it on your local Linux archive site.
If you have access to the Internet, the following FAQs (Frequently Asked Question documents) are regularly posted to the usenet newsgroup news.announce as well as being archived at the site rtfm.mit.edu in the directory /pub/usenet/news.answers:
PCsoundcards/generic-faq (Generic PC Soundcard FAQ)
PCsoundcards/soundcard-faq (comp.sys.ibm.pc.soundcard FAQ)
PCsoundcards/gravis-ultrasound/faq (Gravis Ultrasound FAQ)
audio-fmts/part1,part2 (Audio file format descriptions)
These FAQs also list several product specific mailing lists and archive sites. The following Usenet news groups discuss sound and/or music related issues:
alt.binaries.sounds.misc (Digitized sounds and software)
alt.binaries.sounds.d (Discussion and follow-up group)
alt.binaries.multimedia (Multimedia sounds and software)
alt.sb.programmer (SoundBlaster programming topics)
comp.multimedia (Multimedia topics)
comp.music (Computer music theory and research)
If you have Internet mail access, then you can subscribe to the SOUND channel of the Linux Activists mailing list. To find out how to join the mailing list, send mail to linux-activists-request@joker.cs.hut.fi.
The Readme files included with the kernel sound driver source code contain useful information about the sound card drivers. These can typically be found in the directory /usr/src/linux/drivers/sound.
The Linux Software Map (LSM) is an invaluable reference for locating Linux software. Searching the LSM for keywords such as “sound” is a good way to identify applications related to sound hardware. The LSM can be found on various anonymous FTP sites, including sunsite.unc.edu in the file /pub/Linux/docs/LSM.gz.
Note that at the time this article was written, the sound driver was at version 2.4, and was included as part of the Linux kernel version 0.99 patch level 15 (and is probably ancient history by the time you read this).
Jeff Tranter (Jeff_Tranter@mitel.com) is a software designer for a high-tech telecommunications company in Kanata, Canada. He is the author of the Linux Sound HOWTO.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- What's the tweeting protocol?
- Tech Tip: Really Simple HTTP Server with Python
- Kernel Problem
50 min 22 sec ago - BASH script to log IPs on public web server
5 hours 17 min ago - DynDNS
8 hours 53 min ago - Reply to comment | Linux Journal
9 hours 25 min ago - All the articles you talked
11 hours 49 min ago - All the articles you talked
11 hours 52 min ago - All the articles you talked
11 hours 53 min ago - myip
16 hours 18 min ago - Keeping track of IP address
18 hours 9 min ago - Roll your own dynamic dns
23 hours 22 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
sound in Ubuntu
I cannot play any sound in my new system.
I have an onboard sound card which plays in windows.
I have read pages of text relating to sound and have tried using the CD rom that came with my soundcard.
Can you help me IN SIMPLE TERMS to find a driver/software that will work?
The rest of the Linux system seems to work OK and I have mastered some very useful applications.