I agree, we can use the pipes to put them together. That is how I do such thing, and design these programs, at least.
For example, one program is "playmod" which read a module music file from stdin, and write the raw audio data to stdout. The program "amigamml" is takes the MML code from stdin and write the module music file to stdout. And then, program "aplay" is playing the audio data from stdin on the speaker. Other example can be, "ls" to list files, "shuf" to put into a random order, and "xargs" to run another program for each one, and a shell script might then do "playmod" and "aplay", you can play the music at random!