6

I'm interested in creating musical programs like these:

http://www.youtube.com/watch?v=GtQdIYUtAHg&feature=player_embedded

Essentially these programs just generate sequences of integers, which (apparently), when fed directly into a 8khz audio stream (like "/dev/audio"), produce interesting music.

My problem is that my system does not have /dev/audio. In fact, looking through my /dev, it's unclear to me whether any of the devices is a direct audio interface.

I have two questions:

  1. Is there a nice package which will let me pipe in a stream of numbers from the command line, and produce a matching 8Khz audio output?

  2. If not, how might I go about directly accessing my audio device?

1
  • 1
    Answered my own question, but can't put it in as an answer yet (not enough reputation). This works fine for me: ./a.out | aplay Oct 2, 2011 at 5:20

2 Answers 2

2

This worked out fine for me:

./a.out | aplay
1
  • Thanks! And you probably have enough reputation now to mark that as the answer. Jan 21, 2013 at 2:52
0

From the video it looks like they are using PCM. On Ubuntu try using /dev/snd/pcm*

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .