CN115220686A - Sound playing method, sound playing device, electronic equipment and readable storage medium - Google Patents

Sound playing method, sound playing device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115220686A
CN115220686A CN202210859439.4A CN202210859439A CN115220686A CN 115220686 A CN115220686 A CN 115220686A CN 202210859439 A CN202210859439 A CN 202210859439A CN 115220686 A CN115220686 A CN 115220686A
Authority
CN
China
Prior art keywords
input
sound
determining
pitch
scale
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.)
Pending
Application number
CN202210859439.4A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210859439.4A priority Critical patent/CN115220686A/en
Publication of CN115220686A publication Critical patent/CN115220686A/en
Pending legal-status Critical Current

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/16Sound input; Sound output
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback
    • 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/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

The application discloses a sound playing method, a sound playing device, electronic equipment and a readable storage medium, and belongs to the technical field of electronic equipment. The sound playing method comprises the following steps: under the condition that a first input aiming at the input method control is received, determining a first sound frequency and a target tone color parameter corresponding to the first input, wherein the target tone color parameter corresponds to a preset target background tone style; in response to the first input, playing the corresponding sound based on the first sound frequency and the target timbre parameter.

Description

Sound playing method, sound playing device, electronic equipment and readable storage medium
Technical Field
The present application belongs to the technical field of electronic devices, and in particular, to a sound playing method, a sound playing apparatus, an electronic device, and a readable storage medium.
Background
In the related art, for mobile terminals such as smart phones and tablet computers, character input is generally implemented by using a virtual keyboard, and a user simulates a keyboard input process by touching virtual key positions on the virtual keyboard.
In the process, in order to realize touch feedback, a key background sound is generally set, when a user triggers a virtual key position, the key background sound is played while inputting characters, the key background sound is played based on a preset fixed audio frequency, and the user feels dull and lacks entertainment.
Disclosure of Invention
The embodiment of the application aims to provide a sound playing method, a sound playing device, electronic equipment and a storage medium, which can enrich background sounds of an input method and improve interestingness and fun when input is carried out through the input method.
In a first aspect, an embodiment of the present application provides a method for playing sound, including:
under the condition that a first input aiming at the input method control is received, determining a first sound frequency and a target tone color parameter corresponding to the first input, wherein the target tone color parameter corresponds to a preset target background tone style;
in response to the first input, playing a corresponding sound based on the first sound frequency and the target timbre parameter.
In a second aspect, an embodiment of the present application provides a sound playing apparatus, including:
the determining module is used for determining a first sound frequency and a target tone color parameter corresponding to a first input under the condition that the first input aiming at the input method control is received, wherein the target tone color parameter corresponds to a preset target background tone style;
and the playing module is used for responding to the first input and playing the corresponding sound based on the first sound frequency and the target tone color parameter.
In a third aspect, embodiments of the present application provide an electronic device, including a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, stored in a storage medium, which is executed by at least one processor to implement a method as in the first aspect.
In the embodiment of the application, when a first input of a user for inputting characters aiming at an input method control is received, according to the first input, a corresponding first sound frequency and a target tone color parameter are determined, wherein the first sound frequency is the sound frequency of background sound, the target tone color parameter is used for determining the tone color of the background sound, audio data of the background sound is formed according to the first sound frequency and the target tone color parameter, and based on the audio data, a loudspeaker of the electronic equipment is controlled to play corresponding sound.
Drawings
Fig. 1 shows a flow chart of a method of playing sound according to an embodiment of the present application;
FIG. 2 illustrates a schematic diagram of an input method control according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a setting interface of a target background sound style according to an embodiment of the application;
FIG. 4 shows a schematic illustration of scale fluctuation according to an embodiment of the present application;
FIG. 5 shows a pitch fluctuation diagram according to an embodiment of the present application;
fig. 6 is a block diagram showing a configuration of a sound playing apparatus according to an embodiment of the present application;
FIG. 7 shows a block diagram of an electronic device according to an embodiment of the application;
fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below clearly with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes in detail a playing method, a playing apparatus, an electronic device, and a readable storage medium of sound provided by the embodiments of the present application through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
In some embodiments of the present application, a method for playing a sound is provided, and fig. 1 shows a flowchart of a method for playing a sound according to an embodiment of the present application, and as shown in fig. 1, the method includes:
102, under the condition that a first input aiming at an input method control is received, determining a first sound frequency and a target tone color parameter corresponding to the first input;
in step 102, the target timbre parameter and the first sound frequency both correspond to a first input, and the target timbre parameter corresponds to a preset target background sound style;
in response to the first input, playing a corresponding sound based on the first sound frequency and the target timbre parameter, step 104.
In this embodiment of the application, the first input refers to input of an input method control by a user, and the first input may be operations such as touching and pressing the input method control by the user, where the input method control specifically includes a key in a virtual keyboard, fig. 2 shows a schematic diagram of the input method control according to the embodiment of the application, and as shown in fig. 2, there are multiple virtual keys 202 corresponding to characters on an input method control 200, and when the user touches a certain virtual key 202, characters corresponding to the virtual key 202 are displayed in a corresponding text input box, and finally, a word, a text, a symbol, or the like is formed.
When a first input of a user is received, first, according to the first input, a corresponding first sound frequency and a target timbre parameter are determined, wherein the first sound frequency is a sound frequency of a background sound, specifically, the sound frequency refers to a medium vibration frequency which induces medium vibration to transmit sound to human ears, and the higher the sound frequency is, the higher the tone and the higher the scale are, and the lower the sound frequency is, the lower the tone and the scale are.
The target timbre parameter is a timbre parameter matched with the first sound frequency style, wherein a user can set the style of the background sound of the input method in advance, the style of the background sound affects the target timbre parameter and the first sound frequency, namely, affects the hearing of the background sound of the input method.
And combining the first sound frequency and the target tone color parameter to form audio data of background sound, and playing the audio data. Specifically, the sound can be represented by a sound wave, wherein the frequency of the sound wave is the first sound frequency, and the target timbre parameter is associated with the waveform of the sound wave. It can be appreciated that the amplitude of the sound wave can express the volume of the sound.
Therefore, after the first sound frequency and the target tone color parameter are determined, the sound wave of the sound can be obtained, and the operation of the loudspeaker of the electronic device is controlled according to the sound wave, so that the loudspeaker can emit the corresponding sound.
When the user continuously inputs, specifically presses the virtual key for multiple times, the sound frequency is respectively and independently determined according to each input, so that the background sounds played during each key input execution are different, specifically, the musical scale, the pitch and the like are different, but the uniform tone style is kept, and therefore when the user continuously inputs, the background sounds are coherent to form a special music, and the interestingness and the enjoyment during the input through the input method are improved.
In some embodiments of the present application, determining a first sound frequency corresponding to the first input comprises:
determining a first pitch in a preset pitch set and determining a first scale in a preset scale set under the condition that the first input is within a first preset duration and the 1 st input of the input method control is performed;
a first sound frequency is determined from the first pitch and the first scale.
In the embodiment of the present application, the pitch range of the key background sound may be 8 degrees, that is, within the preset pitch set, there are 8 pitch heights. The scale comprises 7 basic tones, and specifically comprises: do, re, mi, fa, sol, la, ti (or as si).
The final played sound is determined by scale, pitch and timbre, wherein the first sound frequency comprises scale attribute and pitch attribute.
When a user firstly presses an input method control, namely a virtual keyboard, within a first preset time length, a first pitch and a first scale are randomly selected from a preset pitch set and a preset scale set, and a first sound frequency is determined according to the randomly selected first pitch and the first scale.
The first preset time duration is used for judging the time duration of the input interval of the user, the user may pause the input due to thinking or checking characters and the like in the normal input process, and the time for pausing the input is generally short. When the user does not input for a long time, the current input process of the user is judged to be finished, and then the input is judged to be the first input when the user input is received again. The first preset time length is an interval time length used for judging whether the input is the first input.
Because the first scale and the first pitch are randomly selected in the preset range, the randomness of the background sound can be ensured on the premise of ensuring the harmony of the generated sound, and the interest when the characters are input by the input method is improved.
In some embodiments of the application, in a case that the first input is input for the nth time of the input method control within the second preset time duration, the first sound frequency is determined according to the input information of the first input and the second sound frequency corresponding to the N-1 st input of the input method control within the second preset time duration, where N is an integer greater than 1.
In this embodiment, the second preset time period is a determination time period for determining whether the user input is a continuous character input. When user input is received, if the last input is judged to exist in a second preset time period before the input is received, the current input is determined not to be the first input, but is the Nth input.
When the sound frequency of the input background sound of the Nth input is determined, the sound frequency of the background sound of the current input is determined according to the second sound frequency of the background sound played in the last input, namely the N-1 th input, so that the sound frequency between two continuous inputs, including the pitch and the tone scale, is more coherent and has continuity, the background sound continuously input for multiple times is kept with a harmonious melody, the background sounds are harmonious, coherent and unique in formation, and the interestingness in input is improved.
In some embodiments of the present application, before determining the first sound frequency corresponding to the first input, the playing method further comprises:
receiving a second input;
in response to the second input, a target background tone style is determined.
In the embodiment of the present application, the user may select a style of the background sound, such as a jazz style, a campus pop style, a ballad style, and the like, by setting the input method, where the style of the background sound affects a timbre of the background sound, that is, a target timbre, for example, when the campus pop style is selected, the target timbre of the background sound is a timbre of a guitar, and when the jazz style is selected, the target timbre of the background sound may be a timbre of a saxophone, a timbre of a piano, and the like.
For example, fig. 3 is a schematic view of a setting interface of a target background music style according to an embodiment of the application, and as shown in fig. 3, a user may select a desired target background music style by selecting the desired target background music style in a setting interface 300 of an input method. The setting interface 300 can be automatically popped up when the user starts the input method for the first time, and the user can call the setting interface 300 by touching a setting switch of the input method.
Meanwhile, the style of the background sound also influences the scale, the pitch and the like of the adjacent background sounds during continuous input, so that the melody formed by the continuous background sounds during continuous input is influenced, and the melody formed by the background sounds during continuous input is matched with the style of the background sounds selected by the user.
In some embodiments of the present application, the input information includes an input speed and an input duration, the second tone frequency is determined from a second pitch and a second scale;
determining a first sound frequency according to the input information of the first input and a second sound frequency corresponding to the N-1 input of the input method control within a second preset time, wherein the determining comprises the following steps:
determining a third scale according to the second scale, the input speed, the input duration and the target background sound style;
determining a third pitch according to the second pitch, the input speed, the input duration and the target background tone style;
the first sound frequency is determined based on the third scale and the third pitch.
In the embodiment of the present application, when the user's continuous input is detected, the first sound frequency of the background sound inputted N times is related to the second sound frequency of the background sound inputted last time, i.e., the N-1 time input, so that a melody matching the target background sound style is formed between the adjacent background sounds.
Specifically, the sound frequency of the background sound played at the input of the (N-1) th time is specifically the second sound frequency, and the second sound frequency is determined by the second pitch M and the second scale E.
When the third scale of the currently input background sound is determined, the third scale Fy can be generated by combining the music style D and the tune B corresponding to the target background sound style according to the second scale E, the input duration T of the last input and the input speed S of the character input by the user.
The music style D and the tune B are preset constants, for example, the music style D of the campus drafts is 3, and the tune B is 2. The D and B values for different target music styles are different.
The input duration specifically refers to duration between the moment when the user finger touches the virtual key and the moment when the user lifts the hand.
The key speed may be a preset fixed value, i.e. calculated by a fixed value S, e.g. for the second input, the fixed value S may be selected to participate in the calculation.
In some embodiments, the actual input speed S may be obtained by dividing the total duration of N-1 inputs prior to the first input by the number of inputs N-1.
In other embodiments, the input speed S may also be calculated by receiving the N-2 nd input, dividing the time period to the end of the N-1 st input by 2.
After obtaining the second scale E, the last input time length T, the input speed S, the music style D, and the tune B, the following functions may be performed: fun (E, T, S, B, D) to calculate the third scale Fy.
Illustratively, the function fun (E, T, S, B, D) is specifically:
Figure BDA0003757547420000071
wherein Fy is a third scale, S is an input speed, E is a second scale, E is more than or equal to 1 and less than or equal to 7, T is an input duration, B is a tune, B is a constant, D is a music style, and D is a constant.
After Fy is calculated, if Fy is not an integer, rounding processing such as rounding up, rounding down, or rounding down is performed.
Fig. 4 shows a scale fluctuation diagram according to an embodiment of the present application, and as shown in fig. 4, the scale fluctuation range of the continuous input background sound is between 1 and 7.
Similarly, after obtaining the second pitch M, the last input duration T, the input speed S, the music style D, and the tune B, the function: fun (S, M, T, B, D) to calculate a third pitch Fx.
For example, the function fun (S, M, T, B, D) is specifically:
Figure BDA0003757547420000081
wherein Fx is a third pitch, S is an input speed, M is a second pitch, M is more than or equal to 1 and less than or equal to 8, T is an input duration, B is a tune, B is a constant, D is a music style, and D is a constant.
After Fx is calculated, rounding processing such as rounding up, rounding down or rounding down is also performed if Fx is not an integer.
Fig. 5 shows a pitch fluctuation diagram according to an embodiment of the present application, and as shown in fig. 5, the pitch fluctuation range of the continuous input background sound is between 1 and 8.
After the third pitch Fx and the third scale Fy are obtained, the following functions are used: fun (x, y) to calculate the first frequency.
Illustratively, the function fun (x, y) is specifically:
F(x,y)=27.5×2 (x-1) ×1.05 (y-1)
where F (x, y) is the first frequency, x is the third pitch, and y is the third scale.
The sound frequency of the background sound in the current input is determined according to the second sound frequency of the background sound played in the last input and the input parameters, so that the sound frequency between two continuous inputs, including the pitch and the tone scale, is more continuous, and has continuity, so that the background sound continuously input for multiple times is kept with a harmonious melody, the background sounds are harmonious, continuous and unique, and the interestingness in input is improved.
In the sound playing method provided by the embodiment of the application, the execution main body can be a sound playing device. In the embodiment of the present application, a method for determining a background sound performed by a sound playing apparatus is taken as an example, and the apparatus for determining a background sound provided in the embodiment of the present application is described.
In some embodiments of the present application, a sound playing apparatus is provided, and fig. 6 shows a block diagram of a sound playing apparatus according to an embodiment of the present application, and as shown in fig. 6, the sound playing apparatus 600 includes:
a determining module 602, configured to, in a case that a first input for the input method control is received, determine a first sound frequency and a target timbre parameter corresponding to the first input, where the target timbre parameter corresponds to a preset target background sound style;
the playing module 604 is configured to play a corresponding sound based on the first sound frequency and the target timbre parameter in response to the first input.
In the embodiment of the application, when a first input of a user for inputting characters of an input method control is received, according to the first input, a corresponding first sound frequency and a target tone color parameter are determined, the first sound frequency is the sound frequency of background sound, the target tone color parameter is used for determining the tone color of the background sound, audio data of the background sound is formed according to the first sound frequency and the target tone color parameter, and based on the audio data, a loudspeaker of the electronic equipment is controlled to play corresponding sound.
In an embodiment of the present application, the determining module is further configured to:
determining a first pitch in a preset pitch set and determining a first scale in a preset scale set under the condition that the first input is within a first preset duration and the 1 st input of the input method control is performed;
a first sound frequency is determined from the first pitch and the first scale.
In the embodiment of the application, the first scale and the first pitch are randomly selected in the preset range, so that the randomness of the background sound can be ensured on the premise of ensuring the harmony of the generated sound, and the interestingness of character input through an input method is improved.
In an embodiment of the present application, the determining module is further configured to:
and when the first input is within a second preset time length and the Nth input of the input method control is aimed at, determining a first sound frequency according to the input information of the first input and a second sound frequency corresponding to the Nth-1 input of the input method control within the second preset time length, wherein N is an integer greater than 1.
In the embodiment of the application, the sound frequency of the background sound in the current input is determined according to the second sound frequency of the background sound played in the last input, namely the N-1 input, so that the sound frequency between two continuous inputs, including the pitch and the scale, is more coherent and has continuity, and the background sound continuously input for multiple times is kept with a harmonious melody, so that the background sounds are harmonious, coherent and unique, and the interestingness in input is improved.
In this embodiment, the playing apparatus further includes:
a receiving module for receiving a second input;
and the determining module is also used for responding to the second input and determining the target background tone style.
In the embodiment of the present application, the style of the background sound may also affect the scale, pitch, etc. of the adjacent background sounds during continuous input, so as to affect the melody formed by the continuous background sounds during continuous input, thereby matching the melody formed by the background sounds during continuous input with the style of the background sounds selected by the user.
In some embodiments of the present application, the input information includes an input speed and an input duration, the second tone frequency is determined from a second tone pitch and a second musical scale;
a determination module further configured to:
determining a third scale according to the second scale, the input speed, the input duration and the target background sound style;
determining a third pitch according to the second pitch, the input speed, the input duration and the target background tone style;
the first sound frequency is determined from the third scale and the third pitch.
The sound frequency of the background sound in the current input is determined according to the second sound frequency of the background sound played in the last input and the input parameters, so that the sound frequency between two continuous inputs, including the pitch and the tone scale, is more continuous, the continuity is realized, the background sound continuously input for multiple times is kept with a harmonious melody, the background sounds are harmonious and continuous, unique music is formed, and the interestingness in the input is improved.
The playing device of sound in the embodiment of the present application may be an electronic device, or may be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (Network Attached Storage, NAS), a personal computer (NAS), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not limited in particular.
The sound playing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The sound playing device provided by the embodiment of the present application can implement each process implemented by the above method embodiment, and is not described here again to avoid repetition.
Optionally, an electronic device is further provided in an embodiment of the present application, fig. 7 shows a block diagram of a structure of the electronic device according to the embodiment of the present application, and as shown in fig. 7, an electronic device 700 includes a processor 702, a memory 704, and a program or an instruction stored in the memory 704 and executable on the processor 702, where the program or the instruction implements the processes of the above method embodiment when executed by the processor 702, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, and processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 810 is configured to, in a case that a first input for the input method control is received, determine a first sound frequency and a target timbre parameter corresponding to the first input, where the target timbre parameter corresponds to a preset target background sound style; in response to the first input, playing the corresponding sound based on the first sound frequency and the target timbre parameter.
In the embodiment of the application, when a first input of a user for inputting characters of an input method control is received, according to the first input, a corresponding first sound frequency and a target tone color parameter are determined, the first sound frequency is the sound frequency of background sound, the target tone color parameter is used for determining the tone color of the background sound, audio data of the background sound is formed according to the first sound frequency and the target tone color parameter, and based on the audio data, a loudspeaker of the electronic equipment is controlled to play corresponding sound.
Optionally, where the processor 810 is further configured to determine that the first input is within a first preset duration, for a 1 st input of the input method control, a first pitch within a preset set of pitches, and a first scale within the preset set of scales; a first sound frequency is determined from the first pitch and the first scale.
In the embodiment of the application, the first scale and the first pitch are randomly selected in the preset range, so that the randomness of the background sound can be ensured on the premise of ensuring the harmony of the generated sound, and the interestingness of character input through an input method is improved.
Optionally, in the case that the first input is an nth input of the input method control within a second preset time period, the processor 810 is further configured to determine the first sound frequency according to the input information of the first input and a second sound frequency corresponding to an N-1 st input of the input method control within the second preset time period, where N is an integer greater than 1.
In the embodiment of the application, the sound frequency of the background sound in the current input is determined according to the second sound frequency of the background sound played in the last input, namely the input at the N-1 time, so that the sound frequency between two continuous inputs, including the pitch and the scale, is more coherent and has continuity, the background sound continuously input for multiple times is kept with harmonious melody, the background sounds are formed into harmonious, coherent and unique music, and the interestingness in input is improved.
Optionally, the user input unit 807 is for receiving a second input;
and in response to a second input, determining a target background tone style at the processor 810.
In the embodiment of the present application, the style of the background sound may also affect the scale, pitch, etc. of the adjacent background sounds during continuous input, so as to affect the melody formed by the continuous background sounds during continuous input, thereby matching the melody formed by the background sounds during continuous input with the style of the background sounds selected by the user.
Optionally, the input information comprises an input speed and an input duration, the second tone frequency being determined from a second pitch and a second scale; the processor 810 is further configured to determine a third scale according to the second scale, the input speed, the input duration, and the target background sound style; determining a third pitch according to the second pitch, the input speed, the input duration and the target background tone style; the first sound frequency is determined based on the third scale and the third pitch.
The sound frequency of the background sound in the current input is determined according to the second sound frequency of the background sound played in the last input and the input parameters, so that the sound frequency between two continuous inputs, including the pitch and the tone scale, is more continuous, the continuity is realized, the background sound continuously input for multiple times is kept with a harmonious melody, the background sounds are harmonious and continuous, unique music is formed, and the interestingness in the input is improved.
It should be understood that in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 809 may be used to store software programs as well as various data. The memory 809 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playing function, an image playing function, and the like), and the like. Further, the memory 809 can include volatile memory or nonvolatile memory, or the memory 809 can include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 809 in the present embodiment of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor, which primarily handles operations related to the operating system, user interface, and applications, and a modem processor, which primarily handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into processor 810.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements the processes of the foregoing method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. Readable storage media, including computer-readable storage media, such as computer Read-Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, etc.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the foregoing method embodiment, and the same technical effect can be achieved.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
Embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the foregoing method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not described here again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes several instructions for enabling a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method of the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. A method for playing sound, comprising:
under the condition that a first input aiming at an input method control is received, determining a first sound frequency and a target tone color parameter corresponding to the first input, wherein the target tone color parameter corresponds to a preset target background tone style;
in response to the first input, playing a corresponding sound based on the first sound frequency and the target timbre parameter.
2. The playback method of claim 1, wherein the determining the first sound frequency corresponding to the first input comprises:
determining a first pitch in a preset pitch set and determining a first scale in a preset scale set under the condition that the first input is within a first preset duration and the 1 st input of the input method control is performed;
determining the first sound frequency from the first pitch and the first scale.
3. The playback method of claim 1, wherein the determining the first sound frequency corresponding to the first input comprises:
and when the first input is input for the Nth time of the input method control within a second preset time period, determining the first sound frequency according to the input information of the first input and a second sound frequency corresponding to the N-1 st input of the input method control within the second preset time period, wherein N is an integer greater than 1.
4. The playback method as claimed in claim 3, wherein before determining the first sound frequency corresponding to the first input, the playback method further comprises:
receiving a second input;
in response to the second input, determining the target background sound style.
5. The playback method according to claim 4, wherein the input information includes an input speed and an input duration, and the second tone frequency is determined based on a second pitch and a second scale;
the determining the first sound frequency according to the input information of the first input and the second sound frequency corresponding to the N-1 th input of the input method control within the second preset time period includes:
determining a third scale according to the second scale, the input speed, the input duration and the target background sound style;
determining a third pitch according to the second pitch, the input speed, the input duration and the target background tone style;
determining the first sound frequency according to the third scale and the third pitch.
6. A sound playing apparatus, comprising:
the device comprises a determining module, a judging module and a processing module, wherein the determining module is used for determining a first sound frequency corresponding to a first input under the condition that the first input aiming at an input method control is received;
and the playing module is used for responding to the first input and playing corresponding sound based on the first sound frequency and the target tone color parameter.
7. The playback device of claim 6, wherein the determining module is further configured to:
determining a first pitch in a preset pitch set and determining a first scale in a preset scale set under the condition that the first input is within a first preset time length and the 1 st input of the input method control is aimed at;
determining the first sound frequency from the first pitch and the first scale.
8. The playback device of claim 6, wherein the determining module is further configured to:
and when the first input is input for the Nth time of the input method control in a second preset time period, determining the first sound frequency according to the input information of the first input and a second sound frequency corresponding to the Nth-1 st input of the input method control in the second preset time period, wherein N is an integer greater than 1.
9. The playback apparatus according to claim 8, further comprising:
a receiving module for receiving a second input;
the determining module is further configured to determine a target background sound style in response to the second input, wherein the target timbre corresponds to the target background sound style.
10. The playback apparatus according to claim 9, wherein the input information includes an input speed and an input duration, and the second tone frequency is determined based on a second pitch and a second scale;
the determining module is further configured to:
determining a third scale according to the second scale, the input speed, the input duration and the target background sound style;
determining a third pitch according to the second pitch, the input speed, the input duration and the target background tone style;
determining the first sound frequency according to the third scale and the third pitch.
11. An electronic device, characterized in that it comprises a processor and a memory, said memory storing a program or instructions executable on said processor, said program or instructions, when executed by said processor, implementing the steps of the method of playing sound according to any one of claims 1 to 5.
12. A readable storage medium, characterized in that the readable storage medium stores thereon a program or instructions which, when executed by a processor, implement the steps of the method of playing sound according to any one of claims 1 to 5.
CN202210859439.4A 2022-07-21 2022-07-21 Sound playing method, sound playing device, electronic equipment and readable storage medium Pending CN115220686A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210859439.4A CN115220686A (en) 2022-07-21 2022-07-21 Sound playing method, sound playing device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210859439.4A CN115220686A (en) 2022-07-21 2022-07-21 Sound playing method, sound playing device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115220686A true CN115220686A (en) 2022-10-21

Family

ID=83613921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210859439.4A Pending CN115220686A (en) 2022-07-21 2022-07-21 Sound playing method, sound playing device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115220686A (en)

Similar Documents

Publication Publication Date Title
CN109543064B (en) Lyric display processing method and device, electronic equipment and computer storage medium
EP2760014B1 (en) Interactive score curve for adjusting audio parameters of a user's recording.
WO2020177190A1 (en) Processing method, apparatus and device
CN111383631B (en) Voice interaction method, device and system
US11511200B2 (en) Game playing method and system based on a multimedia file
CN104485115A (en) Pronunciation evaluation equipment, method and system
CN110311858A (en) A kind of method and apparatus sending conversation message
CN110808019A (en) Song generation method and electronic equipment
CN113177134A (en) Music playing method and device, electronic equipment and storage medium
CN110827789A (en) Music generation method, electronic device and computer-readable storage medium
CN108319444B (en) Music drumbeat-based control terminal vibration method, storage device and computer device
US20190371066A1 (en) Systems and Methods for Providing Virtual Reality Musical Experiences
CN113407275A (en) Audio editing method, device, equipment and readable storage medium
CN110727411A (en) Audio signal processing method and device, storage medium and terminal
CN115220686A (en) Sound playing method, sound playing device, electronic equipment and readable storage medium
US20220414472A1 (en) Computer-Implemented Method, System, and Non-Transitory Computer-Readable Storage Medium for Inferring Audience's Evaluation of Performance Data
US20200338445A1 (en) Game controller with touchpad input
US11775070B2 (en) Vibration control method and system for computer device
CN113096686B (en) Audio processing method and device, electronic equipment and storage medium
WO2015012892A2 (en) Persistent instrument configured to remind a user that a practice session is scheduled
CN108717849A (en) The method, apparatus and storage medium of splicing multimedia data
JP7263957B2 (en) Information device, automatic setting method and automatic setting program
CN115811590A (en) Mobile audio/video device and audio/video playing control method
JP7337366B2 (en) Video distribution system, program, and computer-readable storage medium
TWI777771B (en) Mobile video and audio device and control method of playing video and audio

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