Electronic musical instrument, key scanning method, and key scanning program

The electronic musical instrument addresses the time lag in key switch state detection by dividing keys into scan lines and prioritizing detection of pressing or releasing states, enhancing the naturalness and responsiveness of tone output.

JP7859876B2Active Publication Date: 2026-05-15ROLAND CORP
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
ROLAND CORP
Filing Date
2022-05-31
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing electronic musical instruments experience a time lag in key switch state detection, leading to incongruous velocity calculations and a sense of unnaturalness in musical tone output.

Method used

An electronic musical instrument with multiple detection units per key, employing a key scanning method that divides keys into scan lines, prioritizes detection of keys being pressed or released, and uses a scanning method to minimize detection frequency while ensuring responsive tone control.

Benefits of technology

The solution enhances the responsiveness and naturalness of musical tone output by prioritizing detection of keys in the pressing or releasing state, reducing the frequency of unnecessary detections, and improving the accuracy of velocity calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007859876000001
    Figure 0007859876000001
  • Figure 0007859876000002
    Figure 0007859876000002
  • Figure 0007859876000003
    Figure 0007859876000003
Patent Text Reader

Abstract

To provide an electronic musical instrument, a key scanning method, and a key scanning program that can achieve output of musical sounds with suppressed discomfort while minimizing number of times of key state detection as necessary.SOLUTION: A scan line to which a 2aX belongs in the middle of key press or key release is set as a priority line, and the priority line set for a scan order SS is inserted. By this, in one scan line detection based on the scan order SS, the scan line to which the key 2aX belongs in the middle of a key press or key release is detected multiple times, accordingly frequency at which the key 2aX in the middle of a key press or key release is detected can be increased. This allows detailed control of musical notes corresponding to the key 2aX, and thus suppresses discomfort of a user H with respect to the musical notes. In addition, since only a priority line is inserted into the scan order SS, the increase in the number of detection times of the key 2aX can be minimized as necessary.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an electronic musical instrument, a key scanning method, and a key scanning program.

Background Art

[0002] Patent Document 1 discloses an electronic keyboard musical instrument in which first to fourth key switch groups 41 to 44 are provided for each of a plurality of white keys 31w and black keys 31b (hereinafter abbreviated as "keys"), and sound generation and velocity control are performed according to the on / off states of these first to fourth key switch groups 41 to 44. The first to fourth key switch groups 41 to 44 are arranged so as to be turned on in order when a key is pressed. These plurality of keys are divided into 15 blocks according to the musical scales corresponding to the keys, and acquisition of the states of the first to fourth key switch groups 41 to 44 is sequentially performed in block units.

[0003] Specifically, first, the states of the first and second key switch groups 41 and 42 of each block are acquired. When the first and second key switch groups 41 and 42 of a certain key are both turned on, after a further time difference between the time when the first key switch group 41 of that key is turned on and the time when the second key switch group 42 is turned on has elapsed, acquisition of the states of the third and fourth key switch groups 43 and 44 of the block to which that key belongs is started. Thereby, without always acquiring the first to fourth key switch groups 41 to 44 of all the keys, the state of the key being pressed or released can be acquired, so that the processing load of the electronic keyboard musical instrument can be reduced.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] However, in Patent Document 1, a time lag of the above-mentioned time difference is required from the time the first and second key switch groups 41 and 42 are turned on until the state of the third and fourth key switch groups 43 and 44 is acquired. As a result, immediately after the first and second key switch groups 41 and 42 are turned on, there is a time lag between the acquisition of the state of the first and second key switch groups 41 and 42 and the acquisition of the state of the third and fourth key switch groups 43 and 44. Consequently, the velocity calculated according to the timing of when the first to fourth key switch groups 41 to 44 are turned on is calculated at a slower rate than the actual speed at which the keys are pressed, which may cause users playing electronic keyboard instruments to feel a sense of incongruity with the musical tones output according to such velocities.

[0006] The present invention was made to solve the above-mentioned problems, and aims to provide an electronic musical instrument, a key scanning method, and a key scanning program that can achieve the output of musical tones with suppressed unnaturalness while minimizing the number of times the key state is detected. [Means for solving the problem]

[0007] To achieve this objective, the electronic musical instrument of the present invention comprises a plurality of keys, detection means for detecting the pressed or released state of the key by a plurality of detection units provided for each key, and musical tone control means for controlling musical tones according to the state of the key detected by the detection means, and further comprises scanning means for sequentially performing the detection of the state of the key by the detection means for each key, operation key acquisition means for acquiring the key in the process of being pressed or released based on the detection result by the detection means, and priority means in the scanning means for prioritizing the detection of the state of the key acquired by the operation key acquisition means by the detection means. The multiple keys are divided into scan lines at predetermined intervals, the detection means detects the state of the keys belonging to each scan line, the scanning means sequentially performs the state detection by the detection means for each scan line, the priority means prioritizes the state detection by the detection means for the scan line to which the key acquired by the operating key acquisition means belongs, and all of the multiple detection units provided on the same key belong to the same scan line. ru. Another electronic musical instrument of the present invention comprises a plurality of keys, detection means for detecting the pressed or released state of a key by a plurality of detection units provided for each key, and musical tone control means for controlling a musical tone according to the state of the key detected by the detection means, wherein the scanning means sequentially performs the detection of the state of each key by the detection means, operation key acquisition means for acquiring a key that is in the process of being pressed or released based on the detection result by the detection means, and priority means for the scanning means to prioritize the detection of the state of the key acquired by the operation key acquisition means by the detection means, wherein the scanning means performs the detection of the state of the keys by the detection means in a scan order which is the order in which the state of the keys is detected by the detection means, and the priority means prioritizes the detection of the state of the key by the detection means by inserting the key acquired by the operation key acquisition means into an insertion position which is a predetermined position of the key in the scan order.

[0008] The key scanning method of the present invention is a method performed on an electronic musical instrument equipped with a plurality of keys and a plurality of detection units provided for each key, and comprises: a detection step in which the detection units detect the pressed or released state of the key; a musical tone control step in which a musical tone is controlled according to the state of the key detected by the detection step; a scan step in which the detection of the state of the key by the detection step is performed sequentially for each key; an operation key acquisition step in which the key is acquired in the pressing or releasing position based on the detection result of the detection step; and a priority step in the scan step in which the detection of the state of the key acquired in the operation key acquisition step is given priority over the detection of the state of the key by the detection step. The multiple keys are divided into scan lines at predetermined intervals, the detection step detects the state of the keys belonging to each scan line, the scan step sequentially performs the state detection by the detection step for each scan line, the priority step prioritizes the state detection by the detection step for the scan line to which the key acquired in the operation key acquisition step belongs, and all of the multiple detection units provided on the same key belong to the same scan line. ru. Another key scanning method of the present invention is a method performed on an electronic musical instrument equipped with a plurality of keys and a plurality of detection units provided for each key, and comprises: a detection step in which the detection units detect the pressed or released state of the key; a musical tone control step in which a musical tone is controlled according to the state of the key detected by the detection step; a scan step in which the detection of the state of the key by the detection step is performed sequentially for each key; an operation key acquisition step in which the key is acquired in the process of being pressed or released based on the detection result of the detection step; and a priority step in which, in the scan step, the detection of the state of the key acquired in the operation key acquisition step is given priority over the detection of the state of the key by the detection step, wherein the scan step performs the detection of the state of the key by the detection step in a scan order which is the order in which the states of the keys are detected by the detection step, and the priority step gives priority to the detection of the state of the key by the detection step by inserting the key acquired in the operation key acquisition step into an insertion position which is a predetermined position of the key in the scan order.

[0009] Furthermore, the key scanning program of the present invention is a program that causes a computer equipped with a keyboard having a plurality of keys and a plurality of detection units provided for each key to execute a process of sequentially detecting the state of the keys, and causes the computer to execute the following: a detection step in which the detection unit detects the state of pressing or releasing the key; a musical tone control step in which a musical tone is controlled according to the state of the key detected by the detection step; a scan step in which the detection of the state of the key by the detection step is sequentially performed for each key; an operation key acquisition step in which the key is acquired in the operation key acquisition step is acquired in the scan step and the computer to execute the following: The multiple keys are divided into scan lines at predetermined intervals, the detection step detects the state of the keys belonging to each scan line, the scan step sequentially performs the state detection by the detection step for each scan line, the priority step prioritizes the state detection by the detection step for the scan line to which the key acquired in the operation key acquisition step belongs, and all of the multiple detection units provided on the same key belong to the same scan line. ru. Another key scanning program of the present invention is a program that causes a computer equipped with a keyboard having a plurality of keys and a plurality of detection units provided for each key to execute a process of sequentially detecting the state of the keys, and causes the computer to execute the following: a detection step in which the detection unit detects the pressed or released state of the key; a musical tone control step in which a musical tone is controlled according to the state of the key detected by the detection step; a scan step in which the detection of the state of the key by the detection step is performed sequentially for each key; an operation key acquisition step in which the key is acquired in the pressing or releasing position based on the detection result of the detection step; and a priority step in which the computer is caused to execute the following: the scan step executes the detection of the state of the keys by the detection step in a scan order which is the order in which the state of the keys is detected by the detection step; and the priority step prioritizes the detection of the state of the key by the detection step by inserting the key acquired in the operation key acquisition step into an insertion position which is a predetermined position of the key in the scan order. [Brief explanation of the drawing]

[0010] [Figure 1] This is a front perspective view of an electronic piano. [Figure 2] This is a cross-sectional view of an electronic piano along line II-II in Figure 1. [Figure 3] This is a magnified cross-sectional view of a digital piano, showing section III in Figure 2. [Figure 4](a) is a schematic representation of scanlines, and (b) is a schematic representation of time slot data. [Figure 5] (a) is a schematic diagram showing the scan order when no priority lines are set, (b) is a schematic diagram showing the scan order when only the first priority line is set, and (c) is a schematic diagram showing the scan order when both the first priority line and the second priority line are set. [Figure 6] This is a functional block diagram of an electronic piano. [Figure 7] This is a block diagram showing the electrical configuration of an electronic piano. [Figure 8] (a) is a flowchart of the main process, (b) is a flowchart of the normal scan process, and (c) is a flowchart of the velocity process. [Figure 9] This is a flowchart for single-priority scan processing. [Figure 10] This is a flowchart for multiple priority scan processing. [Figure 11] (a) is a flowchart for the first priority line change process, (b) is a flowchart for the second priority line change process, and (c) is a flowchart for other line change processes. [Modes for carrying out the invention]

[0011] The following describes preferred embodiments with reference to the attached drawings. First, the outline of the electronic piano 1 of this embodiment will be described with reference to Figure 1. Figure 1 is a front perspective view of the electronic piano 1. Note that Figure 1 shows the keyboard 2 removed from the keyboard table 30. The arrows U, D, F, B, L, and R in Figure 1 indicate the upward, downward, forward, backward, left, and right directions of the electronic piano 1, respectively, and the same applies to Figures 2 and 3.

[0012] The electronic piano 1 is an electronic musical instrument that produces musical tones based on the performance of user H or on music data in the MIDI (Musical Instrument Digital Interface) standard. As shown in FIG. 1, the electronic piano 1 mainly includes a keyboard 2, a keyboard table 30 that supports the keyboard 2, setting keys 4 for performing various settings of the electronic piano 1, and an LCD 5 on which the setting status of various settings and the like are displayed.

[0013] The keyboard 2 is an input device for acquiring performance information based on the performance of user H. The keyboard 2 is provided with a pair of support members 40 for fixing the keyboard 2 to the keyboard table 30, a base member 50 supported by the pair of support members 40, and keys 2a1 to 2a88 supported by the base member 50. MIDI-standard performance information corresponding to the key pressing or key releasing of keys 2a1 to 2a88 by user H is output to the CPU 10 (see FIG. 7) and output as musical tones.

[0014] The support members 40 are provided respectively in the front and rear of the keyboard 2. The front end and the rear end portions of the base member 50 are respectively fixed to the support members 40, and the keys 2a1 to 2a88 are supported on the upper surface of the base member 50.

[0015] Next, the detailed configuration of the electronic piano 1 will be described with reference to FIGS. 2 and 3. FIG. 2 is a cross-sectional view of the electronic piano 1 taken along line II-II of FIG. 1, and FIG. 3 is a partially enlarged cross-sectional view of the electronic piano 1 obtained by enlarging the III portion of FIG. 2. For the keys 2a1 to 2a88, the structure for pivotally supporting (supporting) them rotatably by the base member 50, the structure for guiding their rotation, and the structure for detecting the key pressing or key releasing of the keys 2a1 to 2a88 are substantially the same for the keys 2a1 to 2a88. Therefore, hereinafter, only the structure of the key 2a1 will be described, and the description of the structures of the keys 2a2 to 2a88 will be omitted.

[0016] As shown in Figure 2, the electronic piano 1 is provided with a hammer 80 that is pivotally supported so as to be rotatable around a rotation axis 51 of a base member 50, and a circuit board 2b1 on which a first sensor 2d1 (described later) and the like are provided to detect the pressed or released state of the key 2a1 from the rotation state of the hammer 80.

[0017] The rear end portion of the key 2a1 is pivotally supported on the upper surface of the rear end of the base member 50 so as to be rotatable around the rotation axis 52, and a projection 2c1 is formed on the lower surface of the key 2a1 approximately in the center in the front-rear direction, projecting downward. The projection 2c1 is a part for transmitting the rotational force accompanying the rotation of the key 2a1 to the hammer 80, and the tip of the projection 2c1 comes into contact with the hammer 80.

[0018] The hammer 80 is a mass that provides a tactile sensation when the key 2a1 is pressed, and the hammer 80 is pivotally supported on a rotating shaft 51 located behind the contact point between the hammer 80 and the protrusion 2c1. When the key 2a1 is pressed, the protrusion 2c1 of the key 2a1 slides along the upper surface of the hammer 80, causing the hammer 80 to rotate around the rotating shaft 51. The reaction force accompanying this rotation of the hammer 80 provides the user H with the tactile sensation of pressing the key 2a1. In addition, when the key 2a1 is pressed, the acceleration of the rotation of the hammer 80 is detected by the first sensor 2d1 on the substrate 2b1, thereby detecting the pressing information at the time of pressing.

[0019] As shown in Figure 3, the substrate 2b1 is provided with a first sensor 2d1, a second sensor 2e1, and a third sensor 2f1 positioned on its upper surface, as well as a cover 90. The first sensor 2d1, the second sensor 2e1, and the third sensor 2f1 are sensors for detecting whether the key 2a1 is pressed or released. The cover 90 has a space S in which these sensors 2d1 and the others are housed, and is fixed to the substrate 2b1 while covering the sensors 2d1 and the others.

[0020] Movable contacts 91a, 91b, and 91c are provided on the inner surface of the cover 90. Movable contact 91a is provided in the cover 90 to correspond to the first sensor 2d1, movable contact 91b is provided in the cover 90 to correspond to the second sensor 2e1, and movable contact 91c is provided in the cover 90 to correspond to the third sensor 2f1.

[0021] Furthermore, the first sensor 2d1, the second sensor 2e1, and the third sensor 2f1 and the movable contacts 91a to 91c are arranged such that when the released key 2a1 is pressed, the first sensor 2d1 and the movable contact 91a come into contact first, then the second sensor 2e1 and the movable contact 91b come into contact, and finally the third sensor 2f1 and the movable contact 91c come into contact.

[0022] When the first sensor 2d1 is in contact with the movable contact 91a, the first sensor 2d1 detects that it is ON, and when this contact is released, the first sensor 2d1 detects that it is OFF. Similarly, when the second sensor 2e1 is in contact with the movable contact 91b, the second sensor 2e1 detects that it is ON, and when this contact is released, the second sensor 2e1 detects that it is OFF. Also, when the third sensor 2f1 is in contact with the movable contact 91c, the third sensor 2f1 detects that it is ON, and when this contact is released, the third sensor 2f1 detects that it is OFF. Depending on the timing of when the first sensors 2d1 to the third sensors 2f1 are turned ON or OFF, the state of the key 2a1 being pressed or released, or in the middle of being pressed or released, is detected, and the musical tone corresponding to the key 2a1 is controlled according to the detected state.

[0023] Hereafter, keys 2a1 to 2a88 will be referred to as "key 2aX" if they are not distinguished, first sensors 2d1 to 2d88 will be referred to as "first sensor 2dX" if they are not distinguished, similarly second sensors 2e1 to 2e88 will be referred to as "second sensor 2eX" if they are not distinguished, and third sensors 2f1 to 2f88 will be referred to as "third sensor 2fX" if they are not distinguished. Furthermore, first sensor 2dX, second sensor 2eX, and third sensor 2fX will be abbreviated collectively as "sensor 2dX~2fX," etc.

[0024] The first sensors 2d1 to 2d88, which correspond to keys 1a2 to 2a88, have their on / off states detected periodically, and the detected on / off states are used to control the musical tones corresponding to keys 2a1 to 2a88. The detection method for the first sensors 2d1 to 2d88 in this embodiment will be explained with reference to Figures 4 and 5.

[0025] Figure 4(a) is a schematic representation of the scan lines. In this embodiment, the first sensors 2d1 to 2d88, the second sensors 2e1 to 2e88, and the third sensors 2f1 to 2f88, each corresponding to a key 2a1 to 2a88, are divided into 11 "scan lines" from the first to the eleventh line, and the state of the sensors 2dX to 2fX belonging to each scan line is detected sequentially.

[0026] Specifically, as shown in Figure 4(a), sensors 2d1~2f1, 2d12~2f12, 2d23~2f23, ..., 2d67~2f67, and 2d78~2f78, corresponding to the eight keys 2aX (keys 2a1, 2a12, 2a23, ..., 2a67, and 2a78), are set on the first line. Similarly, sensors 2d2~2f2, 2d13~2f13, ..., and 2d79~2f79, corresponding to the eight keys 2aX (keys 2a2, 2a13, ..., and 2a79), are set on the second line, and so on for the third to eleventh lines.

[0027] The first to eleventh lines, configured in this way, are switched sequentially, and the on / off state of sensors 2dX to 2fX belonging to each scan line is detected. Specifically, the scan lines are switched sequentially as the first line, second line, third line, ..., to the eleventh line, and the on / off state of sensors 2dX to 2fX of key 2aX belonging to each scan line is detected. Once the detection of the on / off state of sensors 2dX to 2fX on the eleventh line is complete, the detection of the on / off state of sensors 2dX to 2fX on the first line is started again. Hereafter, the detection of the on / off state of sensors 2dX to 2fX belonging to a scan line (first line, etc.) will simply be referred to as "detection of the scan line (first line, etc.)".

[0028] In this way, by dividing the 88 keys 2aX into 11 scan lines of 8 keys 2aX each, and detecting the on / off state of sensors 2dX~2fX together for each scan line, the frequency (number of times) in which the on / off state of sensors 2dX~2fX is detected per unit time can be improved compared to sequentially detecting the sensors 2dX~2fX corresponding to each of the 88 keys 2a for each key 2a.

[0029] Furthermore, by providing a control device (not shown) for each scan line that detects the state of the sensors 2dX to 2fX of the key 2aX belonging to that scan line, and connecting the control device to the CPU 10 (described later) in Figure 7, it becomes unnecessary to connect the 264 signal lines that communicate the on / off states from all the sensors 2dX to 2fX to the CPU 10. This allows for a more compact circuit board (not shown) on which the CPU 10 is mounted, thereby reducing the manufacturing cost of the electronic piano 1.

[0030] Furthermore, each scan line is composed of discrete keys 2aX on the keyboard 2, rather than a continuous range of keys 2aX (e.g., keys 2a1, 2a2, 2a3, ...), such that the first line is configured by sensors 2dX~2fX corresponding to keys 2a1, 2a12, 2a23, ..., 2a67, and 2a78, and the second line is configured by sensors 2dX~2fX corresponding to keys 2a2, 2a13, and 2a79.

[0031] Therefore, detecting only a specific range of keys 2aX on keyboard 2 by detecting a single scanline is suppressed, and a wide range of keys 2aX on keyboard 2 can be detected. As a result, the state of sensors 2dX~2fX can be detected in a responsive manner in response to the user H's playing operation of keys 2aX, thereby suppressing any unnaturalness in the musical tones output in response to such playing operations.

[0032] In this scanline-by-scanline detection process, detection of the scanline to which key 2aX belongs while it is being pressed or released is given further priority. Refer to Figures 4(b) and 5 to explain the method for prioritizing scanline detection.

[0033] Figure 4(b) is a schematic representation of the time slot data TD. In this embodiment, the order of scan lines to be detected is managed by the time slot data TD. The time slot data TD contains the time slot number (TS1 to T21) that represents the order in which detection will be performed, the scan target which is the scan line to be detected in that time slot, and the execution condition which is the condition for whether or not to perform detection of that scan target.

[0034] In addition to the first to eleventh lines described above, priority lines are also set as the scan targets. In this embodiment, a "priority line" refers to the scan line to which key 2aX, which is in the process of being pressed or released, belongs. In this embodiment, two priority lines are provided: a first priority line L1 and a second priority line L2.

[0035] In the time slot data TD, lines 1 through 11 are set in the order of lines 1 through 11, with a first priority line L1 and a second priority line L2 inserted between each of the lines 1 through 11. Specifically, lines 1 through 11 are set in time slots TS1, TS3, TS5, TS7, TS9, TS11, TS13, TS15, TS17, TS19, and TS21, respectively. In addition, the first priority line L1 is set in time slots TS2, TS6, TS10, TS14, and TS18, and the second priority line L2 is set in time slots TS4, TS8, TS12, TS16, and TS20.

[0036] Specifically, a first priority line L1 is inserted between the first and second lines, between the third and fourth lines, ..., and between the ninth and tenth lines of the time slot data TD. In addition, a second priority line L2 is inserted after the second and third lines, between the fourth and fifth lines, ..., and between the tenth and eleventh lines of the time slot data TD.

[0037] In the time slot data TD, the positions (insertion positions) where the first priority line L1 and the second priority line L2 are inserted between the first line to the eleventh line are pre-set, making it easy to insert the first priority line L1 or the second priority line L2 into the scan order SS described later.

[0038] Thus, whether to detect scan lines corresponding to the 1st to 11th lines, the 1st priority line L1, and the 2nd priority line L2 set in each time slot of the time slot data TD is determined by whether it matches the execution conditions set for each time slot.

[0039] Among the execution conditions, those corresponding to the first priority line L1 or the second priority line L2 are set to indicate whether any of the lines from the first to the eleventh line are already set to the first priority line L1 or the second priority line L2. In this embodiment, the first priority line L1 or the second priority line L2 is set to a scan line in which any of the keys 2aX belonging to it are either pressed or released. On the other hand, among the execution conditions, those corresponding to the first to the eleventh line are set to indicate whether each line is not set to either the first priority line L1 or the second priority line L2.

[0040] The scan lines of time slots that match the execution conditions set for each time slot are detected, while the scan lines of time slots that do not match the execution conditions are not detected. This sets the scan order SS, which determines the order in which scan lines are actually detected. Refer to Figure 5 for an explanation of the scan order SS.

[0041] Figure 5(a) schematically represents the scan order SS when no priority lines are set, Figure 5(b) schematically represents the scan order SS when only the first priority line L1 is set, and Figure 5(c) schematically represents the scan order SS when both the first priority line L1 and the second priority line L2 are set.

[0042] The scan order SS is set in the time slot data TD with the time slots that match the execution conditions and the scan targets. As shown in Figure 5(a), if no priority lines are set, the scan order SS is set by removing the time slots corresponding to the first priority line L1 and the second priority line L2 from each time slot in the time slot data TD.

[0043] As shown in Figure 5(b), if the first line is set only on the first priority line L1 among the priority lines, the scan order SS will be set by removing the time slots corresponding to the unset second priority line L2 and the first line (time slot TS1) set on the first priority line L1 from the scan targets of the time slot data TD, and setting the first line on the first priority line L1.

[0044] As shown in Figure 5(c), when the first line and the eighth line are set for the first priority line L1 and the second priority line L2, respectively, the scan order SS is set by removing the first line (time slot TS1) set for the first priority line L1 and the eighth line (time slot TS15) set for the second priority line L2 from the time slot data TD, and then setting the first line and the eighth line for the first priority line L1 and the second priority line L2, respectively.

[0045] The scanlines of the scan sequence SS set in this way are detected sequentially starting from the first scanline (No. 1) of the scan sequence SS, and the detection of scanlines based on this scan sequence SS is repeated.

[0046] As shown in Figures 5(b) and (c), the scanline to which the key 2aX that is being pressed or released belongs is set as a priority line, and the priority line set for the scan order SS is inserted. As a result, in the detection of scanlines based on a single scan order SS, the scanline to which the key 2aX that is being pressed or released belongs is detected multiple times, thereby increasing the frequency with which the key 2aX that is being pressed or released is detected. This allows for detailed control of the musical tone corresponding to the key 2aX, thereby suppressing any discomfort the user H may feel with that musical tone. Furthermore, since only the priority line is inserted into the scan order SS, the increase in the number of times the key 2aX is detected can be kept to a minimum.

[0047] In the scan sequence SS shown in Figure 5(b), the first priority line L1 is inserted, while the time slot TS1 corresponding to the first line set as the first priority line L1 is deleted. As a result, the detection of the first line by time slot TS1 and the detection of the first line that has become the first priority line L1 by time slot TS2 are not performed consecutively.

[0048] Similarly, in the scan order SS of Figure 5(c), the first priority line L1 and the second priority line L2 are inserted, while the first line of time slot TS1 corresponding to the first line set as the first priority line L1 and time slot TS15 corresponding to the eighth line set as the second priority line L2 are deleted. As a result, the detection of the first line by time slot TS1 and the detection of the first line that has become the first priority line L1 by time slot TS2 are not performed consecutively, and the detection of the eighth line by time slot TS15 and the detection of the eighth line that has become the second priority line L2 by time slot TS16 are not performed consecutively.

[0049] Therefore, the frequency of detecting priority lines in a single scan sequence SS can be increased, and since a certain time interval is provided between the detection of one priority line and the detection of subsequent priority lines, the on / off state of sensors 2dX to 2fX belonging to the priority line can be efficiently detected.

[0050] Next, the functions of the electronic piano 1 will be explained with reference to Figure 6. Figure 6 is a functional block diagram of the electronic piano 1. As shown in Figure 6, the electronic piano 1 has a detection means 100, a musical tone control means 101, a scanning means 102, an operation key acquisition means 103, and a priority means 104.

[0051] The detection means 100 is a means for detecting whether a key 2aX is pressed or released using multiple sensors 2dX to 2fX provided for each key 2aX, and is implemented in the CPU 10 as described later in Figure 7. The musical tone control means 101 is a means for controlling the musical tone according to the state of the key 2aX detected by the detection means 100, and the scanning means 102 is a means for sequentially detecting the state of each key 2aX using the detection means 100, and both are implemented in the CPU 10.

[0052] The operation key acquisition means 103 is a means for acquiring a key 2aX that is being pressed or released based on the detection result by the detection means 100, and the priority means 104 is a means for the scanning means 102 to prioritize the detection of the state of the key 2aX acquired by the operation key acquisition means 103 by the detection means 100, and both are implemented by the CPU 10.

[0053] The operating key acquisition means 103 acquires the key 2aX in the process of being pressed or released, and in the state detection by the detection means 100, which is sequentially performed in the scanning means, the detection of the state of the key 2aX in the process of being pressed or released is given priority. Therefore, while minimizing the increase in the detection of the key 2aX by the detection means 100, the frequency of detecting the state of the key 2aX in the process of being pressed or released, where the musical tone may change, can be increased. This allows for detailed control of the output musical tone and suppresses any sense of discomfort to the user H from the musical tone.

[0054] Next, the electrical configuration of the electronic piano 1 will be explained with reference to Figure 7. Figure 7 is a block diagram showing the electrical configuration of the electronic piano 1. As shown in Figure 7, the electronic piano 1 has a CPU 10, a flash ROM 11, a RAM 12, the aforementioned keyboard 2, setting keys 4 and LCD 5, a sound source 13, and a Digital Signal Processor 14 (hereinafter referred to as "DSP 14"), each connected via a bus line 15.

[0055] The CPU 10 is an arithmetic unit that controls each part connected by the bus line 15. The flash ROM 11 is a rewritable, non-volatile storage device that stores programs executed by the CPU 10 and fixed value data, and includes a control program 11a and time slot data 11b in which the above-mentioned time slot data TD is stored. When the control program 11a is executed by the CPU 10, the main process shown in Figure 8(a) is executed.

[0056] RAM12 is a memory that the CPU10 uses to store various work data and flags in a rewritable format when executing a program, and includes a scan order memory 12a in which the scan order SS described above is stored, and a priority line memory 12b in which priority lines are stored. The priority line memory 12b includes a first priority line 12b1 in which the first priority line L1 described above is stored, and a second priority line 12b2 in which the second priority line L2 is stored.

[0057] The sound source 13 is a device that outputs waveform data based on the input performance information. The DSP 14 is a processing unit for performing calculations on 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.

[0058] Next, the processes executed by the CPU 10 of the electronic piano 1 will be explained with reference to Figures 8-11. Figure 8(a) is a flowchart of the main process. The main process is executed when the power to the electronic piano 1 is turned on. The main process first resets the priority line memory 12b by setting the first priority line 12b1 and the second priority line 12b2 of the priority line memory 12b to unset (S1).

[0059] After the processing in S1, the normal scan process (S2), described below, is executed. After the normal scan process, other processing of the electronic piano 1 is performed (S3), and the processes from S2 onward are repeated. One example of the processing performed in S3 is changing the timbre of the output musical sound at the instruction of user H via the setting key 4 (see Figure 1). The normal scan process will now be explained with reference to Figure 8(b).

[0060] Figure 8(b) is a flowchart of the normal scan process. The normal scan process first sets the scan order SS based on the time slot data TD of the time slot data 11b and the priority line memory 12b, and saves it to the scan order memory 12a (S10). In the process of S10, since the first priority line 12b1 and the second priority line 12b2 of the priority line memory 12b are not set, the scan order SS, from which the time slots of the first priority line L1 and the second priority line L2 have been removed from the time slot data TD is saved to the scan order memory 12a, as shown in Figure 5(a).

[0061] After processing in S10, the state of sensors 2dX to 2fX for each key 2aX is detected based on the scan order SS in the scan order memory 12a (S11). After processing in S11, velocity processing (S12) is performed. Here, the velocity processing will be explained with reference to Figure 8(c).

[0062] Figure 8(c) is a flowchart of the velocity processing. Velocity processing is a process that calculates the velocity based on the state of the detected sensors 2eX and 2fX, and controls the musical tone based on the calculated velocity. In addition to being executed from the normal scan process shown in Figure 8(a) above, it is also executed from the single-priority scan process shown in Figure 9 (described later) and the multiple-priority scan process shown in Figure 10 (described later).

[0063] The velocity processing first checks whether the second sensor 2eX is ON and the third sensor 2fX is ON (S20). Specifically, in the process of S20, it is checked whether the second sensor 2eX is ON and the third sensor 2fX has changed from OFF to ON, or whether both the second sensor 2eX and the third sensor 2fX have changed from OFF to ON.

[0064] In the process of S20, if both the second sensor 2eX and the third sensor 2fX are turned on (S20: Yes), the velocity of key 2aX is calculated from the time difference between when the second sensor 2eX went from off to on and when the third sensor 2fX went from off to on (S21). After the process of S21, the musical tone of the corresponding key 2aX is controlled using the calculated velocity. Specifically, for example, the volume of the musical tone of the corresponding key 2aX is changed according to the magnitude of the calculated velocity.

[0065] In this embodiment, velocity is calculated based on the second sensor 2eX and the third sensor 2fX, which are among the sensors 2dX to 2fX provided for each key 2aX. When the second sensor 2eX is on, the preceding first sensor 2dX is also on, so the scan line to which the corresponding key 2aX belongs is set as the priority line. Therefore, the corresponding second sensor 2eX and the third sensor 2fX are detected frequently.

[0066] On the other hand, the state of the first sensor 2dX can also be detected in scan order SS (see Figure 5(a)) where no priority line is set, so there are cases where the frequency of detection of the first sensor 2dX is lower than that of the second sensor 2eX and third sensor 2fX, which are detected by the priority line. In this way, by using the states of the second sensor 2eX and third sensor 2fX, which are detected more frequently, the frequency of velocity calculation also increases, so that a velocity output that better follows the pressing and releasing actions of the corresponding key 2aX can be produced.

[0067] For example, if a pressed key 2aX is released and then pressed again before it is completely released, the key 2aX is not completely released during this sequence of actions, so the state of the first sensor 2dX remains ON even while the key is being released. Therefore, if the state of the first sensor 2dX is taken into account when calculating velocity, the velocity due to key release will not decrease sufficiently due to the influence of the ON first sensor 2dX. Consequently, the volume of the musical sound will not decrease sufficiently due to key release, and even if the volume of the musical sound returns to its pre-release state after pressing the key again, there is a risk that user H will not perceive it as being output (re-played).

[0068] Therefore, by excluding the state of the first sensor 2dX from the velocity calculation, both the second sensor 2eX and the third sensor 2fX are turned off by the previous key release, allowing the velocity to be calculated to be sufficiently small. The difference between this velocity and the velocity before and after the previous key release becomes large, resulting in a large change in the volume of the musical tone, which enables appropriate re-play of the musical tone upon key release and subsequent key presses.

[0069] In the process of S20, if the second sensor 2eX is ON and the third sensor 2fX is NOT ON (S20: No), or after the process of S22, the velocity processing is terminated.

[0070] Returning to Figure 8(b), after the velocity processing in S12, it is checked whether there is a key 2aX for which the first sensor 2dX is ON and the third sensor 2fX is OFF (S13). In the process of S13, it is checked whether the first sensor 2dX has turned from OFF to ON while the third sensor 2fX is OFF, i.e., whether the corresponding key 2aX has been pressed, or whether the third sensor 2fX has turned from ON to OFF while the first sensor 2dX is ON, i.e., whether the corresponding key 2aX has been released. In other words, it is checked whether the corresponding key 2aX is in the process of being pressed or released.

[0071] In the process of S13, if there is no key 2aX in which the first sensor 2dX is ON and the third sensor 2fX is OFF (S13: No), the process from S11 onwards is repeated. On the other hand, in the process of S13, if there is a key 2aX in which the first sensor 2dX is ON and the third sensor 2fX is OFF (S13: Yes), the scan line to which the corresponding key 2aX belongs is saved to the first priority line 12b1 of the priority line memory 12b (S14). After the process of S14, the single priority scan process (S15) is executed and the normal scan process is terminated. The single priority scan process will now be explained with reference to Figure 9.

[0072] Figure 9 is a flowchart of the single-priority scan process. The single-priority scan process is executed when only the first priority line L1 is set as the priority line. It is executed from the normal scan process shown in Figure 8(a) above, as well as from the first priority line change process shown in Figure 11(a) and the second priority line change process shown in Figure 11(b).

[0073] The single-priority scan process first sets the scan order SS based on the time slot data TD of the time slot data 11b and the priority line memory 12b, and saves it to the scan order memory 12a (S30). In the process of S30, a scan line is set in the first priority line 12b1 of the priority line memory 12b, while the second priority line 12b2 is not set. Therefore, as shown in Figure 5(b), the scan order SS is saved to the scan order memory 12a with the time slot of the second priority line L2 and the time slot of the scan line corresponding to the first priority line L1 removed from the time slot data TD.

[0074] After processing in S30, the state of sensors 2dX to 2fX for each key 2aX is detected based on the scan order SS in the scan order memory 12a (S31). After processing in S31, the velocity processing in S12 described above in Figure 8(c) is executed. After the velocity processing in S12, it is confirmed that the detection of the state of sensors 2dX to 2fX of the first priority line L1 by processing in S31 has been completed (S32).

[0075] In the process of S32, if the detection of the states of sensors 2dX to 2fX on the first priority line L1 has been completed (S32: Yes), it is checked whether the states of the first sensor 2dX and the third sensor 2fX for each key 2aX belonging to the first priority line L1 are the same (S33). In the process of S33, it is checked whether the states of the first sensor 2dX and the third sensor 2fX corresponding to the key 2aX belonging to the first priority line L1 are the same, that is, whether the pressing or releasing of the key 2aX belonging to the first priority line L1 has been completed.

[0076] In the process of S33, if the state of the first sensor 2dX and the third sensor 2fX of each key 2aX belonging to the first priority line L1 are the same (S33: Yes), then the pressing or releasing of the key 2aX belonging to the corresponding scan line is completed, and there is no need to increase the frequency of detecting the corresponding scan line. Therefore, the first priority line 12b1 of the priority line memory 12b is deleted, and the first priority line 12b1 is set to an unset state (S34).

[0077] After processing in S34, the normal scan process in S2 described above is performed in Figure 8(b). As a result, the scan line in which key 2aX has been pressed or released is removed from the first priority line L1, and the state of sensors 2dX to 2fX is detected by the scan order SS for which no priority line is set.

[0078] In the process of S33, if the states of the first sensor 2dX and the third sensor 2fX corresponding to the key 2aX belonging to the first priority line L1 are not the same (S33: No), then it is checked whether a certain amount of time (e.g., 20 milliseconds) has elapsed since the first priority line L1 was set (S35). In the process of S35, if a certain amount of time (e.g., 20 milliseconds) has elapsed since the first priority line L1 was set (S35: Yes), then the process of S34 and the velocity process of S12 are executed.

[0079] In other words, the first priority line L1, which has been set for a certain period of time, contains a key 2aX that is continuously pressed or released. Since such a key 2aX is pressed or released slowly, the state of being pressed or released can be tracked even by a scan order SS in which no priority line is set, as shown in Figure 5(a), without frequent detection by the first priority line L1. Therefore, by deleting the first priority line L1, which has been set for a certain period of time, the state of being pressed or released on the scan line that was the first priority line L1 can be appropriately detected, and a scan line other than that scan line can be set as a priority line.

[0080] In the process of S32, if the detection of the states of sensors 2dX to 2fX on the first priority line L1 has not been completed (S32: No), then the detection of the states of sensors 2dX to 2fX on scan lines other than the first priority line L1 has been completed. In this case, it is checked whether there is a key 2aX on a scan line other than the first priority line L1 in which the first sensor 2dX is ON and the third sensor 2fX is OFF (S36).

[0081] The processing in S36 is similar to that in S13, for scan lines other than the first priority line L1, it is checked whether the third sensor 2fX is off and the first sensor 2dX has turned from off to on, i.e., whether the corresponding key 2aX has been pressed, or whether the first sensor 2dX is on and the third sensor 2fX has turned from on to off, i.e., whether the corresponding key 2aX has been released.

[0082] In the process of S36, if there is a key 2aX on a scan line other than the first priority line L1 where the first sensor 2dX is ON and the third sensor 2fX is OFF (S36: Yes), the scan line to which the corresponding key 2aX belongs is saved to the second priority line 12b2 of the priority line memory 12b (S37). After the process of S37, the multiple priority scan process of S38 is executed. The multiple priority scan process will be described later in Figures 10 and 11.

[0083] In the process of S35, if a certain amount of time has not elapsed since the first priority line L1 was set (S35: No), or in the process of S36, if there is no key 2aX on a scan line other than the first priority line L1 in which the first sensor 2dX is ON and the third sensor 2fX is OFF (S36: No), the process from S31 onwards is repeated.

[0084] After the normal scan process of S2, which is executed after the process of S34, or after the multiple priority scan process of S38, the single priority scan process is terminated.

[0085] Next, the multiple priority scan process in S38 will be explained with reference to Figures 10 and 11. Figure 10 is a flowchart of the multiple priority scan process. The multiple priority scan process is executed when both the first priority line L1 and the second priority line L2 are set as priority lines.

[0086] The multiple priority scan process first sets the scan order SS based on the time slot data TD of the time slot data 11b and the priority line memory 12b, and saves it to the scan order memory 12a (S50). In the process of S50, since the scan lines of the first priority line 12b1 and the second priority line 12b2 of the priority line memory 12b are set, as shown in Figure 5(c), the scan order SS is saved to the scan order memory 12a with the time slots of the scan lines corresponding to the first priority line L1 and the second priority line L2 removed from the time slot data TD.

[0087] After processing in S50, the state of sensors 2dX to 2fX for each key 2aX is detected based on the scan order SS in the scan order memory 12a (S51). After processing in S51, the velocity processing in S12 described above in Figure 8(c) is executed. After the velocity processing in S12, it is checked whether the detection of the state of sensors 2dX to 2fX of the first priority line L1 has been completed by processing in S51 (S52). If the detection of the state of sensors 2dX to 2fX of the first priority line L1 has been completed in processing in S52 (S52: Yes), the first priority line change processing (S53) is executed. The first priority line change processing will be explained with reference to Figure 11(a).

[0088] Figure 11(a) is a flowchart of the first priority line change process. The first priority line change process first checks whether the state of the first sensor 2dX and the third sensor 2fX of each key 2aX belonging to the first priority line L1 are the same (S70). The process in S70 is the same as the process in S33 described in Figure 9, so a detailed explanation is omitted.

[0089] In the process of S70, if the state of the first sensor 2dX and the third sensor 2fX of each key 2aX belonging to the first priority line L1 are the same (S70: Yes), the current first priority line L1 is deleted and the current second priority line L2 is made the first priority line L1. To achieve this, first, the second priority line 12b2 in the priority line memory 12b is overwritten (copied) to the first priority line 12b1 (S71). After the process of S71, the first priority line 12b1 in the priority line memory 12b is deleted, and the first priority line 12b1 is set to an unset state (S72). After the process of S72, the single priority scan process of S15 described above in Figure 9 is executed, and the first priority line change process is terminated.

[0090] On the other hand, in the process of S70, if the state of the first sensor 2dX and the third sensor 2fX of each key 2aX belonging to the first priority line L1 are not the same (S70: No), then it is checked whether a certain amount of time has elapsed since the first priority line L1 was set (S73). The process of S73 is the same as the process of S35 described above in Figure 9, so a detailed explanation is omitted.

[0091] In the process of S73, if a certain amount of time has elapsed since the first priority line L1 was set (S73:Yes), the processes from S71 onwards are executed, and if a certain amount of time has not elapsed since the first priority line L1 was set (S73:No), the processes from S51 onwards in Figure 10 (i.e., in Figure 10, " <1> Repeat the following steps.

[0092] Return to Figure 10. In the process of S52, if the detection of the state of sensors 2dX to 2fX on the first priority line L1 has not been completed (S52: No), then the detection of the state of sensors 2dX to 2fX on scan lines other than the first priority line L1 has been completed. In this case, it is checked whether the detection of the state of sensors 2dX to 2fX on the second priority line L2 has been completed (S54). In the process of S54, if the detection of the state of sensors 2dX to 2fX on the second priority line L2 has been completed (S54: Yes), the second priority line change process (S55) is executed. Refer to Figure 11(b) to explain the second priority line change process.

[0093] Figure 11(b) is a flowchart of the second priority line change process. The second priority line change process first checks whether the state of the first sensor 2dX and the third sensor 2fX of each key 2aX belonging to the second priority line L2 are the same (S80).

[0094] In the process of S80, if the state of the first sensor 2dX and the third sensor 2fX of each key 2aX belonging to the second priority line L2 are the same (S80: Yes), the second priority line 12b2 in the priority line memory 12b is deleted, and the second priority line 12b2 is set to an unset state (S81). After the process of S81, the single priority scan process of S15 described above in Figure 9 is executed, and the second priority line change process is terminated. As a result, the scan line in which the key 2aX has been pressed or released is deleted from the second priority line L2, and the state of sensors 2dX~2fX is detected by the scan order SS in which only the first priority line L1 is set.

[0095] On the other hand, in the processing of S80, if the states of the first sensor 2dX and the third sensor 2fX of each key 2aX belonging to the second priority line L2 are not the same (S80: No), then it is checked whether a certain amount of time has elapsed since the second priority line L2 was set (S82).

[0096] In the process of S82, if a certain amount of time has elapsed since the second priority line L2 was set (S82:Yes), the processes from S81 onwards are executed, and if a certain amount of time has not elapsed since the second priority line L2 was set (S82:No), the processes from S51 onwards in Figure 10 (i.e., in Figure 10, " <1> Repeat the following steps.

[0097] Return to Figure 10. In the process of S54, if the detection of the state of sensors 2dX to 2fX on the second priority line L2 has not been completed (S54: Yes), then the detection of the state of sensors 2dX to 2fX on scan lines other than the first priority line L1 and the second priority line L2 has been completed. In this case, the other line change process of S56 is executed. Refer to Figure 11(c) to explain the other line change process.

[0098] Figure 11(c) is a flowchart of the other line change process. The other line change process first checks if there is a key 2aX on a scan line other than the first priority line L1 and the second priority line L2 where the first sensor 2dX is ON and the third sensor 2fX is OFF (S90). The process in S90 is the same as the processes in S13 and S36, and on a scan line other than the second priority line L2, it is checked whether the first sensor 2dX has turned from OFF to ON while the third sensor 2fX is OFF, i.e., whether the corresponding key 2aX has been pressed, or whether the third sensor 2fX has turned from ON to OFF while the first sensor 2dX is ON, i.e., whether the corresponding key 2aX has been released.

[0099] In the processing of S90, if there is a key 2aX on a scan line other than the first priority line L1 and the second priority line L2 where the first sensor 2dX is ON and the third sensor 2fX is OFF (S90: Yes), the second priority line 12b2 of the priority line memory 12b is overwritten (copied) to the first priority line 12b1 (S91). After the processing of S91, the scan line to which the key 2aX on is located where the first sensor 2dX is ON and the third sensor 2fX is OFF belongs is saved in the first priority line 12b1 of the priority line memory 12b (S92).

[0100] As a result, the first priority line L1, which was the oldest priority line among the first priority line L1 and the second priority line L2, is deleted, and instead, the scan line to which key 2aX belongs, with the first sensor 2dX turned on and the third sensor 2fX turned off, is newly set as the priority scan.

[0101] In other words, the first priority line L1, which was the oldest priority line, also contains a key 2aX that is continuously pressed or released. Since such a key 2aX is pressed or released slowly, the state of being pressed or released can be tracked by the normal detection of the first to eleventh lines, such as time slots TS1 and TS3, without requiring frequent detection by the first priority line L1. Therefore, by deleting the first priority line L1, which was the oldest priority line, the state of being pressed or released on the scan line that was the first priority line L1 can be appropriately detected, and the frequency of detecting scan lines that have newly become priority lines can be increased.

[0102] In the processing of S90, if there is no key 2aX in which the first sensor 2dX is ON and the third sensor 2fX is OFF on a scan line other than the first priority line L1 and the second priority line L2 (S90: No), or after the processing of S92, S51 and below in Figure 10 (i.e., in Figure 10, " <1> Repeat the following steps.

[0103] Return to Figure 10. After the first priority line change process in S53, the second priority line change process in S55, or the other line change process in S56, the multiple priority scan process is terminated.

[0104] The above description is based on the above embodiment, but it can be easily inferred that various improvements and modifications are possible.

[0105] In the above embodiment, the number of keys 2aX belonging to one scanline is set to 8, but this is not limited to this. The number of keys 2aX belonging to one scanline may be 11 or more, or 11 or less. In particular, the number of keys 2aX included in one scanline may be set to 1, and the state may be detected for each key 2aX. In this case, the priority line may also be set for each key 2aX.

[0106] Alternatively, scanlines may be constructed from sets of 2aX keys that have a common musical meaning. For example, a single scanline may consist of 2aX keys corresponding to the same octave, such as from a certain "C" to the next "B," or it may consist of 2aX keys corresponding to the notes that make up a chord, such as "C-E-G."

[0107] In the above embodiment, there are two priority lines, a first priority line L1 and a second priority line L2, but the system is not limited to this. There may be one priority line or three or more. Furthermore, the number of priority lines is not limited to a fixed number; it may be variable. For example, the number of priority lines may be increased or decreased according to the tempo of the song being played on keyboard 2. In this case, if the song being played on keyboard 2 is at a slow tempo, the number of priority lines should be reduced (for example, to one), and if it is at an uptempo, the number of priority lines should be increased (for example, to three).

[0108] Furthermore, while the scanline to which key 2aX belongs during either the pressing or releasing phase is set as the priority line, it is not limited to this. A certain scanline may be fixed as the priority line at all times, regardless of whether key 2aX is in the pressing or releasing phase, as specified by user H via setting key 4, for example.

[0109] Furthermore, the system may acquire sheet music information (MIDI data, etc.) for the song that user H will play in advance, and based on that sheet music information, sequentially set the scanlines to which key 2aX, which is scheduled to be pressed or released by user H at each stage (timing) of the performance, belongs as priority lines.

[0110] In addition, along with setting priority lines, or instead of setting priority lines, the frequency of detection of scanlines to which a key 2aX that has not been pressed or released for a certain period of time (e.g., 3 seconds) belongs among the 1st to 11th lines of time slot data TD, such as time slots TS1, TS3, TS5, may be reduced. In this case, the addition of the relevant scanline to the scan sequence SS may be omitted, the detection of the relevant scanline may be omitted entirely in the scan sequence SS, or the detection of the relevant scanline may be limited to once for every multiple (e.g., 2) scan sequence SS detections. By omitting the detection of scanlines that have not been pressed or released, the frequency of detection of other scanlines can be increased.

[0111] In the above embodiment, in the process of S33 in Figure 9, the process of S73 in Figure 11(a), and the process of S82 in Figure 11(b), a scan line is removed from the priority line list if a certain amount of time has elapsed since it was set as a priority line. However, the embodiment is not limited to this. For example, the process of S33 in Figure 9, etc., may be omitted, and a scan line may remain a priority line even if a certain amount of time has elapsed since it was set as a priority line, until the pressing or releasing of key 2aX is completed.

[0112] In the above embodiment, the first to eleventh lines are arranged sequentially in the time slot data TD, but the system is not limited to this, and the first to eleventh lines may be arranged randomly in the time slot data TD. Furthermore, the arrangement of the first to eleventh lines in the time slot data TD may be configured to be specified by user H via setting key 4.

[0113] Furthermore, lines 1 through 11 may be duplicated within a single time slot data TD (for example, two time slots for line 1 may be placed in the time slot data TD). For example, by duplicating the scanline containing key 2aX, which is frequently pressed in a song played on keyboard 2, the frequency with which key 2aX is detected along with the priority line can be increased.

[0114] In the above embodiment, priority lines were inserted between the first to eleventh lines in the time slot data TD, but the embodiment is not limited to this. For example, the first priority line L1 and the second priority line L2 may be placed consecutively in the time slot data TD. Furthermore, the arrangement of priority lines in the time slot data TD may be configured so that user H can specify it via setting key 4.

[0115] In the above embodiment, an electronic piano 1 was used as an example of an electronic musical instrument, but the present invention is not limited to this, and may be applied to other electronic musical instruments such as electronic organs and electronic wind instruments. Furthermore, 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 can be connected to the information processing device such as a personal computer. [Explanation of Symbols]

[0116] 1. Electronic piano (electronic musical instrument) 2aX key 2dX First Sensor (part of the detection unit, first detection unit) 2eX Second sensor (part of the detection unit, second detection unit) 2fX Third sensor (part of the detection unit, third detection unit) 11a Control program (key scanning program) S11, S31, S51 Detection means, scanning means, detection step, scanning step S21, S22 Musical sound control means, musical sound control step S13, S36, S90 Operation key acquisition means, operation key acquisition step S14, S37, S91 Priority measures, priority steps

Claims

1. Multiple keys, Detection means for detecting whether the key is pressed or released, using multiple detection units provided for each key, An electronic musical instrument comprising a musical tone control means that controls a musical tone according to the state of the key detected by the detection means, A scanning means that sequentially performs the detection of the state of the key by the detection means for each key, An operation key acquisition means that acquires the key in the process of being pressed or released based on the detection result by the detection means, The scanning means includes a priority means that prioritizes the detection of the state of the key acquired by the operation key acquisition means by the detection means, Multiple keys are divided into scan lines at predetermined intervals, The detection means detects the state of the key belonging to each scan line, The scanning means sequentially performs the detection of the state by the detection means for each scan line. The aforementioned priority means prioritizes the detection of the state of the scanline to which the key acquired by the operation key acquisition means belongs, by the detection means. An electronic musical instrument characterized in that multiple detection units provided on the same key all belong to the same scan line.

2. Multiple keys, Detection means for detecting whether the key is pressed or released, using multiple detection units provided for each key, An electronic musical instrument comprising a musical tone control means that controls a musical tone according to the state of the key detected by the detection means, A scanning means that sequentially performs the detection of the state of the key by the detection means for each key, An operation key acquisition means that acquires the key in the process of being pressed or released based on the detection result by the detection means, The scanning means includes a priority means that prioritizes the detection of the state of the key acquired by the operation key acquisition means by the detection means, The scanning means performs the detection of the state of the keys by the detection means in a scan order which is the order in which the keys' states are detected by the detection means. The electronic musical instrument is characterized in that the priority means prioritizes the detection of the state of the key by the detection means by inserting the key acquired by the operation key acquisition means into the insertion position, which is a predetermined key position in the scan sequence.

3. The scanning means performs the detection of the state of the keys by the detection means in a scan order which is the order in which the keys' states are detected by the detection means. The electronic musical instrument according to claim 1, characterized in that the priority means prioritizes the detection of the state of the key by the detection means by inserting the key acquired by the operation key acquisition means into the scan order.

4. The electronic musical instrument according to claim 2, characterized in that the priority means inserts the key acquired by the operation key acquisition means into the insertion position in the scan sequence and deletes the key before or after the insertion position in the scan sequence if such a key exists before or after the insertion position in the scan sequence.

5. The electronic musical instrument according to claim 2 or 4, wherein the priority means sequentially inserts a plurality of keys acquired by the operation key acquisition means in the scan order, and when the number of keys inserted in the scan order exceeds a predetermined number, the oldest inserted key is removed from the insertion position in the scan order.

6. The electronic musical instrument according to claim 2 or 4, wherein the priority means sequentially inserts a plurality of keys acquired by the operation key acquisition means into the scan order, and when a predetermined time has elapsed since a key was inserted into the insertion position in the scan order, the key is removed from the insertion position in the scan order.

7. The detection unit is arranged in at least three units so as to be sequentially turned on or off in accordance with the stage of pressing or releasing the key. Of the multiple detection units, the one that turns on when the released key is pressed is designated as the first detection unit, the one that turns on when the key is in the second shallowest position is designated as the second detection unit, and the one that turns on when the key is in the third shallowest position is designated as the third detection unit. The electronic musical instrument according to claim 1 or 2, characterized in that the operating key acquisition means acquires the key when the first detection unit is ON and the third detection unit is OFF as the key in the process of being pressed or released.

8. The electronic musical instrument according to claim 7, characterized in that the musical tone control means controls the musical tone of the corresponding key according to the state of the second detection unit or the detection unit which is turned on at a stage where the key is in a deeper position than the second detection unit.

9. The electronic musical instrument according to claim 8, characterized in that the musical tone control means calculates the velocity of the musical tone of the key according to the timing at which the second detection unit or a detection unit that turns on when the key is in a deeper position than the second detection unit turns on.

10. A key scanning method performed on an electronic musical instrument comprising multiple keys and multiple detection units provided for each key, The detection step involves detecting the state of the key being pressed or released by the detection unit, A musical tone control step that controls the musical tone according to the state of the key detected by the detection step, A scan step which sequentially performs the detection of the state of the key by the above detection step for each key, An operation key acquisition step, which acquires the key in the process of being pressed or released based on the detection result of the above detection step, The scan step includes a priority step that prioritizes the detection of the state of the key acquired in the operation key acquisition step by the detection step, Multiple keys are divided into scan lines at predetermined intervals, The aforementioned detection step involves detecting the state of the key belonging to each scan line, The scan step sequentially performs the detection of the state by the detection step for each scan line. The aforementioned priority step prioritizes the detection of the state of the scanline to which the key acquired in the operation key acquisition step belongs, as determined by the detection step. A key scanning method characterized in that multiple detection units provided on the same key all belong to the same scan line.

11. A key scanning method performed on an electronic musical instrument comprising a plurality of keys and a plurality of detection units provided for each of the keys, The detection step involves detecting the state of the key being pressed or released by the detection unit, A musical tone control step that controls the musical tone according to the state of the key detected by the detection step, A scan step which sequentially performs the detection of the state of the key by the above detection step for each key, An operation key acquisition step, which acquires the key in the process of being pressed or released based on the detection result of the above detection step, The scan step includes a priority step that prioritizes the detection of the state of the key acquired in the operation key acquisition step by the detection step, The scan step performs the detection of the state of the keys by the detection step in the scan order which is the order in which the states of the keys are detected by the detection step. The key scanning method is characterized in that the priority step prioritizes the detection of the state of the key by the detection step by inserting the key acquired in the operation key acquisition step into the insertion position, which is a predetermined key position in the scan sequence.

12. A key scanning program that causes a computer equipped with a keyboard having multiple keys and multiple detection units provided for each key to perform a process of sequentially detecting the state of the keys, The detection step involves detecting the state of the key being pressed or released by the detection unit, A musical tone control step that controls the musical tone according to the state of the key detected by the detection step, A scan step which sequentially performs the detection of the state of the key by the above detection step for each key, An operation key acquisition step, which acquires the key in the process of being pressed or released based on the detection result of the above detection step, In the scan step, the computer is instructed to perform a priority step that prioritizes the detection of the state of the key acquired in the operation key acquisition step by the detection step, Multiple keys are divided into scan lines at predetermined intervals, The aforementioned detection step involves detecting the state of the key belonging to each scan line, The scan step sequentially performs the detection of the state by the detection step for each scan line. The aforementioned priority step prioritizes the detection of the state of the scanline to which the key acquired in the operation key acquisition step belongs, as determined by the detection step. A key scanning program characterized in that multiple detection units provided on the same key all belong to the same scan line.

13. A key scan program that causes a computer equipped with a keyboard having a plurality of keys and a plurality of detection units provided for each key to perform a process of sequentially detecting the state of the keys, The detection step involves detecting the state of the key being pressed or released by the detection unit, A musical tone control step that controls the musical tone according to the state of the key detected by the detection step, A scan step which sequentially performs the detection of the state of the key by the above detection step for each key, An operation key acquisition step, which acquires the key in the process of being pressed or released based on the detection result of the above detection step, In the scan step, the computer is instructed to perform a priority step that prioritizes the detection of the state of the key acquired in the operation key acquisition step by the detection step, The scan step performs the detection of the state of the keys by the detection step in the scan order which is the order in which the states of the keys are detected by the detection step. The key scan program is characterized in that the priority step prioritizes the detection of the state of the key by the detection step by inserting the key acquired in the operation key acquisition step into the insertion position, which is a predetermined key position in the scan sequence.