(a) Field of the Invention
The present invention relates to a melody playing system and, more particularly, to a melody playing system which is suitable for use in a cellular phone and capable of storing melodies with a reduced storage capacity.
(b) Description of the Related Art
A cellular phone is known in the art which plays a melody stored therein as a call sign of the cellular phone. Referring to FIG. 1, a cellular phone includes a transmission/reception antenna 31 for signal transmission/reception between the cellular phone and a base station of the communication system. A wireless block 32 receives an electric wave through the antenna 31 for signal processing such as demodulation of the received wave, and also modulates a carrier wave with voice to generate a transmission wave. A control unit 33 controls the wireless 32 block as well as other blocks
A display panel 34 is controlled by the control unit 33 to display a calling telephone number etc. An operator panel 35 including a plurality of key switches transfers data input by a user to the control unit 33.
A speaker 37 converts the electric signal generated by demodulation by the control unit 33 into voice. A microphone 38 converts the voice from a user into an electric signal. A storage device or memory 39 stores program data for operating the cellular phone in accordance with the function thereof. The storage device 39 includes therein a melody data block 39A for storing a melody played upon a call of the cellular phone, and stores a conversion table 39B to be used for converting the sound pitch data into frequencies.
The control unit 33 includes therein a melody control section 33A, which retrieves the melody data from the melody storage block 39A, and converts the sound pitch data in the retrieved melody into frequency data based on the conversion table 39B.
A sound source 36 is controlled by the melody control section 33A to generate a variety of specified frequencies, which regenerate sounds through the speaker 37 based on the frequency data and the sound time data.
The sound time data is used as a timing data, which instructs the sound source 36 to start and stop the sound (or tone). Referring to FIG. 2, the storage device 39 includes the melody data block 39A which stores a plurality of (10) melodies 01 to 10 each having a data structure 51 shown in FIG. 3.
Referring to FIG. 3, the melody data 51 includes a header section 52 for storing the number (n) of tones included in the melody, and a tone data section 53 for storing the plurality (n) of tone data [1] to [n] each having the pitch of the tone and the sound time length. The tone data [1] to [n] are arranged in the order of occurrence of the tones. In this text, the term xe2x80x9cpitchxe2x80x9d means the height of the tone determined by the frequency, the term xe2x80x9cscalexe2x80x9d means the scale level of the tone in each octave band, and the term xe2x80x9csound time lengthxe2x80x9d is a time length between the start of the tone and the end of the tone.
The pitch data in the melody should include the octave data of the tone for specifying a lower octave band, a middle octave band or a higher octave band for the tone, as well as the scale data of the tone for specifying xe2x80x9cDoxe2x80x9d, xe2x80x9cDo#xe2x80x9d, xe2x80x9cRexe2x80x9d, xe2x80x9cRe#xe2x80x9d, xe2x80x9cMixe2x80x9d, xe2x80x9cFaxe2x80x9d, xe2x80x9cFa#xe2x80x9d, xe2x80x9cSolxe2x80x9d, xe2x80x9cSol#xe2x80x9d, xe2x80x9cLaxe2x80x9d, xe2x80x9cLa#xe2x80x9d or xe2x80x9cSixe2x80x9d for the tone in each of the octave bands.
Referring to FIG. 4, each pitch data in the tone data section 53 is stored as a code 0xc3x97FF to (0xc3x9723)16 which represents the scale of the tone such as xe2x80x9cDoxe2x80x9d, Do#xe2x80x9d, . . . , xe2x80x9cSixe2x80x9d as well as the octave band of the pitch. In addition, the code data includes information of xe2x80x9cno soundxe2x80x9d (0xc3x97FF) and xe2x80x9ccontinuexe2x80x9d (0xc3x97FE) instead of the pitch data if there is no tone at that sound time
FIG. 5 is a table showing the code data of the tone in connection with the scale data and the frequency of the tone, wherein the code data corresponds to the frequency of the sound in a one-to-one correspondence. That is, each code is allocated to a corresponding frequency.
Table 1 shows the relative time length of each of the types of sound note used for indicating the tone, with the quarter note being set at xe2x80x9c1xe2x80x9d.
FIG. 6 shows the relative time length for each of the notes tabulated above. As shown, the relative time length is categorized into eight classes
The practical sound time length (Ts) for each of the notes is determined in terms of tempo (Tempo) and the relative time length (Rtime) by the following formula:
Ts=(60/Tempo)xc3x97Rtime.xe2x80x83xe2x80x83(1) 
The term xe2x80x9ctempoxe2x80x9d is defined by the number of notes played in a minute or sixty seconds for indicating the degree of speed for playing the melody. Thus, for example, if the tempo is selected at 60, the tone of the quarter note continues for one second.
FIG. 7 is a table showing the sound time lengths of the notes in terms of xe2x80x9csecondxe2x80x9d for each of the tempos of the melodies. As shown in this figure, eight standard tempos 60, 72, . . . , and 138 are used for playing melodies.
The term xe2x80x9cno soundxe2x80x9d means no note is played at that sound time. The no sound is herein categorized into two types including one defined as a stop note such as used as a quarter stop note or a whole stop note, and the other defined as a wait time which is a time interval between adjacent tones.
FIGS. 8A to 8D show different cases of the sound time length. Basically, the sound time length Ts is defined by a time interval between the start of the tone and the stop of the tone, as shown in FIG. 8A. As shown in FIG. 8B, a standard wait time Tw of 0.03 seconds is generally provided between adjacent tones. The practical wait time is determined by adjusting the standard wait time for playing like music.
For example, a xe2x80x9cstaccatoxe2x80x9d used as a encouraging function in the play of a musical instrument reduces the sound time length Ts by half, as shown in FIG. 8C, and the rest of the sound time length is added to the standard wait time Tw for obtaining the practical wait time. A xe2x80x9cslurxe2x80x9d used for continuation of tones prolongs the preceding sound time length Ts and removes the wait time Tw as shown in FIG. 8D.
By removing the wait time Tw, the melody sounds more smooth. The no-sound data as described above is treated as one of pitch data in the tone data section 53 shown in FIG. 3. For example, a pitch data of a normal tone is associated with a succeeding pitch data indicating a wait time.
The data for a wait time includes xe2x80x9cno soundxe2x80x9d data as a pitch data and 30 milliseconds as a sound time data. Thus, except for a xe2x80x9cslurxe2x80x9d, two time data are specified for each of the notes, including the sound time length and the no-sound time (wait time) length.
A fixed melody or an original melody is generally used in a cellular phone as a call sign of the cellular phone. The fixed melody is stored in the cellular phone during fabrication thereof, whereas the original melody is composed by the user on the cellular phone.
The original melody is composed on the display panel 34 by key operations at the operator panel 35, and stored in the tone data section 39A of the storage device 39 via the melody control section 33A in the control unit 33. The data for the original melody can be modified arbitrarily by the user.
The preference of the melody used as a call sign depends on the users for their ages, genders etc. In particular, the preference of the tempo for the melody differs from user to user.
In the conventional melody playing system in the cellular phone, the change of the tempo for a melody is a time-consuming work, wherein the sound time length for each of the tones is to be recalculated. Especially, it is difficult or practically impossible for the user to change the tempo for the fixed melody in the cellular phone.
In the case of the original melody, the user may store the modified melody having a different tempo as a new original melody However, this increases the number of the modified melodies to be stored in the melody data block, and thereby necessitates a larger storage capacity for the melody data block in the storage device.
It is therefore an object of the present invention to provide a melody playing system suitable for use in a cellular phone, which is capable of allowing the change of the tempo for the melody with a limited increase of the storage device for the melody.
The present invention provides a melody playing system including a data storage device for storing a melody data representing a melody, the melody data including a tempo data representing a tempo of the melody and a plurality of tone data representing tones in the melody, the tone data including a pitch data representing a pitch of each of the tones and a note data representing a sound note of each of the tones;
a control unit for retrieving the tone data in an order of occurrence in the melody to calculate a sound time length for each of the retrieved tone data based on the tempo data and the note data; and
a sound source controlled by the control unit to play the melody based on the pitch data and the sound time length.
In accordance with the melody playing system of the present invention, by storing a tempo data for a melody and calculating a sound time length for each of the tones in the melody based on the tempo data and the note data, the amount of data stored for playing the melody can be reduced significantly.
The above and other objects, features and advantages of the present invention will be more apparent from the following description, referring to the accompanying drawings.