A robot playing method and system thereof
Patent Information
- Application Number
- CN201911366734.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2039-12-26
AI Technical Summary
The existing electronic piano can only be played by hand alone, and cannot be played automatically by the machine, and the degree of intelligence is low.
A robotic performance system is designed, including a key bed, keys, electromagnets, magnets, connectors, programmable logic controllers, placement tables and fixed components. The programmable logic controller controls the electromagnet to be powered on or off to realize the automatic playing of the keys.
It realizes that the electronic piano robot plays alone according to the song signal, and can also participate in ensemble interaction manually, which is highly intelligent.
Smart Images

Figure CN111199720B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot technology, and in particular to a robot playing method and a system thereof. Background Art
[0002] Service robots based on information technologies such as sensors, artificial intelligence, and computer science are gradually entering people's lives and becoming a new growth point in the industrialization of robots. Entertainment performance robots are a new type of service robots. Through hardware design, entertainment robots have a humanized appearance. The rapid development of science and technology has injected many new elements into the field of music, gradually changing the way people write, perform, produce and even appreciate music.
[0003] However, today's electronic keyboards can only be played manually, and cannot be played automatically by machines, so their intelligence is low. Summary of the invention
[0004] The purpose of the present invention is to provide a robot playing method and system thereof, aiming to solve the problem that the current electronic piano can only be played manually but not automatically by a machine, and has low intelligence.
[0005] To achieve the above-mentioned purpose, in a first aspect, the present invention provides a robot playing system, including a keybed, a piano key, a first electromagnet, a first magnet, a connecting piece, a programmable logic controller, a placing table and a fixing component, wherein the keybed has a groove, a cavity and a through hole, and the through hole, the key, the first electromagnet, the first magnet and the connecting piece are all multiple in number, the groove is located above the cavity, and multiple through holes connect the groove and the cavity, multiple keys are arranged on the keybed, covering the groove, and move up and down in the groove, and each key is arranged opposite to each through hole, and multiple first electromagnets are arranged on the keybed to cover the groove and move up and down in the groove. The magnet is located in the cavity, a plurality of the first magnets are fixedly connected to the key bed and are located in the cavity, and each of the first magnets is arranged opposite to each of the through holes and each of the first electromagnets, each of the connecting members is fixedly connected to each of the keys, passes through the corresponding through holes, extends into the cavity and is fixedly connected to the first electromagnet, the programmable logic controller is electrically connected to the first electromagnet, the placement table is integrally formed with the key bed, and is located on a side away from the cavity, and has an inclined surface, the inclined surface faces a side of the keys, a music book is placed on the inclined surface, and the fixing component clamps the music book.
[0006] Wherein, the fixing component includes a second magnet and a second electromagnet, the number of the second magnet and the second electromagnet are at least two, the second magnet is slidably connected to the placement table and is located on the inclined surface, each second electromagnet is arranged opposite to each second magnet, and is electrically connected to the programmable logic controller, and supports the music book on the inclined surface.
[0007] Wherein, the robot performance system also includes a flipping component, which includes a third electromagnet, a first elastic member, a rotating member and a fourth electromagnet. The number of the third electromagnet and the first elastic member is multiple, each of the first elastic members clamps a page of the music book, and every two of the third electromagnets are fixedly connected to the first elastic member, and are electrically connected to the programmable logic controller, and are located on both sides of the music book. The number of the rotating member and the fourth electromagnet is two, and the two rotating members are rotatably connected to the placement table and are located on both sides of the music book. Each of the fourth electromagnets is fixedly connected to each of the rotating members, and is electrically connected to the programmable logic controller, and is arranged opposite to the third electromagnet.
[0008] Among them, the robot performance system also includes a supporting component, the number of the supporting components is multiple, each of the supporting components is located on one side of each first electromagnet and is located in the cavity, the supporting component includes a fixing part and a sliding part, the fixing part is fixedly connected to the key bed and is located on one side of the first electromagnet, the sliding part is fixedly connected to the first electromagnet, and is slidably connected to the fixing part, and is located between the first electromagnet and the fixing part.
[0009] Wherein, the supporting assembly further includes a second elastic member, which is fixedly connected to the sliding member and is located inside the fixing member and on a side close to the first magnet.
[0010] Among them, the supporting assembly also includes a rubber strip, which is located in the second elastic part; the robot performance system also includes a spice stick and a storage box, the spice stick is fixedly connected to the rubber strip and is located on one side of the rubber strip, the storage box is located in the fixing part, the storage box is filled with perfume, the storage box has a M-shaped opening, and the M-shaped opening is located on the positive projection of the spice stick.
[0011] A robot playing system of the present invention connects the groove and the cavity through a plurality of through holes, a plurality of keys are arranged on the key bed, cover the groove, move up and down in the groove, and each key, each through hole, each first electromagnet and each first magnet are arranged relatively, each connecting member is fixedly connected to each key, and passes through the corresponding through hole, extends into the cavity and is fixedly connected to the first electromagnet, the programmable logic controller is electrically connected to the first electromagnet, the placement table is integrally formed with the key bed, and is located on a side away from the cavity, and has an inclined surface, the inclined surface faces a side of the keys, a music book is placed on the inclined surface, and the fixed component clamps the music book. The programmable logic controller controls the first electromagnet connected to different keys to be powered on or off, and the song is played, with a high degree of intelligence.
[0012] In a second aspect, the present invention provides a robot playing method, comprising:
[0013] Based on the length of playing time of the notes in the five-line stave and the scale information, the pitch and beat of each note in the music score corresponding to the selected song are converted into corresponding first note parameters and first beat parameters to form a data table, which is stored in the programmable logic controller;
[0014] Based on the received song signal, enter the corresponding performance state, including:
[0015] When the song signal is a song solo signal, a corresponding power-on signal or a power-off signal is output to the first electromagnets connected to different keys based on the first note parameter and the first beat parameter, and the playing state is entered until a song stop signal is received;
[0016] When the song signal is the first song ensemble signal, the output of the corresponding power-on signal or power-off signal to the first electromagnets connected to different keys is stopped, and the performance waiting state is entered until the second song ensemble signal is detected, then the output of the corresponding power-on signal or power-off signal to the first electromagnets connected to different keys continues.
[0017] In one embodiment, based on the received song signal, entering a corresponding performance state specifically includes:
[0018] When the song signal is a song practice signal, it enters a performance practice state, and obtains the corresponding first key position parameter, first key frequency parameter and first key interval time parameter, generates a first target note parameter and a first target beat parameter, and stores them in a programmable logic controller.
[0019] In one embodiment, after entering the performance practice state, the method further includes:
[0020] The first target note parameter and the first target beat parameter are obtained, and compared with the first note parameter and the first beat parameter of the corresponding song to determine whether they exceed a preset range, and if so, a first prompt signal is output.
[0021] In one embodiment, after outputting the first prompt signal, the method further includes:
[0022] The number of times exceeding the preset range is obtained, and it is determined whether the number of times exceeding the preset range reaches the preset number. If reached, the corresponding song stored in the programmable logic controller is obtained to output the corresponding power-on signal or power-off signal to the first electromagnet connected to different keys, and the performance state is entered.
[0023] In one embodiment, after obtaining the number of times exceeding the preset range and determining whether the number of times exceeding the preset range reaches the preset number, the method further includes:
[0024] Acquire the performance data corresponding to the preset number of times reached for the first time, and generate a visual music score data display.
[0025] In one embodiment, based on the received song signal, entering a corresponding performance state specifically includes:
[0026] When the song signal is a song recording signal, the song recording state is entered, and the corresponding second key position parameter, second key frequency parameter and second key interval time parameter are obtained and stored in the programmable logic controller.
[0027] In one embodiment, based on the received song signal, entering a corresponding performance state specifically includes:
[0028] When the song signal is a repeat play signal, it enters a repeat play state, and the corresponding second key position parameter, second key frequency parameter and second key interval time parameter are obtained to output corresponding power-on signals or power-off signals to the first electromagnets connected to different keys.
[0029] In one embodiment, the method further comprises:
[0030] The storage space of the programmable logic controller is obtained, and it is determined whether the storage space is greater than a preset capacity. If so, a second prompt signal is output.
[0031] In a third aspect, the present invention provides a robot performance device, comprising a module for executing the robot performance method described in the second aspect.
[0032] In a fourth aspect, the present invention provides a server comprising a processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the robot playing method described in the second aspect above.
[0033] In a fifth aspect, the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the robot playing method described in the second aspect above.
[0034] A robot playing method of the present invention converts the pitch and beat of each note in the music score corresponding to the selected song into corresponding first note parameters and first beat parameters; when the song signal is a song solo signal, based on the first note parameters and the first beat parameters, the corresponding power-on signal or power-off signal is output to the first electromagnet connected to different keys, and the playing state is entered until the song stop signal is received; when the song signal is a first song ensemble signal, the corresponding power-on signal or power-off signal is stopped from being output to the first electromagnet connected to different keys, and the playing waiting state is entered until the second song ensemble signal is detected, and the corresponding power-on signal or power-off signal is continued to be output to the first electromagnet connected to different keys. The electronic piano robot can play alone according to the song signal, or can also perform ensemble interaction with human participation, and the intelligent degree is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] 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 or the description of the prior art 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.
[0036] Figure 1 It is a structural schematic diagram of the robot performance system of the present invention;
[0037] Figure 2 is a left side view of the robot performance system of the present invention;
[0038] Figure 3 is a top view of the robot performance system of the present invention;
[0039] Figure 4 yes Figure 1 A partial enlarged view of
[0040] Figure 5yes Figure 2 A partial enlarged view of B;
[0041] Figure 6 It is a schematic diagram of the structure of the support assembly and the first electromagnet of the present invention;
[0042] Figure 7 is a flowchart of a robot playing method provided by the first embodiment of the present invention;
[0043] Figure 8 is a flow chart of a robot playing method provided by a second embodiment of the present invention;
[0044] Fig. 9 is a flow chart of a robot playing method provided by a third embodiment of the present invention;
[0045] Fig.10 is a schematic structural diagram of a robot performance device provided by an embodiment of the present invention;
[0046] Fig.11 It is a structural diagram of a server provided by an embodiment of the present invention;
[0047] In the figure: 100-robot playing system, 1-key bed, 2-key, 3-first electromagnet, 4-first magnet, 5-connector, 6-placement table, 7-fixing component, 8-flipping component, 9-support component, 10-programmable logic controller, 11-groove, 12-cavity, 13-through hole, 61-inclined surface, 71-second magnet, 72-second electromagnet, 81-third electromagnet, 82-first elastic member, 83-rotating member, 84-first Four electromagnets, 91-fixing part, 92-sliding part, 93-second elastic part, 94-rubber strip, 95-spice stick, 96-storage box, 961-M-shaped opening, 400-robot playing device, 401-conversion module, 402-receiving module, 405-output module, 403-acquisition module, 404-judgment module, 500-server, 501-processor, 502-memory, 503-communication interface, 505-bus. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0049] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0050] First, see Figures 1 to 6 The present invention provides a robot playing system 100, comprising a key bed 1, a piano key 2, a first electromagnet 3, a first magnet 4, a connecting piece 5, a programmable logic controller 10, a placing table 6 and a fixing component 7, wherein the key bed 1 has a groove 11, a cavity 12 and a through hole 13, wherein the through hole 13, the piano key 2, the first electromagnet 3, the first magnet 4 and the connecting piece 5 are all multiple in number, the groove 11 is located above the cavity 12, and multiple through holes 13 are connected to the groove 11 and the cavity 12, multiple keys 2 are arranged on the key bed 1, cover the groove 11, move up and down in the groove 11, and each key 2 is arranged opposite to each through hole 13, and multiple first electromagnets 3, the first magnet 4 and the connecting piece 5 are arranged opposite to each through hole 13. The iron 3 is located in the cavity 12, a plurality of the first magnets 4 are fixedly connected to the key bed 1 and are located in the cavity 12, and each of the first magnets 4 is arranged opposite to each of the through holes 13 and each of the first electromagnets 3, each of the connecting members 5 is fixedly connected to each of the keys 2, and passes through the corresponding through holes 13, extends into the cavity 12 and is fixedly connected to the first electromagnet 3, the programmable logic controller 10 is electrically connected to the first electromagnet 3, the placing table 6 is integrally formed with the key bed 1, and is located on a side away from the cavity 12, and has an inclined surface 61, the inclined surface 61 faces the side of the key 2, a music book is placed on the inclined surface 61, and the fixing component 7 clamps the music book.
[0051] In this embodiment, the first electromagnet 3 is a device that generates electromagnetism when powered. A conductive winding matching its power is wound around the outside of the iron core, and this coil with current is magnetic like a magnet. After the first electromagnet 3 is powered, it has opposite magnetism to the first magnet 4, and opposites attract each other. The programmable logic controller 10 uses a type of programmable memory for the internal memory program to execute user-oriented instructions, such as logical operations, continuous operations, timing, counting and arithmetic operations, and control various types of machinery through digital or analog input / output. The model can be FR-FX1N, FR-FX1S, FR-FX2N, FR-FX3U, FR-FX2NC or RA FR-Q. The connecting member 5 is a rope, which is light in weight and does not take up space. When the programmable logic controller 10 does not control the first electromagnet 3 to work, people can play by themselves. When the programmable logic controller 10 controls the first electromagnet 3 to work, according to the pre-programmed song program, the first electromagnet 3 connected to the corresponding key 2 is energized, and has the opposite magnetic properties of the first magnet 4 corresponding thereto, and opposite charges attract each other, so the first electromagnet 3 moves toward the corresponding first magnet 4, thereby driving the connecting member 5 to pull the key 2 downward to play the corresponding tone. The inclined surface 61 of the placement table 6 is used to place the music book, and the fixing component 7 is used to fix the music book, so that the learner or appreciator of the song can watch it. Automatic performance, high degree of intelligence.
[0052] A robot playing system 100 of the present invention connects the groove 11 and the cavity 12 through a plurality of through holes 13, a plurality of keys 2 are arranged on the key bed 1, cover the groove 11, and move up and down in the groove 11, and each key 2, each through hole 13, each first electromagnet 3 and each first magnet 4 are arranged relatively, each connecting member 5 is fixedly connected to each key 2, and passes through the corresponding through hole 13, extends into the cavity 12 and is fixedly connected to the first electromagnet 3, the programmable logic controller 10 is electrically connected to the first electromagnet 3, the placing table 6 is integrally formed with the key bed 1, and is located on a side away from the cavity 12, and has an inclined surface 61, the inclined surface 61 faces the side of the key 2, a music book is placed on the inclined surface 61, and the fixing component 7 clamps the music book. The first electromagnet 3 connected to different keys 2 is controlled to be powered on or off according to the programmable logic controller 10, and a song is played, with a high degree of intelligence.
[0053] Furthermore, the fixing assembly 7 includes a second magnet 71 and a second electromagnet 72, the number of the second magnet 71 and the second electromagnet 72 are at least two, the second magnet 71 is slidably connected to the placement table 6 and is located on the inclined surface 61, each second electromagnet 72 is arranged opposite to each second magnet 71, and is electrically connected to the programmable logic controller 10, and holds the music book on the inclined surface 61.
[0054] In this embodiment, the sheet music book is opened to the page to be initially played, and the second magnet 71 can slide to a suitable position according to the size of the sheet music book, so as to facilitate clamping. The second magnet 71 slides to the left and right sides of the sheet music book, and the second electromagnet 72 is respectively placed on the sheet music book and arranged opposite to the second magnet 71. The programmable logic controller 10 controls the second electromagnet 72 to be energized, and has opposite magnetic properties to the second magnet 71, so that opposite charges attract each other, so as to facilitate clamping the sheet music book, without the need for manual fixation, and is efficient and intelligent to prevent falling.
[0055] Furthermore, the robot performance system 100 also includes a flipping component 8, which includes a third electromagnet 81, a first elastic member 82, a rotating member 83 and a fourth electromagnet 84. The number of the third electromagnet 81 and the first elastic member 82 is multiple, each of the first elastic members 82 clamps a page of the music book, and every two of the third electromagnets 81 are fixedly connected to the first elastic members 82, and are electrically connected to the programmable logic controller 10, and are located on both sides of the music book. The number of the rotating member 83 and the fourth electromagnet 84 is two, and the two rotating members 83 are rotatably connected to the placement table 6 and are located on both sides of the music book. Each of the fourth electromagnets 84 is fixedly connected to each of the rotating members 83, and is electrically connected to the programmable logic controller 10, and is arranged opposite to the third electromagnet 81.
[0056] In this embodiment, the first elastic member 82 is a rubber band, two of which are located on both sides of a page of music score to clamp the page of music score. The third electromagnet 81 is "U"-shaped to at least partially clamp the two sides of a page of music score, and the third electromagnet 81 has weight to hold down the music score to turn the pages at will. When it is necessary to turn the page, the programmable logic controller 10 controls the third electromagnet 81 and the fourth electromagnet 84 to be energized, which have magnetism and opposite magnetism, and opposite charges attract each other. The rotating member 83 is electrically connected to the output end of the motor, and the motor is electrically connected to the programmable logic controller 10. The motor controls the rotating member 83 to rotate forward and rotate toward the first page of the score. The fourth electromagnet 84 and the third electromagnet 81 attract each other, drive the first elastic member 82 to move, thereby driving a page of score clamped by the first elastic member 82 to rotate toward the first page of the score, and the third electromagnet 81 and the second electromagnet 72 have opposite polarities, opposite charges attract each other, and fix the turned page of score and the first page of score. Then the programmable logic controller 10 controls the fourth electromagnet 84 to be de-energized, and the fourth electromagnet 84 does not have magnetism, and does not attract each other and separates from the third electromagnet 81. The rotating member 83 rotates in the opposite direction back to its original position, and the page is repeatedly turned until the song is finished. There is no need to turn the page manually, and the music performance can be enjoyed from a distance, which has a high degree of intelligence.
[0057] Furthermore, the robot performance system 100 also includes a supporting component 9, and the number of the supporting components 9 is multiple, each of the supporting components 9 is located on one side of each first electromagnet 3 and is located in the cavity 12, and the supporting component 9 includes a fixing part 91 and a sliding part 92, the fixing part 91 is fixedly connected to the key bed 1 and is located on one side of the first electromagnet 3, the sliding part 92 is fixedly connected to the first electromagnet 3, and is slidably connected to the fixing part 91, and is located between the first electromagnet 3 and the fixing part 91.
[0058] In this embodiment, the fixing member 91 and the sliding member 92 are used to support the first electromagnet 3 to prevent the first electromagnet 3 from being too heavy and pulling the key 2. When the first electromagnet 3 connected to the key 2 is powered on and moves downward, the sliding member 92 slides on the fixing member 91 accordingly; when the first electromagnet 3 connected to the key 2 is powered off, the sliding member 92 and the fixing member 91 support the key 2.
[0059] Furthermore, the supporting assembly 9 further includes a second elastic member 93 , which is fixedly connected to the sliding member 92 and is located inside the fixing member 91 and on a side close to the first magnet 4 .
[0060] In this embodiment, the second elastic member 93 is a spring. The spring can play a supporting role and can be compressed with the pressure of the sliding member 92 to achieve the up and down movement of the key 2 to produce sound.
[0061] Furthermore, the support assembly 9 also includes a rubber strip 94, which is located in the second elastic member 93; the robot performance system 100 also includes a spice stick 95 and a storage box 96, the spice stick 95 is fixedly connected to the rubber strip 94 and is located on one side of the rubber strip 94, the storage box 96 is located in the fixing member 91, the storage box 96 is filled with perfume, and the storage box 96 has a M-shaped opening 961, and the M-shaped opening 961 is located on the positive projection of the spice stick 95.
[0062] In this embodiment, the rubber strip 94 is made of rubber material, which refers to a highly elastic polymer material with reversible deformation, which can produce a large deformation under a very small external force and can return to its original state after the external force is removed. The rubber strip 94 is located in the second elastic member 93 and has a guiding function. At the same time, the rubber strip 94 is elastic and will not affect the movement of the sliding member 92. When the first electromagnet 3 is energized, the piano key 2 connected thereto is driven to move downward, thereby driving the sliding member 92 to move downward, and the rubber strip 94 moves downward, thereby causing the fragrance stick 95 connected thereto to extend from the M-shaped opening 961 into the storage box 96 and be contaminated with perfume liquid. After the first electromagnet 3 is powered off, the piano key 2 moves upward, driving the fragrance stick 95 to overflow from the storage box 96, and the perfume liquid diffuses into the air, improving the comfort of the environment and enhancing the atmosphere of music appreciation and learning. At the same time, the design of the cross-shaped opening 961 allows the fragrance stick 95 to be removed from the storage box 96 and still protect the fragrance in the storage box 96 to prevent foreign matter from contaminating and prevent the fragrance from continuing to diffuse, thereby extending the service life.
[0063] Second, see Figure 7 , Figure 7 FIG. 1 is a flow chart of a robot playing method provided by the first embodiment of the present invention. Specifically, Figure 7 As shown, the robot playing method may include the following steps:
[0064] S101. Based on the length of playing time of the notes in the five-line staff and the scale information, the pitch and beat of each note in the music score corresponding to the selected song are converted into corresponding first note parameters and first beat parameters to form a data table, which is stored in the programmable logic controller.
[0065] In the embodiment of the present invention, during the performance of the electronic keyboard player, programming is first performed according to the song to be performed. Specifically, according to the specific music score, a program code for controlling the opening and closing of the electromagnets corresponding to different tones is written. For example, if one section of the music score is 1234567, then the program to be written is to first set a timer in a programmable logic controller (PLC), and then, according to the first note parameter and the first beat parameter of the music score, respectively write instructions for starting the electromagnets on the corresponding outputs of duo, rui, mi, fa, suo, la, and xi.
[0066] S102: Entering a corresponding performance state based on the received song signal.
[0067] In an embodiment of the present invention, the hardware part of the electronic piano automatic playing robot includes a host, a memory chip, a transistor, a PLC power supply and a power supply of an actuator. Specifically, it is formed by a row of micro-motion solenoid valve switches firmly on a support plate, and the number of switches is the same as the number of keys to be controlled. The solenoid valve includes an electromagnet, which is a device that generates electromagnetism when powered. A conductive winding matching its power is wound around the outside of the iron core, and this coil with current flowing through it has magnetism like a magnet. The PLC controls the opening and closing of different first electromagnets, and the rope pulls the keys to achieve the performance of the music.
[0068] When the song signal is a song solo signal, a corresponding power-on signal or a power-off signal is output to the first electromagnet connected to different keys based on the first note parameter and the first beat parameter, and the performance state is entered until a song stop signal is received; the first electromagnet that receives the power-on signal pulls the key to produce sound, and the first electromagnet that receives the power-off signal does not move, thereby enabling the electronic piano robot to perform independently according to the song and reducing the intensity of manual labor during long-term music performance.
[0069] When the song signal is the first song ensemble signal, the robot stops outputting the corresponding power-on signal or power-off signal to the first electromagnets connected to different keys, and enters the performance waiting state until the second song ensemble signal is detected, and then the robot continues to output the corresponding power-on signal or power-off signal to the first electromagnets connected to different keys. That is, the interaction between humans and robots, when humans need to play a certain part of the song, when the first song ensemble signal is received, the robot stops controlling the electronic keyboard, and humans can play by themselves, when humans finish playing a certain part, when the second song ensemble signal is received, the robot continues to play the part immediately after the human plays by outputting the power-on signal or power-off signal, until the song stop signal is received, that is, the song performance is completed; when humans need to play the entire song, when the first song ensemble signal is received, the robot stops controlling the electronic keyboard, and humans play the entire song until the song is finished. In addition, the storage space of the programmable logic controller is obtained, and it is determined whether the storage space is greater than the preset capacity. If so, a second prompt signal is output, that is, when the storage space of the programmable logic controller is insufficient, the LED light is turned on to remind the operator that the storage is full and further storage or transfer is performed. The functions are diverse, and can be adjusted to achieve solo or ensemble according to the situation, enhance interactivity and fun, change the music communication mode, and have a high degree of intelligence.
[0070] A robot playing method of the present invention converts the pitch and beat of each note in the music score corresponding to the selected song into corresponding first note parameters and first beat parameters; when the song signal is a song solo signal, based on the first note parameters and the first beat parameters, the corresponding power-on signal or power-off signal is output to the first electromagnet connected to different keys, and the playing state is entered until the song stop signal is received; when the song signal is a first song ensemble signal, the corresponding power-on signal or power-off signal is stopped from being output to the first electromagnet connected to different keys, and the playing waiting state is entered until the second song ensemble signal is detected, and the corresponding power-on signal or power-off signal is continued to be output to the first electromagnet connected to different keys. The electronic piano robot can play alone according to the song signal, or can also perform ensemble interaction with human participation, and the intelligent degree is high.
[0071] See also Figure 8 , Figure 8 FIG. 1 is a flow chart of a robot playing method provided by the second embodiment of the present invention. Specifically, Figure 8 As shown, the robot playing method may include the following steps:
[0072] S201. Based on the length of playing time of the notes in the staff and the scale information, the pitch and beat of each note in the music score corresponding to the selected song are converted into corresponding first note parameters and first beat parameters, forming a data table, and storing it in the programmable logic controller.
[0073] In the embodiment of the present invention, the content of this step is consistent with the content of S101 in the first embodiment and will not be repeated here.
[0074] S202: Entering a corresponding performance state based on the received song signal.
[0075] In an embodiment of the present invention, when the song signal is a song solo signal, the playing state is entered; when the song signal is a first song ensemble signal, the playing waiting state is entered; the storage space of the programmable logic controller is obtained, and it is determined whether the storage space is greater than the preset capacity. If so, the content of the output second prompt signal is consistent with the content in the first embodiment, which will not be repeated here. When the song signal is a song practice signal, the playing practice state is entered, and the corresponding first key position parameter, first key frequency parameter and first key interval time parameter are obtained, and the first target note parameter and the first target beat parameter are generated and stored in the programmable logic controller. When people need the electronic keyboard robot as a practice device, the power-on signal or power-off signal corresponding to the first electromagnet connected to different keys is stopped, and the electronic keyboard is not controlled. People can practice playing as a general electronic keyboard. While people practice, the first key position parameter, first key frequency parameter and first key interval time parameter of the keys pressed by people are recorded, and the first target note parameter and the first target beat parameter are generated and stored. The first target note parameter and the first target beat parameter are obtained, and compared with the first note parameter and the first beat parameter of the corresponding song to determine whether they exceed the preset range. If so, a first prompt signal is output. That is, the playing effect is not good, and the corresponding color LED light is lit to remind the practitioner to pay attention, interact with the robot, and guide the practitioner to learn and change. The number of times exceeding the preset range is obtained, and it is determined whether the number of times exceeding the preset range reaches the preset number. If it reaches, the corresponding song stored in the programmable logic controller is obtained to output the corresponding power-on signal or power-off signal to the first electromagnet connected to different keys, and enter the performance state. That is, if the effect is not good after practicing for many times, the electronic keyboard automatically plays the corresponding song, which is convenient for the practitioner to watch, listen, learn and correct. The performance data corresponding to the preset number of times is obtained, and a visual score data display is generated. That is, the performance data with poor performance effects for many times is obtained for processing, and the visual score data is generated and displayed on the display screen to guide the practitioner to correct and learn. People and robots interact to learn and correct, and the degree of intelligence is high.
[0076] A robot playing method of the present invention converts the pitch and beat of each note in the music score corresponding to the selected song into corresponding first note parameters and first beat parameters; when the song signal is a song solo signal, based on the first note parameters and the first beat parameters, the corresponding power-on signal or power-off signal is output to the first electromagnet connected to different keys, and the playing state is entered until the song stop signal is received; when the song signal is a first song ensemble signal, the corresponding power-on signal or power-off signal is stopped from being output to the first electromagnet connected to different keys, and the playing waiting state is entered until the second song ensemble signal is detected, and the corresponding power-on signal or power-off signal is continued to be output to the first electromagnet connected to different keys. The electronic piano robot can play alone according to the song signal, or can also perform ensemble interaction with human participation, and the intelligent degree is high.
[0077] See also Fig. 9 , Fig. 9 FIG. 3 is a flow chart of a robot playing method provided by the third embodiment of the present invention. Fig. 9 As shown, the robot playing method may include the following steps:
[0078] S301. Based on the length of playing time of the notes in the five-line staff and the scale information, the pitch and beat of each note in the music score corresponding to the selected song are converted into corresponding first note parameters and first beat parameters to form a data table, which is stored in the programmable logic controller.
[0079] In the embodiment of the present invention, the content of this step is consistent with the content of S101 in the first embodiment, and will not be repeated here.
[0080] S302: Entering a corresponding performance state based on the received song signal.
[0081] In an embodiment of the present invention, when the song signal is a song solo signal, the performance progress state is entered; when the song signal is a first song ensemble signal, the performance waiting state is entered; the storage space of the programmable logic controller is obtained, and it is determined whether the storage space is greater than the preset capacity. If so, the content of the output second prompt signal is consistent with the content in the first embodiment, which will not be repeated here.
[0082] When the song signal is a song recording signal, the song recording state is entered, and the corresponding second key position parameter, second key frequency parameter and second key interval time parameter are obtained and stored in the programmable logic controller. That is, music experts can record and store the songs they play, which is convenient for learners to practice.
[0083] When the song signal is a repeat play signal, the repeat play state is entered, and the corresponding second key position parameter, second key frequency parameter and second key interval time parameter are obtained to output corresponding power-on signal or power-off signal to the first electromagnet connected to different keys. That is, the new song played and recorded by the music expert can be played repeatedly, listened to, felt or appreciated and modified.
[0084] A robot playing method of the present invention converts the pitch and beat of each note in the music score corresponding to the selected song into corresponding first note parameters and first beat parameters; when the song signal is a song solo signal, based on the first note parameters and the first beat parameters, the corresponding power-on signal or power-off signal is output to the first electromagnet connected to different keys, and the playing state is entered until the song stop signal is received; when the song signal is a first song ensemble signal, the corresponding power-on signal or power-off signal is stopped from being output to the first electromagnet connected to different keys, and the playing waiting state is entered until the second song ensemble signal is detected, and the corresponding power-on signal or power-off signal is continued to be output to the first electromagnet connected to different keys. The electronic piano robot can play alone according to the song signal, or can also perform ensemble interaction with human participation, and the intelligent degree is high.
[0085] Third, see Fig.10 , is a schematic diagram of the structure of a robot performance device 400 provided in an embodiment of the present invention. The robot performance device 400 in an embodiment of the present invention includes a module for executing the robot performance method. Specifically, the robot performance device 400 in an embodiment of the present invention may include: a conversion module 401, a receiving module 402, an output module 405, an acquisition module 403 and a judgment module 404. Among them:
[0086] The conversion module 401 is used to convert the pitch and beat of each note in the music score corresponding to the selected song into corresponding first note parameters and first beat parameters based on the length of the note playing time and the scale information in the five-line staff, form a data table, and store it in the programmable logic controller;
[0087] The receiving module 402 is used to receive the song signal and enter the corresponding performance state;
[0088] The output module 405 is used for outputting corresponding power-on signals or power-off signals to first electromagnets connected to different keys based on the first note parameter and the first beat parameter when the song signal is a song solo signal, and entering a performance state until a song stop signal is received;
[0089] The output module 405 is used to stop outputting corresponding power-on signals or power-off signals to the first electromagnets connected to different keys when the song signal is a first song ensemble signal, and enter a performance waiting state until a second song ensemble signal is detected, then continue to output corresponding power-on signals or power-off signals to the first electromagnets connected to different keys.
[0090] In one embodiment, the acquisition module 403 is used to enter a performance practice state when the song signal is a song practice signal, and obtain the corresponding first key position parameter, first key frequency parameter and first key interval time parameter, generate a first target note parameter and a first target beat parameter, and store them in a programmable logic controller.
[0091] In one embodiment, the acquisition module 403 is used to acquire the first target note parameter and the first target beat parameter, and compare them with the first note parameter and the first beat parameter of the corresponding song. The judgment module 404 is used to judge whether it exceeds the preset range. If so, the output module 405 is used to output a first prompt signal.
[0092] In one embodiment, the acquisition module 403 is used to obtain the number of times exceeding a preset range, and the judgment module 404 is used to judge whether the number of times exceeding the preset range reaches a preset number. If reached, the corresponding song stored in the programmable logic controller is obtained to output a corresponding power-on signal or a power-off signal to the first electromagnet connected to different keys to enter the performance state.
[0093] In one embodiment, the acquisition module 403 is used to acquire the performance data corresponding to the first number of times reaching a preset number of times, and generate a visual music score data display.
[0094] In one embodiment, the acquisition module 403 is used to enter a song recording state when the song signal is a song recording signal, and obtain the corresponding second key position parameter, second key frequency parameter and second key interval time parameter, and store them in the programmable logic controller.
[0095] In one embodiment, the acquisition module 403 is used to enter a repeated playback state when the song signal is a repeated playback signal, and then obtain the corresponding second key position parameter, second key frequency parameter and second key interval time parameter to output a corresponding power-on signal or power-off signal to the first electromagnet connected to different keys.
[0096] In one implementation, the storage space of the programmable logic controller is obtained, and it is determined whether the storage space is greater than a preset capacity. If so, a second prompt signal is output.
[0097] Fourth, please refer to Fig.11 , Fig.11 is a schematic diagram of the structure of a server 500 provided in an embodiment of the present invention. The server 500 is used to execute the method of the second aspect above. Fig.11 As shown, the server 500 in this embodiment may include: one or more processors 501 and a memory 502. Optionally, the server 500 may also include one or more communication interfaces 503. The processor 501, the communication interface 503 and the memory 502 may be connected via a bus 504, or may be connected in other ways. Figure 5 The bus 504 is used as an example.
[0098] The processor 501 may be a central processing unit (CPU), other general-purpose processors 501, digital signal processors 501 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 501 may be a microprocessor 501 or any conventional processor 501, etc.
[0099] The communication interface 503 can be used for the interaction of sending and receiving information or signaling, as well as the reception and transmission of signals. The communication interface 503 may include a receiver and a transmitter for communicating with other devices. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating device, a storage program required for at least one function (such as a text storage function, a position storage function, etc.); the data storage area may store data (such as image data, text data) created according to the use of the server 500, etc., and may include application storage programs, etc. In addition, the memory 502 may include a high-speed random access memory 502, and may also include a non-volatile memory 502, such as at least one disk storage 502, a flash memory device, or other volatile solid-state storage 502.
[0100] The memory 502 is also used to store program instructions. The processor 501 can call the program instructions stored in the memory 502 to implement the robot playing method shown in the embodiment of the present invention.
[0101] The processor 501 can be used to call the program instructions to perform the following steps: based on the length of the note playing time and the scale information in the five-line staff, convert the pitch and beat of each note in the music score corresponding to the selected song into corresponding first note parameters and first beat parameters, form a data table, and store it in the programmable logic controller;
[0102] Based on the received song signal, enter the corresponding performance state, including:
[0103] When the song signal is a song solo signal, a corresponding power-on signal or a power-off signal is output to the first electromagnets connected to different keys based on the first note parameter and the first beat parameter, and the playing state is entered until a song stop signal is received;
[0104] When the song signal is the first song ensemble signal, the output of the corresponding power-on signal or power-off signal to the first electromagnets connected to different keys is stopped, and the performance waiting state is entered until the second song ensemble signal is detected, then the output of the corresponding power-on signal or power-off signal to the first electromagnets connected to different keys continues.
[0105] In one embodiment, when the song signal is a song practice signal, it enters a performance practice state, and the processor 501 can be used to call the program instructions to perform the following steps: obtain the corresponding first key position parameters, first key frequency parameters and first key interval time parameters, generate first target note parameters and first target beat parameters, and store them in the programmable logic controller.
[0106] In one embodiment, after entering the performance practice state, the processor 501 can be used to call the program instructions to perform the following steps: obtain the first target note parameter and the first target beat parameter, and compare them with the first note parameter and the first beat parameter of the corresponding song to determine whether they exceed the preset range, and if so, output a first prompt signal.
[0107] In one embodiment, after outputting the first prompt signal, the processor 501 can be used to call the program instructions to perform the following steps: obtain the number of times exceeding the preset range, and determine whether the number of times exceeding the preset range reaches the preset number. If reached, obtain the corresponding song stored in the programmable logic controller and output the corresponding power-on signal or power-off signal to the first electromagnet connected to different keys to enter the performance state.
[0108] In one embodiment, after obtaining the number of times exceeding the preset range and determining whether the number of times exceeding the preset range reaches the preset number, the processor 501 can be used to call the program instructions to perform the following steps: obtaining the performance data corresponding to the first number of times reaching the preset number, and generating a visual music score data display.
[0109] In one embodiment, when the song signal is a song recording signal, the song recording state is entered, and the processor 501 can be used to call the program instructions to perform the following steps: obtain the corresponding second key position parameters, second key frequency parameters and second key interval time parameters, and store them in the programmable logic controller.
[0110] In one embodiment, when the song signal is a repeat play signal, it enters a repeat play state, and the processor 501 can be used to call the program instructions to perform the following steps: obtain the corresponding second key position parameters, second key frequency parameters and second key interval time parameters to output corresponding power-on signals or power-off signals to the first electromagnets connected to different keys.
[0111] In one embodiment, the processor 501 may be used to call the program instructions to execute the following steps: obtaining the storage space of the programmable logic controller, and determining whether the storage space is greater than a preset capacity, and if so, outputting a second prompt signal.
[0112] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor 501, Figure 1 or Figure 2 or Figure 3 Part or all of the steps in the robot playing method described in the corresponding embodiment can also implement the present invention. Figure 4 The functions of the robot performance device 400 of the embodiment shown in the figure can also realize the present invention. Figure 5 The functions of the server 500 of the illustrated embodiment are not described in detail here.
[0113] The computer-readable storage medium may be an internal storage unit of the robot performance device 400 or the server 500 described in the foregoing embodiment, such as a hard disk or memory of the robot performance device 400 or the server 500. The computer-readable storage medium may also be an external storage device of the robot performance device 400 or the server 500, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the robot performance device 400 or the server 500.
[0114] The embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute part or all of the steps in the above method.
[0115] In this application, the term "and / or" is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0116] In various embodiments of the present application, the sequence numbers of the above processes do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0117] The above descriptions are only partial implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.
Claims
1. A robot performance system, characterized in that: The invention comprises a keybed, a piano key, a first electromagnet, a first magnet, a connecting piece, a programmable logic controller, a placing table and a fixing component, wherein the keybed has a groove, a cavity and a through hole, and the through hole, the piano key, the first electromagnet, the first magnet and the connecting piece are all multiple in number, the groove is located above the cavity, and multiple through holes are connected to the groove and the cavity, multiple keys are arranged on the keybed, cover the groove, move up and down in the groove, and each key is arranged opposite to each through hole, multiple first electromagnets are located in the cavity, and multiple through holes are connected to the groove and the cavity. The first magnet is fixedly connected to the key bed and is located in the cavity, and each of the first magnets is arranged opposite to each of the through holes and each of the first electromagnets, each of the connecting members is fixedly connected to each of the keys, passes through the corresponding through holes, extends into the cavity and is fixedly connected to the first electromagnet, the programmable logic controller is electrically connected to the first electromagnet, the placement table is integrally formed with the key bed, and is located on a side away from the cavity, and has an inclined surface, the inclined surface faces a side of the keys, a music book is placed on the inclined surface, and the fixing assembly clamps the music book; The robot performance system further includes a flipping assembly, which includes a third electromagnet, a first elastic member, a rotating member and a fourth electromagnet. The third electromagnet and the first elastic member are both in plurality. Each of the first elastic members clamps a page of the music book. Every two of the third electromagnets are fixedly connected to the first elastic member, and are electrically connected to the programmable logic controller, and are located on both sides of the music book. The rotating member and the fourth electromagnet are in two numbers. Two of the rotating members are rotatably connected to the placement table and are located on both sides of the music book. Each of the fourth electromagnets is fixedly connected to each of the rotating members, and is electrically connected to the programmable logic controller, and is arranged opposite to the third electromagnet. The fixing assembly includes a second magnet and a second electromagnet, the number of the second magnet and the number of the second electromagnet are at least two, the second magnet is slidably connected to the placement table and is located on the inclined surface, each of the second electromagnets is arranged opposite to each of the second magnets, and is electrically connected to the programmable logic controller, and supports the music book on the inclined surface; The first elastic member is a rubber band, two of which are located on both sides of a page of music score to clamp the page of music score. The third electromagnet is "U"-shaped, at least partially clamping the two sides of a page of music score, and the third electromagnet has weight, which can press the music score to turn the page at will. When it is necessary to turn the page, the programmable logic controller controls the third electromagnet and the fourth electromagnet to be energized, which have magnetism and opposite magnetism, and opposite charges attract each other. The rotating member is electrically connected to the output end of the motor, and the motor is electrically connected to the programmable logic controller. The motor controls the rotating member to rotate in the forward direction. The first page of the sheet music is rotated toward the first page of the sheet music, and the fourth electromagnet and the third electromagnet attract each other, driving the first elastic member to move, thereby driving a page of sheet music clamped by the first elastic member to rotate toward the first page of the sheet music, and the third electromagnet and the second electromagnet have opposite polarities, and opposite poles attract each other, fixing the turned page of sheet music and the first page of sheet music, and then the programmable logic controller controls the fourth electromagnet to cut off power, the fourth electromagnet has no magnetism, and is not attracted to the third electromagnet and is separated, and the rotating member rotates in the opposite direction back to its original position, and the page turning is repeated until the song is finished.
2. The robot performance system according to claim 1, characterized in that: The robot performance system also includes a supporting component, and the number of the supporting components is multiple. Each of the supporting components is located on one side of each first electromagnet and is located in the cavity. The supporting component includes a fixing part and a sliding part. The fixing part is fixedly connected to the key bed and is located on one side of the first electromagnet. The sliding part is fixedly connected to the first electromagnet and is slidably connected to the fixing part, and is located between the first electromagnet and the fixing part.
3. The robot performance system as claimed in claim 2, characterized in that: The supporting assembly further includes a second elastic member, which is fixedly connected to the sliding member and is located inside the fixing member and on a side close to the first magnet.
4. The robot performance system as claimed in claim 3, characterized in that: The support assembly also includes a rubber strip, which is located in the second elastic member; the robot performance system also includes a spice stick and a storage box, the spice stick is fixedly connected to the rubber strip and is located on one side of the rubber strip, the storage box is located in the fixing member, the storage box is filled with perfume, and the storage box has a cross-shaped opening, which is located on the positive projection of the spice stick.
Citation Information
Patent Citations
Playing control method, device and playing musical instrument
CN106548767A
Intelligent detection and feedback system of intelligent piano
CN107978303A
Driving device for automatically playing electric piano
CN201327706Y
System takes place for fragrant smell by musical instrument control
CN205598286U
Music book page turning device for piano
CN208277673U