A storage medium storing a sound output program of a sound output apparatus having an operating means including an acceleration sensor, wherein said sound output program causes a processor of said sound output apparatus to function as the following means: a swinging motion detection means (36, S23, S43, S61, S63, S65, S67, S69, S95, S99) for detecting a swinging motion of said operating means based on an output of said acceleration sensor; a swinging motion end determination means (36, S27, S47, S69, S105) for determining an end of a swinging motion; and a sound output means (36, S29, S49, S73, S75, S109, S111) for outputting sound based on tone data stored in a storage means (18, 30), characterized in that a peak in the output of the acceleration sensor is deemed to indicate an end in a swinging motion; said swinging motion detection means (36, S23, S43, S61, S63, S65, S67, S69, S95, S99) is adapted to determine the start of a downward swinging motion of said operating means based on the detection of a first peak in the output of said acceleration sensor; said swinging motion end determination means (36, S27, S47, S69, S105) is adapted to determine an end of said downward swinging motion based on detection of a subsequent peak in the output of said acceleration sensor, after the start of a downward swinging motion is determined by said swinging motion detection means (36, S23, S43, S61, S63, S65, S67, S69, S95, S99); and said sound output program causes said processor to additionally function as a swing direction determining means (36, S7) for determining a direction of swing of said operating means based on the output of said acceleration sensor, when said swinging motion end determination means (36, S27, S47, S69, S105) so determines that the swinging motion is ended, wherein the sound output by the sound output means (36, S29, S49, S73, S75, S109, S111) is based on tone data according to the direction of swing determined by said swing direction determining means (36, S7). a swinging motion detection means (36, S23, S43, S61, S63, S65, S67, S69, S95, S99) for detecting a swinging motion of said operating means based on an output of said acceleration sensor; a swinging motion end determination means (36, S27, S47, S69, S105) for determining an end of a swinging motion; and a sound output means (36, S29, S49, S73, S75, S109, S111) for outputting sound based on tone data stored in a storage means (18, 30), characterized in that a peak in the output of the acceleration sensor is deemed to indicate an end in a swinging motion; said swinging motion detection means (36, S23, S43, S61, S63, S65, S67, S69, S95, S99) is adapted to determine the start of a downward swinging motion of said operating means based on the detection of a first peak in the output of said acceleration sensor; said swinging motion end determination means (36, S27, S47, S69, S105) is adapted to determine an end of said downward swinging motion based on detection of a subsequent peak in the output of said acceleration sensor, after the start of a downward swinging motion is determined by said swinging motion detection means (36, S23, S43, S61, S63, S65, S67, S69, S95, S99); and said sound output program causes said processor to additionally function as a swing direction determining means (36, S7) for determining a direction of swing of said operating means based on the output of said acceleration sensor, when said swinging motion end determination means (36, S27, S47, S69, S105) so determines that the swinging motion is ended, wherein the sound output by the sound output means (36, S29, S49, S73, S75, S109, S111) is based on tone data according to the direction of swing determined by said swing direction determining means (36, S7).