Alpha brainwave music generation method, product, medium and equipment
By mapping and optimizing the feature parameter of multi-channel EEG signals, multi-track Alpha brain wave music is generated, which solves the problem of lack of musicality and audibility of audio in the existing technology, and achieves obvious notation changes and clear rhythms. The effect improves the overall musicality and audibility of brain wave music.
Patent Information
- Application Number
- CN202411224796.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-09-02
AI Technical Summary
In the multi-channel EEG signal processing, the generated audio lacks musicality and audibility, and it is difficult to convey meaningful information. There is a lack of chord structure between notes and notes, and the rhythm is unclear.
By collecting multi-channel EEG signals, extracting Alpha band signals, performing preprocessing and bandpass filtering, dividing them into multiple brain wave signal segments, mapping brain wave characteristic parameters as note characteristic parameters, generating multi-track candidate note sequences, and passing Preset modes and large music datasets optimize pitch combinations to convert to multi-track audio files.
The musicality and audibility of the generated Alpha brain wave music is improved, making the length of notes change significantly, the rhythm is clear, the overall structure is clear, and the chord selection is reasonable, bringing better auditory feeling and improving the efficiency of brain wave music generation.
Smart Images

Figure CN119015567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical care, and in particular to an Alpha brainwave music generation method, product, medium and equipment. Background Art
[0002] Electroencephalogram (EEG) plays a vital role in the field of clinical medicine. Generally speaking, EEG is usually presented in visual forms such as waveforms, so as to achieve in-depth analysis of the characteristics of EEG signals. Some studies have pointed out that converting EEG signals into sounds or even music to make brainwave music can awaken consciousness, reduce stress, and effectively improve the sleep quality of insomniacs. Among them, Alpha waves with a frequency range of 8-12Hz have become the first choice for making brainwave music because they can reflect the state of the brain to a certain extent and are easy to adjust.
[0003] In existing research work, brainwave music generation schemes mainly include two categories. The first method is the direct translation method. Since the frequency of brainwave signals is often outside the audible range of the human ear, this method chooses to directly multiply the frequency domain of the original brainwave signal by a fixed coefficient to increase its frequency to within the hearing threshold of the human ear (20-20000Hz). However, since the original brainwave signal contains a lot of background noise and does not have the structure and characteristics of general music works, the audio generated by this method lacks musicality and is difficult to convey meaningful information. The second method is the most widely used parameter mapping method. This method uses the original value of the data or extracts a part of the characteristic parameters to control important parameters such as pitch and sound intensity of music synthesis. The parameter mapping method can generate more reasonable music works than the direct translation method, but when applied to multi-channel brainwave signals, the multi-track music generated lacks meaningful chord structure between notes, the rhythm is unclear, and the melody interferes with each other, which is difficult to bring a good auditory experience. Summary of the invention
[0004] The purpose of the present invention is to provide an Alpha brainwave music generation method, product, medium and device, which can extract Alpha band brainwave signals to automatically generate multi-track Alpha brainwave music and improve the musicality and audibility of the generated brainwave music.
[0005] To achieve the above object, the present invention provides the following solution.
[0006] In one aspect, the present invention provides an Alpha brainwave music generation method, comprising:
[0007] Collect multi-channel EEG signals according to the standard EEG acquisition method;
[0008] Preprocessing the EEG signal of each channel to obtain the preprocessed EEG signal of each channel;
[0009] Extracting the Alpha band brain wave signal from the pre-processed EEG signal through a bandpass filter and dividing it into brain wave signal segments of a preset length;
[0010] Segment the brain wave signal of each channel into multiple brain wave signal segments;
[0011] Mapping brainwave characteristic parameters of each brainwave signal segment to note characteristic parameters of the corresponding candidate notes, thereby converting the brainwave signal segments of each channel into a candidate note sequence consisting of a plurality of candidate notes; the brainwave characteristic parameters include the length, amplitude and average power of each brainwave signal segment; the note characteristic parameters include the length, pitch and intensity of the candidate notes;
[0012] Grouping multiple channels of the EEG signal, and generating a multi-track candidate note sequence of different voices for each group;
[0013] The pitches of the candidate notes in the multi-track candidate note sequence are adjusted according to a preset mode to obtain an optimized candidate note sequence;
[0014] The pitch combinations in the optimized candidate note sequence are filtered by the pitch combinations in the large symbolic music dataset to obtain the multi-track note sequence to be converted;
[0015] Convert multi-track note sequences into audio files of preset formats to generate multi-track Alpha brainwave music.
[0016] Optionally, preprocessing the EEG signal of each channel to obtain the preprocessed EEG signal of each channel specifically includes:
[0017] The EEG signal of each channel is processed by high-pass filtering, power line noise suppression and artifact removal to obtain the preprocessed EEG signal of each channel.
[0018] Optionally, extracting the Alpha band brain wave signal from the preprocessed electroencephalogram signal by a bandpass filter and dividing it into brain wave signal segments of a preset length specifically includes:
[0019] The Alpha band brain wave signal in the preprocessed EEG signal was extracted by setting a bandpass filter of 8.0-13.0 Hz;
[0020] The Alpha band brainwave signal is divided into 3-5 minute long brainwave signal segments E(t), where t is the sampling time and the last sampling time is recorded as t max .
[0021] Optionally, segmenting the brain wave signal of each channel into a plurality of brain wave signal segments specifically includes:
[0022] The brain wave signal segment E(t) of each channel is divided into N+1 brain wave signal segments E0(t), E1(t), ..., E(t) with a length between p and q. N (t), these N+1 brain wave signal segments E0(t), E1(t), ..., E N The sampling times of (t) in E(t) are t0-t1, t1-t2, ..., t N-1 -t N ,t N -t max ; Among them, the brain wave signal segment E n The length of (t) is T4(t n ), n∈{0,1,2,…,N}; p is the preset shortest sound length; q is the preset longest sound length.
[0023] Optionally, mapping the brainwave characteristic parameters of each brainwave signal segment to the note characteristic parameters of the corresponding candidate note, thereby converting the brainwave signal segment of each channel into a candidate note sequence consisting of a plurality of candidate notes, specifically includes:
[0024] The brain wave signal segment E n (t) length T4(t n ) is mapped to candidate note K n The length of the sound Length(n);
[0025] The brain wave signal segment E n The amplitude Amp(n) of (t) is mapped to the candidate note K n The mapping relationship between the two is Pitch(n)=m*lg(Amp(n))+r, where m and r are predetermined constants.
[0026] The brain wave signal segment E n The average power AP(n) of (t) is mapped to the candidate note K n The mapping relationship between the two is MI(n)=k*lg(AP(n))+l, where k and l are predetermined constants.
[0027] Each brain wave signal segment E n The length, amplitude and average power of (t) are mapped one by one to the corresponding candidate notes K n After the sound length, pitch and intensity are determined, the brain wave signal segment E(t) of each channel is converted into a network consisting of N+1 candidate notes K1, K2, ..., K NA candidate note sequence is composed; several candidate note sequences obtained from multiple channels constitute a multi-track candidate note sequence.
[0028] Optionally, the step of grouping the multiple channels of the EEG signal and generating a multi-track candidate note sequence of a different voice part for each group specifically includes:
[0029] Divide multiple channels of EEG signals into several groups, and the EEG signal fragments of different groups are n (t) Different m and r parameters are applied respectively to generate multi-track candidate note sequences of different parts for each group.
[0030] Optionally, converting the multi-track note sequence into an audio file of a preset format to generate multi-track Alpha brainwave music specifically includes:
[0031] The multi-track note sequence to be converted is converted into symbolic music in MIDI format, and then the symbolic music in MIDI format is synthesized into an audio file in a preset format; the preset format includes wav format and mp3 format.
[0032] On the other hand, the present invention provides a computer program product, including a computer program, which implements the Alpha brainwave music generation method when executed by a processor.
[0033] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the Alpha brainwave music generation method when executed by a processor.
[0034] On the other hand, the present invention provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the Alpha brainwave music generating method.
[0035] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0036] The method of the present invention divides the Alpha band brainwave signal of each channel into a plurality of brainwave signal segments of different lengths according to the inherent trend of the multi-channel electroencephalogram signal; then maps the brainwave characteristic parameters (length, amplitude and average power) of each brainwave signal segment to the note characteristic parameters (sound length, pitch and sound intensity) of the corresponding candidate note, so that the generated Alpha brainwave music is rich in variation in note length and has a distinct rhythm; further grouping the multiple channels of the electroencephalogram signal, generating a multi-track candidate note sequence of different parts for each group, which can make the overall structure of the generated Alpha brainwave music clearer; adjusting the pitch of the candidate note in the multi-track candidate note sequence according to the preset mode, which can make the pitch combination more in line with human auditory perception; filtering the pitch combination in the optimized candidate note sequence through the pitch combination in the large symbolic music data set, which can make full use of the prior knowledge of general music works to optimize the generated candidate note sequence, so that the selection of chords is more reasonable, the harmony between the parts is consistent, which can bring a better auditory perception, and effectively improve the musicality and audibility of the generated brainwave music. In addition, the method of the present invention can automatically extract Alpha band brainwave signals to generate multi-track Alpha brainwave music, effectively improving the efficiency of brainwave music generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 This is a flow chart of the Alpha brainwave music generation method provided by the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] The purpose of the present invention is to provide an Alpha brainwave music generation method, product, medium and device, which can extract Alpha band brainwave signals to automatically generate multi-track Alpha brainwave music and improve the musicality and audibility of the generated brainwave music.
[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] like Figure 1 As shown, the present invention provides an Alpha brainwave music generation method, comprising the following steps 1 to 9.
[0043] Step 1: Collect multi-channel EEG signals according to the standard EEG acquisition method.
[0044] The present invention is a method for extracting Alpha band brainwave signals and generating multi-track Alpha brainwave music by using collected multi-channel EEG signal data. Therefore, it is necessary to first collect multi-channel EEG signals according to a standard EEG collection method.
[0045] Step 2: Preprocess the EEG signal of each channel to obtain the preprocessed EEG signal of each channel.
[0046] For the EEG signal of each channel in the multi-channel, the original EEG record is carefully processed, including preprocessing such as high-pass filtering, power line noise suppression and artifact removal, to obtain the preprocessed EEG signal of each channel.
[0047] Among them, the high-pass filtering process uses a high-pass filter set to 1.0 Hz to filter out the slow potential drift phenomenon in the multi-channel EEG signal data to improve the signal quality.
[0048] Power line noise suppression processing eliminates power line noise interference in EEG signals through a notch filter function set to 50Hz.
[0049] Artifact removal processing uses independent component analysis (ICA) technology to automatically distinguish and remove artifact signals introduced by external factors such as muscle activity.
[0050] Step 3: Extract the Alpha band brain wave signal from the preprocessed EEG signal through a bandpass filter and divide it into brain wave signal segments of a preset length.
[0051] The Alpha band brainwave signal in the preprocessed EEG signal is extracted by a bandpass filter set to 8.0-13.0 Hz; the extracted Alpha band brainwave signal is divided into brainwave signal segments E(t) of a preset length; where t is the sampling time; the total length of E(t), that is, the time of the last sampling, is recorded as t max The length of a single brain wave signal segment E(t) is generally preset to 3-5 minutes, which is similar to the length of a general pop music work, and a different length can be freely selected according to needs.
[0052] Step 4: Segment the brain wave signal of each channel into multiple brain wave signal segments.
[0053] In music works, the lengths of various notes usually have a multiple relationship, for example, the length of a quarter note is twice that of an eighth note and four times that of a sixteenth note, thus giving the music a distinct rhythm. In order to make the final generated Alpha brainwave music have the rhythmic characteristics of general music works, the reference length is pre-set, that is, the shortest length of the notes in the generated Alpha brainwave music is set to p, in seconds. The maximum length is also pre-set, that is, the longest length of the notes in the generated Alpha brainwave music is q, in seconds, and is an integer multiple of p.
[0054] Perform polynomial fitting on the Alpha band E(t) of the specified channel, i.e., use a polynomial fitting algorithm (such as the least squares method) to calculate the best fitting polynomial function T1(t) for E(t). T1(t) reflects a certain basic or dominant pattern in the E(t) signal segment, such as a certain physiological rhythm or long-term change in neural activity.
[0055] Calculate the derivative T2(t) of T1(t) at each sampling point (i.e., sampling time) t, and normalize T2(t) at all sampling points, that is, linearly transform it to the range of [0,1] to obtain T3(t), T3(t) = (T2(t)-min(T2)) / (max(T2)-min(T2)); where min(T2) and max(T2) represent the minimum and maximum values of T2(t), respectively.
[0056] Calculate T4(t)=p+(qp)^T3(t), where T4(t) is the length of the brain wave signal segment segmented from sampling time t.
[0057] Starting from sampling time t0=0, the above algorithm is repeatedly applied to recursively calculate t1=t0+T4(t0), t2=t1+T4(t1), ..., t N =t N-1 +T4(t N-1 ). Where t i is the sampling point position for segmenting the brain wave signal E(t). N is the number of increasing sequences t in the recursive calculation process. i , just enough to make t i Less than t max And t i+1 Greater than or equal to t max Therefore, E(t) can be divided into the sampling times of the original EEG signal segments E(t) as t0-t1, t1-t2, ..., t N-1-t N ,t N -t max N+1 segments E0(t), E1(t), ..., E N (t). These segments are not necessarily of equal length. n (t), the length of n∈{0,1,2,…,N} is T4(t n ).
[0058] Step 5: Map the brainwave feature parameters of each brainwave signal segment to the note feature parameters of the corresponding candidate note, thereby converting the brainwave signal segment of each channel into a candidate note sequence consisting of multiple candidate notes.
[0059] Each brain wave signal segment E segmented in step 4 n (t) are all related to a candidate note K n One-to-one correspondence. Follow the steps below to convert E n The brainwave characteristic parameters (such as length, amplitude and average power) of (t) are mapped to candidate notes K n The note characteristic parameters (such as note length, pitch and intensity) are obtained. The step 5 specifically comprises:
[0060] Step 5.1: Convert the brain wave signal segment E n (t) length T4(t n ) is mapped to candidate note K n The length of the sound is Length(n).
[0061] Note the candidate note K n The length of the sound is Length(n), which is equal to the brain wave signal segment E n (t) length T4(t n ), that is, Length(n)=T4(t n ).
[0062] Step 5.2: Convert the brain wave signal segment E n The amplitude Amp(n) of (t) is mapped to the candidate note K n The mapping relationship between the two is Pitch(n)=m*lg(Amp(n))+r, where m and r are predetermined constants.
[0063] Note the candidate note K n The pitch of the sound is Pitch(n), and the value of Pitch(n) is the value representing the pitch in the Musical Instrument Digital Interface (MIDI), that is, an integer ranging from 1 to 127. nThe amplitude of (t) is recorded as Amp(n), which represents the distance from the bottom to the peak of a wave in an event. The mapping relationship between the two is established: Pitch(n) = m*lg(Amp(n)) + r. Among them, m and r are predetermined constants in order to map the pitch to a suitable distribution interval [Pitch min ,Pitch max ], the values of m and r can be adjusted freely as needed. min is the minimum value among Pitch(0), Pitch(1), ..., Pitch(N); max It is the maximum value among Pitch(0), Pitch(1), ..., Pitch(N).
[0064] Step 5.3: Convert the brain wave signal segment E n The average power AP(n) of (t) is mapped to the candidate note K n The mapping relationship between the two is MI(n)=k*lg(AP(n))+l, where k and l are predetermined constants.
[0065] Note the candidate note K n The sound intensity is MI(n), and the value of MI(n) is the value representing the sound intensity in MIDI, that is, an integer ranging from 1 to 127. Brain wave signal segment E n The average power of (t) is recorded as AP(n). Based on the scaling property relationship, a mapping relationship between the two is established: MI(n) = k*lg(AP(n))+l. Where k and l are predetermined constants to map the sound intensity to a suitable distribution interval [MI min ,MI max ], the values of k and l can be adjusted freely as needed. min is the minimum value among MI(0), MI(1), ..., MI(N); MI max It is the maximum value among MI(0), MI(1), ..., MI(N).
[0066] According to step 4 and step 5, the Alpha band EEG signal segment E(t) of the specified channel is first divided into segments E0(t), E1(t), ..., E N (t), and then each brain wave signal segment E n The length, amplitude and average power of (t) are mapped one by one to the corresponding candidate notes K n The characteristics of the sound length, pitch and sound intensity are finally converted into N+1 candidate notes K1, K2, ..., K NFor EEG signal data composed of multiple channels, steps 4 to 5 are applied to the Alpha band EEG signal of each channel respectively to obtain a multi-track candidate note sequence composed of several candidate note sequences.
[0067] Step 6: Group multiple channels of the EEG signal, and generate a multi-track candidate note sequence of different parts for each group.
[0068] In order to better meet the characteristics of general music works composed of multiple parts, the multiple channels of EEG signals are divided into several groups, and the EEG signal segments of different groups are n (t) Different m and r parameters are applied respectively to form several different parts, thereby generating a multi-track candidate note sequence of different parts for each group. Taking 20-channel EEG signal data as an example, it can be divided into 4 groups, each containing 5 channels, and each group is assigned different parameters m and r. Then the generated candidate note sequence is a multi-track candidate note sequence of four parts.
[0069] Step 7: Adjust the pitches of the candidate notes in the multi-track candidate note sequence according to the preset mode to obtain an optimized candidate note sequence.
[0070] The pitch combination of the multi-track candidate note sequence generated by the above steps is often not consistent with human auditory perception, so the following method is used to optimize it: according to the preset mode, the candidate note K n The pitch of the candidate note is adjusted to obtain the optimized candidate note sequence. Taking the C major scale as an example, it contains seven basic pitches: C, D, E, F, G, A, and B. If the pitch in the candidate note sequence belongs to one of them, it remains unchanged. Otherwise, it is adjusted according to the stability order of C, G, E, F, A, D, and B in the major scale according to the nearest and most stable principles. For example, if the calculated candidate note pitch is #D, it is filtered according to C major. Since #D is not among the seven basic pitches, it needs to be adjusted; according to the nearest principle, the pitches closest to #D are D and E, which are semitones lower and higher than #D respectively; according to the most stable principle, since E is more stable, #D is adjusted to E.
[0071] Step 8: Filter the pitch combinations in the optimized candidate note sequence through the pitch combinations in the large symbolic music dataset to obtain the multi-track note sequence to be converted.
[0072] This step 8 performs screening and filtering of candidate note sequences, aiming to select a series of notes that best conform to music theory and human auditory perception from the optimized candidate note sequences to form a multi-track note sequence, and then perform the next step of conversion. Specifically, the multi-track candidate note sequence generated by all channels can be regarded as a mixture of a part of meaningful note events and noise. By analyzing large symbolic music datasets (such as GiantMIDI-Piano and other large-scale open source datasets), the utilization rate of all different pitch combinations is obtained, where the pitch combination at a certain time point refers to a combination composed of the pitches of all the notes existing at that time point; for example, if there are two notes at a certain time point, and their respective pitches are C4 and #D4, then (C4, #D4) is the pitch combination at that time point. The utilization rate of a pitch combination is the proportion of the duration of the pitch combination in the selected symbolic music dataset to the total duration of the entire symbolic music dataset.
[0073] The more different pitch types a pitch combination contains, the more complex and unique it appears to the auditory sense, but correspondingly, the less likely it is to appear in data sets and actual use; on the contrary, pitch combinations that only contain fewer pitch types often show extremely high usage rates, but a large number of repeated appearances in the same work can easily make the audience feel bored. Therefore, the present invention removes pitch combinations that contain pitch types above the highest threshold (for example, more than 10) and removes pitch combinations that only contain pitch types below the lowest threshold (for example, less than 3) from the usage rate list of different pitch combinations obtained by analysis. Subsequently, the remaining pitch combinations are sorted in order from large to small according to the number of pitch types contained in the pitch combinations, and for pitch combinations containing the same number of pitch types, they are sorted in order from high to low in usage rate. The above method obtains a list of pitch combinations arranged in descending order of the number of pitch types and in descending order of usage rate, and these pitch combinations are recorded as sets PC1, PC2, ..., PC4, ..., PC5, ..., PC6, ..., PC7, ..., PC8, ..., PC9, ..., PC10, ..., PC11, ..., PC12, ..., PC13, ..., PC14, ..., PC15, ..., PC16, ..., PC17, ..., PC18, ..., PC19, ..., PC20, ..., PC21, ..., PC22, ..., PC30, ..., PC41, ..., PC51, ..., PC61, ..., PC72, ..., PC83, ..., PC19, ..., PC21, ..., PC11, ..., PC21, ..., PC31, ..., PC41, ..., PC51, ..., PC61, ... H , H is the total number of pitch combinations in the pitch combination list, and the elements in the set are the pitch types it contains.
[0074] For the multi-track candidate note sequence adjusted in step 7, the pitch combination at sampling point t is recorded as set PC(t), and the elements in the set are the pitch types it contains. Search from top to bottom in the above pitch combination list in the order of arrangement until the first one that satisfies The PC of the pitch combination h∈{0,1,2,…,H} h , then it is recorded as PCR(t), that is, PCR(t) = PC h ; If the entire pitch combination list is searched and no pitch combination that meets the requirements is found, then By applying the above method to all sampling points and replacing the original pitch combination PC(t) with the obtained pitch combination PCR(t), a multi-track note sequence filtered by the pitch combination list obtained from the analysis of a large symbolic music data set can be generated and used as the multi-track note sequence to be converted. The filtered multi-track note sequence is composed of pitch combinations with relatively high usage rates and relatively reasonable structures, which can bring a better auditory experience. At the same time, all pitch combinations after filtering are subsets of the original pitch combinations before filtering, which retains the characteristics of the original brain wave signal to a certain extent.
[0075] Step 9: Convert the multi-track note sequence into an audio file of a preset format to generate multi-track Alpha brainwave music.
[0076] The multi-track note sequence obtained in step 8 is converted into symbolic music in MIDI format through relevant tools (such as the mne toolkit based on the Python programming language), and then the symbolic music in MIDI format is synthesized into an audio file in a specified format (such as wav format or mp3 format) through relevant tools (such as the midi2audio toolkit based on the Python programming language), thereby obtaining the required multi-track Alpha brainwave music.
[0077] Compared with the prior art, the multi-track Alpha brainwave music generated by the method of the present invention using multi-channel Alpha brainwave signals is more audible and more in line with human aesthetic experience. Among them, step 4 divides the EEG signal into segments of varying lengths according to the trend of the EEG signal itself, and then maps the segmented EEG signal segments into notes in step 5, which can make the generated Alpha brainwave music rich in variation in note length and distinct in rhythm. Step 6 groups the multi-channel EEG signals and applies different parameters to form voice parts, which can make the overall structure of the generated Alpha brainwave music clearer. Step 7 adjusts the pitch of the candidate notes in the multi-track candidate note sequence according to the preset mode, so that the pitch combination is more in line with human auditory perception. Step 8 filters the multi-track candidate note sequence according to the pitch combination weight calculated from the large symbolic music data set, which can make full use of the prior knowledge of general music works to optimize the generated candidate note sequence, make the selection of chords more reasonable, and the harmony between the voice parts can bring a better auditory experience, effectively improving the musicality and audibility of the generated brainwave music.
[0078] In some embodiments, the present invention also provides a computer program product, including a computer program, which implements the Alpha brainwave music generation method when executed by a processor.
[0079] In some embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the Alpha brainwave music generation method when executed by a processor.
[0080] In some embodiments, the present invention also provides a computer device, which includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the Alpha brainwave music generation method can be implemented.
[0081] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for generating Alpha brainwave music, characterized in that: include: Collect multi-channel EEG signals according to the standard EEG acquisition method; Preprocessing the EEG signal of each channel to obtain the preprocessed EEG signal of each channel; Extracting the Alpha band brain wave signal from the pre-processed EEG signal through a bandpass filter and dividing it into brain wave signal segments of a preset length; Segment the brain wave signal of each channel into multiple brain wave signal segments; Mapping brainwave characteristic parameters of each brainwave signal segment to note characteristic parameters of the corresponding candidate notes, thereby converting the brainwave signal segments of each channel into a candidate note sequence consisting of a plurality of candidate notes; the brainwave characteristic parameters include the length, amplitude and average power of each brainwave signal segment; the note characteristic parameters include the length, pitch and intensity of the candidate notes; Grouping multiple channels of the EEG signal, and generating a multi-track candidate note sequence of different voices for each group; The pitches of the candidate notes in the multi-track candidate note sequence are adjusted according to a preset mode to obtain an optimized candidate note sequence; The pitch combinations in the optimized candidate note sequence are filtered by the pitch combinations in the large symbolic music dataset to obtain the multi-track note sequence to be converted; Convert multi-track note sequences into audio files of preset formats to generate multi-track Alpha brainwave music.
2. The Alpha brainwave music generation method according to claim 1, characterized in that: The preprocessing of the EEG signal of each channel to obtain the preprocessed EEG signal of each channel specifically includes: The EEG signal of each channel is processed by high-pass filtering, power line noise suppression and artifact removal to obtain the preprocessed EEG signal of each channel.
3. The Alpha brainwave music generation method according to claim 1, characterized in that: The extracting of the Alpha band brain wave signal in the preprocessed EEG signal by a bandpass filter and dividing the signal into brain wave signal segments of a preset length specifically includes: The Alpha band brain wave signal in the preprocessed EEG signal was extracted by setting a bandpass filter of 8.0-13.0 Hz; The Alpha band brainwave signal is divided into 3-5 minute long brainwave signal segments E(t), where t is the sampling time and the last sampling time is recorded as t max .
4. The method for generating Alpha brainwave music according to claim 3, characterized in that: The segmenting of the brain wave signal of each channel into a plurality of brain wave signal segments specifically includes: The brain wave signal segment E(t) of each channel is divided into N+1 brain wave signal segments E0(t), E1(t), ..., E(t) with a length between p and q. N (t), these N+1 brain wave signal segments E0(t), E1(t), ..., E N The sampling times of (t) in E(t) are t0-t1, t1-t2, ..., t N-1 -t N ,t N -t max ; Among them, the brain wave signal segment E n The length of (t) is T4(t n ), n∈{0,1,2,…,N}; p is the preset shortest sound length; q is the preset longest sound length.
5. The Alpha brainwave music generation method according to claim 4, characterized in that: The step of mapping the brain wave characteristic parameters of each brain wave signal segment to the note characteristic parameters of the corresponding candidate notes, thereby converting the brain wave signal segments of each channel into a candidate note sequence consisting of a plurality of candidate notes, specifically includes: The brain wave signal segment E n (t) length T4(t n ) is mapped to candidate note K n The length of the sound Length(n); The brain wave signal segment E n The amplitude Amp(n) of (t) is mapped to the candidate note K n The mapping relationship between the two is Pitch(n)=m*lg(Amp(n))+r, where m and r are predetermined constants. The brain wave signal segment E n The average power AP(n) of (t) is mapped to the candidate note K n The mapping relationship between the two is MI(n)=k*lg(AP(n))+l, where k and l are predetermined constants. Each brain wave signal segment E n The length, amplitude and average power of (t) are mapped one by one to the corresponding candidate notes K n After the sound length, pitch and intensity are determined, the brain wave signal segment E(t) of each channel is converted into a network consisting of N+1 candidate notes K1, K2, ..., K N A candidate note sequence is composed; several candidate note sequences obtained from multiple channels constitute a multi-track candidate note sequence.
6. The method for generating Alpha brainwave music according to claim 5, characterized in that: The method of grouping the multiple channels of the EEG signal and generating a multi-track candidate note sequence of different parts for each group specifically includes: Divide multiple channels of EEG signals into several groups, and the EEG signal fragments of different groups are n (t) Different m and r parameters are applied respectively to generate multi-track candidate note sequences of different parts for each group.
7. The Alpha brainwave music generation method according to claim 1, characterized in that: The method of converting a multi-track note sequence into an audio file of a preset format to generate multi-track Alpha brainwave music specifically includes: The multi-track note sequence to be converted is converted into symbolic music in MIDI format, and then the symbolic music in MIDI format is synthesized into an audio file in a preset format; the preset format includes wav format and mp3 format.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the Alpha brainwave music generation method described in any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the Alpha brainwave music generation method described in any one of claims 1 to 7 is implemented.
10. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the Alpha brainwave music generation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Music brain electricity analytical method
CN101015451A
Brain wave music generation method
CN102999701A
Intelligent sleep aid system based on electroencephalogram monitoring and sleep headphone thereof
CN109999314A
Intelligent brainwave music earphone capable of realizing interconnection and interaction
CN113143289A
Conditional music theme melody automatic generation method and system based on Transform
CN115762449A
Cited By
Music generation method, device and equipment based on electroencephalogram signals and storage medium
CN119701158A
Brain wave sleep-aiding music generation method and device capable of adjusting sleep state, equipment and medium
CN119770062A
