Electronic musical instrument, automatic operation method and automatic operation program

The system controls key pressing and releasing in electronic musical instruments to manage noise and discomfort by limiting simultaneous keys, using a virtual envelope to determine key release, ensuring stable operation with reduced power consumption.

JP2024146203APending Publication Date: 2024-10-15ROLAND CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023058971
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing electronic musical instruments are limited by the capacity of their power supply, leading to a maximum control number of keys that can be pressed or released simultaneously, which results in mechanical noise and discomfort when exceeding this limit, and require a large-capacity power supply to increase this number, thereby increasing cost.

Method used

Implementing a system that controls the number of keys pressed and released simultaneously by prioritizing key release over pressing, using a maximum control number and a maximum number of pressed keys, and employing a virtual envelope to determine which keys to release, thereby reducing mechanical noise and power consumption.

Benefits of technology

The system allows for stable operation with a smaller power supply capacity, reducing mechanical noise and listener discomfort when multiple keys are operated simultaneously, while maintaining efficient power usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024146203000001_ABST
    Figure 2024146203000001_ABST
Patent Text Reader

Abstract

To provide an electronic musical instrument, automatic operation method, and automatic operation program that can reduce listener's sense of discomfort when keys are released, while also suppressing increase in power costs, even when multiple keys are operated automatically at the same time.SOLUTION: By controlling pressing and releasing of key 2a so that number of pressed keys Np is the maximum number of pressed keys Mp or less that is less than the maximum controlled number Mc, number of keys 2a that can be released can be secured from the maximum controlled number Mc. Therefore, even if many keys 2a are pressed by an instruction, the release control of the keys 2a that are being released can be continued, so listener's sense of discomfort about the release can be reduced. In addition, by ensuring the keys 2a that are released with less power consumption than pressing the keys among the keys 2a of the maximum controlled number Mc, the power consumption of the keyboard 2 when operated automatically is reduced, and the capacity of the power supply of a digital piano 1 can be smaller. This can suppress increase in cost for the power supply of the digital piano 1.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an electronic musical instrument, an automatic operation method, and an automatic operation program. [Background technology]

[0002] Patent Document 1 discloses an electronic musical instrument that acquires key-on data and key-off data from song data stored in an external storage device 81, generates and outputs musical tones in a sound source circuit 66 and a sound system 69 using the acquired key-on data and key-off data, and presses or releases a key 11 by driving a solenoid 52. By driving the solenoid 52 even when the key 11 is released, the speed at which the key 11 is released can be reduced below the speed based on gravity, thereby mitigating the impact when the key 11 returns to its original position before it was pressed and suppressing the generation of mechanical noise when the key 11 returns to its original position. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2008-233828 A Summary of the Invention [Problem to be solved by the invention]

[0004] However, in the electronic musical instrument of Patent Document 1, the maximum number of controls, which is the number of keys that can be simultaneously pressed or released, is limited to 10 based on the capacity of the power supply installed. When a certain key 11 has been pressed and key release control has just started, if 10 new instructions to press the keys 11 are added, the number of keys 11 to be pressed or released will exceed the maximum number of controls, which is 10. In this case, the key 11 is given priority in order to suppress the discrepancy between the output musical tone and the action of the key 11, so that the key release control of the key 11 that has just started to be started is stopped. As a result, the speed of the key 11 that has been pressed and has just started to be released will change from the state in which it was held down by the driving force of the solenoid 52 to the speed based on gravity, and the impact of the key 11 returning to its original position will generate mechanical noise, which may cause the listener to feel uncomfortable. On the other hand, in order to increase the maximum number of controls in order to increase the number of keys 11 that can be simultaneously pressed or released, it is necessary to install a power supply with a large capacity in the electronic musical instrument, which increases the cost of the power supply for the electronic musical instrument.

[0005] The present invention has been made to solve the above-mentioned problems, and has as its object to provide an electronic musical instrument, an automatic operation method, and an automatic operation program which can reduce the discomfort felt by a listener when a key is released, even when multiple keys are automatically operated simultaneously, while suppressing increases in power supply costs. [Means for solving the problem]

[0006] In order to achieve this object, the electronic musical instrument of the present invention has a keyboard having keys that can be automatically operated, and is equipped with: key press number acquisition means for acquiring a key press number, which is the number of keys pressed in the automatic operation; maximum key press number acquisition means for acquiring a maximum key press number, which is the maximum number of keys that can be pressed and released simultaneously in the automatic operation and is a number less than a maximum control number, which is the maximum number of keys that can be pressed and released simultaneously in the automatic operation, and which is the maximum number of keys that can be controlled to be pressed in the automatic operation; and control switching means for newly acquiring a key press instruction for the automatic operation, and, if the number of keys pressed acquired by the key press number acquisition means is equal to or greater than the maximum number of keys pressed, issuing a key release instruction to any of the keys pressed in the automatic operation and starting pressing of the key that has been instructed to be pressed.

[0007] The automatic operation method of the present invention is a method executed in an electronic musical instrument equipped with a keyboard having keys that can be automatically operated, and includes: a key press number acquisition step of acquiring a key press number, which is the number of keys pressed in the automatic operation; a maximum key press number acquisition step of acquiring a maximum key press number, which is the maximum number of keys that can be pressed and released simultaneously in the automatic operation and is a number less than a maximum control number, which is the maximum number of keys that can be pressed and released simultaneously in the automatic operation, and a control switching step of newly acquiring a key press instruction for the keys in the automatic operation, and, if the number of keys pressed acquired in the key press number acquisition step is equal to or greater than the maximum key press number acquired in the maximum key press number acquisition step, issuing a key release instruction to any of the keys pressed in the automatic operation and starting pressing of the key instructed to be pressed.

[0008] The automatic operation program of the present invention is a program for causing a computer equipped with a keyboard having keys that can be automatically operated to execute automatic operation processing of keys of the keyboard, and causes the computer to execute the following steps: a key press number acquisition step for acquiring a key press number, which is the number of the keys pressed in the automatic operation; a maximum key press number acquisition step for acquiring a maximum key press number, which is the maximum number of the keys that can be controlled to be pressed in the automatic operation and is a number less than a maximum control number, which is the maximum number of the keys that can be simultaneously pressed and released in the automatic operation; and a control switching step for newly acquiring a key press instruction for the keys in the automatic operation and, if the number of keys pressed acquired in the key press number acquisition step is equal to or greater than the maximum key press number acquired in the maximum key press number acquisition step, issuing a key release instruction to any of the keys pressed in the automatic operation and starting pressing of the key instructed to be pressed. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a diagram illustrating the appearance of an electronic piano. [Diagram 2] FIG. 1A is a schematic diagram showing the maximum number of controls and the maximum number of key presses and the key press / release state of the keys, FIG. 1B is a diagram showing the case where the number of key presses is the maximum number of keys, and FIG. 1C is a diagram showing the case where the number of key presses is smaller than the maximum number of keys. [Diagram 3] FIG. 2A is a diagram illustrating a virtual envelope, and FIG. 2B is a diagram illustrating a method for determining a target key using the virtual envelope level. [Figure 4] FIG. 2 is a functional block diagram of the electronic piano. [Diagram 5] FIG. 2 is a block diagram showing the electrical configuration of the electronic piano. [Figure 6] FIG. 2 is a diagram illustrating a resource table. [Figure 7] 13A is a flowchart of a key-press request process, and FIG. 13B is a flowchart of a key-release request process. [Figure 8] 13 is a flowchart of a key press number limiting process. [Figure 9] 13 is a flowchart of a key press resource selection process. [Figure 10] 13 is a flowchart of a timer 0% interrupt process. [Figure 11] 13A is a flowchart of a timer 10% interrupt process, and FIG. 13B is a flowchart of a timer 80% interrupt process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] A preferred embodiment will be described below with reference to the accompanying drawings. First, an overview of an electronic piano 1 according to this embodiment will be described with reference to Fig. 1. Fig. 1 is a diagram showing the external appearance of the electronic piano 1, which is an electronic musical instrument that produces musical tones based on the performance of a user H or MIDI data, which is music data conforming to the MIDI (Musical Instrument Digital Interface) standard.

[0011] The electronic piano 1 is provided with a keyboard 2, setting keys 3 to which various settings are input by the user H, and an LCD 4 to display the setting status of the various settings. The keyboard 2 is an input device for acquiring performance information from the performance of the user H. The keyboard 2 has a plurality of keys 2a arranged thereon, and performance information conforming to the MIDI standard in response to the pressing / releasing of the keys 2a by the user H is output to a CPU 10 (see FIG. 5) and output as musical tones.

[0012] The keyboard 2 is also provided with solenoids 2b that drive each of the keys 2a independently up and down. When a note-on in the performance information is acquired from the MIDI data designated by the user H, the solenoid 2b drives the key 2a downward, thereby realizing the pressing of the key 2a. On the other hand, when a note-off in the performance information is acquired from the MIDI data, the solenoid 2b drives the key 2a upward, thereby realizing the releasing of the key 2a.

[0013] More specifically, the solenoid 2b is driven by Pulse Width Modulation (PWD) control. In this embodiment, when the key 2a is pressed, a High output (hereinafter abbreviated as "H output") is applied to the solenoid 2b for 80% of a predetermined period (e.g., 1 millisecond), thereby moving the key 2a downward.

[0014] On the other hand, when the key 2a is released, an H output is sent to the solenoid 2b for 10% of the predetermined cycle. The driving force of the solenoid 2b acts as a resistance force against the key 2a, which is pressed and moved downward, and is then suddenly moved upward by gravity. This makes the movement of the key 2a gentler during release, and reduces the impact when the key returns to its original position before it was pressed. This makes it possible to suppress the mechanical noise that occurs when the released key 2a returns to its original position.

[0015] By synchronizing the pressing / releasing of the keys 2a by the solenoid 2b based on MIDI data specified by the user H with the production of musical tones based on the MIDI data, it becomes possible for the user H to see the electronic piano 1 playing automatically. Hereinafter, driving the solenoid 2b based on such MIDI data to operate the keys 2a is referred to as "automatic operation of the keys 2a."

[0016] The MIDI data for outputting musical tones and automatically operating the keys 2a may be pre-stored in the electronic piano 1, or a communication device for communicating with external devices may be provided in the electronic piano 1, and the MIDI data may be acquired from other devices or the Internet via the communication device. Furthermore, the output of musical tones and the automatic operation of the keys 2a are not limited to being performed using the same MIDI data, and may be performed using separate MIDI data.

[0017] In this way, the solenoid 2b is driven by both pressing and releasing the keys 2a. In this embodiment, a maximum control number Mc, which is the number of keys 2a that can be pressed and released simultaneously, is set, and the pressing / releasing of the keys 2a is controlled so that the sum of the number of key presses Np, which is the number of keys 2a to be pressed, and the number of key releases Nr, which is the number of keys 2a to be released, is equal to or less than the maximum control number Mc.

[0018] Furthermore, a maximum number of pressed keys Mp, which is smaller than the maximum control number Mc, is set, and pressing of the key 2a is controlled so that the number of pressed keys Np is equal to or smaller than the maximum number of pressed keys Mp. The maximum control number Mc and the maximum number of pressed keys Mp will be described with reference to FIG.

[0019] FIG. 2(a) is a diagram showing the maximum number of controls Mc and the maximum number of key presses Mp, and the state of key 2a when it is pressed / released, FIG. 2(b) is a diagram showing the case where the number of key presses Np is the maximum number of key presses Mp, and FIG. 2(c) is a diagram showing the case where the number of key presses Np is smaller than the maximum number of key presses Mp.

[0020] 2(a), in this embodiment, the maximum control number Mc, which is the maximum number of keys 2a that can be simultaneously pressed and released, is set to "12." The pressing / releasing of the keys 2a is controlled so that the sum of the number of pressed keys Np and the number of released keys Nr is equal to or less than the maximum control number Mc. This limits the number of solenoids 2b that are simultaneously driven by pressing or releasing a key, thereby preventing an increase in power consumption of the electronic piano 1 and allowing the electronic piano 1 to operate stably.

[0021] Furthermore, the maximum number of keys pressed Mp, which is the maximum number of keys 2a that can be pressed, out of the maximum number of controls Mc, is set to "8." In other words, by setting the maximum number of keys pressed Mp to a number less than the maximum number of controls Mc, even if the number of keys pressed Np reaches the maximum number of keys pressed Mp, at least four keys 2a can be released.

[0022] For example, as shown in Fig. 2(b), when three keys 2a are released and multiple keys 2a are instructed to be pressed, the keys 2a are controlled so that the number of pressed keys Np is equal to or less than the maximum number of pressed keys Mp. If the number of pressed keys Np is greater than the maximum number of pressed keys Mp, a "target key 2a" (described later) is obtained from among the pressed keys 2a, and the target key 2a is instructed to be released, and pressing of the newly instructed key 2a to be pressed is started. As a result, the sum of the number of pressed keys Np and the number of released keys Nr can be made equal to or less than the maximum control number Mc, so that the drive of the solenoid 2b of the released key 2a (hereinafter referred to as "key release control") can be continued.

[0023] As a result, even when multiple keys 2a are instructed to be pressed, the key release control of the released key 2a continues, and the speed of the released key 2a can be kept lower than the speed based on gravity by the driving force of the solenoid 2b of the released key 2a, thereby suppressing the impact when returning to the original position. This reduces the discomfort felt by the listener when multiple keys 2a are automatically operated at the same time.

[0024] Incidentally, the power consumption of the solenoid 2b when the key 2a is released is smaller than the power consumption when the key is pressed. This is because the driving time of the solenoid 2b is shorter when the key is released than when the key is pressed in the above-mentioned predetermined period (1 millisecond). In this embodiment, among the keys 2a with the maximum control number Mc to the maximum key press number Mp, the keys 2a with the difference between the maximum control number Mc and the maximum key press number Mp (i.e., "4") are reserved as keys that are released with low power consumption. Therefore, compared with the case where all the keys 2a with the maximum control number Mc can be pressed and released, the power consumption required by the keyboard 2 when automatically operated can be reduced, so that the electronic piano 1 can be operated stably even with a power supply with a smaller capacity. This makes it possible to suppress an increase in the cost of the power supply for the electronic piano 1.

[0025] Also, the maximum control number Mc is set to 12, and the maximum key press number Mp is set to 8, i.e., the maximum key press number Mp is set to a number greater than half the maximum control number Mc. Therefore, when the key 2a is pressed or released up to the maximum control number Mc, the number of key presses Np becomes greater than the number of key releases Nr. As a result, pressing the key 2a takes precedence over releasing it, so that it is possible to prevent the key 2a from not being pressed even when a key press is instructed, or to prevent the key 2a from being unnecessarily changed from being pressed to being released.

[0026] Such maximum control number Mc and maximum number of pressed keys Mp are determined by balancing the capacity of the power supply of the electronic piano 1 and the power consumption of the solenoid 2b. Therefore, the maximum control number Mc may be set to 12 or more or less than 12 depending on the capacity of the power supply and the power consumption of the solenoid 2b. Similarly, the maximum number of pressed keys Mp may be set to 8 or more or less than 8. In this case, it is preferable that the maximum number of pressed keys Mp is equal to or less than the maximum control number Mc and is at least half the maximum control number Mc.

[0027] Here, the maximum number of keys 2a that can be pressed is set as the maximum number of key presses Mp, whereas the maximum number of keys 2a that can be released is not set. Therefore, when the number of key presses Np is smaller than the maximum number of key presses Mp, the number of key releases Nr can be set to be greater than the difference between the maximum control number Mc and the maximum number of key presses Mp (i.e., "4"). This is because, as described above, the driving time of the solenoid 2b is shorter for key release than for key pressing, and therefore the increase in power consumption of the solenoid 2b is smaller when a key is released instead of pressed.

[0028] For example, when six keys 2a are instructed to be pressed simultaneously, the same six keys 2a are then instructed to be released, as shown in Fig. 2(c). Even in such a case, it is possible to control the release of the keys 2a equal to or greater than the difference between the maximum control number Mc and the maximum number of pressed keys Mp, so that it is possible to prevent the key release control from being stopped for some of the six keys 2a to be released. This allows the keys 2a to be released smoothly, thereby preventing the listener from feeling uncomfortable when the keys are released.

[0029] Incidentally, even if a command to press a new key 2a is given when the number of pressed keys Np is the maximum number of pressed keys Mp, it is necessary to maintain the number of pressed keys Np equal to or less than the maximum number of pressed keys Mp, and to maintain the sum of the number of pressed keys Np and the number of released keys Nr equal to or less than the maximum number of controlled keys Mc. For this purpose, it is necessary to release the pressed key 2a and to stop the key release control of the released key 2a. In this embodiment, the key 2a to be released from the pressed key 2a and the key 2a to be stopped from the key release control are determined based on a virtual envelope E based on the velocity at the time of key pressing and the elapsed time from the key pressing. The virtual envelope E will be described with reference to FIG. 3.

[0030] Fig. 3(a) is a diagram for explaining the virtual envelope E. In Fig. 3(a) and Fig. 3(b) described later, the horizontal axis represents time, and the vertical axis represents velocity or the magnitude of the virtual envelope level described later. The virtual envelope E is a function that represents the manner in which the velocity of a musical tone generated in response to a key press instruction attenuates over time.

[0031] Specifically, the virtual envelope E represents the change in velocity when it is assumed that a sound generated with a velocity Vs at a key press start time Ts, which is the time when a key press starts, has a velocity of 0 at a time Te that is ΔT (e.g., 10 seconds) after the key press start time Ts. In this embodiment, the virtual envelope E is a function that connects the velocity Vs at the key press start time Ts and the velocity "0" at the time Te with a straight line, that is, a linearly interpolated function.

[0032] From such a virtual envelope E, a velocity at a desired time, for example, a velocity Vc at the current time Tc, is obtained and used to determine a target key 2a to be released or a target key 2a for which key release control is to be stopped (hereinafter abbreviated as "target key 2a"). Hereinafter, a velocity such as Vc obtained from the virtual envelope E is referred to as a "virtual envelope level". A method for determining a target key 2a using the virtual envelope level will be described with reference to Fig. 3(b).

[0033] Fig. 3(b) is a diagram for explaining a method of determining the target key 2a using the virtual envelope level. In Fig. 3(b), there are three pressed or released keys 2a, and the target key 2a is determined from among them at time Tc. Of the three keys, the key 2a pressed first is the first key 2a1, the key 2a pressed second is the second key 2a2, and the key 2a pressed third is the third key 2a3.

[0034] First, the virtual envelopes Ea, Eb, and Ec are calculated for the first key 2a1, the second key 2a2, and the third key 2a3, respectively. Specifically, the virtual envelope Ea is calculated as a function that connects the velocity Vsa at the key pressing start time Tsa of the first key 2a1 with the velocity “0” at the time Tea that is ΔT after the key pressing start time Tsa with a straight line.

[0035] Similarly, the virtual envelope Eb is calculated as a function connecting with a straight line the velocity Vsb at the key press start time Tsb of the second key 2a2 and the velocity "0" at the time Teb that is ΔT after the key press start time Tsb, and the virtual envelope Ec is calculated as a function connecting with a straight line the velocity Vsc at the key press start time Tsc of the third key 2a3 and the velocity "0" at the time Tec that is ΔT after the key press start time Tsc.

[0036] From the virtual envelopes Ea, Eb, Ec calculated in this manner, virtual envelope levels Vca, Vcb, Vcc at time Tc for determining the target key 2a are obtained, and the first key 2a1 having the smallest value among the obtained virtual envelope levels Vca, Vcb, Vcc is determined to be the "target key 2a".

[0037] The first key 2a1 determined as the target key 2a in this manner has the smallest virtual envelope level at time Tc, and is therefore the key 2a that had the smallest velocity when pressed among the first to third keys 2a1 to 2a3 that are pressed or released simultaneously, or the key 2a that has been pressed for some time and has the lowest relationship with the sound production state at time Tc.

[0038] That is, the first key 2a1 is the key 2a that is least noticeable among the keys 2a1 to 2a3 when a key press is changed to a key release, and is the key 2a that is least noticeable when the key release control is stopped and the mechanical noise that occurs when the key returns to the original position is stopped. By using the first key 2a1 that is least noticeable as the "target key 2a" and changing from a key press to a key release or stopping the key release control, it is possible to suppress the discomfort felt by the listener when a key press is changed to a key release or when the key release control is stopped.

[0039] Next, the function of the electronic piano 1 will be described with reference to Fig. 4. Fig. 4 is a functional block diagram of the electronic piano 1. As shown in Fig. 4, the electronic piano 1 has a key press number acquisition means 100, a maximum key press number acquisition means 101, and a control switching means 102. The key press number acquisition means 100 is a means for acquiring the above-mentioned number of key presses Np, and the maximum key press number acquisition means 101 is a means for acquiring the above-mentioned maximum number of key presses Mp, and these are realized by the CPU 10 described later in Fig. 5. The control switching means 102 is a means for acquiring a new instruction for pressing a key 2a, and when the number of key presses Np acquired by the key press number acquisition means 100 is equal to or greater than the maximum number of key presses Mp acquired by the maximum key press number acquisition means 101, issuing an instruction to release one of the pressed keys 2a and starting pressing the key 2a instructed to be pressed, and is realized by the CPU 10.

[0040] That is, when the control exchanging means 102 newly acquires an instruction to press a key 2a and the number of pressed keys Np is equal to or greater than the maximum number of pressed keys Mp, an instruction to release one of the pressed keys 2a is issued and pressing of the key 2a instructed to be pressed is started. As a result, the number of pressed keys 2a can be kept equal to or less than the maximum number of pressed keys Mp before and after acquiring the key press instruction, so there is no need to stop key release control of the released key 2a due to the instruction to press the key 2a.

[0041] Therefore, the key release control of the released key 2a is continued, and the speed of the key 2a can be kept lower than the speed based on gravity, so that the impact when returning to the original position can be suppressed. This reduces the discomfort felt by the listener when the key is released even when multiple keys 2a are automatically operated at the same time. In addition, among the keys 2a with the maximum control number Mc, the number of keys 2a that is the difference between the maximum control number Mc and the maximum number of pressed keys Mp is reserved as the keys that are only released, which consumes less power than the keys that are pressed. Therefore, compared to the case where all the keys 2a with the maximum control number Mc can be pressed and released, the power consumption required by the keyboard 2 during automatic operation can be reduced, so that the electronic piano 1 can be operated stably even with a power supply with a smaller capacity, and the increase in the cost of the power supply for the electronic piano 1 can be suppressed.

[0042] Next, the electrical configuration of the electronic piano 1 will be described with reference to Figures 5 and 6. Figure 5 is a block diagram showing the electrical configuration of the electronic piano 1. The electronic piano 1 has a CPU 10, a flash ROM 11, a RAM 12, the keyboard 2, the setting keys 3, and the LCD 4 described above, a sound source 13, and a digital signal processor 14 (hereinafter referred to as "DSP 14"), each of which is connected via a bus line 15.

[0043] The CPU 10 is a calculation device that controls each part connected by a bus line 15. The flash ROM 11 is a rewritable non-volatile storage device that stores programs executed by the CPU 10, fixed value data, etc., and stores a control program 11a. When the control program 11a is executed by the CPU 10, a key-press request process of FIG. 7(a) and a key-release request process of FIG. 7(b) are executed. The RAM 12 is a memory for rewritably storing various work data, flags, etc. when the CPU 10 executes a program, and stores a resource table 12a. The resource table 12a will now be described with reference to FIG. 6.

[0044] Fig. 6 is a diagram showing a schematic diagram of the resource table 12a. The resource table 12a is a data table for managing information of the key 2a to be pressed or released. The resource table 12a stores, as information of the key 2a, a status indicating the key-pressed / released state of the key 2a, a MIDI note number corresponding to the key 2a, a velocity when the key 2a is pressed, the key-press start time described above in Fig. 3, and a key-release start time when the key 2a is released, in association with each other. Hereinafter, the status, note number, velocity, key-press start time, and key-release start time of the key 2a stored in the resource table 12a are referred to as the "resource of the key 2a".

[0045] The resource table 12a is configured to store resources for 12 keys 2a, which is the maximum control number Mc. The statuses stored in the resource table 12a include a "key press request" indicating that the key 2a has been instructed to be pressed, a "key pressed" indicating that the key 2a is being pressed, a "key release request" indicating that the key 2a has been instructed to be released, a "key pressed" indicating that the key 2a is being released, and "OFF" indicating that the key 2a has neither been pressed nor released.

[0046] Using such a resource table 12a, the key pressing / release of the key 2a is controlled. In particular, in the resource table 12a, the number of requested or currently pressed keys is set as the number of pressed keys Np, and the key pressing / release of the key 2a is controlled so that the number of pressed keys Np is equal to or smaller than the maximum number of pressed keys Mp.

[0047] Returning to Fig. 5, the sound source 13 is a device that outputs waveform data based on performance information input from the CPU 10. The DSP 14 is a calculation device that processes the waveform data input from the sound source 13. A digital-to-analog converter (DAC) 16 is connected to the DSP 14, an amplifier 17 is connected to the DAC 16, and a speaker 18 is connected to the amplifier 17.

[0048] Next, the processing executed by the CPU 10 of the electronic piano 1 will be described with reference to Figs. 7 to 11. Fig. 7(a) is a flowchart of the key press request processing. The key press request processing is processing executed when a key press request, which is an instruction to the CPU 10 to press the key 2a, is input. The key press request processing performs a key press number limiting process in S1, and then a key press resource selection process in S2. Here, the key press number limiting process in S1 and the key press resource selection process in S2 will be described with reference to Figs. 8 and 9.

[0049] 8 is a flowchart of the key press count limiting process. In the key press count limiting process, NULL is set to the candidate key release resource in which the resource of the candidate key 2a to be released is stored, and the number of pressed keys is set to 0 (S20). In this embodiment, "NULL" represents the resource of the key 2a, i.e., a resource in which the status, note number, velocity, key press start time, and key release start time of the key 2a are not set.

[0050] After the process of S20, the counter variable i is set to 1 (S21). After the process of S21, the i-th resource is obtained from the resource table 12a (S22). After the process of S22, it is confirmed whether the status of the obtained i-th resource is "key pressed" (S23).

[0051] In the process of S23, if the status of the i-th resource is "key pressed" (S23: Yes), the number of keys pressed is incremented by 1 (S24). After the process of S24, a virtual envelope E is calculated from the key press start time and velocity of the i-th resource, and a virtual envelope level at the current time is obtained from the calculated virtual envelope E (S25).

[0052] After the process of S25, a virtual envelope E is calculated from the key press start time and velocity of the key release candidate resource, and a virtual envelope level at the current time is obtained from the calculated virtual envelope E (S26). Note that if the key release candidate resource is NULL, the key press start time and velocity are not set, so the maximum virtual envelope level of "255" is obtained as the virtual envelope level.

[0053] After the process of S26, it is confirmed whether the virtual envelope level of the i-th resource obtained in the process of S25 is equal to or lower than the virtual envelope level of the release-key candidate resource obtained in the process of S26 (S27). In the process of S27, if the virtual envelope level of the i-th resource is equal to or lower than the virtual envelope level of the release-key candidate resource (S27: Yes), the i-th resource is set as the release-key candidate resource (S28).

[0054] If the status of the i-th resource is not “key pressed” in the processing of S23 (S23: No), if the virtual envelope level of the i-th resource is greater than the virtual envelope level of the candidate resource for key release in the processing of S27 (S27: No), or after the processing of S28, 1 is added to the counter variable i (S29).

[0055] After the process of S29, it is confirmed whether the counter variable i is greater than the maximum control number Mc (S30). In the process of S30, if the counter variable i is equal to or smaller than the maximum control number Mc (S30: No), the processes from S22 onwards are repeated.

[0056] In the process of S30, if the counter variable i is larger than the maximum control number Mc (S30: Yes), it is confirmed whether the number of key presses Np is equal to or larger than the maximum number of key presses Mp (S31). In the process of S31, if the number of key presses Np is equal to or larger than the maximum number of key presses Mp (S31: Yes), it is a case where the key 2a corresponding to the key-release candidate resource, which is considered to have the smallest virtual envelope level among the pressed keys 2a, is to be released. In such a case, the status of the resource corresponding to the key-release candidate resource in the resource table 12a is set to "key-release request" and the key-release start time is set to the current time (S32).

[0057] If the number of pressed keys is smaller than the maximum number of pressed keys Mp in the process of S31 (S31: No), or after the process of S32, the key press number limiting process ends.

[0058] Next, the key pressing resource selection process of S2 will be described with reference to Fig. 9. Fig. 9 is a flowchart of the key pressing resource selection process. In the key pressing resource selection process, NULL is set to a new key pressing candidate resource in which a resource corresponding to a resource for setting a resource of a new key 2a to be pressed is stored among resources in the resource table 12a (S40). After the process of S40, 1 is set to a counter variable i (S41). After the process of S41, the i-th resource is obtained from the resource table 12a (S42).

[0059] After the process of S42, it is confirmed whether the status of the acquired i-th resource is "OFF" (S43). In the process of S43, if the status of the i-th resource is "OFF" (S43: Yes), the i-th resource is free, so the i-th resource is set as a new key pressing candidate resource (S44).

[0060] On the other hand, if the status of the i-th resource is not "OFF" in the process of S43 (S43: No), 1 is added to the counter variable i (S45), and it is confirmed whether the counter variable i is greater than the maximum control number Mc (S46). If the counter variable i is equal to or smaller than the maximum control number Mc in the process of S46 (S46: No), the processes from S42 onwards are repeated.

[0061] In the process of S46, if the counter variable i is greater than the maximum control number Mc (S46: Yes), 1 is set to the counter variable k (S47). After the process of S47, the kth resource is obtained from the resource table 12a (S48). After the process of S48, it is confirmed whether the status of the obtained kth resource is "key released" (S49).

[0062] In the processing of S49, if the status of the kth resource is “key released” (S49: Yes), a virtual envelope E is calculated from the key press start time and velocity of the kth resource, and the virtual envelope level at the current time is obtained from the calculated virtual envelope E (S50).

[0063] After the process of S50, a virtual envelope E is calculated from the key pressing start time and velocity of the new key pressing candidate resource, and a virtual envelope level at the current time is obtained from the calculated virtual envelope E (S51). Note that, in the process of S51 as well, if the new key pressing candidate resource is NULL, "255" is obtained as the virtual envelope level.

[0064] After the process of S51, it is confirmed whether the virtual envelope level of the k-th resource obtained in the process of S50 is equal to or lower than the virtual envelope level of the new key press candidate resource obtained in the process of S51 (S52). In the process of S52, if the virtual envelope level of the k-th resource is equal to or lower than the virtual envelope level of the new key press candidate resource (S52: Yes), the k-th resource is set as the new key press candidate resource (S53).

[0065] If the status of the k-th resource is not "key released" in the process of S49 (S49: No), if the virtual envelope level of the k-th resource is greater than the virtual envelope level of the new key pressing candidate resource in the process of S52 (S52: No), or after the process of S53, 1 is added to the counter variable k (S54). After the process of S54, it is confirmed whether the counter variable k is greater than the maximum control number Mc (S55).

[0066] In the process of S55, if the counter variable k is equal to or smaller than the maximum control number Mc (S55: No), the processes from S48 onwards are repeated. On the other hand, in the process of S55, if the counter variable k is greater than the maximum control number Mc (S55: Yes), or after the process of S44, the status of the resource corresponding to the new key-press candidate resource in the resource table 12a is set to "key press request", the note number corresponding to the key 2a requested to be pressed is set to the note number, the velocity at the time of the key-press request is set to the velocity, and the current time is set to the key-press start time (S56). As a result, if the key 2a corresponding to the new key-press candidate resource is being released, the key-release control is stopped, and pressing of the key 2a requested to be pressed is started. After the process of S56, the key-press resource selection process is terminated.

[0067] Next, the key-release request process will be described with reference to Fig. 7(b). Fig. 7(b) is a flowchart of the key-release request process. The key-release request process is executed when an instruction to release the key 2a (key-release request) is input to the CPU 10.

[0068] The key release request process begins by setting a counter variable i to 1 (S10). After the process of S10, the i-th resource is obtained from the resource table 12a (S11). After the process of S11, it is confirmed whether the note number requested for key release matches the note number of the obtained resource (S12). In the process of S12, if the note number requested for key release matches the note number of the obtained resource (S12: Yes), "key release request" is set as the status of the i-th resource from the resource table 12a, and the current time is set as the key release start time (S13).

[0069] If the note number requested for key release in the process of S12 does not match the note number of the acquired resource (S12: No), or after the process of S13, 1 is added to the counter variable i (S14), and it is confirmed whether the counter variable i is greater than the maximum control number Mc (S15). If the counter variable i is equal to or less than the maximum control number Mc in the process of S15 (S15: No), the processes from S11 onwards are repeated. On the other hand, if the counter variable i is greater than the maximum control number Mc in the process of S15 (S15: Yes), the key release request process is terminated.

[0070] Next, the timer interrupt process will be described with reference to Figures 10 and 11. In this embodiment, there are provided a timer 0% interrupt process executed at the start of a predetermined cycle (1 millisecond), a timer 10% interrupt process executed 10% of the predetermined cycle after the start of the cycle, and a timer 80% interrupt process executed 80% of the predetermined cycle after the start of the cycle. First, the timer 0% interrupt process will be described with reference to Figure 10.

[0071] 10 is a flowchart of the timer 0% interrupt process. The timer 0% interrupt process first sets a counter variable i to 1 (S60). After the process of S60, the i-th resource is obtained from the resource table 12a (S61).

[0072] After the process of S61, it is confirmed whether the status of the i-th resource is "key press request" (S62). In the process of S62, if the status of the i-th resource is "key press request" (S62: Yes), the status of the i-th resource is set to "key pressed" from the resource table 12a (S63).

[0073] If the status of the i-th resource is not "key press request" in the process of S62 (S62: No), or after the process of S63, it is confirmed whether the status of the i-th resource is "key release request" (S64). If the status of the i-th resource is "key release request" in the process of S64 (S64: Yes), the status of the i-th resource is set to "key released" in the resource table 12a (S65).

[0074] If the status of the i-th resource is not "key release request" in the process of S64 (S64: No), or after the process of S65, it is confirmed whether the status of the i-th resource is "key release in progress" and 200 milliseconds have passed since the key release start time (S66). If the status of the i-th resource is "key release in progress" and 200 milliseconds have passed since the key release start time (S66: Yes), it is time to stop the key release control of the key 2a corresponding to the i-th resource, so the status of the i-th resource is set to "OFF" (S67).

[0075] In the process of S66, if the status of the i-th resource is not "key released" or 200 milliseconds have not elapsed since the key release start time (S66: No), or after the process of S67, it is confirmed whether the status of the i-th resource is "key pressed" or "key released" (S68). In the process of S68, if the status of the i-th resource is "key pressed" or "key released" (S68: Yes), an H output is sent to the solenoid 2b of the key 2a corresponding to the note number of the i-th resource (S69). As a result, the driving force of the solenoid 2b for key pressing control or key release control is applied to the key 2a.

[0076] If the status of the i-th resource is neither "key pressed" nor "key released" in the process of S68 (S68: No), or after the process of S69, 1 is added to the counter variable i (S70), and it is confirmed whether the counter variable i is greater than the maximum control number Mc (S71). If the counter variable i is equal to or less than the maximum control number Mc in the process of S71 (S71: No), the processes from S61 onwards are repeated. On the other hand, if the counter variable i is greater than the maximum control number Mc in the process of S71 (S71: Yes), the timer 0% interrupt process is terminated.

[0077] Next, the timer 10% interrupt process will be described with reference to Fig. 11(a). Fig. 11(a) is a flowchart of the timer 10% interrupt process. In the timer 10% interrupt process, first, a counter variable i is set to 1 (S80). After the process of S80, the i-th resource is obtained from the resource table 12a (S81). After the process of S81, it is confirmed whether the status of the i-th resource is "key released" (S82). In the process of S82, if the status of the i-th resource is "key released" (S82: Yes), a Low output (L output) is sent to the solenoid 2b of the key 2a that corresponds to the note number of the i-th resource (S83).

[0078] That is, the solenoid 2b of the released key 2a outputs H in the process of S69 of the timer 0% interrupt process and outputs L in the process of S83. This stops the driving force of the solenoid 2b of the released key 2a, and the solenoid 2b of the key 2a is driven for only 10% of the predetermined period. This driving force of the solenoid 2b is not strong enough to move the key 2a downward, but it can act as a resistance force when the released key 2a moves upward due to the action of gravity. This allows the key 2a to be released gently, which can suppress mechanical noise caused by the impact when the key 2a returns to its original position.

[0079] If the status of the i-th resource is not "key released" in the process of S82 (S82: No), or after the process of S83, 1 is added to the counter variable i (S84), and it is confirmed whether the counter variable i is greater than the maximum control number Mc (S85). If the counter variable i is equal to or less than the maximum control number Mc in the process of S85 (S85: No), the processes from S81 onwards are repeated. On the other hand, if the counter variable i is greater than the maximum control number Mc in the process of S85 (S85: Yes), the timer 10% interrupt process is terminated.

[0080] Finally, referring to Fig. 11(b), the timer 80% interrupt process will be described. Fig. 11(b) is a flowchart of the timer 80% interrupt process. In the timer 80% interrupt process, first, counter variable i is set to 1 (S90). After the process of S90, the i-th resource is obtained from resource table 12a (S91). After the process of S91, it is confirmed whether the status of the i-th resource is "key being pressed" (S92). In the process of S92, if the status of the i-th resource is "key being pressed" (S92: Yes), an L output is sent to the solenoid 2b of the key 2a that corresponds to the note number of the i-th resource (S93).

[0081] That is, the solenoid 2b of the pressed key 2a outputs H in the process of S69 of the timer 0% interrupt process, and outputs L in the process of S93. This stops the driving force of the solenoid 2b of the pressed key 2a, and the solenoid 2b of the key 2a is driven for only 80% of the predetermined cycle. By limiting the drive of the solenoid 2b when the key 2a is pressed to 80% of the predetermined cycle, it is possible to achieve a better balance between power consumption and the key pressing speed of the key 2a than, for example, driving the solenoid 2b for 100% of the predetermined cycle.

[0082] If the status of the i-th resource is not "key pressed" in the process of S92 (S92: No), or after the process of S93, 1 is added to the counter variable i (S94), and it is confirmed whether the counter variable i is greater than the maximum control number Mc (S95). If the counter variable i is equal to or less than the maximum control number Mc in the process of S95 (S95: No), the processes from S91 onwards are repeated. On the other hand, if the counter variable i is greater than the maximum control number Mc in the process of S95 (S95: Yes), the timer 80% interrupt process is terminated.

[0083] Although the above description is based on the above embodiment, it can be easily imagined that various improvements and modifications are possible.

[0084] In the above embodiment, the virtual envelope E is a function that represents the attenuation of the velocity Vs generated at the key press start time Ts, but the present invention is not limited to this. For example, the virtual envelope E may be a function that corresponds only to the elapsed time from the key press start time Ts. In this case, the reciprocal of the elapsed time from the key press start time Ts may be obtained as the virtual envelope level.

[0085] In addition, the virtual envelope E is linearly interpolated between the velocity Vs at the key press start time Ts and the velocity "0" at the time Te, but this is not limited to this and may be interpolated using a curve such as a quadratic function, a cubic function, or an exponential function, or may be interpolated in a stepped manner, or may be interpolated using some other shape.

[0086] 8 and S50 to S53 in Fig. 9, the value obtained from the virtual envelope E is used as the virtual envelope level when selecting the key-release candidate resource or the new key-press candidate resource, but this is not limited to this. For example, the value obtained from the virtual envelope E may be added to or multiplied by a coefficient based on the inverse of the elapsed time from the key-press start time Ts, and the result may be used as the virtual envelope level when selecting the key-release candidate resource or the new key-press candidate resource.

[0087] This allows the virtual envelope level of the key 2a that has just been pressed to be made larger than the virtual envelope level of the key 2a that has been pressed for some time, thereby preventing the key 2a that has just been pressed from being released or the key release control from being stopped, thereby further reducing the sense of discomfort felt by the listener.

[0088] Furthermore, in the processes of S25 to S28 in Fig. 8 and S50 to S53 in Fig. 9, both the key-release candidate resource and the new key-press candidate resource are selected using the virtual envelope level, but this is not limited to this. Only the key-release candidate resource may be selected using the virtual envelope level, and the new key-press candidate resource may be selected by another method, or only the new key-press candidate resource may be selected using the virtual envelope level, and the key-release candidate resource may be selected by another method.

[0089] In the above embodiment, when the key 2a is pressed, the solenoid 2b outputs an H signal for 80% of the predetermined cycle, but this is not limited to this. The H signal when the key is pressed may be for a period of 80% or more of the predetermined cycle, or for a period of 80% or less. Similarly, when the key 2a is released, the solenoid 2b outputs an H signal for 10% of the predetermined cycle, but this is not limited to this. The H signal when the key is released may be for a period of 10% or more of the predetermined cycle, or for a period of 10% or less of the predetermined cycle.

[0090] In the above embodiment, when a key press request is input, a key-release candidate resource is selected from the pressed keys 2a by the process of S1 in Fig. 8, and the corresponding key 2a is released, and a new key-press candidate resource is selected from the released keys 2a by the process of S2 in Fig. 9, and the key-release control of the corresponding key 2a is stopped. However, this is not limited to the above, and when a key press instruction is input, only the process of S1 in Fig. 8 may be performed to release the pressed key 2a, or only the process of S2 in Fig. 9 may be performed to stop the key-release control of the released key 2a.

[0091] In the above embodiment, the maximum number of pressed keys Mp is set to a number equal to or greater than half the maximum number of controls Mc, but this is not limited thereto and may be set to a number equal to or less than half the maximum number of controls Mc. Also, in the above embodiment, the maximum number of keys 2a that can be released is not set, but this is not limited thereto and may be set to a maximum number of keys 2a that can be released.

[0092] In the above embodiment, the output to the solenoid 2b of the released key 2a is changed from H output to L output at 10% of the predetermined cycle by the process of Fig. 11(a), but this is not limited to this. The timing of changing the output to the solenoid 2b of the released key 2a from H output to L output may be before or after the 10% of the predetermined cycle. Similarly, the output to the solenoid 2b of the pressed key 2a is changed from H output to L output at 80% of the predetermined cycle by the process of Fig. 11(b), but this is not limited to this and may be before or after the 80% of the predetermined cycle.

[0093] In the above embodiment, the electronic musical instrument is exemplified as an electronic piano 1, but the present invention is not limited to this and may be applied to other electronic musical instruments such as synthesizers and electronic wind instruments. Also, the control program 11a may be made executable by an information processing device such as a personal computer or a mobile terminal. In this case, the keyboard 2 may be connected to the information processing device such as a personal computer.

[0094] In the above embodiment, MIDI data is used as an example of music data, but the present invention is not limited to this, and data relating to music other than that conforming to the MIDI standard may also be used as music data. [Explanation of symbols]

[0095] 1. Electronic piano (electronic instrument) 11a Control program (automatic operation program) 2 keys 2a key Np Number of keys pressed Mc Maximum Control Number Mp Maximum number of keys pressed Vs Velocity E Virtual Envelope Vc Virtual envelope level S31: A means for acquiring the number of pressed keys, a means for acquiring the maximum number of pressed keys, a step for acquiring the number of pressed keys, and a step for acquiring the maximum number of pressed keys S32, S56 Control switching means, control switching step S25, S26, S50, S51 Envelope calculation method S42 to S46 Control number acquisition means

Claims

1. An electronic musical instrument having a keyboard with automatically operable keys, a key press number acquiring means for acquiring a key press number, which is the number of the keys pressed in the automatic operation; a maximum key press number acquisition means for acquiring a maximum key press number, which is a number less than a maximum control number, which is a maximum number of the keys that can be simultaneously pressed and released in the automatic operation, and which is a maximum number of the keys that can be controlled to be pressed in the automatic operation; and control switching means for acquiring a new instruction to press one of the keys in the automatic operation, and when the number of pressed keys acquired by the key press number acquisition means is equal to or greater than the maximum number of pressed keys acquired by the maximum key press number acquisition means, issuing an instruction to release any of the keys pressed in the automatic operation, and starting to press the key instructed to be pressed.

2. a control number acquiring means for acquiring a control number which is the number of the keys being pressed or released in the automatic operation, 2. The electronic musical instrument according to claim 1, wherein the control switching means is configured to, when a new instruction to press a key in the automatic operation is obtained, and the number of controls obtained by the control number obtaining means is equal to or greater than a maximum control number, and the number of pressed keys obtained by the key press number obtaining means is equal to or greater than the maximum number of pressed keys obtained by the maximum number of pressed keys obtaining means, obtain an instruction to stop key release control for any of the keys that have been released in the automatic operation, and to give an instruction to release any of the keys that have been pressed in the automatic operation, and to start pressing the key that has been instructed to be pressed.

3. a control number acquiring means for acquiring a control number which is the number of the keys being pressed or released in the automatic operation, 2. The electronic musical instrument according to claim 1, wherein the control switching means newly acquires an instruction to press a key for the automatic operation, and when the control number acquired by the control number acquisition means is equal to or greater than a maximum control number and the number of pressed keys acquired by the key press number acquisition means is less than the maximum number of pressed keys acquired by the maximum key press number acquisition means, instructs any of the keys that have been released in the automatic operation to stop key release control, and starts pressing the key for which pressing has been instructed.

4. an envelope calculation means for calculating a virtual envelope of a musical tone based on an instruction to press the key when the instruction to press the key in the automatic operation is received; 3. The electronic musical instrument according to claim 1, wherein the control switching means obtains a virtual envelope level at that time for each of the keys being pressed in the automatic operation from the virtual envelope calculated by the envelope calculation means, and issues a key-release instruction to the key for which the obtained virtual envelope level is a minimum value.

5. an envelope calculation means for calculating a virtual envelope of a musical tone based on an instruction to press the key when the instruction to press the key in the automatic operation is received; 4. The electronic musical instrument according to claim 2, wherein the control switching means obtains a virtual envelope level at that point in time for each of the keys that is released during the automatic operation from the virtual envelope calculated by the envelope calculation means, and issues an instruction to stop key-release control to the key for which the obtained virtual envelope level is a minimum value.

6. 5. The electronic musical instrument according to claim 4, wherein said envelope calculation means calculates a virtual envelope based on the time and velocity at which said key is depressed and the time elapsed since the key was depressed.

7. 6. The electronic musical instrument according to claim 5, wherein said envelope calculation means calculates a virtual envelope based on the time and velocity at which said key is depressed and the time elapsed since the key was depressed.

8. 7. The electronic musical instrument according to claim 6, wherein said envelope calculation means calculates a virtual envelope by linearly interpolating a velocity at the time when said key is pressed, said velocity being set as a velocity at the time when said key is pressed and a velocity a predetermined time after said time being set as 0.

9. 8. The electronic musical instrument according to claim 7, wherein said envelope calculation means calculates a virtual envelope by linearly interpolating a velocity at the time when said key is pressed, said velocity being set as a velocity at the time when said key is pressed and a velocity a predetermined time after said time being set as 0.

10. 2. The electronic musical instrument according to claim 1, wherein said maximum number of keys to be pressed is greater than half of said maximum number of controls.

11. 1. An automatic operation method executed in an electronic musical instrument having a keyboard with keys capable of being automatically operated, a key press number acquisition step for acquiring a key press number, which is the number of the keys simultaneously pressed in the automatic operation; a maximum key press number acquisition step for acquiring a maximum key press number, which is a number less than a maximum control number, which is a maximum number of the keys that can be simultaneously pressed and released in the automatic operation, and which is a maximum number of the keys that can be controlled to be pressed in the automatic operation; and a control switching step of newly acquiring an instruction to press a key for the automatic operation, and if the number of pressed keys acquired in the key press number acquiring step is equal to or greater than the maximum number of pressed keys acquired in the maximum number of pressed keys acquiring step, issuing an instruction to release any of the keys pressed in the automatic operation, and starting to press the key for which pressing has been instructed.

12. An automatic operation program for causing a computer equipped with a keyboard having automatically operable keys to execute an automatic operation process for the keys of the keyboard, a key press number acquisition step for acquiring a key press number, which is the number of the keys simultaneously pressed in the automatic operation; a maximum key press number acquisition step for acquiring a maximum key press number, which is a number less than a maximum control number, which is a maximum number of the keys that can be simultaneously pressed and released in the automatic operation, and which is a maximum number of the keys that can be controlled to be pressed in the automatic operation; a control switching step of newly acquiring an instruction to press a key for the automatic operation and, if the number of pressed keys acquired in the key press number acquiring step is equal to or greater than the maximum number of pressed keys acquired in the maximum number of pressed keys acquiring step, issuing an instruction to release any of the keys pressed in the automatic operation and starting to press the key for which pressing has been instructed.

Citation Information

Patent Citations

  • Controller of musical instrument

    JP2008233828A