CN107404581B - Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal - Google Patents

Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal Download PDF

Info

Publication number
CN107404581B
CN107404581B CN201710613432.3A CN201710613432A CN107404581B CN 107404581 B CN107404581 B CN 107404581B CN 201710613432 A CN201710613432 A CN 201710613432A CN 107404581 B CN107404581 B CN 107404581B
Authority
CN
China
Prior art keywords
user
mobile terminal
scale
data
approaching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710613432.3A
Other languages
Chinese (zh)
Other versions
CN107404581A (en
Inventor
李乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710613432.3A priority Critical patent/CN107404581B/en
Publication of CN107404581A publication Critical patent/CN107404581A/en
Application granted granted Critical
Publication of CN107404581B publication Critical patent/CN107404581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

The embodiment of the invention discloses a musical instrument simulation method and device of a mobile terminal, a storage medium and the mobile terminal, wherein the method comprises the following steps: acquiring airflow information sent by a user, a scale control instruction input by the user and approaching and departing state information of the user to the mobile terminal; generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information; and generating corresponding musical tones for setting the wind instrument according to the volume data, the scale data and the effect data. The technical scheme provided by the embodiment of the invention enriches the musical instrument simulation modes of the mobile terminal and ensures that the sound effect of the musical instrument simulated by the mobile terminal is more vivid.

Description

Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal
Technical Field
The embodiment of the invention relates to the technical field of terminal application, in particular to a method and a device for simulating a musical instrument of a mobile terminal, a storage medium and the mobile terminal.
Background
With the development of electronic technology, mobile terminals such as mobile phones and tablet computers have become essential tools in daily life. At present, functions on mobile terminals are increasing, people can make calls, shop and search information through the mobile terminals, and people can play music instruments through the mobile terminals in an analog mode, for example, the music instruments such as pianos or drums are played in an analog mode.
However, the current music instrument simulation function of the mobile terminal is single, the playing effect is simple and monotonous, and the increasingly personalized and diversified music instrument simulation requirements of people cannot be met.
Disclosure of Invention
The embodiment of the invention provides a method and a device for simulating a musical instrument of a mobile terminal, a storage medium and the mobile terminal, which can enrich the musical instrument simulation modes of the mobile terminal.
In a first aspect, an embodiment of the present invention provides a method for simulating a musical instrument of a mobile terminal, including:
acquiring airflow information sent by a user, a scale control instruction input by the user and approaching and departing state information of the user to the mobile terminal;
generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information;
and generating corresponding musical tones for setting the wind instrument according to the volume data, the scale data and the effect data.
In a second aspect, an embodiment of the present invention provides a musical instrument simulation apparatus for a mobile terminal, including:
the user operation information acquisition module is used for acquiring airflow information sent by a user, a scale control instruction input by the user and the approaching and departing state information of the user to the mobile terminal;
the musical sound data acquisition module is used for generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction and generating corresponding sound effect data according to the approaching and departing state information;
and the musical tone playing module is used for generating musical tones corresponding to the set playing type musical instrument according to the volume data, the scale data and the sound effect data.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the musical instrument simulation method of the mobile terminal as provided in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a mobile terminal, including a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing, implements the musical instrument simulation method of the mobile terminal as provided in the first aspect.
In a fifth aspect, an embodiment of the present invention provides a mobile terminal, including: the microphone is used for acquiring airflow information sent by a user; the touch screen is used for acquiring a scale control instruction acted on the touch screen by a user; and/or, the acceleration sensor is used for collecting a scale control command input by a user; the proximity sensor is used for acquiring the information of the proximity and the distance of a user to the mobile terminal; a memory for storing the airflow information, scale control instructions, and near-far state information; the processor is used for acquiring the air flow information, the scale control instruction and the approaching and departing state information; generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information; and generating corresponding musical tones for setting the wind instrument according to the volume data, the scale data and the effect data.
According to the embodiment of the invention, the airflow information sent by the user, the scale control instruction input by the user and the approaching and departing state information of the user to the mobile terminal are obtained, the corresponding volume data are generated according to the airflow information, the corresponding scale data are generated according to the scale control instruction, the corresponding sound effect data are generated according to the approaching and departing state information, and the corresponding music tones of the playing musical instrument are set according to the volume data, the scale data and the sound effect data, so that the musical instrument simulation mode of the mobile terminal is enriched, and the sound effect of the musical instrument simulated by the mobile terminal is more vivid.
Drawings
Fig. 1 is a flowchart of a method for simulating a musical instrument of a mobile terminal according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an interactive interface of a mobile terminal simulated harmonica provided by the embodiment of the invention;
fig. 3 is a schematic diagram of another interactive interface of the mobile terminal analog harmonica provided by the embodiment of the invention;
FIG. 4 is a block diagram of an instrument simulation system architecture provided by an embodiment of the present invention;
fig. 5 is a flowchart of an instrument simulation method of another mobile terminal according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an interactive interface for obtaining a scale control command by using an acceleration sensor according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a musical instrument simulation apparatus of a mobile terminal according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in further detail below with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of a method for simulating a musical instrument of a mobile terminal according to an embodiment of the present invention, where the method of this embodiment may be performed by a musical instrument simulation apparatus of the mobile terminal, the apparatus may be implemented by hardware and/or software, and the apparatus may be disposed inside the mobile terminal as a part of the mobile terminal. The technical scheme provided by the embodiment of the invention is suitable for simulating the application scene of the wind instrument by adopting the mobile terminal.
As shown in fig. 1, the method for simulating a musical instrument of a mobile terminal according to the present embodiment includes the steps of:
step 101, acquiring airflow information sent by a user, a scale control instruction input by the user and information of a proximity and distance state of the user to the mobile terminal.
The step can acquire the airflow information sent by a user through a mouth or other modes through a microphone of the mobile terminal or a set area of a touch screen of the mobile terminal; for example, airflow information such as airflow speed and pressure applied to the touch screen by airflow emitted from a user to a set area of the touch screen may be acquired by a pressure sensor and/or an acceleration sensor.
The step can obtain a scale control instruction acted on the touch screen by a user through the touch screen of the mobile terminal; or, a scale control instruction input by the user can be obtained according to the air gesture of the user; or, a scale control instruction input by the user can be acquired through an acceleration sensor of the mobile terminal.
The step can acquire the information of the approaching and departing state of the user to the mobile terminal through a proximity sensor of the mobile terminal. Generally, when a user operates a wind instrument to play, a certain tremolo effect is generated by shielding scale buttons or sound holes of the wind instrument or closing and opening the whole wind instrument continuously. The step obtains the information of the approaching and leaving state of the user to the mobile terminal through the proximity sensor, and the sound effect of the playing type musical instrument can be simulated more vividly.
For example, the sound hole of the harmonica may be displayed through the whole or part of the longitudinal interface of the mobile terminal, or the sound hole of the harmonica may be displayed through the whole or part of the lateral interface of the mobile terminal. Fig. 2 is a schematic diagram of an interactive interface of a mobile terminal analog harmonica provided by the embodiment of the invention. Fig. 3 is a schematic diagram of another interactive interface of the mobile terminal analog harmonica provided by the embodiment of the invention. As shown in fig. 2, if the microphone is located at the bottom of the mobile terminal, in order to facilitate the user to input the scale control command while sending the airflow information, the sound hole of the harmonica may be displayed through the longitudinal interface of the right half of the mobile terminal, as shown in fig. 3, or the sound hole of the harmonica may be displayed through the lateral interface of the upper half of the mobile terminal. It should be noted that fig. 2 and fig. 3 only schematically show a part of sound holes of the harmonica, and in the actual use process, the complete sound holes of the harmonica can be displayed through an interactive interface.
Correspondingly, the corresponding horizontal/vertical interface display modes can be preset for other blowing-type musical instruments according to the operation habits of users.
102, generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information.
The generating of the corresponding volume data according to the airflow information may include: and generating corresponding volume data according to the strength of the airflow and/or the sound emitted by the user.
The generating the corresponding scale data according to the scale control instruction may include: corresponding scale data are generated according to scale control instructions of keys of a sound hole pressed or slid by a user acting on the touch screen, or generated according to scale control instructions input by the user in an air gesture mode, or generated according to scale control instructions input by the user and acquired through an acceleration sensor.
The generating of the corresponding sound effect data according to the approaching and departing state information may include: and when the approaching and departing state information indicates that the palm or the finger of the user gradually approaches the mobile terminal, correspondingly executing high-frequency suppression operation of the scale, increasing the low frequency with a set size to the current scale, and generating tremolo sound effect data for adjusting the current scale or the volume.
When the current simulated musical instrument of the mobile terminal is a harmonica, the vibrato sound effect is hand tremolo or hand java sound. Generally, when playing a harmonica, the left hand and the right hand are folded to form a closed cavity, the wrist part contacted by the two hands is used as a fulcrum, the right hand is rapidly shaken to switch the two hands between a closed state and an open state, and then the effect of hand vibration can be obtained. The hand tremolo technique is slowed down, and the key point is 'fast opening and slow closing', so that the hand Wa sound is obtained. The strength can be freely exerted according to the proficiency of the user, and the generated effects are different. The shielding action of the user in the harmonica playing process is simulated according to the approaching and far-away state information, and the tremolo sound effect data corresponding to the shielding action are generated, so that the effect of the mobile terminal simulating the harmonica is more vivid, and the actual playing effect of real musical instruments is more fit.
And 103, generating corresponding musical tones for setting the wind instrument according to the volume data, the scale data and the effect data.
Wherein, set for the type of playing musical instrument of blowing and include harmonica, flute, xiao, number, calabash silk, an ancient egg-shaped, holed wind instrument, saxophone and suona, optionally be the harmonica.
After the volume data, the scale data and the sound effect data are generated, musical tones with the same tone color as that of the set playing type musical instrument, the volume corresponding to the volume data, the scale corresponding to the scale data and having the sound effect corresponding to the sound effect data are generated.
The musical instrument simulation method of the mobile terminal provided by the embodiment is characterized in that the state information is kept away from the mobile terminal by acquiring the airflow information sent by the user, the scale control instruction input by the user and the approach of the user to the mobile terminal, the corresponding volume data is generated according to the airflow information, the corresponding scale data is generated according to the scale control instruction, the corresponding sound effect data is generated according to the approach away state information, and the corresponding musical tones of the playing musical instrument are set according to the volume data, the scale data and the sound effect data, so that the musical instrument simulation mode of the mobile terminal is enriched, and the sound effect of the musical instrument simulated by the mobile terminal is more vivid.
On the basis of the above embodiment, the method may further include the following steps: and if a multi-finger operation instruction acted on the touch screen by the user is detected, generating chord data according to the multi-finger operation instruction, and emitting musical tones corresponding to the chord data.
The multi-finger operation instruction is an operation instruction of a plurality of fingers of a user simultaneously acting on keys with different sound holes on the touch screen.
On the basis of the above-described embodiment, while emitting musical tones for setting the corresponding blowing type musical instrument based on the volume data, scale data, and sound effect data, the method may further include the steps of: and emitting corresponding musical tones of at least one other set type musical instrument according to the volume data, the scale data and the effect data so as to emit ensemble musical tones together with the set blowing type musical instrument.
Wherein, the other setting type musical instruments are musical instruments except the setting blowing type musical instrument, and can be blowing type musical instruments or other types such as playing type musical instruments.
Illustratively, the set blowing type instrument is a harmonica, and the other set type instruments may be one or more of a piano, a violin, a guitar, a flute, or the like. Tones corresponding to one or more other musical instruments of a piano, a violin, a guitar, a flute, or the like are sounded while tones corresponding to the harmonica are sounded based on the volume data, scale data, and effect data to produce an ensemble effect. Wherein the volume of the other setting type musical instrument may be set smaller than the volume of the setting blow type musical instrument, for example, the volume of the piano is 70% of the volume of the harmonica, to more prominently set the tones of the blow type musical instrument.
For convenience of understanding, the following takes the Android system as an example, and a musical instrument simulation system architecture in the Android system is briefly described.
As shown in fig. 4, the musical instrument simulation system architecture provided in this embodiment mainly includes an Application (Application) Layer, an Application Framework (Framework) Layer, a Hardware Abstraction Layer (HAL), a Hardware Driver (Driver) Layer, and a Hardware system. The application layer is the top layer of the system, and can execute corresponding logic operation by programming an application program, for example, a sound recording instruction can be issued to the lower layer by an AudioRecorder to drive a microphone at the bottom layer to acquire airflow information of a user, sound effect data uploaded at the lower layer can be acquired by an AudioEffect to generate musical tones with corresponding sound effects, an operation instruction of the user acting on a touch screen can be acquired by a UI to execute corresponding operation, and a musical tone playing instruction can be issued to the lower layer by a Player to drive a loudspeaker at the bottom layer to play musical tones. The application framework layer provides a MediaRecorder interface and a MediaPlayer interface for acquiring volume and scale. The Hardware Abstraction (HAL) layer is the transition from the application framework layer to the hardware driver layer to achieve compatibility of the underlying hardware. The hardware Driver (Driver) layer includes an Audio Driver, a Sensor Driver, and a touch screen Driver, the Audio Driver includes a microphone Driver and a speaker Driver, and the Sensor Driver includes a proximity Sensor Driver and a proximity Sensor Driver. The hardware system comprises a microphone, a sensor, a touch screen, a loudspeaker and the like. The mobile terminal comprises a microphone, a proximity sensor, an acceleration sensor, a touch screen and a loudspeaker, wherein the microphone is used for acquiring airflow information of a user, the proximity sensor is used for acquiring information of a state of approaching and leaving the mobile terminal by the user, the acceleration sensor is used for acquiring displacement and moving direction generated by the user driving the mobile terminal to move, the touch screen is used for receiving a scale control instruction acted on the touch screen by the user, and the loudspeaker is used for playing final music.
Fig. 5 is a flowchart of another method for simulating a musical instrument of a mobile terminal according to an embodiment of the present invention. As shown in fig. 5, the method provided by this embodiment includes the following steps:
step 201, acquiring airflow information sent by a user by using a microphone of the mobile terminal.
Step 202, acquiring a scale control instruction acted on a touch screen by a user by utilizing the touch screen of the mobile terminal; or, acquiring a scale control command input by the user by using an acceleration sensor of the mobile terminal.
For example, a key pressing or sliding instruction applied to a sound hole key on the touch screen by a user is detected to obtain a scale control instruction corresponding to the pressing or sliding instruction. The pressing instruction can be a pressing instruction for pressing a certain sound hole key by a single finger of a user or a pressing instruction for simultaneously pressing a plurality of sound hole keys by a plurality of fingers, and the sliding instruction can be a sliding instruction for covering one or more sound hole keys in a sliding track of the fingers of the user on the touch screen.
The obtaining of the scale control command input by the user by using the acceleration sensor of the mobile terminal may include: acquiring displacement and moving direction generated by the movement of a mobile terminal driven by a user by using an acceleration sensor of the mobile terminal; and determining a scale control instruction input by a user according to the displacement, the moving direction and the initial position of the displacement.
The mobile terminal can be held by a user to move at a preset initial position, the mobile terminal can detect the moving direction and the generated displacement of the mobile terminal by using the acceleration sensor, and a scale control instruction input by the user is determined according to the moving direction, the displacement and the initial position. Before the user moves the mobile terminal, the starting position, namely the starting sound hole, of the instrument played by the user can be determined in advance, for example, a note corresponding to the starting sound hole input by the user through the input frame is received or a pressing instruction of the user acting on a key of the starting sound hole of the touch screen is received, after the starting sound hole is determined, the acceleration sensor detects the displacement and the moving direction of the mobile terminal generated in the period from the beginning to the end of the movement, and then the scale control instruction generated by moving the mobile terminal can be determined. Fig. 6 is a schematic view of an interactive interface for acquiring a scale control command by using an acceleration sensor according to an embodiment of the present invention. As shown in fig. 6, for example, the initial position is the sound hole 4, the acceleration sensor detects that the moving direction of the mobile terminal is to the right X, the moving displacement S is 1cm, and if the interval value d of each sound hole key is 0.5cm, the corresponding musical scale is composed of the notes (sound holes) that the initial sound holes are moved to the left S, and it can be determined that the musical scale control command input by the user through moving the mobile terminal is 32, that is, the user continuously inputs the notes 3 and 2. Accordingly, in order to allow the user to see the scale input by the user, the currently input scale may be displayed in a form different from other scales, for example, the tone hole keys corresponding to the note 3 and the note 2 are displayed in a completely black form, and after the musical tone of the scale is generated, the tone hole keys are restored to white. It should be noted that fig. 6 only illustrates that the scale control command is obtained by the acceleration sensor, and the moving direction of the mobile terminal may also be the same as the moving direction of the scale, as in the above example, the mobile terminal moves by S displacement to the right, and the corresponding scale may be composed of the note 5 and the note 6 that the initial tone hole 4 moves by S to the right. In the actual use process, a user can simulate the continuous action of the mouthpiece organ by continuously moving the mobile terminal in different directions, and correspondingly, the mobile terminal can obtain corresponding scale control instructions according to the starting notes and the moving directions and the moving displacements of the mobile terminal by using the acceleration sensor.
The reason for this is: the operation that the user moved mobile terminal is detected through the acceleration sensor, and then the musical scale control command of confirming user input provides diversified musical instrument simulation mode for the user, to simulation harmonica, more laminating the actual conditions that the user produced the musical scale through removing the harmonica when playing the harmonica, the user can experience more lifelike mobile terminal's musical instrument simulation experience.
And step 203, acquiring the approaching and departing state information of the user to the mobile terminal by using a proximity sensor of the mobile terminal.
And step 204, generating corresponding volume data according to the airflow information.
And step 205, generating corresponding scale data according to the scale control instruction.
Step 206, generating corresponding sound effect data according to the approaching and departing state information;
and step 207, generating corresponding musical tones for setting the wind instrument according to the volume data, the scale data and the sound effect data.
It is understood that the execution sequence of steps 201 to 203 can be arbitrarily adjusted or executed concurrently, and the execution sequence of steps 204 to 206 can be arbitrarily adjusted or executed concurrently.
According to the method provided by the embodiment, airflow information sent by a user, scale data input by the user and approaching and keeping-away state information of the user to the mobile terminal are acquired by utilizing a microphone, a touch screen or an acceleration sensor and a proximity sensor which are configured on the mobile terminal, corresponding volume data are generated according to the airflow information, corresponding scale data are generated according to a scale control instruction, corresponding sound effect data are generated according to the approaching and keeping-away state information, and corresponding music tones for setting a playing type musical instrument are sent according to the volume data, the scale data and the sound effect data, so that the musical instrument simulation mode of the mobile terminal is enriched, the sound effect of the musical instrument simulated by the mobile terminal is more vivid, and the ever-increasing requirements of personalized and diversified musical instrument modes of people are met.
Fig. 7 is a schematic structural diagram of a musical instrument simulation apparatus of a mobile terminal according to an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware and is integrated in the mobile terminal. As shown in fig. 7, the apparatus includes a user operation information acquisition module 31, a tone data acquisition module 32, and a tone playing module 33.
The user operation information obtaining module 31 is configured to obtain airflow information sent by a user, a scale control instruction input by the user, and information of a proximity state and a distance state of the user to the mobile terminal;
the musical sound data acquisition module 32 is configured to generate corresponding volume data according to the airflow information, generate corresponding scale data according to the scale control instruction, and generate corresponding sound effect data according to the approaching/departing state information;
and the musical tone playing module 33 is configured to generate a musical tone corresponding to the set playing type musical instrument according to the volume data, the scale data, and the sound effect data.
On the basis of the above embodiment, the user operation information obtaining module is specifically configured to:
acquiring airflow information sent by a user by using a microphone of the mobile terminal;
acquiring a scale control instruction acted on the touch screen by a user by using the touch screen of the mobile terminal; or, acquiring a scale control instruction input by a user by using an acceleration sensor of the mobile terminal;
and acquiring the approaching and departing state information of the user to the mobile terminal by utilizing a proximity sensor of the mobile terminal.
On the basis of the above embodiment, the acquiring module of the user operation information, by using the acceleration sensor of the mobile terminal, acquires the scale control instruction input by the user includes:
acquiring displacement and moving direction generated by the movement of a mobile terminal driven by a user by using an acceleration sensor of the mobile terminal;
and determining a scale control instruction input by a user according to the displacement, the moving direction and the initial position of the displacement.
On the basis of the above embodiment, the apparatus further includes:
and the chord data generating module is used for generating chord data according to the multi-finger operation instruction and emitting musical tones corresponding to the chord data if the multi-finger operation instruction acted on the touch screen by the user is detected.
On the basis of the above embodiment, the apparatus further includes:
and the ensemble musical sound generating module is used for generating musical sounds corresponding to the set blowing type musical instrument according to the volume data, the scale data and the effect data, and simultaneously generating musical sounds corresponding to at least one other set type musical instrument according to the volume data, the scale data and the effect data so as to generate ensemble musical sounds together with the set blowing type musical instrument.
On the basis of the above-described embodiment, the tone data acquisition module generating corresponding effect data according to the approaching/departing state information includes:
and when the approaching and separating state information indicates that the palm or the fingers of the user gradually approach the mobile terminal, executing high-frequency suppression operation of the scale, adding low frequency with a set size to the current scale, and generating tremolo sound effect data for adjusting the current scale or the volume.
On the basis of the above embodiments, the setting blowing type musical instrument includes a harmonica, a flute, a schottky, a horn, a cucurbit flute, an ancient egg-shaped, holed wind instrument, a saxophone and a suona.
The device that this embodiment provided, through the state information is kept away from to mobile terminal's proximity to air current information, the scale control command of user input and user that acquire the user and send, according to air current information generates corresponding volume data, according to scale control command generates corresponding scale data, and according to state information generation corresponding audio data is kept away from to the proximity, and according to volume data, scale data and audio data send and set for the corresponding tone of playing type musical instrument, have richened mobile terminal's musical instrument analog mode, and make the audio of the musical instrument of mobile terminal simulation more lifelike.
An embodiment of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a musical instrument simulation method of a mobile terminal, the method including:
acquiring airflow information sent by a user, a scale control instruction input by the user and approaching and departing state information of the user to the mobile terminal;
generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information;
and generating corresponding musical tones for setting the wind instrument according to the volume data, the scale data and the effect data.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the musical instrument simulation operation described above, and may also perform the relevant operations in the musical instrument simulation method of the mobile terminal provided by any embodiments of the present invention.
The embodiment of the invention also provides a mobile terminal, and the mobile terminal can comprise the musical instrument simulation device of the mobile terminal provided by any embodiment of the invention. Fig. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention, as shown in fig. 8, the mobile terminal may include a microphone for collecting airflow information sent by a user; the touch screen is used for acquiring a scale control instruction acted on the touch screen by a user; and/or, the acceleration sensor is used for collecting a scale control command input by a user; the proximity sensor is used for acquiring the information of the proximity and the distance of a user to the mobile terminal; a memory 401, a Central Processing Unit (CPU) 402 (also called a processor, hereinafter referred to as CPU), and the memory 401, configured to store executable program codes; the processor 402 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 401, for performing: acquiring airflow information sent by a user, a scale control instruction input by the user and approaching and departing state information of the user to the mobile terminal; generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information; and generating corresponding musical tones for setting the wind instrument according to the volume data, the scale data and the effect data.
The mobile terminal further includes: peripheral interface 403, RF (Radio Frequency) circuitry 405, audio circuitry 406, speakers 411, power management chip 408, input/output (I/O) subsystem 409, touch screen 412, other input/control devices 410, and external port 404, which communicate via one or more communication buses or signal lines 407.
It should be understood that the illustrated mobile terminal 400 is merely one example of a mobile terminal and that the mobile terminal 400 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
For example, the mobile terminal in this embodiment may be a mobile phone, a tablet computer, a digital reader, and other terminals, and is preferably a smart phone.
The following describes the mobile terminal for simulating a musical instrument provided in the present embodiment in detail, and the mobile terminal is exemplified by a mobile phone.
A memory 401, the memory 401 being accessible by the CPU402, the peripheral interface 403, and the like, the memory 401 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 403, the peripheral interface 403 may connect input and output peripherals of the device to the CPU402 and the memory 401.
An I/O subsystem 409, which I/O subsystem 409 may connect input and output peripherals on the device, such as a touch screen 412 and other input/control devices 410, to the peripheral interface 403. The I/O subsystem 409 may include a display controller 4091 and one or more input controllers 4092 for controlling other input/control devices 410. Where one or more input controllers 4092 receive electrical signals from or send electrical signals to other input/control devices 410, the other input/control devices 410 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 4092 may be connected to any one of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 412, which touch screen 412 is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 4091 in the I/O subsystem 409 receives electrical signals from the touch screen 412 or transmits electrical signals to the touch screen 412. The touch screen 412 detects a contact on the touch screen, and the display controller 4091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 412, i.e., implements a human-computer interaction, and the user interface object displayed on the touch screen 412 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 405 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, the RF circuitry 405 receives and transmits RF signals, also referred to as electromagnetic signals, through which the RF circuitry 405 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 405 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 406 is mainly used to receive audio data from the peripheral interface 403, convert the audio data into an electric signal, and transmit the electric signal to the speaker 411.
And the input line of the loudspeaker 411 is electrically connected with the audio circuit 406 in the mobile terminal through the bonding pad, and is used for restoring the voice signal received by the mobile phone from the wireless network through the RF circuit 405 into sound through the loudspeaker 411 and playing the sound to a user.
And the power management chip 408 is used for supplying power and managing power to the hardware connected with the CPU402, the I/O subsystem 409 and the peripheral interface 403.
The mobile terminal provided by the embodiment of the invention generates corresponding volume data according to airflow information by acquiring airflow information sent by a user, a scale control instruction input by the user and approaching and departing state information of the user to the mobile terminal, generates corresponding scale data according to the scale control instruction, generates corresponding sound effect data according to the approaching and departing state information, and sends corresponding music tones for setting a playing type musical instrument according to the volume data, the scale data and the sound effect data, thereby enriching the musical instrument simulation mode of the mobile terminal and enabling the sound effect of the musical instrument simulated by the mobile terminal to be more vivid.
The foregoing is considered as illustrative of the preferred embodiments of the invention and technical principles employed. The present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in more detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the claims.

Claims (11)

1. A musical instrument simulation method of a mobile terminal, comprising:
acquiring airflow information sent by a user, a scale control instruction input by the user and approaching and departing state information of the user to the mobile terminal;
generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information;
generating corresponding musical tones of the set wind instrument according to the volume data, the scale data and the effect data;
wherein, the generating of the corresponding sound effect data according to the approaching and departing state information comprises:
and simulating the shielding action of the user in the playing process according to the approaching and departing state information, and generating vibrato sound effect data corresponding to the shielding action.
2. The method of claim 1, wherein the obtaining of the airflow information issued by the user, the scale control instruction input by the user and the approaching and departing state information of the user to the mobile terminal comprises:
acquiring airflow information sent by a user by using a microphone of the mobile terminal;
acquiring a scale control instruction acted on the touch screen by a user by using the touch screen of the mobile terminal; or, acquiring a scale control instruction input by a user by using an acceleration sensor of the mobile terminal;
and acquiring the approaching and departing state information of the user to the mobile terminal by utilizing a proximity sensor of the mobile terminal.
3. The method according to claim 2, wherein the obtaining the scale control command input by the user by using the acceleration sensor of the mobile terminal comprises:
acquiring displacement and moving direction generated by the movement of a mobile terminal driven by a user by using an acceleration sensor of the mobile terminal;
and determining a scale control instruction input by a user according to the displacement, the moving direction and the initial position of the displacement.
4. The method of claim 1, further comprising:
and if a multi-finger operation instruction acted on the touch screen by the user is detected, generating chord data according to the multi-finger operation instruction, and emitting musical tones corresponding to the chord data.
5. The method according to claim 1, wherein, while emitting corresponding tones of a set blow type musical instrument based on the volume data, scale data and effect data, further comprising:
and emitting corresponding musical tones of at least one other set type musical instrument according to the volume data, the scale data and the effect data so as to emit ensemble musical tones together with the set blowing type musical instrument.
6. The method of claim 1, wherein the generating the corresponding sound effect data according to the approaching and departing state information comprises:
and when the approaching and departing state information indicates that the user gradually approaches the mobile terminal, executing high-frequency suppression operation of the scale, adding low frequency with set size to the current scale, and generating vibrato sound effect data for adjusting the current scale or volume.
7. The method according to any one of claims 1 to 6, wherein the set blowing type musical instrument includes a harmonica, a flute, a scholar, a horn, a cucurbit flute, an ancient egg-shaped instrument, a saxophone and a suona.
8. An apparatus for simulating a musical instrument of a mobile terminal, comprising:
the user operation information acquisition module is used for acquiring airflow information sent by a user, a scale control instruction input by the user and the approaching and departing state information of the user to the mobile terminal;
the musical sound data acquisition module is used for generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction and generating corresponding sound effect data according to the approaching and departing state information;
the musical sound playing module is used for generating musical sound corresponding to the set playing type musical instrument according to the volume data, the scale data and the sound effect data;
the musical sound data acquisition module is also used for simulating the shielding action of the user in the playing process according to the approaching and departing state information and generating vibrato sound effect data corresponding to the shielding action.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a musical instrument simulation method for a mobile terminal according to any one of claims 1 to 7.
10. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of simulating a musical instrument of a mobile terminal according to any of claims 1-7 when executing the computer program.
11. A mobile terminal, comprising:
the microphone is used for acquiring airflow information sent by a user;
the touch screen is used for acquiring a scale control instruction acted on the touch screen by a user; and/or, the acceleration sensor is used for collecting a scale control command input by a user;
the proximity sensor is used for acquiring the information of the proximity and the distance of a user to the mobile terminal;
a memory for storing the airflow information, scale control instructions, and near-far state information;
the processor is used for acquiring the air flow information, the scale control instruction and the approaching and departing state information; generating corresponding volume data according to the airflow information, generating corresponding scale data according to the scale control instruction, and generating corresponding sound effect data according to the approaching and departing state information; and generating corresponding musical tones for setting the playing type musical instrument according to the volume data, the scale data and the effect data;
the processor is further used for simulating the shielding action of the user in the playing process according to the approaching and departing state information and generating vibrato sound effect data corresponding to the shielding action.
CN201710613432.3A 2017-07-25 2017-07-25 Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal Active CN107404581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710613432.3A CN107404581B (en) 2017-07-25 2017-07-25 Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710613432.3A CN107404581B (en) 2017-07-25 2017-07-25 Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN107404581A CN107404581A (en) 2017-11-28
CN107404581B true CN107404581B (en) 2020-03-31

Family

ID=60401000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710613432.3A Active CN107404581B (en) 2017-07-25 2017-07-25 Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN107404581B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101883177A (en) * 2010-04-26 2010-11-10 华为终端有限公司 Mobile communication terminal and playing method thereof
CN103167161A (en) * 2012-10-09 2013-06-19 深圳市金立通信设备有限公司 System and method for achieving mobile phone instrument playing based on microphone input
CN104154915A (en) * 2014-07-04 2014-11-19 北京搜狗科技发展有限公司 Audio operating method based on intelligent wearable device and intelligent wearable device
CN104915137A (en) * 2015-03-31 2015-09-16 努比亚技术有限公司 Music playing method and device based on frame-free terminal
CN105027192A (en) * 2014-01-30 2015-11-04 施政 Apparatus and method to enhance expressive qualities of digital music
CN105741639A (en) * 2016-02-04 2016-07-06 北京千音互联科技有限公司 Micro-sensing palmtop musical instrument of simulating bowed stringed instrument
CN105931627A (en) * 2016-04-07 2016-09-07 百度在线网络技术(北京)有限公司 Artificial intelligence movement recognition-based music instrument simulation method and device
CN106205283A (en) * 2016-08-26 2016-12-07 北京千音互联科技有限公司 A kind of handset type intelligent musical instrument playing method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101554221B1 (en) * 2009-05-11 2015-09-21 삼성전자주식회사 Method for playing a musical instrument using potable terminal and apparatus thereof
US20110316793A1 (en) * 2010-06-28 2011-12-29 Digitar World Inc. System and computer program for virtual musical instruments

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101883177A (en) * 2010-04-26 2010-11-10 华为终端有限公司 Mobile communication terminal and playing method thereof
CN103167161A (en) * 2012-10-09 2013-06-19 深圳市金立通信设备有限公司 System and method for achieving mobile phone instrument playing based on microphone input
CN105027192A (en) * 2014-01-30 2015-11-04 施政 Apparatus and method to enhance expressive qualities of digital music
CN104154915A (en) * 2014-07-04 2014-11-19 北京搜狗科技发展有限公司 Audio operating method based on intelligent wearable device and intelligent wearable device
CN104915137A (en) * 2015-03-31 2015-09-16 努比亚技术有限公司 Music playing method and device based on frame-free terminal
CN105741639A (en) * 2016-02-04 2016-07-06 北京千音互联科技有限公司 Micro-sensing palmtop musical instrument of simulating bowed stringed instrument
CN105931627A (en) * 2016-04-07 2016-09-07 百度在线网络技术(北京)有限公司 Artificial intelligence movement recognition-based music instrument simulation method and device
CN106205283A (en) * 2016-08-26 2016-12-07 北京千音互联科技有限公司 A kind of handset type intelligent musical instrument playing method

Also Published As

Publication number Publication date
CN107404581A (en) 2017-11-28

Similar Documents

Publication Publication Date Title
US10388122B2 (en) Systems and methods for generating haptic effects associated with audio signals
US9558727B2 (en) Performance method of electronic musical instrument and music
KR101657963B1 (en) Operation Method of Device based on a alteration ratio of touch area And Apparatus using the same
CN103235642B (en) Virtual musical instrument system that a kind of 6 dimension sense organs are mutual and its implementation
US10636417B2 (en) Method and apparatus for performing voice recognition on basis of device information
WO2020059245A1 (en) Information processing device, information processing method and information processing program
US20170344113A1 (en) Hand-held controller for a computer, a control system for a computer and a computer system
US20180315343A1 (en) System and method for translating sound to tactile
CN107705776A (en) The System and method for that a kind of intelligent piano or so keyboard subregion uses
Ketabdar et al. Magimusic: using embedded compass (magnetic) sensor for touch-less gesture based interaction with digital music instruments in mobile devices
TW201737239A (en) Musical instrument with intelligent interface
CN103714805A (en) Electronic musical instrument control device and method thereof
CN101937670A (en) Method and device for displaying and making music
Essl et al. Developments and challenges turning mobile phones into generic music performance platforms
CN105489209A (en) Electroacoustic musical instrument rhythm controllable method and improvement of karaoke thereof
Turchet Some reflections on the relation between augmented and smart musical instruments
WO2010112677A1 (en) Method for controlling an apparatus
CN107404581B (en) Musical instrument simulation method and device for mobile terminal, storage medium and mobile terminal
KR102244293B1 (en) Digital piano system works with mobile devices
CN109739388B (en) Violin playing method and device based on terminal and terminal
KR100650890B1 (en) Mobile communication terminal having music player and music playing method in that terminal
CN214504972U (en) Intelligent musical instrument
JP5821170B2 (en) Electronic music apparatus and program
CN109801613B (en) Terminal-based cello playing method and device and terminal
WO2023051651A1 (en) Music generation method and apparatus, device, storage medium, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant