Electronic musical instrument, automatic operation method, and automatic operation program
By adjusting key drive timings with a look-ahead delay in an electronic musical instrument, the instrument synchronizes key operations with musical tone output, addressing user discomfort from discrepancies in existing systems.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- ROLAND CORP
- Filing Date
- 2022-07-18
- Publication Date
- 2026-05-22
AI Technical Summary
Existing electronic musical instruments experience discrepancies between the output musical tone and the operation of keys due to delayed key presses based on subsequent key-on data, causing user discomfort.
The electronic musical instrument employs a keyboard with automatic operation capabilities, utilizing performance information acquisition, key drive timing setting, and automatic operation means to adjust key drive timings by adding a look-ahead delay time, advancing or delaying key operations to synchronize with musical tone output.
This approach reduces the discrepancy between key operations and musical tone output, enhancing the user's experience by ensuring synchronized and smooth automatic key operations.
Smart Images

Figure 0007864028000001 
Figure 0007864028000002 
Figure 0007864028000003
Abstract
Description
Technical Field
[0001] The present invention relates to an electronic musical instrument, an automatic operation method, and an automatic operation program.
Background Art
[0002] Patent Document 1 discloses an electronic musical instrument that acquires key-on data and key-off data from music data stored in an external storage device 81, generates and outputs musical sounds with a sound source circuit 66 and a sound system 69, and presses and releases a key 11 by driving a solenoid 52. By outputting such musical sounds and operating the key 11, it is possible to make it appear to the user that musical sounds are output in response to an automatic operation (automatic operation) of the key 11.
[0003] By the way, in order to realize rapid repeated key presses in performance, there may be cases where subsequent key-on data for the same sound is stored in the music data immediately after the previous key-off data. In this case, in the output musical sounds, the user can recognize a "break in the sound" between the previous key-off data and the subsequent key-on data. On the other hand, since the key 11 is driven by a solenoid 52, the key press is started by the subsequent key-on data before the key 21a is sufficiently released by the previous key-off data. As a result, to the user, it appears that the key 11 hardly operates, and a sense of incongruity with the output musical sounds where a "break in the sound" can be recognized is felt.
[0004] Therefore, in Patent Document 1, when the previous key-off data and the subsequent key-on data for the same sound are acquired within a short period of time, the timing of pressing the key 11 by the subsequent key-on data is delayed. Thereby, after the key 11 is sufficiently released by the previous key-off data, the key 11 can be pressed by the subsequent key-on data.
Prior Art Documents
Patent Documents
[0005] [Patent Document 1] Japanese Patent Publication No. 2008-233825 [Overview of the project] [Problems that the invention aims to solve]
[0006] However, in Patent Document 1, because the pressing of key 11 based on subsequent key-on data is delayed, a discrepancy occurs between the outputted musical tone and the operation of key 11, such as when the pressing of key 11 begins after the output of the musical tone based on subsequent key-on data has started. There was a problem in that the user might feel uncomfortable with this discrepancy between the outputted musical tone and the operation of key 11.
[0007] The present invention was made to solve the above-mentioned problems and aims to provide an electronic musical instrument, an automatic operation method, and an automatic operation program that can suppress the discrepancy between the output musical sound and the automatically operated keys. [Means for solving the problem]
[0008] To achieve this objective, the electronic musical instrument of the present invention is equipped with a keyboard having keys that can be operated automatically, and comprises: performance information acquisition means for acquiring performance information including note-on or note-off and the input timing of the performance information; key drive timing setting means for setting a key drive timing, which is the timing for automatically operating the keys of the keyboard based on the performance information acquired by the performance information acquisition means, based on the input timing of the performance information; forwarding means for resetting the key drive timing of the earlier performance information to an earlier timing if the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same note as the earlier performance information, set by the key drive timing setting means, is less than or equal to a predetermined timing threshold; and automatic operation means for performing automatic operation of the keys of the keyboard based on the performance information acquired by the performance information acquisition means at the key drive timing of the performance information. The key drive timing setting means sets the key drive timing of the performance information to a timing obtained by adding a look-ahead delay time longer than the timing threshold to the input timing of the performance information acquired by the performance information acquisition means. ru.
[0009] The present invention provides an automatic operation method for an electronic musical instrument equipped with a keyboard having keys capable of automatic operation, comprising: a performance information acquisition step of acquiring performance information including note-on or note-off and the input timing of the performance information; a key drive timing setting step of setting a key drive timing, which is the timing for performing automatic operation of the keyboard keys based on the performance information acquired in the performance information acquisition step, based on the input timing of the performance information; an advance step of resetting the key drive timing of the earlier performance information to an earlier timing if the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same note as the earlier performance information, set in the key drive timing setting step, is less than or equal to a predetermined timing threshold; and an automatic operation step of performing automatic operation of the keyboard keys based on the performance information acquired in the performance information acquisition step at the key drive timing of the performance information. The key drive timing setting step sets the key drive timing of the performance information to a timing obtained by adding a look-ahead delay time longer than the timing threshold to the input timing of the performance information obtained in the performance information acquisition step. ru.
[0010] Furthermore, the present invention's automatic operation program is a program that causes a computer equipped with a keyboard having keys capable of automatic operation to perform automatic operation processing of the keys on the keyboard, and causes the computer to execute the following steps: a performance information acquisition step that acquires performance information including note-on or note-off and the input timing of the performance information; a key drive timing setting step that sets the key drive timing, which is the timing for performing automatic operation of the keys on the keyboard based on the performance information acquired in the performance information acquisition step, based on the input timing of the performance information; an advance step that, if the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same note as the earlier performance information, set in the key drive timing setting step, is less than or equal to a predetermined timing threshold, the key drive timing of the earlier performance information is reset to an earlier timing; and an automatic operation step that performs automatic operation of the keys on the keyboard based on the performance information acquired in the performance information acquisition step at the key drive timing of the performance information. The key drive timing setting step sets the key drive timing of the performance information to a timing obtained by adding a look-ahead delay time longer than the timing threshold to the input timing of the performance information obtained in the performance information acquisition step. ru. [Brief explanation of the drawing]
[0011] [Figure 1]This is a diagram showing the appearance of an electronic piano. [Figure 2] (a) is a diagram showing the timing of automatic key operation and musical tone output in the prior art; (b) is a diagram showing the timing of automatic key operation and musical tone output before the preceding note-off is brought forward and the subsequent note-on is delayed in the embodiment; and (c) is a diagram showing the timing of automatic key operation and musical tone output after the preceding note-off is brought forward and the subsequent note-on is delayed in the embodiment. [Figure 3] (a) is a diagram showing the timing of automatic key operation and musical tone output before the later note-off delay in the embodiment, and (b) is a diagram showing the timing of automatic key operation and musical tone output after the later note-off delay in the embodiment. [Figure 4] This is a functional block diagram of an electronic piano. [Figure 5] (a) is a block diagram showing the electrical configuration of an electronic piano, (b) is a schematic representation of the sound-producing note buffer, and (c) is a schematic representation of the key-driven note buffer. [Figure 6] This is a flowchart of the main process. [Figure 7] This is a flowchart for the process of adding a key-driven note. [Figure 8] This is a flowchart for timer event processing. [Figure 9] (a) is a diagram showing the timing of automatic key operation and musical tone output after the note-off is brought forward in the modified example, and (b) is a diagram showing the timing of automatic key operation and musical tone output after the note-off is brought forward in the modified example. [Figure 10] This is a flowchart of the key-driven note addition process in the modified example. [Modes for carrying out the invention]
[0012] Hereinafter, preferred embodiments will be described with reference to the accompanying drawings. First, an overview of the electronic piano 1 of the present embodiment will be described with reference to FIG. 1. FIG. 1 is a diagram showing the appearance of the electronic piano 1, and the electronic piano 1 is an electronic musical instrument that produces musical sounds based on musical sounds based on the performance of the user H or MIDI data MD, which is musical piece data in the MIDI (Musical Instrument Digital Interface) standard.
[0013] The electronic piano 1 is mainly provided with a keyboard 2, a setting key 3 for inputting various settings from the user H, and an LCD 4 for displaying the setting states of various settings. The keyboard 2 is an input device for acquiring performance information based on the performance of the user H. A plurality of keys 2a are arranged on the keyboard 2, and MIDI-standard performance information corresponding to the key-on / key-off operations of the keys 2a by the user H is output to the CPU 10 (see FIG. 5) and output as musical sounds.
[0014] The keyboard 2 is provided with a solenoid 2b for independently driving each of the keys 2a up and down. When a note-on in the performance information is acquired from the MIDI data MD specified by the user H, the key 2a is driven downward by the solenoid 2b to realize the key-on of the key 2a. On the other hand, when a note-off in the performance information is acquired from the MIDI data MD, the key 2a is driven upward by the solenoid 2b to realize the key-off of the key 2a.
[0015] By synchronizing the key-on / key-off of the key 2a by the solenoid 2b based on the MIDI data MD specified by the user H with the production of musical sounds by the MIDI data MD, it is possible to make it appear to the user H that the electronic piano 1 is automatically performing. Hereinafter, driving the solenoid 2b based on such MIDI data MD and operating the key 2a is referred to as "automatic operation of the key 2a".
[0016] In this embodiment, when the time difference between the timing at which a subsequent note-on for the same sound as the previous note-off is acquired is small, the timing at which the key 2a is automatically operated by the previous note-off is advanced, and the timing at which the key 2a is automatically operated by a subsequent note-on is delayed, so that the key-off of the key 2a by the previous note-off can be sufficiently executed. Referring to FIGS. 2 and 3, the timing at which the key 2a is automatically operated will be described.
[0017] FIG. 2(a) is a diagram showing the timing at which the key 2a is automatically operated in the prior art. In FIGS. 2 and subsequent FIGS. 3 and 9, the horizontal axis represents the time axis. In this embodiment, "Tick" is used as the unit of time, and "1 millisecond" is exemplified as the required time per Tick. Note that the unit of time is not limited to "Tick", and other time units such as "seconds" or "minutes" may be used. Also, the required time per Tick is not limited to 1 millisecond, and may be 1 millisecond or more or 1 millisecond or less.
[0018] The performance information acquired from the MIDI data MD is referred to as an "input note", and an "i" is appended to the end of its symbol. The input note placed at the timing of sounding a musical tone is referred to as a "sounding note", and an "s" is appended to the end of its symbol. Also, the input note placed at the timing of automatically operating the key 2a is referred to as a "key drive note", and a "k" is appended to the end of its symbol. In these input notes, sounding notes, and key drive notes, note-on is represented by a circle ("〇"), and note-off is represented by a white square ("□").
[0019] The vertical position of the key 2a when automatically operated by the key drive note is referred to as the "vertical position of the key". Among these, the vertical position of the key 2a when the key 2a is completely key-off is referred to as the "key-off position Ku", and the vertical position of the key 2a when the key 2a is completely key-on is referred to as the "key-on position Kb".
[0020] Conventionally, as shown in Figure 2(a), when an input note is obtained from MIDI data MD, key-driven notes and sound-generating notes are placed based on the timing corresponding to that input note. Automatic operation of key 2a is performed at the timing of the placed key-driven note (hereinafter referred to as "key-driven timing"), and musical sound is output at the timing of the placed sound-generating note (hereinafter referred to as "musical sound output timing").
[0021] Conventionally, the key drive timing was set to be approximately simultaneous with the input timing of the input note. On the other hand, the musical tone output timing was set to be delayed by a key drive delay time T1 from the input timing of the input note. Here, the key drive delay time T1 is based on the time required for a fully released key 2a to be fully pressed by the solenoid 2b, and "110 milliseconds" is an example.
[0022] For example, if note-on N1i is acquired as an input note at time t1, note-on N1k, the key-driving note corresponding to that input note, is placed at time t1, and note-on N1s, the musical tone output note corresponding to the input note, is placed at time t2, after a key-driving delay time T1 from time t1. By placing note-on N1s and note-on N1k at timings separated by a key-driving delay time T1 in this way, the time lag between the output musical tone and the automatic operation of key 2a can be suppressed.
[0023] Incidentally, in order to achieve rapid note-taking during performance, there are cases where the time difference between the timing when the first note-off is acquired from the MIDI data MD and the timing when the subsequent note-on for the same note is acquired is small. For example, as in Figure 2(a), the time difference ΔT between the note-off F1i and note-on N2i of the input note may be acquired within a short period of time.
[0024] In this case, if note-off F1k and note-on N2k are used for the automatic operation of key 2a with a time difference ΔT, the solenoid 2b must physically move key 2a. As a result, the key is pressed by the subsequent note-on N2k before key 2a is fully released by the earlier note-off F1k. This makes it appear to user H that key 2a is hardly being operated at all.
[0025] On the other hand, the output of musical tones due to note-off F1s and note-on N2s occurs even with a short time difference ΔT, and user H can distinguish between these outputted musical tones. In other words, user H perceives that musical tones are output due to note-off F1s and note-on N2s even though key 2a is hardly activated, which may cause a sense of incongruity between the automatic operation of key 2a and the output of musical tones.
[0026] Therefore, in this embodiment, if the time difference ΔT between the preceding note-off and the following note-on, which are both produced by the same sound in a key drive note, is smaller than a predetermined time, the timing of the preceding note-off is advanced and the following note-on is delayed, thereby ensuring that the key 2a is released by the preceding note-off. The advancement of the preceding note-off and the delay of the following note-on in this embodiment will be explained with reference to Figures 2(b) and (c).
[0027] Figure 2(b) shows the timing of automatic key operation and musical tone output before the preceding note-off is brought forward and the subsequent note-on is delayed in this embodiment. In this embodiment, when an input note is acquired, the musical tone output timing and key drive timing corresponding to that input note are delayed.
[0028] Specifically, the musical tone output timing is set to a timing that is delayed by the sum of the key drive delay time T1 and the look-ahead delay time T2 from the input timing of the corresponding input note, and the key drive timing is set to a timing that is delayed by the look-ahead delay time T2 from the input timing of the corresponding input note. The look-ahead delay time T2 is a time based on the note-off advance time T3, which advances the preceding note-off, and the note-on delay time T4, which delays the subsequent note-on, and "75 milliseconds" is given as an example.
[0029] In a key-driven note that is delayed by a look-ahead delay time T2 from the input timing of the input note, if the time difference ΔT between the earlier note-off and the later note-off is small, for example, if the time difference ΔT between the earlier note-off F1k and the later note-on N2k in Figure 2(b) is smaller than the sum of the note-off advance time T3 and the note-on delay time T4, then the earlier note-off F1k is advanced by the note-off advance time T3 and the note-on N2k is delayed by the note-on delay time T4.
[0030] In this embodiment, the note-off advance time T3 and the note-on delay time T4 are each exemplified as "35 milliseconds". That is, the look-ahead delay time T2, note-off advance time T3, and note-on delay time T4 are set such that the sum of the note-off advance time T3 and the note-on delay time T4 is less than or equal to the look-ahead delay time T2 described above.
[0031] The key drive timing for the earlier note-off F1k is determined by delaying the input timing of the corresponding note-off F1i by a look-ahead delay time T2, and then further advancing the note-off advance time T3 from that time. In other words, the key drive timing for the earlier note-off F1k is determined by delaying the input timing of note-off F1i by the time obtained by subtracting the note-off advance time T3 from the look-ahead delay time T2.
[0032] On the other hand, the key drive timing of the delayed Note-on N2k is set to a time obtained by delaying the input timing (time t4) of the corresponding Note-on N2i by a look-ahead delay time T2, and then by a further delay of Note-on delay time T4. In other words, the key drive timing of the subsequent Note-on N2k is set to a time obtained by delaying the input timing of the Note-on N2i by the sum of the look-ahead delay time T2 and the Note-on delay time T4.
[0033] By advancing the key drive timing of the preceding note-off F1k and delaying the key drive timing of the subsequent note-on N2k, it is possible to secure time from the start of key 2a's release due to the preceding note-off F1k to the start of key pressing due to the subsequent note-on N2k. Therefore, key 2a can be released sufficiently due to the preceding note-off F1k before being pressed by the subsequent note-on N2k. This suppresses the discrepancy between the automatic operation of key 2a by note-off F1k and note-on N2s and the output of musical tones by note-off F1s and note-on N2s, thereby reducing the user H's discomfort caused by the automatic operation of key 2a and the output of musical tones.
[0034] Furthermore, in ensuring sufficient time between the key activation timing of the preceding note-off F1k and the subsequent note-on N2k, by changing the key activation timing of the preceding note-off F1k and the subsequent note-on N2k respectively, it is possible to suppress a large discrepancy between either of these timings and the corresponding musical tone output timing of the preceding note-off F1s or the subsequent note-on N2s.
[0035] Note that while the note-off pre-release time T3 and note-on delay time T4 are set to 35 milliseconds, they are not limited to this value. As long as the sum of the note-off pre-release time T3 and note-on delay time T4 is less than or equal to the look-ahead delay time T2 mentioned above, it may be 35 milliseconds or more, or 35 milliseconds or less. The longer the sum of the note-off pre-release time T3 and note-on delay time T4, the more it is possible to achieve a "full stroke" where key 2a of keyboard 2 is pressed from a completely released state. On the other hand, the shorter the sum of the note-off pre-release time T3 and note-on delay time T4, the more it is possible to achieve an action that approximates the actual rapid pressing of key 2a, where key 2a is released partway before being pressed.
[0036] Next, referring to Figure 3, we will explain the case where the time difference ΔT between the earlier note-on and the later note-off, both using the same tone, is small in a key-driven note. Figure 3(a) is a diagram showing the timing of automatic key operation and musical tone output before the delay of the later note-off in this embodiment. In Figure 3(a), even when the time difference ΔT between the key-driven timing of the earlier note-on N3k and the key-driven timing of the later note-off F4k, both using the same tone, is small, the key release begins with the later note-off F4k before the key 2a is fully pressed by the earlier note-on N3k. As a result, to user H, it may appear as if the key 2a is hardly being operated at all.
[0037] Therefore, in this embodiment, when the time difference ΔT between the key drive timing of the earlier note-on N3k and the key drive timing of the later note-off F4k, which is produced by the same sound, is small, the key drive timing of the later note-off F4k is delayed to ensure that there is enough time for the key 2a to be pressed by the earlier note-on N3k. The delay of the key drive timing of the later note-off F4k will be explained with reference to Figure 3(b).
[0038] Figure 3(b) is a diagram showing the timing of automatic key operation and musical tone output after the delay of the subsequent note-off in this embodiment. If the time difference ΔT between the key drive timing of the initial note-on N3k and the key drive timing of the subsequent note-off F4k is smaller than the note-off delay time T5, the key drive timing of the subsequent note-off F4k is delayed by the note-off delay time T5.
[0039] Specifically, the subsequent note-off F4k is defined as the time obtained by delaying the input timing (time tp) of the corresponding note-off F4i by the sum of the look-ahead delay time T2 and the note-off delay time T5. In this embodiment, the note-off delay time T5 is exemplified as "110 milliseconds," but it may be 110 milliseconds or more, or 110 milliseconds or less.
[0040] In this way, by delaying the key drive timing of the subsequent note-off F4k, time can be secured from the start of pressing key 2a by the preceding note-on N3k to the start of releasing key by the subsequent note-off F4k, allowing key 2a to be pressed fully before being released. This suppresses the discrepancy between the automatic operation of key 2a by note-on N3k and note-off F4k and the output of musical tones by note-on N3s and note-off F4s, thereby reducing the user H's discomfort caused by the automatic operation of key 2a and the output of musical tones.
[0041] Next, the functions of the electronic piano 1 will be explained with reference to Figure 4. Figure 4 is a functional block diagram of the electronic piano 1. As shown in Figure 4, the electronic piano 1 has a performance information acquisition means 100, a key drive timing setting means 101, a forward-tilting means 102, and an automatic operation means 103.
[0042] The performance information acquisition means 100 is a means for acquiring performance information and its input timing, and is implemented in the CPU 10, which will be described later in Figure 5. The key drive timing setting means 101 is a means for setting the key drive timing, which is the timing for automatically operating the keys 2a of the keyboard 2 based on the performance information acquired by the performance information acquisition means 100, based on the input timing of the performance information, and is implemented in the CPU 10.
[0043] The advance timing means 102 is a means that, when the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information, set by the key drive timing setting means 101, is less than or equal to a predetermined timing threshold, readjusts the key drive timing of the earlier performance information to an earlier timing, and is implemented by the CPU 10. The automatic operation means 103 is a means that performs automatic operation of the keys 2a of the keyboard 2 based on the performance information acquired by the performance information acquisition means 100, at the key drive timing of the performance information, and is implemented by the CPU 10 and the solenoid 2b described above.
[0044] If the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information is less than or equal to a predetermined timing threshold, the key drive timing of key 2a based on the earlier performance information is reset to an earlier timing. This makes the time from the start of automatic key operation based on the earlier performance information to the start of automatic key operation based on the later performance information longer than the time between the initial input timing of the earlier performance information and the input timing of the later performance information, thus ensuring sufficient time for automatic key operation based on the earlier performance information.
[0045] In addition, the key drive timing of subsequent performance information can be kept the same as the timing based on the initial input timing of the subsequent performance information, thus suppressing the discrepancy between the timing of the output of musical tones from the subsequent performance information and the automatic operation of key 2a from the subsequent performance information. This reduces the user's discomfort caused by the musical tones output by the subsequent performance information and the automatic operation of key 2a on keyboard 2.
[0046] Next, the electrical configuration of the electronic piano 1 will be explained with reference to Figure 5. Figure 5(a) 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 aforementioned keyboard 2, setting keys 3 and LCD 4, a sound source 13, and a Digital Signal Processor 14 (hereinafter referred to as "DSP 14"), each connected via a bus line 15.
[0047] 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 MIDI data 11b in which multiple MIDI data MDs are stored. When the control program 11a is executed by the CPU 10, the main processing shown in Figure 6 and the timer event processing shown in Figure 8 are executed.
[0048] RAM12 is a memory that the CPU10 uses to store various work data and flags in a rewritable format during program execution, and includes target MIDI data 12a, sound-generating note buffer 12b, and key-driven note buffer 12c. Target MIDI data 12a stores MIDI data MD for automatic operation of key 2a and output of musical tones. Sound-generating note buffer 12b stores information about the above-mentioned sound-generating notes, and key-driven note buffer 12c stores information about the above-mentioned key-driven notes. The sound-generating note buffer 12b and key-driven note buffer 12c will be explained with reference to Figures 5(b) and (c).
[0049] Figure 5(b) is a schematic representation of the sound note buffer 12b. The sound note buffer 12b stores the musical sound output timing, note number, and note information associated with each sound note. Figure 5(b) shows an example where the sound note buffer 12b stores information about the sound notes for one timbre, such as a piano. However, if the MIDI data MD contains multiple timbres, a separate sound note buffer 12b may be provided for each timbre, or information about the sound notes of multiple timbres may be mixed and stored in a single sound note buffer 12b. When storing information about the sound notes of multiple timbres in a single sound note buffer 12b, for example, the corresponding timbre information can be stored for each sound note in the sound note buffer 12b.
[0050] Figure 5(c) is a schematic representation of the key-driven note buffer 12c. The key-driven note buffer 12c stores the key-driven timing, note number, and note information associated with each key-driven note. Figure 5(c) shows an example where the key-driven note buffer 12c stores information about a single timbre, such as a piano. However, similar to the sound-generating note buffer 12b, if the MIDI data MD contains multiple timbres, a separate key-driven note buffer 12c may be provided for each timbre, or information about key-driven notes from multiple timbres may be mixed and stored in a single key-driven note buffer 12c.
[0051] Returning to Figure 5, 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 arithmetic operations 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.
[0052] Next, the processes executed by the CPU 10 of the electronic piano 1 will be explained with reference to Figures 6-8. Figure 6 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 checks whether to perform automatic operation of key 2a (S1). In this embodiment, whether or not to perform automatic operation of key 2a is configured to be set by the user H using the setting key 3 (see Figure 1), and the setting status is confirmed in process S1.
[0053] In the process of S1, if automatic operation of key 2a is to be performed (S1: Yes), it is checked whether one of the MIDI data MDs stored in MIDI data 11b has been selected by the operation of user H's setting key 3 (S2).
[0054] In the process of S2, if MIDI data MD is specified (S2:Yes), the specified MIDI data MD is obtained from MIDI data 11b and saved to the target MIDI data 12a (S3). After the process of S3, the current position, which is the reading position of the MIDI data stored in the target MIDI data 12a, is set to the beginning position of the MIDI data MD (S4). On the other hand, if MIDI data MD is not specified in the process of S2 (S2:No), processes S3 and S4 are skipped.
[0055] After processing S2 and S4, check if the current position of the target MIDI data 12a is note information (S5). In processing S5, if the current position of the target MIDI data 12a is note information (S5: Yes), obtain the note number corresponding to the note information (S6). After processing S6, check whether the note information at the current position of the target MIDI data 12a is note on or note off (S7).
[0056] In the processing of S7, if the note information is note on or note off (S7: Yes), the musical tone output timing, which is the current time plus the key drive delay time T1 and the look-ahead delay time T2, along with the note information of the current position of the target MIDI data 12a and the note number obtained in the processing of S6, are added to the sound-producing note buffer 12b (S8). The sound-producing notes added to the sound-producing note buffer 12b by the processing of S8 are used in the output of musical tones in the timer event processing described later in Figure 8.
[0057] In this embodiment, the note information of the current position of the target MIDI data 12a corresponds to the input note described above, and the current time at which the input note is obtained from the target MIDI data 12a corresponds to the input timing. In this embodiment, the current time is obtained by a real-time clock (not shown), but it may be obtained from a device other than a real-time clock.
[0058] After processing in S8, the key-driven note addition process (S9) is executed. The key-driven note addition process will now be explained with reference to Figure 7.
[0059] Figure 7 is a flowchart of the key-driven note addition process. The key-driven note addition process first checks the note information at the current position of the target MIDI data 12a (S20). In the process of S20, if the note information at the current position of the target MIDI data 12a is note-on (S20: "note-on"), it is checked whether there is a note-off key-driven note with the same note number as the note number obtained in the process of S6 in the key-driven note buffer 12c (S21).
[0060] In the process of S21, if there is a key-driven note off with the same note number as the note number obtained in the process of S6 in the key-driven note buffer 12c (S21: Yes), it is checked whether the time difference ΔT between the key-driven timing of the note off stored in the key-driven note buffer 12c and the time obtained by adding the look-ahead delay time T2 to the current time is smaller than the sum of the note-off advance time T3 and the note-on delay time T4 (S22).
[0061] In the processing of S22, if the time difference ΔT is less than the sum of the note-off advance time T3 and the note-on delay time T4 (S22: Yes), then, as shown in Figure 2 with note-off F1k and note-on N2k above, the time difference ΔT between the note-on at the current position of the target MIDI data 12a and the note-off with the same note number stored in the key-driven note buffer 12c is small, and the key-driven timing of the note-off is advanced, while the note-on at the current position of the target MIDI data 12a is delayed.
[0062] In such cases, the key drive timing for the note off stored in the key drive note buffer 12c is advanced by the note off advancement time T3 (S23), and the key drive timing at the time obtained by adding the look-ahead delay time T2 and the note-on delay time T4 to the current time, along with the note information of the current position of the target MIDI data 12a (i.e., note-on) and the note number obtained in the processing of S6, are added to the key drive note buffer 12c (S24).
[0063] On the other hand, in the processing of S20, if the note information at the current position of the target MIDI data 12a is note off (S20: "note off"), it is checked whether there is a note on key-driven note in the key-driven note buffer 12c with the same note number as the note number obtained in the processing of S6 (S25).
[0064] In the process of S25, if there is a note-on key drive note with the same note number as the note number obtained in the process of S6 in the key drive note buffer 12c (S25: Yes), it is checked whether the time difference ΔT between the key drive timing of that note-on stored in the key drive note buffer 12c and the time obtained by adding the look-ahead delay time T2 to the current time is smaller than the note-off delay time T5 (S26).
[0065] In the processing of S26, if the time difference ΔT is smaller than the note-off delay time T5 (S26: Yes), then, as shown in Figure 3 with note-on N3k and note-off F4k above, the time difference ΔT between the note-off at the current position of the target MIDI data 12a and the note-on with the same note number stored in the key-driven note buffer 12c is small, and the note-on at the current position of the target MIDI data 12a is delayed.
[0066] In such cases, the key drive timing at the time obtained by adding the look-ahead delay time T2 and the note-off delay time T5 to the current time, along with the note information of the current position of the target MIDI data 12a (i.e., note-off) and the note number obtained in the processing of S6, are added to the key drive note buffer 12c (S27).
[0067] In the process of S21, if there is no note-off key-driven note with the same note number as the note number obtained in the process of S6 in the key-driven note buffer 12c (S21: No), in the process of S22, if the time difference ΔT is greater than or equal to the sum of the note-off advance time T3 and the note-on delay time T4 (S22: No), in the process of S25, if there is no note-on key-driven note with the same note number as the note number obtained in the process of S6 in the key-driven note buffer 12c (S25: No), or in the process of S26, if the time difference ΔT is greater than or equal to the note-off delay time T5 (S26: No), then the key-driven timing at the time obtained by adding the look-ahead delay time T2 to the current time, the note information of the current position of the target MIDI data 12a, and the note number obtained in the process of S6 are added to the key-driven note buffer 12c (S28). The sound-producing notes added to the key-driven note buffer 12c through processing S24, S27, and S28 are used in the automatic operation of the key 2a by the solenoid 2b in the timer event processing described later in Figure 8.
[0068] After processing S24, S27, and S28, the key-driven note addition process is terminated.
[0069] Return to Figure 6. In the processing of S5, if there is no note information at the current position of the target MIDI data 12a (S5: No), or after the key-driven note addition processing in S9, other processing related to the MIDI data MD of the target MIDI data 12a is performed (S10), and the current position is advanced by one (S11). Examples of processing performed in S10 include changing the volume of the musical sound output in accordance with the volume change instruction contained in the MIDI data MD, or changing the timbre of the musical sound output in accordance with the timbre change instruction contained in the MIDI data MD.
[0070] If automatic operation of key 2a is not performed during the process of S1 (S1: No), or if other processing of the electronic piano 1 is performed after the process of S11 (S12), the processes from S1 onwards are repeated. An example of the processing performed in S14 is the output of musical tones based on the performance of key 2a by user H.
[0071] Next, we will explain timer event processing. Timer event processing is a timer interrupt process that is executed every millisecond, separate from the main processing described above. Refer to Figure 8 to explain timer event processing.
[0072] Figure 8 is a flowchart of the timer event processing. The timer event processing first checks whether the current time has reached the musical tone output timing of the first sounded note in the sounded note buffer 12b (S40). In the process of S40, if the current time has reached the musical tone output timing of the first sounded note in the sounded note buffer 12b (S40: Yes), a musical tone based on the note number and note information of the corresponding sounded note is output (S41). After the musical tone is output by the process of S41, the musical tone output timing, note number, and note information of the corresponding sounded note are deleted from the sounded note buffer 12b.
[0073] In the processing of S40, if the current time has not yet reached the timing of the musical tone output of the first note in the sound note buffer 12b (S40: No), the processing of S41 is skipped.
[0074] After processing S40 and S41, it is checked whether the current time has reached the key drive timing of the first key drive note in the key drive note buffer 12c (S42). In processing S42, if the current time has reached the key drive timing of the first key drive note in the key drive note buffer 12c (S42: Yes), the solenoid 2b is driven based on the note number and note information of the corresponding key drive note to perform automatic operation of the key 2a (S43). After the automatic operation of the key 2a by processing S43, the key drive timing, note number, and note information of the corresponding key drive note are deleted from the key drive note buffer 12c.
[0075] In the process of S42, if the current time has not reached the key drive timing of the first key drive note in the key drive note buffer 12c (S42: No), or after the process of S43, the timer event processing is terminated.
[0076] Note that the time interval at which the timer event processing is executed is not limited to 1 millisecond; it may be less than 1 millisecond or more than 1 millisecond. Also, although the musical tone output processing by S40 and S41 and the automatic operation of key 2a by S40 and S41 were performed in the same timer interrupt processing, this is not limited to this; the processing of S40 and S41 and the processing of S41 and S42 may be performed in separate timer interrupt processing, or the processing of S40 to S42 may be performed in the main processing described above.
[0077] The above description is based on the above embodiment, but it can be easily inferred that various improvements and modifications are possible.
[0078] In the above embodiment, in the processing of S21 to S24 in Figure 7, when the time difference ΔT between the key drive timing of the preceding note-off and the key drive timing of the subsequent note-on, which is produced by the same sound, is small, the key drive timing of the preceding note-off is brought forward and the key drive timing of the subsequent note-on is delayed. Also, in the processing of S25 to S27 in Figure 7, when the time difference ΔT between the key drive timing of the preceding note-on and the key drive timing of the subsequent note-off, which is produced by the same sound, is small, the key drive timing of the subsequent note-off is delayed. However, the processing when the time difference ΔT is small is not limited to this.
[0079] For example, as shown in Figure 9(a), if the time difference ΔT between the key drive timing of the first note-off F1k and the key drive timing of the subsequent note-on N2k is small, only the key drive timing of the first note-off F1k may be advanced by the second note-off advance time T6. Also, as shown in Figure 9(b), if the time difference ΔT between the key drive timing of the first note-on N3k and the key drive timing of the subsequent note-off F4k is small, only the key drive timing of the first note-on N3k may be advanced by the note-on advance time T7. Here, the second note-off advance time T6 and the note-on advance time T7 are set to be shorter than the look-ahead delay time T2, and "35 milliseconds" is given as an example for each, but they may be greater than or less than 35 milliseconds.
[0080] In this case, as in the modified example in Figure 10, in the process of S21, if there is a key drive note for a note off with the same note number as the note number obtained in the process of S6 in the key drive note buffer 12c (S21: Yes), it is checked whether the time difference ΔT between the key drive timing of the note off stored in the key drive note buffer 12c and the time obtained by adding the look-ahead delay time T2 to the current time is smaller than the second note off advance time T6 (S100). In the process of S100, if the time difference ΔT is smaller than the second note off advance time T6 (S100: Yes), the key drive timing of the note off stored in the key drive note buffer 12c is advanced by the second note off advance time T6 (S100), and then the process of S28 can be performed.
[0081] In the process of S25, if there is a key-on key-driven note with the same note number as the note number obtained in the process of S6 in the key-driven note buffer 12c (S25: Yes), check if the time difference ΔT between the key-on key-driven timing stored in the key-driven note buffer 12c and the time obtained by adding the look-ahead delay time T2 to the current time is smaller than the note-on advance time T7 (S102). In the process of S102, if the time difference ΔT is smaller than the note-on advance time T7 (S102: Yes), advance the key-driven timing of the note-on stored in the key-driven note buffer 12c by the note-on advance time T7 (S103), and then proceed with the process of S28.
[0082] Furthermore, the process of bringing forward the note-off and delaying the note-off by the process of S21 to S24 in Figure 7 of the above embodiment may be combined with only the process of bringing forward the note-on by the process of S25 to S103 in Figure 10 of the modified example, or only the process of bringing forward the note-off by the process of S21 to S101 in Figure 10 of the modified example may be combined with only the delay of the note-off by the process of S25 to S27 in the above embodiment.
[0083] In the above embodiment, the time for changing the key drive timing, such as the look-ahead delay time T2, note-off advance time T3, note-on delay time T4, and note-off delay time T5, was set in milliseconds, but this is not limited to this. The look-ahead delay time T2, etc., may be set based on musically meaningful time, for example, the length of an eighth note or sixteenth note set in the MIDI data MD, or the length of the look-ahead delay time T2, etc., may be set according to the tempo speed set in the MIDI data MD. By setting the look-ahead delay time T2, etc., based on musically meaningful time in this way, it is possible to achieve automatic operation of key 2a that better matches the output musical tone.
[0084] In the above embodiment, the output of musical tones and the automatic operation of key 2a were performed based on the MIDI data MD stored in the target MIDI data 12a. However, the embodiment is not limited to this, and the output of musical tones and the automatic operation of key 2a may be performed with separate MIDI data MDs. In this case, the MIDI data MD used for the output of musical tones may have a MIDI data MD in which the key drive timing has been advanced or delayed in advance, corresponding to the key drive note addition process in Figures 7 and 10, and this MIDI data MD may be used for the automatic operation of key 2a.
[0085] In the above embodiment, the configuration for acquiring MIDI data MD from MIDI data 11b is shown in the processing of S3 in Figure 6, but it is not limited to this. For example, the electronic piano 1 may be equipped with a communication device for communicating with external devices, and MIDI data MD may be acquired from other devices or the internet via that communication device. In this case, all MIDI data MD input from other devices or the internet may be read first, and then the sound generation process for musical tones corresponding to the performance information and the automatic operation (driving) process for keys 2a may be performed. Alternatively, the sound generation process for musical tones corresponding to the performance information and the automatic operation process for keys 2a may be performed in real time while receiving MIDI data MD input from other devices or the internet in real time.
[0086] 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 synthesizers and electronic wind instruments. Furthermore, the control program 11a may be made executable on 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.
[0087] In the above embodiment, MIDI data MD was used as an example of music data, but the embodiment is not limited to this, and data related to other musical works other than the MIDI standard may be used as music data. [Explanation of symbols]
[0088] 1. Electronic piano (electronic musical instrument) 2 keys 2a key S5, S6 Means for acquiring performance information, steps for acquiring performance information S40, S41 Musical sound output means S28 Part of the key drive timing setting means, part of the key drive timing setting step S23 Advance means, part of key drive timing setting means, advance step, part of key drive timing setting step S42, S43 Automatic operation means, automatic operation step S24 Delay means, part of key drive timing setting means, part of key drive timing setting step ΔT time difference T1 Key drive delay time T2 lookahead delay T3 Note-off advance time (1st hour, 2nd hour) T4 Note-on delay time (3rd hour) T6 Second note-off advance time (1st hour)
Claims
1. An electronic musical instrument equipped with a keyboard having keys that can be operated automatically, A means for acquiring performance information that acquires performance information including note-on or note-off and the input timing of said performance information, A key drive timing setting means sets the key drive timing, which is the timing for automatically operating the keys of the keyboard based on the performance information acquired by the performance information acquisition means, based on the input timing of the performance information. The key drive timing setting means, when the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information is less than or equal to a predetermined timing threshold, the key drive timing of the earlier performance information is reset to an earlier timing; The system includes an automatic operation means that performs automatic operation of the keys of the keyboard based on the performance information acquired by the performance information acquisition means, at the key drive timing of the performance information, The key drive timing setting means is characterized in that it sets the key drive timing of the performance information to a timing obtained by adding a look-ahead delay time longer than the timing threshold to the input timing of the performance information obtained by the performance information acquisition means.
2. The system includes a musical sound output means that outputs the musical sound of the performance information acquired by the performance information acquisition means at a timing based on the input timing of the performance information, The electronic musical instrument according to claim 1, characterized in that the musical sound output means outputs the musical sound of the performance information acquired by the performance information acquisition means at a timing that is delayed by the sum of the input timing of the performance information and the look-ahead delay time and the key drive delay time corresponding to the time required for the automatic operation of the keys of the keyboard.
3. The aforementioned advancement means resets the key drive timing of the earlier performance information to a timing advanced by one hour if the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information, as set by the key drive timing setting means, is less than or equal to the timing threshold. The electronic musical instrument according to claim 1 or 2, characterized in that the first time is shorter than the look-ahead delay time.
4. The aforementioned performance information is note-off. The performance information mentioned above is note-on. The electronic musical instrument according to claim 3, characterized in that the first time is further set to be less than or equal to the time required for the keyboard key to move from a state where it is fully pressed to a state where it is fully released by automatic operation.
5. The electronic musical instrument according to claim 1, further comprising a delay means for resetting the key drive timing of the later performance information to a further delayed timing when the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information, as set by the key drive timing setting means, is less than or equal to the timing threshold.
6. The advance means resets the key drive timing of the earlier performance information to a timing advanced by two hours if the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information, as set by the key drive timing setting means, is less than or equal to the timing threshold. The delay means, when the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information, as set by the key drive timing setting means, is less than or equal to the timing threshold, readjusts the key drive timing of the later performance information to a timing that is further delayed by a third time. The electronic musical instrument according to claim 5, characterized in that the sum of the second time and the third time is shorter than the look-ahead delay time.
7. The electronic musical instrument according to claim 6, characterized in that the sum of the second time and the third time is set to be less than or equal to the actual time required for the keyboard key to move from a fully pressed state to a fully released state by automatic operation.
8. This is an automated operation method performed on an electronic musical instrument equipped with a keyboard that has keys capable of automatic operation. A performance information acquisition step that acquires performance information including note-on or note-off and the input timing of the performance information, A key drive timing setting step is to set the key drive timing, which is the timing for automatically operating the keys of the keyboard based on the performance information acquired in the performance information acquisition step, based on the input timing of the performance information. If the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information, as set in the key drive timing setting step, is less than or equal to a predetermined timing threshold, the key drive timing of the earlier performance information is reset to an earlier timing, in an advance step. The system includes an automatic operation step which performs automatic operation of the keys on the keyboard based on the performance information acquired in the performance information acquisition step, at the key drive timing of the performance information, The automatic operation method is characterized in that the key drive timing setting step sets the key drive timing of the performance information to a timing obtained by adding a look-ahead delay time longer than the timing threshold to the input timing of the performance information obtained in the performance information acquisition step.
9. An automated operation program that causes a computer equipped with a keyboard having keys capable of automatic operation to perform an automated operation process for the keys of the keyboard, A performance information acquisition step that acquires performance information including note-on or note-off and the input timing of the performance information, A key drive timing setting step is to set the key drive timing, which is the timing for automatically operating the keys of the keyboard based on the performance information acquired in the performance information acquisition step, based on the input timing of the performance information. If the time difference between the key drive timing of the earlier performance information and the key drive timing of the later performance information relating to the same sound as the earlier performance information, as set in the key drive timing setting step, is less than or equal to a predetermined timing threshold, the key drive timing of the earlier performance information is reset to an earlier timing, in an advance step. The computer is instructed to perform an automatic operation step, which involves automatically operating the keys of the keyboard based on the performance information acquired in the performance information acquisition step, at the key drive timing of the performance information. The automatic operation program is characterized in that the key drive timing setting step sets the key drive timing of the performance information to a timing obtained by adding a look-ahead delay time longer than the timing threshold to the input timing of the performance information obtained in the performance information acquisition step.