CN-122001975-A - Music playing method, device, terminal, storage medium and computer program product
Abstract
The application discloses a music playing method, a device, a terminal, a storage medium and a computer program product, wherein the method comprises the steps that the terminal determines gait frequency and first time based on gait data, the first time represents a time point of HS, and music is played based on the gait frequency and/or the first time.
Inventors
- GONG CHEN
- ZHENG ZHIMIN
- CUI CHUNFENG
- WANG QIXING
- LIU GUANGYI
Assignees
- 中国移动通信有限公司研究院
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (15)
- 1. A music playing method, characterized in that it is applied to a terminal, the method comprising: Determining a gait frequency and a first time based on the gait data, the first time characterizing a point in time of the heel strike HS; music is played based on the gait frequency and/or the first time.
- 2. The method of claim 1, wherein playing music based on the gait frequency and/or the first time comprises: determining a music playing strategy and/or playing music based on the first value and/or the second value, wherein, The first value characterizes a ratio of the gait frequency to a third value characterizes a BPM of beats per minute of music, the second value characterizes a phase difference between a pace and a music beat, the phase difference is determined based on the first time, a second time and a third time, the second time characterizes a time point of the music beat before the first time, and the third time characterizes a time point of the music beat after the first time.
- 3. The method according to claim 1 or 2, wherein the playing music based on the gait frequency and/or the first time comprises one or more of the following: Adjusting a third value of the first music based on the second value, the third value characterizing the BPM of the music, if the first value is within the set range; when the first value is out of the set range, the instruction is made to change from the first music to the second music; in the case where the first value is outside the set range, it is instructed to play the second music when the second value is zero or the first time is the same as the time point of the music tempo of the second music.
- 4. A method according to claim 3, wherein the third value of the second music matches the gait frequency and/or the style of the second music is the same as the style of the first music.
- 5. The method of claim 1,2 or 4, wherein playing music based on the first value and/or the second value comprises one or more of: Reducing a third value of the music, the third value characterizing the BPM of the music, if the second value is less than or equal to the first threshold; Under the condition that the second value is smaller than or equal to the first threshold, the playing speed of music is accelerated; Increasing a third value of the music, the third value characterizing the BPM of the music, if the second value is greater than or equal to the second threshold; slowing down the playing speed of the music under the condition that the second value is larger than or equal to a second threshold; the BPM of the music is adjusted from the first BPM to the second BPM.
- 6. The method according to claim 1, wherein playing music based on the first value and/or the second value comprises: the tempo of the music is adjusted without changing the pitch of the music.
- 7. The method according to claim 1 or 6, wherein playing music based on the first value and/or the second value comprises: performing short-time Fourier transform (STFT) on the first audio signal of the music file to obtain a first frequency spectrum signal of the music file; And performing inverse short time Fourier transform ISTFT on the second frequency spectrum signal to obtain a second audio signal of the music file, wherein the second frequency spectrum represents the first frequency spectrum signal after time expansion, and the music rhythm of the first audio signal of the music file is different from that of the corresponding second audio signal.
- 8. The method of claim 7, wherein the method further comprises: Determining an amplitude value and a phase value corresponding to a new time point of the first frequency spectrum signal in an interpolation mode; The second spectral signal is constructed based on the amplitude value and the phase value corresponding to the new point in time of the first spectral signal.
- 9. The method of claim 1,2, 4, 6 or 8, further comprising: selecting music from a music library based on one or more of: User preferences; preference information; Music style; BPM of music.
- 10. The method of claim 1, 2, 4, 6 or 8, further comprising: storing the music file and the corresponding music information in a music library in an associated mode, wherein the music information comprises one or more of the following: Style of music; BPM of music; Time point sequence of musical beats.
- 11. A music playing device, comprising: a first determining unit for determining a gait frequency and a first time based on the gait data, the first time characterizing a point in time of the HS; and the playing unit is used for playing music based on the gait frequency and/or the first time.
- 12. A terminal is characterized by comprising a processor and a communication interface, wherein, The communication interface is used for determining gait frequency and first time based on gait data, wherein the first time represents a time point of heel grounding HS, and playing music based on the gait frequency and/or the first time.
- 13. A terminal comprising a processor and a memory for storing a computer program capable of running on the processor, Wherein the processor is adapted to perform the steps of the method of any of claims 1 to 10 when the computer program is run.
- 14. A storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the method according to any of claims 1 to 10.
- 15. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 15.
Description
Music playing method, device, terminal, storage medium and computer program product Technical Field The present application relates to the field of communications technologies, and in particular, to a music playing method, apparatus, terminal, storage medium, and computer program product. Background In the related art, rhythmic auditory stimuli (RAS, rhythmic Auditory Stimulation) may be used as a technique for neuromuscular therapy (NMT, neurologic Music Therapy). The conventional RAS technical scheme mainly relies on external devices (such as a metronome or an audio player) to generate and play rhythm audio, and promotes walking training through consistent and regular music rhythms, but cannot meet the personalized demands of users on the music rhythms. Disclosure of Invention To solve the related technical problems, embodiments of the present application provide a music playing method, apparatus, terminal, storage medium and computer program product. The technical scheme of the embodiment of the application is realized as follows: The embodiment of the application provides a music playing method, which is applied to a terminal and comprises the following steps: determining a gait frequency and a first time based on the gait data, the first time characterizing a point in time of Heel Strike (HS); music is played based on the gait frequency and/or the first time. In the above solution, the playing music based on the gait frequency and/or the first time includes: determining a music playing strategy and/or playing music based on the first value and/or the second value, wherein, The first value characterizes a ratio of the gait frequency to a third value characterizes a number of Beats Per Minute (BPM) of music, the second value characterizes a phase difference between a pace and a music Beat, and the second value characterizes a time point of the music Beat before the first time, the second value characterizes a time point of the music Beat after the first time, and the third value characterizes a time point of the music Beat after the first time. In the above aspect, the playing music based on the gait frequency and/or the first time includes one or more of the following: Adjusting a third value of the first music based on the second value, the third value characterizing the BPM of the music, if the first value is within the set range; when the first value is out of the set range, the instruction is made to change from the first music to the second music; in the case where the first value is outside the set range, it is instructed to play the second music when the second value is zero or the first time is the same as the time point of the music tempo of the second music. In the above scheme, the third value of the second music is matched with the gait frequency, and/or the style of the second music is the same as the style of the first music. In the above scheme, the playing music based on the first value and/or the second value includes one or more of the following: Reducing a third value of the music, the third value characterizing the BPM of the music, if the second value is less than or equal to the first threshold; Under the condition that the second value is smaller than or equal to the first threshold, the playing speed of music is accelerated; Increasing a third value of the music, the third value characterizing the BPM of the music, if the second value is greater than or equal to the second threshold; slowing down the playing speed of the music under the condition that the second value is larger than or equal to a second threshold; the BPM of the music is adjusted from the first BPM to the second BPM. In the above scheme, playing music based on the first value and/or the second value includes: the tempo of the music is adjusted without changing the pitch of the music. In the above scheme, playing music based on the first value and/or the second value includes: Performing short time Fourier transform (STFT, short-time Fourier transform or short-term Fourier transform) on the first audio signal of the music file to obtain a first spectrum signal of the music file; and performing Inverse Short time Fourier transform (ISTFT, inverse Short-Time Fourier Transform) on the second frequency spectrum signal to obtain a second audio signal of the music file, wherein the second frequency spectrum represents the first frequency spectrum signal after time stretching, and the first audio signal of the music file is different from the corresponding second audio signal in music rhythm. In the above scheme, the method further comprises: Determining an amplitude value and a phase value corresponding to a new time point of the first frequency spectrum signal in an interpolation mode; The second spectral signal is constructed based on the amplitude value and the phase value corresponding to the new point in time of the first spectral signal. In the above scheme, the method further comprises: selecting music from a mus