CN110930970B - Music chord generating device and method based on signal triggering - Google Patents

Music chord generating device and method based on signal triggering Download PDF

Info

Publication number
CN110930970B
CN110930970B CN201911222223.1A CN201911222223A CN110930970B CN 110930970 B CN110930970 B CN 110930970B CN 201911222223 A CN201911222223 A CN 201911222223A CN 110930970 B CN110930970 B CN 110930970B
Authority
CN
China
Prior art keywords
module
time
result
generating device
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911222223.1A
Other languages
Chinese (zh)
Other versions
CN110930970A (en
Inventor
艾瑞克
张雪芹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Gwantsi Cultural Transmission Co ltd
Original Assignee
Shanghai Gwantsi Cultural Transmission Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Gwantsi Cultural Transmission Co ltd filed Critical Shanghai Gwantsi Cultural Transmission Co ltd
Priority to CN201911222223.1A priority Critical patent/CN110930970B/en
Publication of CN110930970A publication Critical patent/CN110930970A/en
Application granted granted Critical
Publication of CN110930970B publication Critical patent/CN110930970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/0008Associated control or indicating means
    • G10H1/0025Automatic or semi-automatic music composition, e.g. producing random music, applying rules from music theory or modifying a musical piece
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/32Constructional details
    • G10H1/34Switch arrangements, e.g. keyboards or mechanical switches specially adapted for electrophonic musical instruments
    • G10H1/342Switch arrangements, e.g. keyboards or mechanical switches specially adapted for electrophonic musical instruments for guitar-like instruments with or without strings and with a neck on which switches or string-fret contacts are used to detect the notes being played
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/36Accompaniment arrangements
    • G10H1/38Chord

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

The invention provides a musical chord generating device and a method based on signal triggering, which relate to the technical field of musical chord generation and comprise the following steps: the sensing modules are connected with the strings, detect real-time state data of the strings and generate trigger signals; the trigger signal comprises a first number of the sensing module and a second number of the string; the sub-controller is used for searching according to the first number and the second number and outputting a third number of the sub-controller and the total number of the strings; the master controller starts timing when starting working and outputs a timing result when receiving a search result; calculating a chord corresponding to the timing result and a note corresponding to the chord; matching the virtual musical instrument according to the total number of the strings; generating control instructions according to the notes and the virtual musical instrument; and the playing module plays notes corresponding to the virtual musical instrument according to the control instruction. The invention can play by simply plucking the strings, and the played music can keep the chord effect at any time without professional playing technology and skill.

Description

Music chord generating device and method based on signal triggering
Technical Field
The invention relates to the technical field of musical chord generation, in particular to a musical chord generation device and method based on signal triggering.
Background
Chords, a concept on music theory, refer to a set of sounds of a certain musical interval relationship. Three or more tones are combined in the longitudinal direction in a three-degree superimposed relationship to form a chord. There are generally concepts of three chords (chords of three tones), seven chords (chords of four tones), nine chords, etc., among which common chords are for example C, dm, am, F, G, etc. The chord formed according to the relationship of three-degree musical intervals is widely adopted because the tone of each tone keeps certain tension, the sound is coordinated and plump and accords with the natural rule of overtones.
In the prior art, when people use musical instruments to play, taking guitar as an example, a long time is usually required to master the pressing method of more chords and the switching between chords, and the arrangement of the chords of each song is often required to be mastered in a long time, so that a certain music theory knowledge reserve and the musical instrument use capability are required, and people who are not trained by professional musical instruments and are deficient in the aspects of tone, rhythm and music feel cannot play corresponding musical chords, so that the existing musical instruments cannot meet the demands of most people.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a musical chord generating device based on signal triggering, wherein a plurality of strings are arranged in the musical chord generating device, and the musical chord generating device further comprises:
the sensing modules are respectively and correspondingly connected with a plurality of strings, and are used for detecting real-time state data of the connected strings, generating corresponding trigger signals when the real-time state data indicate that the strings are touched and outputting the trigger signals, and the strings connected with the same sensing module form a string group;
each of the sensing modules has a first number, each string has a second number for indicating the ordering of the strings within the string set, and the trigger signal includes the first number and the second number;
each of the strings also has a total number for indicating the ordering of the strings among all strings;
each sub-controller is correspondingly connected with a plurality of sensing modules respectively, and each sub-controller is provided with a corresponding third number;
each of the sub-controllers includes, in particular:
the data storage unit is used for generating a corresponding relation library in advance, and the corresponding relation library stores the mutual corresponding relation among the first number, the second number, the third number and the total number;
The data retrieval unit is connected with the data storage unit and is used for receiving the trigger signal, retrieving the corresponding third number and the corresponding total number according to the trigger signal and outputting the third number and the total number in a retrieval result;
a master controller connected to at least one of the sub-controllers, the master controller comprising:
the data receiving module is used for receiving the search result, generating a corresponding receiving signal according to the search result and outputting the corresponding receiving signal;
the timing module is connected with the data receiving module and is used for starting timing when the music chord generating device starts working and outputting a corresponding timing result when receiving the receiving signal;
the storage module specifically comprises:
a first storage unit for storing a plurality of music pieces with preset storage sequence and chords corresponding to the music pieces arranged according to the music composing sequence;
the second storage unit is used for storing the one-to-one correspondence between the total number of each string and a plurality of preset virtual musical instruments;
the first processing module is respectively connected with the timing module and the storage module and is used for calculating the chord corresponding to the currently touched string according to the timing result and the preset duration of each music piece;
The second processing module is connected with the first processing module and is used for correspondingly processing the chords to obtain notes corresponding to the currently touched strings;
the third processing module is connected with the storage module and is used for matching and obtaining the corresponding virtual musical instrument in the storage module according to the total number corresponding to the currently touched string included in the search result and outputting the virtual musical instrument;
the control module is respectively connected with the second processing module and the third processing module and is used for generating and outputting corresponding control instructions according to the notes and the virtual musical instrument;
the playing module is connected with the master controller, and the master controller outputs the control instruction to the playing module so as to control the playing module to play the notes corresponding to the virtual musical instrument;
the playing module continuously plays the notes so as to play the preset music piece in the continuous operation process of the user on the music chord generating device.
Preferably, the overall controller further includes a heartbeat sound control module connected to the data receiving module, and the heartbeat sound control module specifically includes:
the first timing unit is used for starting timing every time the received signal is received and continuously outputting a first real-time timing result;
The first comparing unit is connected with the first timing unit and is used for continuously receiving the first timing result, comparing the first real-time timing result with a preset first time threshold value, outputting a corresponding first comparing result when the first real-time timing result is larger than the first time threshold value, and outputting a corresponding second comparing result when the first real-time timing result is not larger than the first time threshold value;
the first control unit is connected with the first comparison unit and is used for generating a corresponding first control instruction according to the first comparison result so as to control the playing module to play the heartbeat sound and gradually increase the playing interval time of the heartbeat sound;
the second control unit is connected with the first comparison unit and is used for generating a corresponding second control instruction according to the second comparison result so as to control the playing module to play the heartbeat sound and gradually shorten the playing interval time of the heartbeat sound;
the first detection unit is connected with the first control unit and is used for detecting the playing interval time in real time and outputting a corresponding first detection result when detecting that the playing interval time is not smaller than a preset interval time threshold value;
And the third control unit is connected with the first detection unit and is used for generating a corresponding third control instruction according to the first detection result so as to control the playing module to stop playing the heartbeat sound.
Preferably, the first control unit gradually increases the play interval time of the heartbeat sound in such a manner that the play interval time of the heartbeat sound increases by 2 ms every 100 ms.
Preferably, the second control unit shortens the play interval time of the heartbeat sound by 0.5% each time the reception signal is received, thereby gradually shortening the play interval time of the heartbeat sound.
Preferably, the master controller further includes a heartbeat lamp control module connected to the data receiving module, and the heartbeat lamp control module specifically includes:
the second timing unit is used for starting timing every time the received signal is received and continuously outputting a third real-time timing result;
the second comparing unit is connected with the second timing unit and is used for continuously receiving the third real-time timing result, comparing the third real-time timing result with a preset second time threshold, outputting a corresponding third comparing result when the third real-time timing result is larger than the second time threshold, and outputting a corresponding fourth comparing result when the first real-time timing result is not larger than the second time threshold;
The fourth control unit is connected with the second comparison unit and is used for generating a corresponding fourth control instruction according to the third comparison result so as to control a heartbeat lamp of a light module connected with the master controller to flash, and the flash interval time of the heartbeat lamp is gradually increased;
the fifth control unit is connected with the second comparison unit and is used for generating a corresponding fifth control instruction according to the fourth comparison result so as to control the heartbeat lamp of the light module to flash and gradually shorten the flashing interval time of the heartbeat lamp;
the second detection unit is connected with the fourth control unit and is used for detecting the flicker interval time in real time and outputting a corresponding second detection result when the flicker interval time is detected to be not smaller than a preset flicker interval time threshold value;
and the sixth control unit is connected with the second detection unit and is used for generating a corresponding sixth control instruction according to the second detection result and controlling the heartbeat lamp of the light module to flash so as to present the breathing lamp effect.
Preferably, the fourth control unit gradually increases the blinking interval time of the heartbeat lamp in such a manner that the blinking interval time of the heartbeat lamp increases by 2 ms every 100 ms.
Preferably, the fifth control unit shortens the blinking interval time of the heartbeat lamp by 0.5% each time the reception signal is received, thereby gradually shortening the playing interval time of the heartbeat sound.
Preferably, the overall controller further includes an initialization module connected to the heartbeat lamp control module, and the initialization module specifically includes:
the starting detection unit is used for generating and outputting a corresponding starting signal when detecting that a main switch of the music chord generating device is started;
the calibration control unit is connected with the opening detection unit and is used for generating corresponding sensing calibration instructions according to the opening signals and sending the sensing calibration instructions to the sub-controllers so as to calibrate the sensing modules connected with the sub-controllers;
and the sleep display unit is connected with the starting detection unit and is used for generating a corresponding sleep display instruction according to the starting signal and sending the instruction to the heartbeat lamp control module, and controlling the heartbeat lamp of the light module to flash so as to present the breathing lamp effect.
Preferably, the string is a capacitive touch trigger.
The music chord generating method based on signal triggering is applied to the music chord generating device based on signal triggering, and specifically comprises the following steps:
Step S1, each sensing module of the musical chord generating device detects real-time state data of each string correspondingly connected in real time, generates corresponding trigger signals when the real-time state data indicate that the strings are touched, and sends the trigger signals to a sub-controller correspondingly connected with the sensing module;
step S2, the sub-controller of the musical chord generating device searches a pre-generated corresponding relation library to obtain a third number and the total number according to the trigger signal, and the third number and the total number are included in a search result, and the search result is sent to a connected total controller;
step S3, the master controller of the musical chord generating device receives the search result and generates a corresponding receiving signal according to the search result;
step S4, the master controller of the musical chord generating device starts timing when the musical chord generating device starts working, and outputs a corresponding timing result when receiving the receiving signal;
step S5, the master controller of the musical chord generating device calculates and obtains the chord corresponding to the string which is touched currently according to the timing result and the preset duration of each musical piece, a plurality of musical pieces which are stored in advance and have preset storage sequences, and the chord corresponding to each musical piece which is arranged according to the music composing sequence;
Step S6, the master controller of the musical chord generating device carries out corresponding processing on the chords to obtain notes corresponding to the currently touched strings;
step S7, the master controller of the musical chord generating device matches the preset total number with a plurality of preset virtual musical instruments according to the total number of the currently touched string included in the search result to obtain the corresponding virtual musical instrument;
step S8, the master controller of the musical chord generating device generates corresponding control instructions according to the notes and the virtual musical instrument, and sends the control instructions to a playing module connected with the master controller;
step S9, the playing module of the musical chord generating device plays the notes corresponding to the virtual musical instrument according to the control instruction.
Preferably, before executing the step S1, the method further includes:
a1, when detecting that a main switch of the music chord generating device is turned on, the main controller of the music chord generating device generates a corresponding turning-on signal and outputs the corresponding turning-on signal;
step A2, the master controller of the musical chord generating device generates corresponding sensing calibration instructions according to the starting signals and sends the corresponding sensing calibration instructions to the sub-controllers so as to calibrate the sensing modules connected with the sub-controllers;
And A3, the master controller of the music chord generating device generates a corresponding sleep display instruction according to the starting signal and sends the sleep display instruction to the heartbeat lamp control module, and controls the heartbeat lamp of the light module to flash so as to present a breathing lamp effect.
Preferably, after executing the step S3, the method further includes:
step B1, the master controller of the musical chord generating device starts timing every time the receiving signal is received, and continuously outputs a first real-time timing result;
step B2, the master controller of the musical chord generating device continuously receives the first real-time timing result and compares the first real-time timing result with a preset first time threshold value:
if the first real-time timing result is greater than the first time threshold, outputting a corresponding first comparison result, and then turning to step B3,
if the first real-time timing result is not greater than the first time threshold, outputting a corresponding second comparison result, and then turning to the step B4;
step B3, the master controller of the musical chord generating device generates a corresponding first control instruction according to the first comparison result so as to control the playing module to play the heartbeat sound and gradually increase the playing interval time of the heartbeat sound, and then the step B5 is performed;
Step B4, the master controller of the musical chord generating device generates a corresponding second control instruction according to the second comparison result so as to control the playing module to play the heartbeat sound, gradually shorten the playing interval time of the heartbeat sound and then exit;
step B5, the master controller of the musical chord generating device detects the playing interval time in real time and compares the playing interval time with a preset interval time threshold value:
if the playing interval time is smaller than the interval time threshold value, returning to the step A3;
if the playing interval time is not smaller than the interval time threshold, outputting a corresponding first detection result, and then turning to the step B6;
and step B6, the master controller of the musical chord generating device generates a corresponding third control instruction according to the first detection result so as to control the playing module to stop playing the heartbeat sound.
Preferably, after executing the step S3, the method further includes:
step C1, the master controller of the musical chord generating device starts timing when receiving the receiving signal each time, and continuously outputs a third real-time timing result;
Step C2, the master controller of the musical chord generating device continuously receives the third real-time timing result, and compares the third real-time timing result with a preset second time threshold value:
if the third real-time timing result is greater than the second time threshold, outputting a corresponding third comparison result, and then turning to the step C3;
if the first real-time timing result is not greater than the second time threshold, outputting a corresponding fourth comparison result, and then turning to the step C4;
step C3, the master controller of the musical chord generating device generates a corresponding fourth control instruction according to the third comparison result so as to control a heartbeat lamp of a light module connected with the master controller to flash, and gradually increase the flashing interval time of the heartbeat lamp;
step C4, the master controller of the music chord generating device generates a corresponding fifth control instruction according to the fourth comparison result so as to control the heartbeat lamp of the light module to flash and gradually shorten the flashing interval time of the heartbeat lamp;
step C5, the total controller of the musical chord generating device detects the flicker interval time in real time, and compares the flicker interval time with a preset flicker interval time threshold value:
If the flicker interval time is smaller than the flicker interval time threshold, returning to the step C3;
if the flicker interval time is not smaller than the flicker interval time threshold, outputting a corresponding second detection result, and then turning to the step C6;
and step C6, the master controller of the music chord generating device generates a corresponding sixth control instruction according to the second detection result, and controls the light module to flash so as to present a breathing lamp effect.
The technical scheme has the following advantages or beneficial effects: the music can be played by simply poking the strings, and the played music can keep the chord effect at any time, does not need professional playing technology and skills, and provides a playing platform for operators who are not trained by professional musical instruments and have poor tone, rhythm and music sense.
Drawings
FIG. 1 is a schematic diagram of a musical chord generating device based on signal triggering in a preferred embodiment of the present invention;
FIG. 2 is a flow chart of a method for generating musical chords based on signal triggering in a preferred embodiment of the present invention;
FIG. 3 is a flow chart of a device initialization method according to a preferred embodiment of the invention;
FIG. 4 is a flow chart of a method for controlling heart beat sounds according to a preferred embodiment of the present invention;
fig. 5 is a flowchart of a control method of a heartbeat lamp in a preferred embodiment of the invention.
Detailed Description
The invention will now be described in detail with reference to the drawings and specific examples. The present invention is not limited to the embodiment, and other embodiments may fall within the scope of the present invention as long as they conform to the gist of the present invention.
In a preferred embodiment of the present invention, based on the above-mentioned problems occurring in the prior art, there is now provided a signal-triggered musical chord generating apparatus, as shown in fig. 1, in which a plurality of strings 2 are provided, further comprising:
the sensing device comprises a plurality of sensing modules 1, wherein each sensing module 1 is correspondingly connected with a plurality of strings 2 respectively, and is used for detecting real-time state data of each connected string 2, generating corresponding trigger signals and outputting when the real-time state data indicate that the strings 2 are touched, and a plurality of strings 2 connected with the same sensing module 1 form a string group;
each sensing module 1 has a first number, each string 2 has a second number for indicating the ordering of strings 2 within the string set, and the trigger signal comprises the first number and the second number;
Each string 2 also has a general number for indicating the ordering of strings 2 within all strings;
at least one sub-controller 3, each controller 3 is correspondingly connected with a plurality of sensing modules 1, and each sub-controller 3 is provided with a corresponding third number;
each sub-controller 3 specifically includes:
a data storage unit 31, configured to generate a correspondence library in advance, where the correspondence library stores the mutual correspondence among the first number, the second number, the third number, and the total number;
a data retrieving unit 32, connected to the data storage unit 31, for receiving the trigger signal, retrieving the corresponding third number and total number according to the trigger signal, and outputting the retrieved result;
a master controller 4 connected to the at least one sub-controller 3, the master controller 4 comprising:
the data receiving module 40 is configured to receive the search result, generate a corresponding receiving signal according to the search result, and output the corresponding receiving signal;
a timing module 41 connected to the data receiving module 40, for starting timing when the musical chord generating device starts to operate, and outputting a corresponding timing result when receiving the receiving signal;
the storage module 42, the storage module 42 specifically includes:
a first storage unit 421 for storing a plurality of pieces of music having a preset storage order, and chords corresponding to the pieces of music arranged according to the composition order;
A second storage unit 422 for storing the one-to-one correspondence of the total number of each string with a plurality of virtual musical instruments set in advance;
the first processing module 43 is respectively connected with the timing module 41 and the storage module 42, and is used for calculating and obtaining the chord corresponding to the currently touched string 2 according to the timing result and the preset duration of each music piece;
the second processing module 44 is connected with the first processing module 43, and is used for performing corresponding processing on the chord to obtain a note corresponding to the currently touched string;
the third processing module 45 is connected with the storage module 42, and is used for matching and obtaining corresponding virtual musical instruments in the storage module according to the total number corresponding to the currently touched string included in the search result and outputting the corresponding virtual musical instruments;
the control module 46 is respectively connected with the second processing module 44 and the third processing module 45, and is used for generating and outputting corresponding control instructions according to the notes and the virtual musical instrument;
the playing module 5 is connected with the master controller 4, and the master controller 4 outputs a control instruction to the playing module 5 to control the playing module 5 to play notes corresponding to the virtual musical instrument;
the play module 5 continuously plays notes to play a preset musical composition during the continuous operation of the musical chord generating device by the user.
Specifically, in this embodiment, the musical chord generating apparatus of the present invention has a main switch, when the main switch is turned on, the main controller 4 generates a corresponding sensing calibration instruction to calibrate each sensing module 1, and when no string 2 is touched, the musical chord generating apparatus enters a sleep state, at this time, the main controller 4 generates a corresponding sleep display instruction and sends the sleep display instruction to the heartbeat lamp control module, and controls the heartbeat lamp of the light module 6 to flash correspondingly to present a breathing lamp effect.
When any string 2 is touched, the musical chord generating device is awakened, the string 2 is preferably triggered by capacitive touch, an operator touches any string 2 by using a finger, the sensing module 1 connected with the string 2 senses touch and also senses touch stopping, the sensing module 1 detects real-time state data of each string 2 connected with the sensing module in real time, namely whether the string is currently touched or not, and the real-time state data is transmitted to the sub-controller 3 through an I2C bus, and the sub-controller 3 is preferably a single chip microcomputer. In this embodiment, one single chip microcomputer is preferably connected with 8 sensing modules 1, and each sensing module 1 is preferably connected with 12 strings 2, so that 96 strings can be monitored in a full configuration state of one single chip microcomputer, and if more strings are needed, the number of the single chip microcomputer can be expanded as required.
The sub-controller 3 stores in advance the first numbers corresponding to the sensing modules 1, the second numbers of the strings 2 connected to the sensing modules 1, and a correspondence library between the total number of all strings and each first number and each second number corresponding to the first number. The first number is preferably 0 to 7, the second number is preferably 0 to 11, and the total number is preferably 0 to 95.
Each sub-controller 3 has a third number, after receiving the second number of the touched string 2 and the first number of the sensing module 1 corresponding to the string 2, the sub-controller 3 corresponds to the first number and the second number with the total number, and transmits the third number corresponding to itself and the total number of the string to the total controller 4 connected to the serial port thereof, and the total controller 4 may be a computer.
The overall controller 4 stores therein a plurality of pieces of music having a preset storage order, and chords corresponding to the pieces of music arranged according to the composition order. And starting timing when the musical chord generating device starts working, namely starting timing when a main switch of the musical chord generating device is started, and calculating and obtaining chords corresponding to the timing result according to the timing result and the preset duration of each music piece. For example, song 1, song 2 and song 3 are sequentially stored in the musical chord generating apparatus, the duration of song 1 is 100 seconds, the duration of song 2 is 110 seconds, the duration of song 3 is 120 seconds, and if the timing result is 90 seconds, that is, if string 2 is touched only 90 seconds after the musical chord generating apparatus is turned on, the calculated chord is the chord corresponding to 90 seconds of song 1; if the timing result is 220 seconds, the calculated chord is the chord corresponding to the 10 th second of song 3; if the timing result is 340 seconds, the calculated chord is the chord corresponding to the 10 th second of song 1, and so on.
After obtaining the chord to be output by the string 2, the master controller 4 processes the chord accordingly to obtain the note corresponding to the string 2. Because there are 7 home notes and 5 down notes in each octave of musics, one can choose how to tune any note in a gamut if it is to be a chord. For example n is the total number of the touched strings, n ranges from 0 to 95. When the overall controller 4 receives that n strings are touched, it is only necessary to judge the current chord, and it is possible to calculate what notes should actually be output from the value of n. The specific treatment process is as follows:
1) If the current chord is C, only three notes C, E and G can be output, so the processing method of the C chord is as follows:
the "0" inside k=n× 4+0"+0" is because the C chord is the most basic reference chord position, and the other chords are all plus integers;
if ((k+4)% 12= 0) k=k-1 k is used to represent the note that the string needs to play, find out those 5 th notes where k is only this octave, adapt to the down note;
2) If the current chord is D, only three notes of D, F#, and A can be output, so the D chord processing method is as follows:
The "2" inside k=n×4+2"+2" is that 2 is added because the D chord is two notes higher than the C chord;
if ((k+2)% 12= 0) k=k-1 k is used to represent the note that the string needs to play, find out those 5 th notes where k is only this octave, adapt to the down note;
3) If the current chord is a minor tri-chord, for example Dm, only three notes D, F, and A can be output, so the Dm chord is processed by:
the "2" inside k=n×4+2"+2" is that 2 is added because Dm chord is two notes higher than C chord;
if ((k+2)% 12= 0) k=k-1 k is used to represent the note that the string needs to play, find out the 5 th note that k is only this octave, adapt to the note down;
if ((k-6)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 3 rd home notes where k is only this octave, adapt to down notes;
4) If the current chord is E, only three notes of D, F#, and A can be output, so the D chord processing method is as follows:
the "4" inside k=n×4+4"+4" is that 4 is added because the E chord is four notes higher than the C chord;
if ((k+2)% 12= 0) k=k-1 k is used to represent the note that the string needs to play, find out those 5 th notes where k is only this octave, adapt to the down note;
5) If the current chord is Em, only three notes, E, G, and B, can be output, so the processing method of the Em chord is as follows:
the "4" inside k=n×4+4"+4" is that 4 is added because the Em chord is four notes higher than the C chord;
if ((k+4)% 12= 0) k=k-1 k is used to represent the note that the string needs to play, find out the 5 th note that k is only this octave, adapt to the note down;
if (k12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 3 rd home notes where k is only this octave, adapt to down notes;
6) If the current chord is F, only three notes of F, A and C can be output, so the F chord is processed by the following steps:
the "5" inside k=n×4+5"+5" is that 5 is added because the F chord is five notes higher than the C chord;
if ((k-1)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 5 th notes where k is only this octave, adapt to the down notes;
7) If the current chord is F#, only three notes of F#, A#, and C# can be output, so the F# chord is processed by the following steps:
the "6" inside k=n×4+6"+6" is that 6 is added because the f# chord is six notes higher than the C chord;
if ((k-2)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 5 th notes where k is only this octave, adapt to the down notes;
8) If the current chord is G, only three notes of G, B and D can be output, so the G chord is processed by the following steps:
the "5" inside k=n×4+7"+7" is that 7 is added because the G chord is seven notes higher than the C chord;
if ((k-3)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 5 th notes where k is only this octave, adapt to the down notes;
9) If the current chord is A, only three notes A, C#, and E can be output, so the processing method of the A chord is as follows:
"9" out of k=n×4+9"+9" is 9 added because the a chord is nine notes higher than the C chord;
if ((k-5)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 5 th notes where k is only this octave, adapt to the down notes;
10 If the current chord is Am, only three notes a, C, and E can be output, so the Am chord is processed by:
"9" inside k=n×4+9"+9" is 9 added because the Am chord is nine notes higher than the C chord;
if ((k-1)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 5 th note where k is only this octave, adapt to the note down;
if ((k-5)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 3 rd home notes where k is only this octave, adapt to down notes;
11 If the current chord is Bm, only three notes of B, D, and f# are output, so the Am chord is processed by:
"9" inside k=n×4+11"+11" is that 11 is added because the Bm chord is eleven notes higher than the C chord;
if ((k-3)% 12= 0) k = k-1k is used to represent the notes that the string needs to play, find out those 5 th note where k is only this octave, adapt to the note down;
if ((k+5)% 12= 0) k=k-1 k is used to represent the notes that the string needs to play, find out those 3 rd home notes where k is only this octave, adapt to down notes;
when calculating the note of the current chord output, the overall controller 4 needs to further determine through which virtual musical instrument the note is played. The master controller 4 stores the corresponding relation between the total number of all strings and a plurality of preset virtual musical instruments; such as: the virtual musical instruments corresponding to the numbers 0 to 11 are pianos, and the virtual musical instruments corresponding to the numbers 12 to 15 are guitars and the like; therefore, the overall controller 4 can determine through which virtual musical instrument the notes corresponding to the chords are played, based on the overall number of the touched strings 2, and generate the corresponding control instruction to play the notes corresponding to the virtual musical instrument.
Further, in this embodiment, the communication interface between the overall controller 4 and the sub-controller 3 is an RS-232 serial port on the physical layer, the bit rate is designed to 250000bps, the data bit is 8 bits, the check is set to none, and the stop bit is 1 bit. The overall controller 4 can control the sub-controller 3 in a DTR manner via this serial connection to perform sensor calibration on the sensor module 1. After the calibration is completed, the sub-controller 3 needs to send a piece of READY-X:Y information to the main controller 4, X is the number of the sub-controller 3, and Y is the number of the sensing module 1. The sub-controller 3 needs to send corresponding information to the overall controller when two events occur, these two times being: 1) When the string is touched 2) when the string stops being touched. When the string is touched, the sub-controller 3 needs to send a signal of 'TX: Y-Z' to the master controller, wherein X is the number of the sub-controller, Y is the number of the sensing module 1, and Z is the number of the touched string. When the string stops being touched, the sub-controller needs to send a DX:Y-Z signal to the main controller, wherein X is the number of the sub-controller, Y is the number of the sensing module 1, and Z is the number of the string which stops being touched.
In this embodiment, the mutual communication interface between the master controller 4 and the light module 6 is on the physical layer, the interface is an RS-232 serial interface, the bit rate is designed to 2400bps, the data bit is 8 bits, the check is no, and the stop bit is 1 bit. After the serial connection is initialized, the light module 6 needs to send a piece of Light board ready information to the master controller 4. All communication is thereafter unidirectional, from the overall controller 4 to the light module 6. The overall controller 4 has two commands, each of a binary byte, that can be issued to the light module 6. The description of the individual commands is as follows:
0x00000010 (decimal 2): the sleep effect is shown, which is an effect of a feeling of "full breathing".
0x00000001 (decimal 1): the heartbeat effect is shown, which is a fairly rapid but soft flickering effect. This command byte is followed by a 16-unambi value, i.e., a heartbeat time delay millisecond value.
In the preferred embodiment of the present invention, the overall controller 4 further includes a heartbeat sound control module 47, connected to the data receiving module 40, and the heartbeat sound control module 47 specifically includes:
a first timing unit 471, configured to start timing each time a received signal is received, and continuously output a first real-time timing result;
the first comparing unit 472 is connected to the first timing unit 471, and is configured to continuously receive the first real-time timing result, compare the first real-time timing result with a preset first time threshold, output a corresponding first comparing result when the first real-time timing result is greater than the first time threshold, and output a corresponding second comparing result when the first real-time timing result is not greater than the first time threshold;
the first control unit 473 is connected to the first comparison unit 472 and is configured to generate a corresponding first control instruction according to the first comparison result, so as to control the playing module to play the heartbeat sound and gradually increase the playing interval time of the heartbeat sound;
The second control unit 474 is connected to the first comparison unit 472, and is configured to generate a corresponding second control instruction according to the second comparison result, so as to control the playing module to play the heartbeat sound, and gradually shorten the playing interval time of the heartbeat sound;
the first detection unit 475 is connected to the first control unit 473, and is configured to detect the play interval time in real time, and output a corresponding first detection result when detecting that the play interval time is not less than a preset interval time threshold;
the third control unit 476 is connected to the first detection unit 475, and is configured to generate a corresponding third control instruction according to the first detection result, so as to control the playing module to stop playing the heartbeat sound.
Specifically, in this embodiment, the musical chord generating device of the present invention further plays a corresponding heartbeat sound, the heartbeat sound is not played in the sleep state of the musical chord generating device, in the wake state, the play interval time is adjusted according to the frequency of the plucked string of the operator, after a period of time, the play interval time of the heartbeat sound is gradually increased until the play interval time is increased to a preset play interval time threshold, after the play interval time threshold is reached, the playing of the heartbeat sound is stopped after a period of time, the plucked string is still not plucked.
In a preferred embodiment of the present invention, the first control unit gradually increases the playing interval time of the heartbeat sound in such a manner that the playing interval time of the heartbeat sound every 100 ms increases by 2 ms.
In a preferred embodiment of the present invention, the second control unit shortens the playing interval time of the heartbeat sound by 0.5% each time the receiving signal is received, so as to gradually shorten the playing interval time of the heartbeat sound.
In a preferred embodiment of the present invention, the overall controller 4 further includes a heartbeat lamp control module 48, connected to the data receiving module 40, and the heartbeat lamp control module 48 specifically includes:
a second timing unit 481, configured to start timing each time a received signal is received, and continuously output a third real-time timing result;
a second comparing unit 482 connected to the second timing unit 481, configured to compare the third real-time timing result with a preset second time threshold, and output a corresponding third comparison result when the third real-time timing result is greater than the second time threshold, and output a corresponding fourth comparison result when the first real-time timing result is not greater than the second time threshold;
the fourth control unit 483 is connected to the second comparing unit 482, and is configured to generate a corresponding fourth control instruction according to the third comparing result, so as to control the heartbeat lamp of a light module 6 connected to the master controller to flash, and gradually increase the flash interval time of the heartbeat lamp;
The fifth control unit 484 is connected to the second comparing unit 482, and is configured to generate a corresponding fifth control instruction according to the fourth comparing result, so as to control the heartbeat lamp of the light module 6 to flash, and gradually shorten the flash interval time of the heartbeat lamp;
the second detection unit 485 is connected with the fourth control unit 483 and is used for detecting the flicker interval time in real time and outputting a corresponding second detection result when the flicker interval time is detected to be not smaller than a preset flicker interval time threshold;
the sixth control unit 486 is connected to the second detection unit 485, and is configured to generate a corresponding sixth control instruction according to the second detection result, and control the heartbeat lamp of the light module 6 to flash so as to present a breathing lamp effect.
Specifically, in this embodiment, the musical chord generating apparatus of the present invention is further provided with a heartbeat lamp that exhibits a breathing lamp effect, i.e., a gradually brightening and a gradually darkening effect, in a sleep state of the musical chord generating apparatus, and that adjusts the blinking interval time according to the frequency of operator plucking in an awake state of the musical chord generating apparatus.
In a preferred embodiment of the present invention, the fourth control unit gradually increases the blinking interval time of the heartbeat lamp in such a manner that the blinking interval time of the heartbeat lamp increases by 2 ms every 100 ms.
In a preferred embodiment of the present invention, the fifth control unit shortens the flashing interval time of the heartbeat lamp by 0.5% each time the receiving signal is received, so as to gradually shorten the playing interval time of the heartbeat sound.
In a preferred embodiment of the present invention, the overall controller 4 further includes an initialization module 49, connected to the heartbeat lamp control module 48, and the initialization module 49 specifically includes:
an opening detection unit 491, configured to generate and output a corresponding opening signal when detecting that a main switch of the musical chord generating apparatus is opened;
the calibration control unit 492 is connected to the opening detection unit 491, and is configured to generate a corresponding sensing calibration command according to the opening signal, and send the sensing calibration command to the sub-controller, so as to calibrate each sensing module connected to the sub-controller;
the sleep display unit 493 is connected to the turn-on detection unit 491, and is configured to generate a corresponding sleep display instruction according to the turn-on signal, send the sleep display instruction to the heartbeat lamp control module, and control the heartbeat lamp of the light module 6 to flash to present a breathing lamp effect.
In a preferred embodiment of the invention, the strings 2 are capacitive touch activated.
The signal trigger-based musical chord generating method is applied to the signal trigger-based musical chord generating device in any one of the above, and as shown in fig. 2, the musical chord generating method specifically comprises the following steps:
Step S1, each sensing module of the music chord generating device detects real-time state data of each string correspondingly connected in real time, generates corresponding trigger signals when the real-time state data indicate that the strings are touched, and sends the trigger signals to a sub-controller correspondingly connected with the sensing module;
step S2, the sub-controller of the music chord generating device searches a pre-generated corresponding relation library to obtain a third number and a total number according to the trigger signal, the third number and the total number are included in a search result, and the search result is sent to the connected total controller;
step S3, the master controller of the music chord generating device receives the search result and generates a corresponding receiving signal according to the search result;
step S4, the master controller of the musical chord generating device starts timing when the musical chord generating device starts working, and outputs a corresponding timing result when receiving a receiving signal;
step S5, the total controller of the music chord generating device calculates and obtains the chord corresponding to the currently touched string according to the timing result and the preset duration of each music piece, a plurality of pre-stored music pieces with preset storage sequences and the chords corresponding to each music piece arranged according to the music editing sequence;
Step S6, the master controller of the musical chord generating device carries out corresponding processing on the chords to obtain notes corresponding to the currently touched strings;
step S7, the master controller of the music chord generating device matches the preset total number with a plurality of preset virtual musical instruments according to the total number of the currently touched strings included in the search result to obtain corresponding virtual musical instruments;
step S8, the master controller of the musical chord generating device generates corresponding control instructions according to the notes and the virtual musical instrument, and sends the control instructions to a playing module connected with the master controller;
step S9, the playing module of the music chord generating device plays notes corresponding to the virtual musical instrument according to the control instruction.
In a preferred embodiment of the present invention, as shown in fig. 3, before executing step S1, the method further includes:
step A1, when a master controller of the musical chord generating device detects that a master switch of the musical chord generating device is turned on, generating a corresponding turning-on signal and outputting the corresponding turning-on signal;
step A2, the master controller of the musical chord generating device generates corresponding sensing calibration instructions according to the starting signals and sends the corresponding sensing calibration instructions to the sub-controllers so as to calibrate each sensing module connected with the sub-controllers;
And A3, generating a corresponding sleep display instruction by the master controller of the music chord generating device according to the starting signal, and sending the sleep display instruction to the heartbeat lamp control module, and controlling the heartbeat lamp of the light module to flash so as to present the breathing lamp effect.
In a preferred embodiment of the present invention, as shown in fig. 4, after executing step S3, the method further includes:
step B1, starting timing when the master controller of the musical chord generating device receives a receiving signal each time, and continuously outputting a first real-time timing result;
and B2, continuously receiving a first real-time timing result by the master controller of the musical chord generating device, and comparing the first real-time timing result with a preset first time threshold value:
if the first real-time timing result is greater than the first time threshold, outputting a corresponding first comparison result, and then turning to step B3,
if the first real-time timing result is not greater than the first time threshold, outputting a corresponding second comparison result, and then turning to the step B4;
step B3, the master controller of the music chord generating device generates a corresponding first control instruction according to the first comparison result so as to control the playing module to play the heartbeat sound and gradually increase the playing interval time of the heartbeat sound, and then the step B5 is turned to;
Step B4, the master controller of the music chord generating device generates a corresponding second control instruction according to the second comparison result so as to control the playing module to play the heartbeat sound, gradually shorten the playing interval time of the heartbeat sound and then exit;
step B5, the master controller of the music chord generating device detects the playing interval time in real time and compares the playing interval time with a preset interval time threshold value:
if the playing interval time is smaller than the interval time threshold value, returning to the step A3;
if the playing interval time is not less than the interval time threshold, outputting a corresponding first detection result, and then turning to the step B6;
and step B6, the master controller of the music chord generating device generates a corresponding third control instruction according to the first detection result so as to control the playing module to stop playing the heartbeat sound.
In a preferred embodiment of the present invention, as shown in fig. 5, after executing step S3, the method further includes:
step C1, starting timing when the master controller of the musical chord generating device receives a receiving signal each time, and continuously outputting a third real-time timing result;
step C2, continuously receiving a third real-time timing result by the master controller of the musical chord generating device, and comparing the third real-time timing result with a preset second time threshold value:
If the third real-time timing result is greater than the second time threshold, outputting a corresponding third comparison result, and then turning to the step C3;
if the first real-time timing result is not greater than the second time threshold, outputting a corresponding fourth comparison result, and then turning to the step C4;
step C3, the master controller of the music chord generating device generates a corresponding fourth control instruction according to the third comparison result so as to control the heartbeat lamp of a light module connected with the master controller to flash, and gradually increase the flash interval time of the heartbeat lamp;
step C4, the master controller of the music chord generating device generates a corresponding fifth control instruction according to the fourth comparison result so as to control the heartbeat lamp of the light module to flash and gradually shorten the flash interval time of the heartbeat lamp;
and C5, detecting the flicker interval time in real time by the overall controller of the music chord generating device, and comparing the flicker interval time with a preset flicker interval time threshold value:
if the flicker interval time is smaller than the flicker interval time threshold, returning to the step C3;
if the flicker interval time is not less than the flicker interval time threshold, outputting a corresponding second detection result, and then turning to the step C6;
And C6, the master controller of the music chord generating device generates a corresponding sixth control instruction according to the second detection result, and controls the light module to flash so as to present the breathing lamp effect.
The foregoing description is only illustrative of the preferred embodiments of the present invention and is not to be construed as limiting the scope of the invention, and it will be appreciated by those skilled in the art that equivalent substitutions and obvious variations may be made using the description and drawings, and are intended to be included within the scope of the present invention.

Claims (13)

1. The utility model provides a music chord generating device based on signal trigger which characterized in that is provided with a plurality of strings in the music chord generating device, still includes:
the sensing modules are respectively and correspondingly connected with a plurality of strings, and are used for detecting real-time state data of the connected strings, generating corresponding trigger signals when the real-time state data indicate that the strings are touched and outputting the trigger signals, and the strings connected with the same sensing module form a string group;
each of the sensing modules has a first number, each string has a second number for indicating the ordering of the strings within the string set, and the trigger signal includes the first number and the second number;
Each of the strings also has a total number for indicating the ordering of the strings among all strings;
each sub-controller is correspondingly connected with a plurality of sensing modules respectively, and each sub-controller is provided with a corresponding third number;
each of the sub-controllers includes, in particular:
the data storage unit is used for generating a corresponding relation library in advance, and the corresponding relation library stores the mutual corresponding relation among the first number, the second number, the third number and the total number;
the data retrieval unit is connected with the data storage unit and is used for receiving the trigger signal, retrieving the corresponding third number and the corresponding total number according to the trigger signal and outputting the third number and the total number in a retrieval result;
a master controller connected to at least one of the sub-controllers, the master controller comprising:
the data receiving module is used for receiving the search result, generating a corresponding receiving signal according to the search result and outputting the corresponding receiving signal;
the timing module is connected with the data receiving module and is used for starting timing when the music chord generating device starts working and outputting a corresponding timing result when receiving the receiving signal;
The storage module specifically comprises:
a first storage unit for storing a plurality of music pieces with preset storage sequence and chords corresponding to the music pieces arranged according to the music composing sequence;
the second storage unit is used for storing the one-to-one correspondence between the total number of each string and a plurality of preset virtual musical instruments;
the first processing module is respectively connected with the timing module and the storage module and is used for calculating the chord corresponding to the currently touched string according to the timing result and the preset duration of each music piece;
the second processing module is connected with the first processing module and is used for correspondingly processing the chords to obtain notes corresponding to the currently touched strings;
the third processing module is connected with the storage module and is used for matching and obtaining the corresponding virtual musical instrument in the storage module according to the total number corresponding to the currently touched string included in the search result and outputting the virtual musical instrument;
the control module is respectively connected with the second processing module and the third processing module and is used for generating and outputting corresponding control instructions according to the notes and the virtual musical instrument; the playing module is connected with the master controller, and the master controller outputs the control instruction to the playing module so as to control the playing module to play the notes corresponding to the virtual musical instrument;
The playing module continuously plays the notes so as to play the preset music piece in the continuous operation process of the user on the music chord generating device;
the general controller also comprises an initialization module which is connected with the heartbeat lamp control module, and the initialization module specifically comprises:
the starting detection unit is used for generating and outputting a corresponding starting signal when detecting that a main switch of the music chord generating device is started;
and the calibration control unit is connected with the opening detection unit and is used for generating corresponding sensing calibration instructions according to the opening signals and sending the sensing calibration instructions to the sub-controllers so as to calibrate the sensing modules connected with the sub-controllers.
2. The musical chord generating device based on signal triggering as defined in claim 1, wherein the overall controller further comprises a heartbeat sound control module connected with the data receiving module, the heartbeat sound control module specifically comprises:
the first timing unit is used for starting timing every time the received signal is received and continuously outputting a first real-time timing result;
the first comparing unit is connected with the first timing unit and is used for continuously receiving the first real-time timing result, comparing the first real-time timing result with a preset first time threshold value, outputting a corresponding first comparing result when the first real-time timing result is larger than the first time threshold value, and outputting a corresponding second comparing result when the first real-time timing result is not larger than the first time threshold value;
The first control unit is connected with the first comparison unit and is used for generating a corresponding first control instruction according to the first comparison result so as to control the playing module to play the heartbeat sound and gradually increase the playing interval time of the heartbeat sound;
the second control unit is connected with the first comparison unit and is used for generating a corresponding second control instruction according to the second comparison result so as to control the playing module to play the heartbeat sound and gradually shorten the playing interval time of the heartbeat sound;
the first detection unit is connected with the first control unit and is used for detecting the playing interval time in real time and outputting a corresponding first detection result when detecting that the playing interval time is not smaller than a preset interval time threshold value;
and the third control unit is connected with the first detection unit and is used for generating a corresponding third control instruction according to the first detection result so as to control the playing module to stop playing the heartbeat sound.
3. The signal trigger-based musical chord generating apparatus according to claim 2, wherein the first control unit gradually increases the play interval time of the heartbeat sound in such a manner that the play interval time of the heartbeat sound increases by 2 milliseconds every 100 milliseconds.
4. The signal trigger-based musical chord generating apparatus according to claim 2, wherein the second control unit shortens the play interval time of the heartbeat sound by 0.5% each time the reception signal is received, thereby gradually shortening the play interval time of the heartbeat sound.
5. The musical chord generating device based on signal triggering as defined in claim 1, wherein the overall controller further comprises a heartbeat lamp control module connected with the data receiving module, the heartbeat lamp control module specifically comprises:
the second timing unit is used for starting timing every time the received signal is received and continuously outputting a third real-time timing result;
the second comparing unit is connected with the second timing unit and is used for continuously receiving the third real-time timing result, comparing the third real-time timing result with a preset second time threshold, outputting a corresponding third comparing result when the third real-time timing result is larger than the second time threshold, and outputting a corresponding fourth comparing result when the third real-time timing result is not larger than the second time threshold;
The fourth control unit is connected with the second comparison unit and is used for generating a corresponding fourth control instruction according to the third comparison result so as to control a heartbeat lamp of a light module connected with the master controller to flash, and the flash interval time of the heartbeat lamp is gradually increased;
the fifth control unit is connected with the second comparison unit and is used for generating a corresponding fifth control instruction according to the fourth comparison result so as to control the heartbeat lamp of the light module to flash and gradually shorten the flashing interval time of the heartbeat lamp;
the second detection unit is connected with the fourth control unit and is used for detecting the flicker interval time in real time and outputting a corresponding second detection result when the flicker interval time is detected to be not smaller than a preset flicker interval time threshold value;
and the sixth control unit is connected with the second detection unit and is used for generating a corresponding sixth control instruction according to the second detection result and controlling the heartbeat lamp of the light module to flash so as to present the breathing lamp effect.
6. The signal trigger-based musical chord generating apparatus according to claim 5, wherein the fourth control unit gradually increases the blinking interval time of the heartbeat lamp in such a manner that the blinking interval time of the heartbeat lamp increases by 2 milliseconds every 100 milliseconds.
7. The signal trigger-based musical chord generating apparatus according to claim 5, wherein the fifth control unit shortens the blinking interval time of the heartbeat lamp by 0.5% every time the reception signal is received, thereby gradually shortening the blinking interval time of the heartbeat lamp.
8. The signal trigger based musical chord generating apparatus according to claim 5, wherein the initialization module further comprises:
and the sleep display unit is connected with the starting detection unit and is used for generating a corresponding sleep display instruction according to the starting signal and sending the instruction to the heartbeat lamp control module, and controlling the heartbeat lamp of the light module to flash so as to present the breathing lamp effect.
9. The signal trigger-based musical chord generating apparatus according to claim 1 wherein the strings are capacitive touch triggered.
10. A signal trigger-based musical chord generating method, applied to a signal trigger-based musical chord generating device as claimed in any one of claims 1 to 9, comprising:
step S1, each sensing module of the musical chord generating device detects real-time state data of each string correspondingly connected in real time, generates corresponding trigger signals when the real-time state data indicate that the strings are touched, and sends the trigger signals to a sub-controller correspondingly connected with the sensing module;
Step S2, the sub-controller of the musical chord generating device searches a pre-generated corresponding relation library to obtain a third number and the total number according to the trigger signal, and the third number and the total number are included in a search result, and the search result is sent to a connected total controller;
step S3, the master controller of the musical chord generating device receives the search result and generates a corresponding receiving signal according to the search result;
step S4, the master controller of the musical chord generating device starts timing when the musical chord generating device starts working, and outputs a corresponding timing result when receiving the receiving signal;
step S5, the master controller of the musical chord generating device calculates and obtains the chord corresponding to the string which is touched currently according to the timing result and the preset duration of each musical piece, a plurality of musical pieces which are stored in advance and have preset storage sequences, and the chord corresponding to each musical piece which is arranged according to the music composing sequence;
step S6, the master controller of the musical chord generating device carries out corresponding processing on the chords to obtain notes corresponding to the currently touched strings;
Step S7, the master controller of the musical chord generating device matches the preset total number with a plurality of preset virtual musical instruments according to the total number of the currently touched string included in the search result to obtain the corresponding virtual musical instrument;
step S8, the master controller of the musical chord generating device generates corresponding control instructions according to the notes and the virtual musical instrument, and sends the control instructions to a playing module connected with the master controller;
step S9, the playing module of the musical chord generating device plays the notes corresponding to the virtual musical instrument according to the control instruction.
11. The signal-trigger-based musical chord generating method according to claim 10, further comprising, before performing the step S1:
a1, when detecting that a main switch of the music chord generating device is turned on, the main controller of the music chord generating device generates a corresponding turning-on signal and outputs the corresponding turning-on signal;
step A2, the master controller of the musical chord generating device generates corresponding sensing calibration instructions according to the starting signals and sends the corresponding sensing calibration instructions to the sub-controllers so as to calibrate the sensing modules connected with the sub-controllers;
And A3, the master controller of the music chord generating device generates a corresponding sleep display instruction according to the starting signal and sends the sleep display instruction to the heartbeat lamp control module, and controls the heartbeat lamp of the light module to flash so as to present a breathing lamp effect.
12. The signal-trigger-based musical chord generating method according to claim 10, further comprising, after performing the step S3:
step B1, the master controller of the musical chord generating device starts timing every time the receiving signal is received, and continuously outputs a first real-time timing result;
step B2, the master controller of the musical chord generating device continuously receives the first real-time timing result and compares the first real-time timing result with a preset first time threshold value:
if the first real-time timing result is greater than the first time threshold, outputting a corresponding first comparison result, and then turning to step B3,
if the first real-time timing result is not greater than the first time threshold, outputting a corresponding second comparison result, and then turning to the step B4;
step B3, the master controller of the musical chord generating device generates a corresponding first control instruction according to the first comparison result so as to control the playing module to play the heartbeat sound and gradually increase the playing interval time of the heartbeat sound, and then the step B5 is performed;
Step B4, the master controller of the musical chord generating device generates a corresponding second control instruction according to the second comparison result so as to control the playing module to play the heartbeat sound, gradually shorten the playing interval time of the heartbeat sound and then exit;
step B5, the master controller of the musical chord generating device detects the playing interval time in real time and compares the playing interval time with a preset interval time threshold value:
if the playing interval time is smaller than the interval time threshold, returning to the step B3;
if the playing interval time is not smaller than the interval time threshold, outputting a corresponding first detection result, and then turning to the step B6;
and step B6, the master controller of the musical chord generating device generates a corresponding third control instruction according to the first detection result so as to control the playing module to stop playing the heartbeat sound.
13. The signal-trigger-based musical chord generating method according to claim 10, further comprising, after performing the step S3:
step C1, the master controller of the musical chord generating device starts timing when receiving the receiving signal each time, and continuously outputs a third real-time timing result;
Step C2, the master controller of the musical chord generating device continuously receives the third real-time timing result, and compares the third real-time timing result with a preset second time threshold value:
if the third real-time timing result is greater than the second time threshold, outputting a corresponding third comparison result, and then turning to the step C3;
if the third real-time timing result is not greater than the second time threshold, outputting a corresponding fourth comparison result, and then turning to the step C4;
step C3, the master controller of the musical chord generating device generates a corresponding fourth control instruction according to the third comparison result so as to control a heartbeat lamp of a light module connected with the master controller to flash, and gradually increase the flashing interval time of the heartbeat lamp;
step C4, the master controller of the music chord generating device generates a corresponding fifth control instruction according to the fourth comparison result so as to control the heartbeat lamp of the light module to flash and gradually shorten the flashing interval time of the heartbeat lamp;
step C5, the total controller of the musical chord generating device detects the flicker interval time in real time, and compares the flicker interval time with a preset flicker interval time threshold value:
If the flicker interval time is smaller than the flicker interval time threshold, returning to the step C3;
if the flicker interval time is not smaller than the flicker interval time threshold, outputting a corresponding second detection result, and then turning to the step C6;
and step C6, the master controller of the music chord generating device generates a corresponding sixth control instruction according to the second detection result, and controls the light module to flash so as to present a breathing lamp effect.
CN201911222223.1A 2019-12-03 2019-12-03 Music chord generating device and method based on signal triggering Active CN110930970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911222223.1A CN110930970B (en) 2019-12-03 2019-12-03 Music chord generating device and method based on signal triggering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911222223.1A CN110930970B (en) 2019-12-03 2019-12-03 Music chord generating device and method based on signal triggering

Publications (2)

Publication Number Publication Date
CN110930970A CN110930970A (en) 2020-03-27
CN110930970B true CN110930970B (en) 2023-12-05

Family

ID=69848524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911222223.1A Active CN110930970B (en) 2019-12-03 2019-12-03 Music chord generating device and method based on signal triggering

Country Status (1)

Country Link
CN (1) CN110930970B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112331165B (en) * 2020-11-09 2024-03-22 崔繁 Custom chord system of intelligent guitar chord auxiliary device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4012979A (en) * 1975-03-03 1977-03-22 Computeacher Limited Music teaching apparatus
US5425297A (en) * 1992-06-10 1995-06-20 Conchord Expert Technologies, Inc. Electronic musical instrument with direct translation between symbols, fingers and sensor areas
JP2000330554A (en) * 1999-05-24 2000-11-30 Dainippon Printing Co Ltd Expressing method/displaying method/display medium of acoustic information using midi data and reproducing method of midi data
CN1346485A (en) * 1999-02-02 2002-04-24 吉创公司 Electronic strianged music instrument
US6448486B1 (en) * 1995-08-28 2002-09-10 Jeff K. Shinsky Electronic musical instrument with a reduced number of input controllers and method of operation
CN201498198U (en) * 2009-05-11 2010-06-02 曾平蔚 Electronic plucked string instrument
JP2015049302A (en) * 2013-08-30 2015-03-16 ブラザー工業株式会社 Music retrieval device, music retrieval system and music retrieval program
CN105161087A (en) * 2015-09-18 2015-12-16 努比亚技术有限公司 Automatic harmony method, device, and terminal automatic harmony operation method
JP2015230501A (en) * 2014-06-03 2015-12-21 矢崎総業株式会社 Control device
CN105761713A (en) * 2016-01-29 2016-07-13 北京精奇互动科技有限公司 Chord changing processing method and device
CN110335578A (en) * 2019-07-11 2019-10-15 中北大学 Music input unit and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8269094B2 (en) * 2009-07-20 2012-09-18 Apple Inc. System and method to generate and manipulate string-instrument chord grids in a digital audio workstation
EP2772904B1 (en) * 2013-02-27 2017-03-29 Yamaha Corporation Apparatus and method for detecting music chords and generation of accompaniment.
US10614786B2 (en) * 2017-06-09 2020-04-07 Jabriffs Limited Musical chord identification, selection and playing method and means for physical and virtual musical instruments

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4012979A (en) * 1975-03-03 1977-03-22 Computeacher Limited Music teaching apparatus
US5425297A (en) * 1992-06-10 1995-06-20 Conchord Expert Technologies, Inc. Electronic musical instrument with direct translation between symbols, fingers and sensor areas
US6448486B1 (en) * 1995-08-28 2002-09-10 Jeff K. Shinsky Electronic musical instrument with a reduced number of input controllers and method of operation
CN1346485A (en) * 1999-02-02 2002-04-24 吉创公司 Electronic strianged music instrument
JP2000330554A (en) * 1999-05-24 2000-11-30 Dainippon Printing Co Ltd Expressing method/displaying method/display medium of acoustic information using midi data and reproducing method of midi data
CN201498198U (en) * 2009-05-11 2010-06-02 曾平蔚 Electronic plucked string instrument
JP2015049302A (en) * 2013-08-30 2015-03-16 ブラザー工業株式会社 Music retrieval device, music retrieval system and music retrieval program
JP2015230501A (en) * 2014-06-03 2015-12-21 矢崎総業株式会社 Control device
CN105161087A (en) * 2015-09-18 2015-12-16 努比亚技术有限公司 Automatic harmony method, device, and terminal automatic harmony operation method
CN105761713A (en) * 2016-01-29 2016-07-13 北京精奇互动科技有限公司 Chord changing processing method and device
CN110335578A (en) * 2019-07-11 2019-10-15 中北大学 Music input unit and method

Also Published As

Publication number Publication date
CN110930970A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN103810992B (en) Voice synthesizing method and voice synthesizing apparatus
CN108630176A (en) Electronic wind instrument and its control method and recording medium
JPS59223492A (en) Electronic musical instrument
EP3428911B1 (en) Device configurations and methods for generating drum patterns
JP7367641B2 (en) Electronic musical instruments, methods and programs
CN102800307A (en) Musical sound generation instrument
JP7035697B2 (en) Singing practice device, singing practice method, and program
CN110930970B (en) Music chord generating device and method based on signal triggering
JPH0448234B2 (en)
US7220906B2 (en) String-instrument type electronic musical instrument
US20020083818A1 (en) Electronic musical instrument with performance assistance function
US8865991B1 (en) Portable music player
JP2010160396A (en) Musical performance training apparatus and program
JPH0934456A (en) Electronic musical instrument and electronic phonation device
JP3430267B2 (en) Electronic musical instrument
CN101996624B (en) Method for performing chord figure and rhythm figure by monochord of electric guitar
JP4185991B2 (en) Finger music playing device
CN113539215A (en) Music style conversion method, device, equipment and storage medium
JPH04212194A (en) Electronic musical instrument
JP3192579B2 (en) Automatic performance device and automatic performance method
JPH065455B2 (en) Singing instruction device
JPH1097250A (en) Musical tone generator
JPS6116992B2 (en)
JP2513014B2 (en) Electronic musical instrument automatic performance device
JP2827497B2 (en) Electronic musical instrument

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 206, Building 3, No. 48, Lane 1088, Yuyuan Road, Changning District, Shanghai, 200050

Patentee after: SHANGHAI GWANTSI CULTURAL TRANSMISSION CO.,LTD.

Address before: Room J1526, 3rd Floor, Building 8, No. 55 Huiyuan Road, Jiading District, Shanghai, 2018

Patentee before: SHANGHAI GWANTSI CULTURAL TRANSMISSION CO.,LTD.

CP02 Change in the address of a patent holder