Audio overlay recording method and device based on file chain table management, equipment and storage medium

Through the audio overlay method of file link list management, the problem of high storage bandwidth and computing power requirements of Looper devices after multiple overlays is solved, and the generation and export of wav format files is realized, which improves the user's creative freedom.

CN120472952APending Publication Date: 2025-08-12GUANGZHOU RANTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510534202.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing Looper devices have high requirements for computing power and storage bandwidth after multiple overlays, so they cannot record multiple times, and after recording, the audio cannot be exported in file form for further processing, which limits the user's creative space.

Method used

The file link list management method is adopted, and only one file is read and written at the same time, and a Wav format recording file is generated. The file link list is reconstructed through the file header to realize audio overlay, support infinite audio overlay, and generate wav format files during recording or overlay.

Benefits of technology

It reduces the requirements for storage bandwidth and chip computing power, facilitates users to export and edit creative content, and improves the recording and editing efficiency of Looper devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472952A_ABST
    Figure CN120472952A_ABST
Patent Text Reader

Abstract

The invention relates to an audio overlay method and device based on file chain table management, computer equipment and a storage medium, and the method comprises the steps: starting recording, reading an audio frame from a write-in buffer, and writing the audio frame into an initial wav file; entering a stack recording state, reading audio frames from the initial wav file, and writing the audio frames into a pre-reading buffer area; when stack recording is started each time, a first stack recording audio frame is collected, a second stack recording audio frame is obtained from the write-in pre-read buffer area and is subjected to stack recording, and after stack recording is finished, the stack recording audio frame is written into the write-in buffer area and the created stack recording wav file; constructing a file chain table based on the initial wav file and the overlapping wav file obtained by overlapping each time according to the relationship between the recording sequence of each time and the time axis; and when the stacked audio of the file chain table is played, playing the stacked audio according to the relationship between each wav file and the time axis and the time sequence. According to the method, the audio can be overlaid on the basis of file linked list management, only one file is read or written at the same time, and the requirement for storage bandwidth is lowered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio processing, and in particular to an audio overdubbing method, device, computer equipment and storage medium based on file link list management. Background Art

[0002] Loopers are primarily used in live music production and recording. They allow musicians to record a single audio segment and then instantly play it back as a loop, allowing them to layer more tracks on top. This technology greatly enriches the possibilities of live performances, enabling a single musician to create complex soundscapes similar to those of a full band.

[0003] Currently, multiple overdubs on Looper devices require high computing power and storage bandwidth, making multiple recordings impossible. Furthermore, because Looper devices lack a file system, after recording, the audio can only be listened to from the device; it cannot be exported as a file for further processing, limiting users' creative possibilities. Summary of the Invention

[0004] Based on this, it is necessary to provide an audio overlay method, device, computer equipment and storage medium based on file linked list management to address the above technical problems. The method can overlay audio based on file linked list management. Only one file will be read and one file will be written at the same time, which greatly reduces the requirements for storage bandwidth and chip computing power. It also directly generates recording files in wav format, which is very convenient for users to export and edit creative content.

[0005] An audio overdubbing method based on file linked list management comprises: starting recording when a recording slot of a looper device has no data, creating an initial WAV file, cyclically reading audio frames from a write buffer and writing them into the initial WAV file, wherein the write buffer caches multiple audio frames to be written; entering an overdubbing state after recording stops, reading audio frames from the initial WAV file and writing them into a pre-read buffer; each time overdubbing is started, capturing a first overdubbing audio frame and obtaining a second overdubbing audio frame from the write pre-read buffer, mixing the first overdubbing audio frame and the second overdubbing audio frame for overdubbing, obtaining overdubbing audio after the overdubbing is completed, writing the overdubbing audio into the write buffer, creating an overdubbing WAV file, cyclically reading the overdubbing audio from the write buffer and writing it into the overdubbing WAV file; constructing a file linked list based on the relationship between each recording or overdubbing sequence and a time axis, and based on the initial WAV file and the overdubbing WAV file obtained from each overdubbing; and when the overdubbing audio in the file linked list is played in a cyclic manner, playing the overdubbing audio according to the relationship between each WAV file and the time axis and in a chronological order.

[0006] Preferably, an audio overdubbing method based on file linked list management further includes: adding a Looper file description block and a Looper sector alignment reservation block of a Looper device on the basis of the WAV file format of each WAV file; wherein each Looper file description block is used to describe the playback timeline position and file type corresponding to each WAV file; and the Looper sector alignment reservation block is used to control the data length before DataChunkData to be a set byte so that the sectors are aligned.

[0007] Preferably, the audio overdubbing method based on file linked list management further comprises: if it is determined according to the overdubbing order that the playback time axis corresponding to the newly overdubbed WAV file completely covers the old overdubbed file, recycling the old overdubbed file.

[0008] Preferably, after the step of playing the overdubbed audio according to the relationship between each wav file and the time axis and in time sequence, the method further includes: synchronously writing all played overdubbed audios into a marge file according to the play time sequence, and recycling the wav files in the file linked list.

[0009] Preferably, an audio overdubbing method based on file linked list management also includes: in the process of starting overdubbing to generate overdubbing wav files, setting LooperFileType in the file header of each overdubbing wav file to a tentative state; when playing the overdubbed audio in the file linked list in a loop, based on the user's choice, playing the audio frame containing the last overdubbing or playing the audio frame not containing the last overdubbing, wherein the audio frame of the last overdubbing is set to a reuse state, and the audio frame not containing the last overdubbing is set to a revoked state; if the user chooses to start overdubbing again while playing the audio frame containing the last overdubbing, then the overdubbing wav files with LooperFileType in a tentative state are set to an applied state; if the user chooses to start overdubbing again while playing the audio frame not containing the last overdubbing, then the overdubbing wav files with LooperFileType in a tentative state are deleted.

[0010] Preferably, collecting the first overwritten audio frame includes: receiving the collected audio frame to be overwritten, performing effect algorithm processing on the received audio frame, fading in the audio frame after the effect algorithm processing, and collecting the first overwritten audio frame from the audio frame after the fade-in processing; mixing and overwriting the first overwritten audio frame and the second overwritten audio frame, and obtaining overwritten audio after the overwriting is completed, including: mixing and overwriting the first overwritten audio frame and the second overwritten audio frame to obtain overwritten data, fading out the overwritten data, and obtaining overwritten audio according to the overwritten data after the fade-out processing.

[0011] Preferably, obtaining the overdubbed audio based on the overdubbed data after the fade-out processing includes: performing a limiter algorithm on the overdubbed data after the fade-out processing to control the amplitude value of the overdubbed data to be less than an amplitude threshold; and writing the overdubbed data after the limiter algorithm processing as the overdubbed audio into a write buffer.

[0012] An audio overdub recording device based on file chain list management includes: a writing module, which is used to start recording when there is no data in the recording slot of a Looper device, create an initial WAV file, and cyclically read audio frames from a writing buffer and write them into the initial WAV file, wherein the writing buffer caches multiple audio frames to be written; a reading module, which is used to enter the overdub recording state after recording stops, read audio frames from the initial WAV file and write them into a pre-read buffer; an overdub recording module, which is used to collect the first overdub recording audio frame and obtain the second overdub recording audio frame from the write pre-read buffer each time overdub recording is started, and write the first overdub recording audio frame into the pre-read buffer. An overdubbed audio frame and a second overdubbed audio frame are mixed and overdubbed, and overdubbed audio is obtained after the overdubbing is completed. The overdubbed audio is written to a write buffer to create an overdubbed WAV file, and the overdubbed audio is cyclically read from the write buffer and written into the overdubbed WAV file; a construction module is used to construct a file link list based on the relationship between each recording or overdubbing sequence and the time axis, and based on the initial WAV file and the overdubbed WAV file obtained by each overdubbing; a playback module is used to play the overdubbed audio in the file link list according to the relationship between each WAV file and the time axis and in time sequence when cyclically playing the overdubbed audio.

[0013] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.

[0014] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of the above embodiments.

[0015] The above-mentioned audio overlay recording method, device, computer equipment and storage medium based on file linked list management start recording when there is no data in the recording slot of the looper device, create an initial wav file, cyclically read audio frames from the write buffer and write them into the initial wav file, wherein the write buffer caches multiple frames of audio frames to be written; enter the overlay recording state after recording stops, read audio frames from the initial wav file and write them into the pre-read buffer; each time overlay recording is started, collects a first overlay recording audio frame and obtains a second overlay recording audio frame from the write pre-read buffer, mixes the first overlay recording audio frame and the second overlay recording audio frame and overlays them, obtains overlay recording audio after the overlay recording is completed, writes the overlay recording audio into the write buffer, creates an overlay recording wav file, and cyclically reads the overlay recording audio from the write buffer and writes it into the overlay recording wav file; constructs a file linked list based on the relationship between each recording or overlay recording sequence and the time axis, and based on the initial wav file and the overlay recording wav file obtained by each overlay recording; when the overlay recording audio in the file linked list is played in a cyclic manner, the overlay recording audio is played according to the relationship between each wav file and the time axis and in time sequence. Therefore, audio can be overwritten based on file link list management. Only one file will be read and one file will be written at the same time, which greatly reduces the requirements for storage bandwidth and chip computing power. In addition, the recording file in wav format is directly generated, which is very convenient for users to export and edit creative content. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 1 is a flow chart of an audio overdubbing method based on file linked list management in one embodiment;

[0017] Figure 2 is a schematic diagram of a file linked list containing an initial rec.wav file in one embodiment;

[0018] Figure 3 Schematic diagram of a file linked list including a rec.wav file and various overdubbed wav files in one embodiment;

[0019] Figure 4 Schematic diagram of the corresponding relationship between each overdubbed WAV file and the time axis in one embodiment;

[0020] Figure 5 A schematic diagram of the corresponding relationship between the playback time axes of each WAV file in the file list in the loop playback state in one embodiment;

[0021] Figure 6 A schematic diagram of the data format of the WAV file header of each WAV file in one embodiment;

[0022] Figure 7 A schematic diagram of the relationship between a file list and a corresponding time axis when executing an automatic marge mechanism in one embodiment;

[0023] Figure 8 is a schematic diagram of audio data played in a revoked state according to one embodiment;

[0024] Figure 9 is a schematic diagram of audio data played in a reused state according to an embodiment;

[0025] Figure 10 1 is a flow chart of an audio overdubbing method based on file linked list management in another embodiment;

[0026] Figure 11 A schematic diagram of a fade-in and fade-out effect in one embodiment;

[0027] Figure 12 A schematic diagram of the effect of audio mixing processing in one embodiment;

[0028] Figure 13 This is a schematic diagram of the effect after the limiter algorithm is processed in one embodiment;

[0029] Figure 14 The figure is a structural diagram of an audio overdubbing device based on file link list management in one embodiment. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0031] This application provides an audio overdubbing method based on file link table management. Figure 1 As shown, in one embodiment, a method for audio overdubbing based on file linked list management includes the following steps:

[0032] S101, when there is no data in the recording slot of the Looper device, start recording, create an initial WAV file, and cyclically read audio frames from the write buffer and write them into the initial WAV file, wherein the write buffer caches multiple audio frames that need to be written.

[0033] Specifically, when the recording slot does not have any data, the recording will start in the first track state, creating the initial wav file, that is, the rec.wav file, and looping to read audio frames from the write buffer and write them to the rec.wav file until the user stops recording. At this point, the maximum duration of the overdubbing has been determined. For the convenience of the following description, it is assumed that the user recorded a rec.wav file with 16,000 sampling points. The rec.wav file is as follows: Figure 2 shown.

[0034] S102, after the recording stops, the overdubbing state is entered, and audio frames are read from the initial WAV file and written into the pre-read buffer.

[0035] Specifically, when recording is started again in the loop playback state, the overdubbing state is entered, and audio frames are read from the rec.wav file and written into the pre-read buffer.

[0036] In particular, due to the existence of the pre-read buffer and the write buffer, a recording time that is too short will be considered an emergency operation and the recording content will be cleared. When recording stops, it will enter the loop playback state, reading the audio frames of the rec.wav file and writing them to the pre-read buffer.

[0037] Regarding the pre-read buffer and write buffer mentioned above: the pre-read buffer is used to cache overwritten audio frames for multi-frame reads, and the write buffer is used to cache multi-frame audio frames for writes. Audio frames are typically stored on large-capacity block devices such as SD cards, disks, and EMMC. Therefore, a block erase operation can take 1 to 10s of milliseconds (depending on the storage medium), and the data on the block device is unreadable during the erase process. Most audio products require a low latency of <= 5ms, so an audio frame must be within 128 samples (128 / 48000 = 0.002666s ≈ 2.7ms). Therefore, a buffer is needed to cache data until the block device completes the erase operation to prevent playback interruptions or write losses. For example, if a block device has an erase time of 7ms, the buffer must be set to cache at least 4 audio frames.

[0038] S103: Each time overdubbing is started, a first overdubbing audio frame is captured and a second overdubbing audio frame is obtained from a write pre-read buffer. The first overdubbing audio frame and the second overdubbing audio frame are mixed and overdubbed. After the overdubbing is completed, overdubbing audio is obtained, the overdubbing audio is written to the write buffer, an overdubbing WAV file is created, and the overdubbing audio is cyclically read from the write buffer and written into the overdubbing WAV file.

[0039] Specifically, after entering the overdubbing state, a dub1.wav file is created, and the overdubbing audio is cyclically read from the write buffer and written to the dub1.wav file. Assume that the overdubbing key is pressed when the playback reaches the 1000th point, and 3000 sampling points are recorded until the user stops recording. Overdubbing is performed multiple times to generate the dub2.wav file (assuming that the overdubbing key is pressed when the playback reaches the 6000th point, and 3000 sampling points are recorded), and the dub3.wav file (assuming that the overdubbing key is pressed when the playback reaches the 13000th point, and 2000 sampling points are recorded) and then enter the loop playback state. Among them, the dub1.wav file, the dub2.wav file, and the dub3.wav file are the corresponding overdubbing wav files obtained for each overdubbing.

[0040] In addition, you can also use the file system to store the generated wav files. There is no need for special transcoding processing. You only need to connect to the upper-level USB drive to directly view, modify, and share the creative content on the computer.

[0041] S104: construct a file link list based on the relationship between each recording or overdubbing sequence and the time axis, and based on the initial WAV file and the overdubbing WAV files obtained by each overdubbing.

[0042] Specifically, the constructed file list is as follows Figure 3 As shown in the figure. Among them, the corresponding relationship between each overdubbed wav file and the time axis is as follows Figure 4 shown.

[0043] S105 , when looping the overdubbed audio in the file link list, the overdubbed audio is played according to the relationship between each wav file and the time axis and in a time sequence.

[0044] Specifically, in the loop playback state, the file list is traversed from top to bottom to retrieve the wav file corresponding to the playback time axis. Figure 5 As shown, for example, when the playback time axis is between 0 and 999, the rec.wav file is read, when playing between 1000 and 3999, dub1.wav is read, when playing between 4000 and 5999, rec.wav is read again, when playing between 6000 and 8999, dub2.wav is read, when playing between 9000 and 12999, rec.wav is read, when playing between 13000 and 14999, dub3.wav is read, and when playing between 15000 and 15999, rec.wav is read in orange.

[0045] In one embodiment, after obtaining each overwritten WAV file, the method further includes: adding a Looper file description block and a Looper sector alignment reservation block of a Looper device based on the WAV file format of each WAV file; wherein each Looper file description block is used to describe the playback timeline position and file type corresponding to each WAV file; and the Looper sector alignment reservation block is used to control the data length before DataChunkData to be a set byte to align the sectors.

[0046] Specifically, a strategy of adding overdubbing data to the wav file header is adopted. Based on the standard wav file format, a Looper file description block is added to describe the position of the playback time axis corresponding to the wav file, the file type and other information for playback control and recovery of the file list. A sector alignment reservation block is added to make the data length before DataChunkData 512 bytes to ensure sector alignment. The specific Looper file description block and Looper sector alignment reservation block are as follows: Figure 6 Because the smallest unit of a block device during block erase is a sector, if the address of the written data is not aligned with the sector, a read->erase->write process is required, which seriously affects the data writing speed.

[0047] The file list reconstruction mechanism eliminates the need for additional files to store track information, allowing recordings to resume even after switching recording slots or experiencing a power outage. When the user switches between recording slots, the file list is reconstructed by first interpreting the WAV file name and its sequence number. The looper information in the WAV file header is then used to locate each file's timeline position and file type, completing the file list reconstruction.

[0048] In summary, the file linked list management strategy is adopted, and only one file is read and one file is written at the same time, which greatly reduces the requirements for storage bandwidth and chip computing power, and significantly shortens the file retrieval time; the strategy of adding overlay data to the wav file header is adopted to generate wav format files during recording or overlaying. By adding exclusive info data (ID number, type, read-write attributes, timeline start value, timeline end value) to the file header, the file linked list can be reconstructed, without using additional files to store track information, and the recording status can be restored even in the event of an unexpected power outage; the automatic recycling mechanism of recording overlap area files is adopted. When the playback timeline corresponding to the new overlay file completely covers the old overlay file, the old file is automatically recycled to ensure that the disk will not be filled up in the case of repeated overlaying; the undo and reuse mechanism is adopted to allow users to create more freely;

[0049] In one embodiment, after the above step of playing the overdubbed audio according to the relationship between each wav file and the time axis and in time sequence, it also includes: synchronously writing all played overdubbed audio into the marge file according to the playback time sequence, and recycling the wav files in the file linked list.

[0050] Specifically, the automatic marge mechanism is used. When all overdubbed audio is played from the beginning, the currently played audio content will be synchronously written to the marge file. After all overdubbed audio is played, a complete marge file can be obtained. Then all other overdubbed files can be recycled to release disk resources. Figure 7 For example, the audio being played will be synchronously written to marge.wav (recording starts at point 0 and records 16,000 samples). Due to the automatic recycling mechanism for overlapping recordings, the marge.wav file has already overwritten all dubx.wav and rec.wav files on the playback timeline. Therefore, the next time you start overdub, these overwritten files will be recycled to free up disk space, and the marge.wav file will be renamed to rec.wav.

[0051] In summary, with the automatic marge mechanism, when all overdubbed audio is played from the beginning, the currently playing audio content will be synchronously written to the marge file. When all overdubbed audio is played, a complete marge file will be obtained, and then all other overdubbed files can be recycled to release disk resources.

[0052] In one embodiment, each time overdubbing is started, it also includes: in the process of starting overdubbing to generate overdubbing wav files, setting LooperFileType in the file header of each overdubbing wav file to a tentative state; when the overdubbing audio in the file list is played in a loop, based on the user's selection, playing the audio frame containing the last overdubbing or playing the audio frame not containing the last overdubbing, wherein the audio frame of the last overdubbing is set to a reuse state, and the audio frame not containing the last overdubbing is set to a cancel state; if the user chooses to start overdubbing again while playing the audio frame containing the last overdubbing, then the overdubbing wav files with LooperFileType in the tentative state are set to the applied state; if the user chooses to start overdubbing again while playing the audio frame not containing the last overdubbing, then the overdubbing wav files with LooperFileType in the tentative state are deleted.

[0053] Specifically, the undo and reuse mechanism is adopted to allow users to create more freely. When the overdubbing is started, the LooperFileType in the header of all dubx.wav files generated will be set to a tentative state (pending). After the overdubbing is finished and looped, the user can choose to play the audio containing the last overdubbing (reuse state) or play the audio excluding the last overdubbing (undo state) to compare whether the effect of the creation is satisfactory. After the overdubbing is finished, the default is loop playback in the reuse state. If the user starts the overdubbing again in the reuse state (indicating that the creative content meets the user's expectations and needs to be applied and retained), then all dubx.wav files with LooperFileType in the tentative state will be changed to the applied state. If the user starts the overdubbing again in the undo state (indicating that the creative content fails to meet the user's expectations and needs to be deleted), then all dubx.wav files with LooperFileType in the tentative state will be deleted. For example, audio data played in the undo state such as Figure 8 As shown, the audio data played in the reuse state is as follows Figure 9 shown.

[0054] In one embodiment, the capturing of the first overdubbed audio frame includes: receiving the captured audio frame to be overdubbed, performing an effect algorithm processing on the received audio frame, performing a fade-in process on the audio frame processed by the effect algorithm, and capturing the first overdubbed audio frame from the audio frame processed by the fade-in process; and mixing and overdubbing the first overdubbed audio frame and the second overdubbed audio frame to obtain the overdubbed audio after the overdubbing is completed includes: mixing and overdubbing the first overdubbed audio frame and the second overdubbed audio frame to obtain overdubbed data, performing a fade-out process on the overdubbed data, and obtaining the overdubbed audio based on the fade-out overdubbed data.

[0055] The step of obtaining the overdubbed audio based on the overdubbed data after the fade-out processing includes: performing a limiter algorithm on the overdubbed data after the fade-out processing to control an amplitude value of the overdubbed data to be less than an amplitude threshold; and writing the overdubbed data after the limiter algorithm processing as the overdubbed audio into a write buffer.

[0056] This embodiment mainly describes the processing of overdubbing data during the early overdubbing period.

[0057] Specifically, if Figure 10 As shown, the audio overdubbing method based on file linked list management of the present invention is mainly divided into the first part of audio acquisition and effect processing and the second part of the implementation process of infinite audio overdubbing based on file linked list management.

[0058] Among them, fade in and fade out processing: when overdubbing is started, the audio frames after acquisition and effect algorithm processing are received. In order to prevent popping sound caused by sudden increase in sound volume, the input signal needs to be faded in. When overdubbing is ended, in order to prevent popping sound caused by sudden decrease in sound volume, the output signal needs to be faded out. Figure 11 shown.

[0059] Fade in and fade out is actually a linear calculation (or exponential calculation) on the audio. It can be achieved by multiplying each audio data by a transformation coefficient, and this coefficient is a time-varying quantity. For example, the linear function y = kx, x can be regarded as the audio value at a certain moment, and k is a variation coefficient. Assuming that it takes 10ms for the 48KHz sampled audio to change from the minimum value to the maximum value, then k = 1 / ((10 / 1000)*48000) = 1 / 480, and y is the audio value after fade-in or fade-out processing.

[0060] Among them, mixing processing: Figure 10 As shown, the audio frame is read from the pre-read buffer and mixed with the audio frame after fading in and out. The simplest operation is to perform data superposition calculation. The function is y_dub=x_dub+x_fade, where x_dub is the data read from the pre-read buffer, x_fade is the data after fading in and out, and y_dub is the overdubbed data after mixing. After multiple overdubbing, the data of y_dub will exceed the maximum signal amplitude. If it is directly output to the speaker, it will cause sound distortion. Figure 12 As shown in the figure, taking the superposition of a 0.6V 440Hz and a 0.6V 880Hz sine wave as an example, the peak value will exceed 1V and cause waveform distortion.

[0061] To solve this problem, it is necessary to use the limiter algorithm after data superposition to limit the amplitude of the superimposed signal to within 0.9V to ensure that the waveform is not distorted. The specific algorithm is implemented as: limiter(mixed_wave_data,threshold=0.9,ratio=10,attack_time=0.01,release_time=0.1,fs=48000), the effect is as follows Figure 13 As shown, the data after the limiter is finally written to the write buffer.

[0062] The audio overdubbing method of the present invention, based on file linked list management, supports unlimited input audio overdubbing and effectively solves problems such as popping sounds and distortion after multiple overdubbing by adding a fade in / out algorithm and a limiter algorithm.

[0063] By adopting the file linked list management strategy, only one file will be read and one file will be written at the same time, which greatly reduces the requirements for storage bandwidth and chip computing power, and significantly shortens the file retrieval time.

[0064] The strategy of adding overdubbing data to the WAV file header is adopted to generate WAV format files during recording or overdubbing. By adding exclusive info data (ID number, type, read-write attributes, timeline start value, timeline end value) to the file header, the file linked list can be reconstructed. There is no need to use additional files to store track information, and the recording status can be restored even in the event of an unexpected power outage.

[0065] An automatic file recycling mechanism is used for overlapping recording areas. When the playback timeline corresponding to the new overlay file completely covers the old overlay file, the old file will be automatically recycled to ensure that the disk will not be filled up even in the case of repeated overlay recording.

[0066] An automatic marge mechanism is used. When all overdubbed audio is played from the beginning, the currently played audio content is written to the marge file. When the overdubbed audio is completely played once, a complete marge file is obtained. Then all other overdubbed files can be recycled to release disk resources.

[0067] The file system is used to store the generated audio files, so the same storage address will not be erased when the file is written, which extends the life of the storage medium. The recorded files can also be easily exported via a USB flash drive, making it convenient for users to perform secondary creation and sharing.

[0068] The present invention also provides an audio overdubbing device based on file link table management. Figure 14As shown, an audio overdubbing device based on file linked list management includes a writing module 1401, a reading module 1402, an overdubbing module 1403, a construction module 1404, and a playing module 1405. The writing module 1401 is used to start recording when there is no data in the recording slot of the Looper device, and to create an initial wav file, and to cyclically read audio frames from the writing buffer and write them into the initial wav file, wherein the writing buffer caches multiple audio frames to be written; the reading module 1402 is used to enter the overdubbing state after the recording stops, and to read audio frames from the initial wav file and write them into the pre-read buffer; the overdubbing module 1403 is used to collect the first overdubbing audio frame and obtain the second overdubbing audio frame from the write pre-read buffer each time the overdubbing is started, and to store the first overdubbing audio frame and the second overdubbing audio frame in the pre-read buffer. The second overwritten audio frame is mixed and overwritten, and the overwritten audio is obtained after the overwriting is completed. The overwritten audio is written to the write buffer to create an overwritten WAV file, and the overwritten audio is read from the write buffer in a loop and written into the overwritten WAV file; a construction module 1404 is used to construct a file list based on the relationship between each recording or overwriting sequence and the time axis, and based on the initial WAV file and the overwritten WAV file obtained from each overwriting; a playback module 1405 is used to play the overwritten audio in the file list according to the relationship between each WAV file and the time axis and in time sequence when looping the overwritten audio.

[0069] The specific limitations of an audio overdubbing device based on file linked list management can be found in the limitations of an audio overdubbing method based on file linked list management described above and will not be further elaborated here. Each module in the aforementioned audio overdubbing device based on file linked list management can be implemented in whole or in part via software, hardware, or a combination thereof. Each of these modules can be embedded in or independent of a processor within a computer device in hardware form, or stored in a computer device memory in software form, allowing the processor to call and execute the corresponding operations of each module.

[0070] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, an audio overdubbing method based on file linked list management according to any of the above embodiments is implemented. The computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic cards, or optical cards. In other words, a storage device includes any medium that can store or transmit information in a readable form by a device (e.g., a computer, a mobile phone), and can be a read-only memory, a disk, or an optical disk, etc.

[0071] An embodiment of the present invention further provides a computer program that runs on a computer. The computer program is used to execute the audio overdubbing method based on file linked list management according to any one of the above embodiments.

[0072] An embodiment of the present invention also provides a computer device, comprising one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more computer programs are configured to execute an audio overdubbing method based on file linked list management in any of the above embodiments.

[0073] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.

Claims

1. An audio overdubbing method based on file linked list management, characterized in that: include: When there is no data in the recording slot of the Looper device, recording is started and an initial WAV file is created. Audio frames are cyclically read from a write buffer and written into the initial WAV file, wherein the write buffer caches multiple audio frames to be written. After the recording stops, the overdubbing state is entered, and the audio frames are read from the initial WAV file and written into the pre-read buffer; Each time overdubbing is started, a first overdubbing audio frame is captured and a second overdubbing audio frame is obtained from the write pre-read buffer, the first overdubbing audio frame and the second overdubbing audio frame are mixed and overdubbed, overdubbing audio is obtained after the overdubbing is completed, the overdubbing audio is written to the write buffer, an overdubbing WAV file is created, and the overdubbing audio is cyclically read from the write buffer and written into the overdubbing WAV file; According to the relationship between each recording or overdubbing sequence and the time axis, and based on the initial WAV file and the overdubbing WAV file obtained by each overdubbing, a file linked list is constructed; When the overdubbed audio in the file link list is played in a loop, the overdubbed audio is played in chronological order according to the relationship between each wav file and the time axis.

2. The audio overdubbing method according to claim 1, wherein: The audio overdubbing method further includes: On the basis of the wav file format of each wav file, a Looper file description block and a Looper sector alignment reservation block of the Looper device are added; Among them, each Looper file description block is used to describe the playback timeline position and file type corresponding to each wav file; The Looper sector alignment reservation block is used to control the data length before DataChunkData to be a set byte so that the sectors are aligned.

3. The audio overdubbing method according to claim 1, wherein: The audio overdubbing method further includes: If it is determined according to the overdubbing sequence that the playback time axis corresponding to the overdubbing WAV file obtained by the new overdubbing completely covers the old overdubbing file, the old overdubbing file is recycled.

4. The audio overdubbing method according to claim 1, wherein: After the step of playing the overdubbed audio in chronological order according to the relationship between each WAV file and the time axis, the method further includes: Write all played overdubbed audio files synchronously to the marge file in the order of playback time, and recycle the wav files in the file list.

5. The audio overdubbing method according to claim 1, wherein: The audio overdubbing method further includes: When starting overdubbing to generate overdubbing WAV files, set LooperFileType to a tentative state in the file header of each overdubbing WAV file; When looping overdubbed audio in the file link list, based on user selection, play the audio frame containing the last overdubbed audio or play the audio frame excluding the last overdubbed audio, wherein the audio frame containing the last overdubbed audio is set to a reused state, and the audio frame excluding the last overdubbed audio is set to a canceled state; If the user chooses to start overdubbing again while playing the audio frame containing the last overdubbing, the overdubbing wav files with LooperFileType in the tentative state will be set to the applied state; If the user chooses to start overdubbing again while playing an audio frame that does not contain the last overdubbing, the overdubbing wav files with LooperFileType in the tentative state will be deleted.

6. The audio overdubbing method according to claim 1, characterized in that: The collecting of the first overdubbed audio frame includes: receiving the collected audio frames to be overdubbed, performing effect algorithm processing on the received audio frames, performing fade-in processing on the audio frames processed by the effect algorithm, and collecting a first overdubbed audio frame from the audio frames processed by the fade-in processing; The mixing and overrecording the first overrecorded audio frame and the second overrecorded audio frame to obtain the overrecorded audio after the overrecording is completed includes: The first overdubbed audio frame and the second overdubbed audio frame are mixed and overdubbed to obtain overdubbed data, and a fade-out process is performed on the overdubbed data to obtain the overdubbed audio according to the fade-out overdubbed data.

7. The audio overdubbing method according to claim 6, characterized in that: The step of obtaining the overdubbed audio according to the overdubbed data after the fade-out process includes: performing a limiter algorithm on the overdubbed data after the fade-out processing to control the amplitude value of the overdubbed data to be less than an amplitude threshold; The overdubbed data processed by the limiter algorithm is used as the overdubbed audio and written into the write buffer.

8. An audio overdubbing device based on file link list management, characterized in that: include: A writing module is used to start recording when there is no data in the recording slot of the Looper device, create an initial WAV file, and cyclically read audio frames from the writing buffer and write them into the initial WAV file, wherein the writing buffer caches multiple audio frames to be written; A reading module is used to enter an overdubbing state after recording stops, and read audio frames from the initial WAV file and write them into a pre-read buffer; an overdubbing module, configured to, each time overdubbing is started, collect a first overdubbing audio frame and obtain a second overdubbing audio frame from the write pre-read buffer, mix and overdub the first overdubbing audio frame and the second overdubbing audio frame, obtain overdubbing audio after the overdubbing is completed, write the overdubbing audio to the write buffer, create an overdubbing WAV file, and cyclically read the overdubbing audio from the write buffer and write it into the overdubbing WAV file; A construction module, configured to construct a file linked list based on the relationship between each recording or overdubbing sequence and the time axis, and based on the initial WAV file and the overdubbing WAV file obtained by each overdubbing; The playing module is used to play the overdubbed audio in the file list in a loop according to the relationship between each wav file and the time axis and in a time sequence.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.