Summary of the invention
The purpose of this invention is to provide a kind of fitting with portable terminal of performing music and the method for performing music thereof, it utilizes the touch-screen of portable terminal or the input that keyboard is played instruction, has realized the purpose of playing music of mobile terminal.
The invention provides a kind of method that realizes playing music of mobile terminal, may further comprise the steps:
The performance instruction of a, the tone color file of setting up music and described portable terminal also is stored in described portable terminal, makes described portable terminal play instruction and described tone color file association according to pre-defined rule;
The performance instruction of b, the described portable terminal of reception is also resolved, and when judging that described performance instruction belongs to the performance instruction of described step a foundation, changes next step; Otherwise do not carry out any operation;
The related tone color file of performance instruction of c, execution and described step b is by the audio frequency output module outputting music of described portable terminal.
The performance instruction that described step b receives is by the load module input of described portable terminal, and the load module of described portable terminal is touch-screen or keyboard.
The tone color file of described step a comprises the tone color file of various musical instruments, and described touch-screen or keyboard have selectable musical instrument pattern, corresponding described performance instruction of described every kind of musical instrument pattern association and tone color file.
Described step a also stores the melody file, and selectable accompaniment pattern is provided, under described accompaniment pattern, and the described melody file that described mobile terminal playing is selected, and carry out described step b, step c.
On the other hand, the invention provides a kind of suitable portable terminal, comprising to perform music:
Database, the music tamber file that storage is set up and the performance of described portable terminal are instructed, and the incidence relation of instruction and described tone color file is played in storage according to the described portable terminal of pre-defined rule foundation;
Load module receives the performance instruction that the user sends in real time;
Control module, connect described database and load module, resolve the described performance instruction of receiving, when judging that described performance instruction belongs to the performance instruction of described database storing, carry out with this and play the related tone color file of instruction, by the audio frequency output module outputting music of described portable terminal.
The load module of described portable terminal is touch-screen or keyboard.
Described tone color file comprises the tone color file of various musical instruments, and described touch-screen or keyboard have selectable musical instrument pattern, corresponding described performance instruction of described every kind of musical instrument pattern association and tone color file.
Described database is also stored the melody file, and described touch-screen or keyboard provide selectable accompaniment pattern, enters described accompaniment pattern, and described control module is play the described melody file of selecting, and controls described playing music of mobile terminal.
Adopt of the present invention a kind of suitable with portable terminal of performing music and the method for performing music thereof, it at first sets up the tone color file and performance instruction and it is related of music, when receiving the performance instruction of user's input, through after the analysis judgment, carry out and the related tone color file of described performance instruction, and pass through the audio frequency output module outputting music of portable terminal.The present invention can realize only using portable terminal just can finish the performance of various musical instruments, has expanded the purposes of portable terminal, has also increased the recreational and practicality of portable terminal simultaneously greatly.
Embodiment
Further specify technical scheme of the present invention below in conjunction with drawings and Examples.
Referring to Fig. 1, Fig. 1 has shown a kind of method 100 that realizes playing music of mobile terminal, comprising:
101, set up tone color file and performance instruction and related.
Set up the performance instruction of the tone color file of music and described portable terminal and be stored in described portable terminal, make described portable terminal play instruction and described tone color file association according to pre-defined rule.The tone color file comprises the tone color file (such as the tone color file of piano, guitar, violin) of various musical instruments, and described touch-screen or keyboard have selectable musical instrument pattern, corresponding described performance instruction of described every kind of musical instrument pattern association and tone color file.As an embodiment, these musical instrument patterns comprise piano, guitar, violin isotype, if the user has selected the piano pattern by touch-screen or keyboard, so because instruction of the corresponding piano performance of piano pattern association and piano sound file, what the user played out by portable terminal is exactly the music of piano.The performance instruction of the portable terminal of being set up comprises information such as speed, rhythm, position, and summarizing to get up is exactly the action message that has comprised that the user plays on portable terminal, after these action input portable terminals, has just formed described performance instruction.
102, receive and resolve and play instruction, change next step when judging its performance instruction that belongs to step 101 foundation.
Performance instruction and parsing that real-time reception user sends described portable terminal, when judging that the performance instruction that belongs to described step 101 foundation is instructed in described performance, the commentaries on classics next step; Otherwise do not carry out any operation.Play the load module input of instruction by described portable terminal, the load module of described portable terminal is touch-screen or keyboard.When load module is touch-screen, the touch track that the user stays on touch-screen when portable terminal is played has just comprised information such as speed, rhythm, position, formed above-mentioned performance instruction, play instruction when belonging to the performance instruction that step 101 set up when these, then carry out next step 103.When load module was keyboard, reason was the same.
103, the related tone color file of the performance of execution and described step 102 instruction, playing back music.
Carry out with the performance of described step 102 and instruct related tone color file, by the audio frequency output module outputting music of described portable terminal.Promptly when receiving and resolving a performance instruction, the tone color file that real-time execution is related with it, making each play instruction sounds by carrying out the tone color file related with it, play speed, rhythm, positional information difference that instruction comprises, its sound that sends is also different, and the sound that sends connects together and just formed the music of playing.
As an embodiment, portable terminal also stores some melody files, these melody files are as the usefulness of accompaniment, portable terminal provides selectable accompaniment pattern, (select corresponding melody file simultaneously) after the user has selected the accompaniment pattern, portable terminal begins to play the melody file of selection, under the background of this melody file, can continue to carry out according to above-mentioned steps the performance of music, only the music of playing this moment has had background music.
Referring to Fig. 2, Fig. 2 has shown a kind of suitable portable terminal 200 to perform music, and comprising:
Database 201, the music tamber file that storage is set up and the performance of described portable terminal are instructed, and the incidence relation of instruction and described tone color file is played in storage according to the described portable terminal of pre-defined rule foundation.Described tone color file comprises the tone color file of various musical instruments, and described touch-screen or keyboard have selectable musical instrument pattern, corresponding described performance instruction of described every kind of musical instrument pattern association and tone color file.
Load module 202 receives the performance instruction that the user sends in real time.As an embodiment, the load module 202 of described portable terminal is touch-screen or keyboard.
Control module 203, connect described database 201 and load module 202, the described performance instruction that parsing is received, when judging that described performance instruction belongs to the performance instruction of described database 201 storages, carry out with this and play the related tone color file of instruction, by the audio frequency output module outputting music of described portable terminal.
As an embodiment, described database 201 is also stored the melody file, and described touch-screen or keyboard provide selectable accompaniment pattern, enters described accompaniment pattern, described control module 203 is play the described melody file of selecting, and controls described playing music of mobile terminal.
It is pointed out that and describedly a kind ofly suitable realize that with a kind of the method 100 of playing music of mobile terminal is same or analogous on principle and implementation process, so the part of its repetition repeats no more with the portable terminal 200 of performing music.
With reference to Fig. 3, as an embodiment, Fig. 3 has shown the process flow diagram that the user utilizes mobile terminal touch screen to perform music:
At first, the user starts portable terminal, selects the musical instrument pattern, and system's adjustment enters this musical instrument pattern (referring to S1, S2, S3).
Then, the user selects whether enter the accompaniment pattern, if then open the melody that the music list of portable terminal is selected accompaniment, begins to play the melody of selection this moment, and the user begins to play action (referring to S4, S5, S6, S7) on touch-screen simultaneously.
At last, the user is resolved in the formed performance instruction of touch track that touch-screen stays, resolve the successfully corresponding tone color file of back broadcast, realize the performance (referring to S8, S9) of music.
Those of ordinary skill in the art will be appreciated that, above embodiment is used for illustrating the present invention, and be not to be used as limitation of the invention, as long as in connotation scope of the present invention, all will drop in claims scope of the present invention variation, the modification of above embodiment.