Problem of the Day
A new programming or logic puzzle every Mon-Fri

Sound Off

An easy objective for today. Using your favorite programming language create a program that makes a sound. For bonus points make multiple different tonal sounds.

Permalink: http://problemotd.com/problem/sound-off/

Comments:

  • Johnathan - 9 years, 8 months ago

    I tried to make a GUI for it with tkinter, but still don't have a good grasp on making them yet.

    import winsound
    
    while True:
        x = int(raw_input("enter a freqency between 300 and 500 and I will play it: "))
        if x >= 300 and x <= 500:
            winsound.Beep(x,1000)
    

    reply permalink

  • Johnathan - 9 years, 8 months ago

    Also be careful the sound could be kinda loud from this if you have it turned up and try running it.

    reply permalink

  • Cha0z97 - 9 years, 8 months ago

    This weekend I came across this little gem:

    main(t){ for(t=0;;t++)putchar( t*((t>>12|t>>8)&63&t>>4) );}

    Compile as noize1 ./noize | padsp tee /dev/audio > /dev/null

    credits go to viznut

    reply permalink

Content curated by @MaxBurstein