Thanks, everybody! Those were incredibly informative answers. This list is amazing.
Heinrich's suggestion of compiling with "-threaded" was by itself sufficient to get the first rhythm to sound right.
The second rhythm, however, still blurs into a string of beeps of the same duration even after I throw all of Heinrich's and Carter's suggestions at it by doing this:
ghc --make fast -threaded -fno-omit-yields -with-rtsopts -C0
(although I should admit to not really knowing what I'm doing when I run that) where fast.hs is this:
import Control.Concurrent
import Text.Printf
import Control.Monad
import System.IO
main = do
hSetBuffering stdout NoBuffering
mapM_ note (cycle [1,1,2])
beat = round (10^6 / 10) -- measured in microseconds
note :: Int -> IO ()
note n = do
threadDelay $ beat * n
printf "\BEL\n"
I therefore suspect I have to teach myself, as Brandon suggested, a realtime scheduler. This seems like a general, powerful thing:
Hayoo also returns a lot of domain-specific results, e.g. from the Sound and Data.Reactive libraries:
but I suspect a general tool like Atom would be more useful so I'll start there.
Thanks again,
Jeff