Results 1 to 3 of 3
  1. #1
    od11kd is offline Member
    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    Default Programming an echo to a sound

    An echo occurs when sound waves produced at one place reflect off a hard surface and return back to the original source. The time it takes for the sound to reach the surface and then return is the delay in the echo. Since sound attenuates (diminishes) as it travels, the reflected sound (echo) is quieter than the original.

    Write a method:
    private Sound echo ( Sound aSound, double delay,
    double factor ) {...

    which produces a sound with an echo based on the original sound aSound with a delay of delay seconds and an attenuation of factor. The delay can be converted to a number of samples by multiplying by the sampling rate of the sound. The new sound will be longer than the original sound by the number of samples that make up the delay. The first samples in the echo will just be a copy of the samples from the original sound. Once the delay has elapsed, the next set of samples (until the end of the original sound) will be the sum of the samples in the original sound and the samples from the beginning of the original sound at the attenuated amplitude. Finally the last part of the result will simply be the remaining samples of the original sound at the attenuated amplitude.
    Write a program that loads a sound, allows the user to play it and then produces a sound with an echo having a delay of 0.5 seconds and an attenuation of 0.25. The new sound should then be presented for the user to play and, when done, the new sound should be saved.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: Programming an echo to a sound

    This isn't a homework factory. Recommended reading: How to ask questions the smart way

    Also, it might be a good idea to reply to the two responses on your earlier thread before we come to the conclusion that you're not really interested.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    od11kd is offline Member
    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    Default Re: Programming an echo to a sound

    Quote Originally Posted by DarrylBurke View Post
    This isn't a homework factory. Recommended reading: How to ask questions the smart way

    Also, it might be a good idea to reply to the two responses on your earlier thread before we come to the conclusion that you're not really interested.

    db
    No, you're right. It isn't a homework factory, however, I am SO stumped and need help... I literally have not a clue.

Similar Threads

  1. Have server echo output to multiple clients
    By Wnt2bsleepin in forum New To Java
    Replies: 19
    Last Post: 05-07-2012, 02:26 AM
  2. Problems with sound in java and USB sound card
    By marblecatdog in forum New To Java
    Replies: 1
    Last Post: 04-19-2011, 12:02 PM
  3. Replies: 0
    Last Post: 07-20-2008, 03:58 PM
  4. An echo server using UDP sockets
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-07-2008, 08:09 PM
  5. echo of pwd
    By jeffpoulsen in forum New To Java
    Replies: 3
    Last Post: 12-04-2007, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •