Electronic apparatus, electronic musical instrument, output control method and program

The electronic device enhances sound signal output timing by collectively processing unit data with the same output timing, reducing delays and maintaining sound quality through a FIFO and latest data storage system.

JP2024146972APending Publication Date: 2024-10-16CASIO COMPUTER CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023059710
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2024-10-16

AI Technical Summary

Technical Problem

Existing electronic devices face issues with timing shifts in sound signal output generation due to slow data processing speeds.

Method used

An electronic device with a receiving unit, control unit, and generation unit that collectively holds unit data with the same output timing and outputs them simultaneously, using a FIFO and latest data storage to ensure precise timing.

Benefits of technology

Improves the accuracy of sound signal output generation timing by reducing delays and variations, maintaining sound quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024146972000001_ABST
    Figure 2024146972000001_ABST
Patent Text Reader

Abstract

To provide an electronic apparatus, electronic musical instrument, output control method and a program that can improve timing of output generation of a signal.SOLUTION: An electronic apparatus includes: a communication unit (14) that can receive input data including unit data related to output; and a control unit that controls timing of outputting unit data to a DSP (15) that generates output data based on the input data. The control unit acquires information about the output timing for each of the acquired unit data, and holds together the unit data for which the output timing in the information is the most recent timing, and outputs the held unit data to the DSP (15) at the most recent timing.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an electronic device, an electronic musical instrument, an output control method, and a program. [Background technology]

[0002] There are electronic devices that generate and output sound signals based on sound output data related to music performance such as MIDI (Musical Instruments Digital Interface). Patent Document 1 discloses a technology that acquires and uses sound output data up to two bars before in advance. In this patent document 1, the same process as the output generation of the actual sound signal (sound playback) is performed a certain time before the actual sound output, but with the sound output set to zero, thereby keeping the lead time constant.

[0003] Such sound output data can also be transmitted by wireless communication such as Bluetooth (registered trademark) from one electronic device to another electronic device capable of generating sound signals for processing. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2009-210917 A Summary of the Invention [Problem to be solved by the invention]

[0005] However, when the data processing speed is slow, there is a problem that the timing for generating and outputting the sound signal may be off.

[0006] An object of the present invention is to provide an electronic device, an electronic musical instrument, an output control method, and a program that can improve the timing of signal output generation. [Means for solving the problem]

[0007] In order to achieve the above object, the present invention provides A receiving unit capable of receiving input data including unit data related to output; a control unit that controls a timing at which the unit data is output to a generation unit that generates output data based on the input data; Equipped with The control unit is acquiring information regarding output timings related to each of the acquired unit data; A plurality of the unit data whose output timing in the information is the same is stored together; The plurality of unit data held are output to the generating unit at the same timing. It is an electronic device. Effect of the Invention

[0008] According to the present invention, there is an advantage that the timing of signal output generation can be improved. [Brief description of the drawings]

[0009] [Figure 1] 1 is a block diagram showing a functional configuration of an electronic device according to an embodiment of the present invention; [Diagram 2] FIG. 2 is a diagram illustrating a data flow related to sound output in an electronic device. [Diagram 3] 13 is a flowchart showing a control procedure for an output data generation process. [Figure 4] 13 is a flowchart showing a control procedure of a simultaneous data addition process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the functional configuration of an electronic device 1 according to the present embodiment. The electronic device 1 analyzes performance data (input data), for example, MIDI data, received from a sound source S, and generates sound output data including a digital signal corresponding to at least one of musical tones and voices (sounds to be emitted). The electronic device 1 outputs a sound output signal (output signal) obtained by converting the generated sound output data into an analog form. The sound source S may be a general computer (PC) or the like (one in which MIDI software is installed, etc.). Alternatively, the sound source S may be an electronic musical instrument, etc., in which the performance contents are converted into MIDI data, stored, and output. Furthermore, the electronic device 1 itself may be an electronic musical instrument equipped with a performance reception unit 17 such as a keyboard. The output destination of the sound output signal may be, for example, a speaker L, earphones, headphones, or an electronic device that records the sound output signal.

[0011] The electronic device 1 includes a CPU 11 (Central Processing Unit) (control unit), a RAM 12 (Random Access Memory), a storage unit 13, a communication unit 14 (receiving unit), a DSP 15 (Digital Signal Processor) (generating unit), an output unit 16, and the performance reception unit 17. Each component is electrically connected to each other via a bus.

[0012] The CPU 11 is a processor that performs arithmetic processing and controls the overall operation of the electronic device 1. The CPU 11 may be designed to be suitable for controlling the generation of sound output data. The CPU 11 may have a single processor, or may have multiple processors that operate in parallel or independently depending on the application. The CPU 11 also counts the current time based on a clock signal output by an oscillation circuit (not shown). For this purpose, the electronic device 1 is provided with an RTC (Real Time Clock) (not shown). The CPU 11 obtains the current time from the RTC when the electronic device 1 is started.

[0013] The RAM 12 provides a working memory space for the CPU 11 and stores temporary data. The RAM 12 includes a FIFO 121 (first storage unit) and latest data 122 (second storage unit). The FIFO 121 stores each sound data and control data (these are referred to as unit data) included in input data from the outside in order, and outputs them in the order in which they were stored. The latest data 122 collectively stores (holds) data to be output to the DSP 15 at the same timing (latest timing) among the unit data stored in the FIFO 121. The FIFO 121 and the latest data 122 may each be a part of the same hardware storage device. The FIFO 121 may be a ring buffer. There is an upper limit (maximum storage number Imax) to the number of unit data that can be stored simultaneously as the latest data 122. This maximum storage number Imax is equal to or less than the number of sounds that the DSP 15 can generate simultaneously.

[0014] The storage unit 13 is a non-volatile memory, such as a flash memory or a HDD, and stores a program 131 for generating sound output data and setting data.

[0015] The communication unit 14 controls communication operations with external devices in accordance with a defined communication standard. In this example, communication standards available for communication include the Bluetooth (registered trademark) Low Energy standard (BLE).

[0016] The DSP 15 is a dedicated circuit that analyzes input data (MIDI data) and generates sound output data. The generated sound output data is output to the output unit 16. The DSP 15 can simultaneously process up to an upper limit of unit data in parallel to generate sound data (including data not directly related to the output sound), and generate sound output data by mixing these data using a mixer. The processing of the DSP 15 can also include effect processing for the output sound.

[0017] The output unit 16 has a DAC (digital / analog converter) that converts the digital sound output data generated by the DSP 15 into analog data, and an output terminal (interface) for outputting the sound output signal obtained by the analog conversion to the outside. The output unit 16 may have an output terminal that outputs the sound output signal to a headphone. In addition to or instead of this, the output unit 16 may output the sound output signal to a speaker L that the electronic device 1 itself has. The output unit 16 may have an amplifier that amplifies the sound output signal before outputting it to the output terminal and / or the speaker L. The electronic device 1 may be capable of switching whether to output the sound output signal to the output terminal or the speaker L, either mechanically or under the control of the CPU 11.

[0018] The electronic device 1 may have an input terminal for receiving performance data (sound data) of a separate electronic musical instrument. The performance data may be input to the DSP 15, mixed with sound data based on MIDI data, and sent to the output unit 16. The electronic device 1 includes a CPU 11, a RAM 12, a storage unit 13, and a communication unit 14 as a computer involved in generating and outputting sound output data.

[0019] Additionally, the electronic device 1 may include an operation reception unit having an operation button for turning on and off the power supply, a display unit having a display screen for displaying a status, and the like.

[0020] Next, the acquisition of MIDI data and sound output will be described. In the following description, the input data is assumed to be MIDI data. MIDI data is an ordered sequence of unit data such as event data indicating the content of the sound to be output and its changes over time. The content of the sound may include pitch, timbre, intensity, etc. The changes over time may include onset characteristics such as accents, attenuation of volume, frequency spectrum distribution, etc. Note that system exclusive data that may be included in the event data does not need to be taken into consideration, and may not be included in the unit data of this embodiment.

[0021] The electronic device 1 can receive (acquire) MIDI data from an external device via BLE (wireless communication). In BLE, data is sent in packets that are transmitted at a specified communication interval (a certain time interval). The communication interval can be variably set within a range defined by the BLE standard, but is often fixed (for example, 15 msec intervals). The data format of the communication contents may be in accordance with a common standard (MIDI over Bluetooth Low Energy). Each packet includes one or more sets of the unit data and information (timestamp) on the output timing associated with each unit data.

[0022] When MIDI data is received, conventional electronic devices sequentially decode the unit data, obtain output timing information, and output the unit data at that output timing to the DSP 15. However, when there is a large amount of event data with the same output timing, the actual output of some data has a significant delay from the specified output timing, and as a result, the output of some sounds from the output unit 16 frequently occurs later than the desired output timing.

[0023] FIG. 2 is a diagram illustrating the flow of data related to sound output in the electronic device 1. As shown in FIG. The electronic device 1 breaks down MIDI data acquired by reception via BLE by the communication unit 14 into unit data and stores the data in the FIFO 121. The electronic device 1 sequentially refers to and checks the output timing of each unit data, and collects the unit data of the most recent output timing (same timing) in advance and stores it as most recent data 122. At the output timing, it becomes possible to output all the unit data stored and held in the most recent data 122 without delay.

[0024] In principle, the unit data are arranged in the order of their output timing. Therefore, all the unit data following a unit data whose output timing is not the latest output timing are not the latest output timing.

[0025] Taking into consideration the arrangement of the unit data, the received MIDI data is input to and stored in the FIFO 121 in the arrangement (reception order) of the unit data, and is read and output in the input order. If the output timing of the read unit data is the most recent output timing, this unit data is moved to most recent data 122 and stored. If the output timing of the read unit data is not the most recent output timing, this output timing is the next timing after the most recent output timing. This unit data is returned to the top position of the FIFO 121, and is read out again after the unit data of the most recent output timing has been output.

[0026] The most recent data 122 is output collectively to the DSP 15 at the most recent output timing. This allows the DSP 15 to generate sound output data and output it to the output unit 16 more quickly than if the DSP 15 were to sequentially read and process a plurality of data at the same output timing as separate unit data. Therefore, a plurality of processes related to the output of sound based on the sound output data are performed without a significant delay from the designated timing.

[0027] Fig. 3 is a flowchart showing the control procedure by the CPU 11 of the output data generation process executed by the electronic device 1 of this embodiment. Fig. 4 is a flowchart showing the control procedure of the simultaneous data addition process called in the output data generation process. The output data generation process including the output control method of this embodiment is started when MIDI data (input data) is received by the communication unit 14.

[0028] When the output data generation process is started, the CPU 11 acquires one unit data that is the earliest in the input data according to the data order, and adds it to the queue of the FIFO 121 (step S101). The CPU 11 determines whether or not the unit data has been acquired (step S102). If it is determined that the unit data has not been acquired (step S102; NO), the CPU 11 ends the output data generation process.

[0029] When it is determined that the unit data has been acquired and added to the queue (step S102; YES), the CPU 11 sets a variable (memory count I) indicating the number of stored output data to "0" (step S103). The CPU 11 refers to information related to the timing of the acquired unit data, and sets the output timing as the nearest timing Tn (step S104; acquisition means).

[0030] The CPU 11 executes an output timing addition process (step S105; storage means). As shown in Fig. 4, in the output timing addition process, the CPU 11 determines whether the storage number I is equal to or greater than a predetermined maximum storage number Imax (step S141).

[0031] When it is determined that the number of memories I is equal to or greater than the maximum number of memories Imax (step S141; YES), the CPU 11 does not store and hold the acquired unit data in the most recent data 122, and sets a value indicating that the storage of the output data has failed (step S143). This setting may be set, for example, as a flag, or may be set as a function value, such as "-1", that the simultaneous data addition process returns to the output data generation process. Then, the CPU 11 ends the simultaneous data addition process.

[0032] When it is determined that the storage number I is not equal to or greater than the maximum storage number Imax (step S141; NO), the CPU 11 appends and stores the acquired unit data to the most recent data 122 (step S142). The CPU 11 adds "1" to the storage number I (step S142). Then, the CPU 11 ends the simultaneous data addition process and returns the process to the output data generation process.

[0033] 3, when the simultaneous data addition process is completed and the process returns to the output data generation process, the CPU 11 acquires the next unit data from the received MIDI data (step S106). The CPU 11 determines whether or not the unit data has been acquired (step S107). If there is no unit data and it is determined that the unit data has not been acquired (step S107; NO), the process of the CPU 11 proceeds to step S112.

[0034] When it is determined that the unit data has been acquired (step S107; YES), the CPU 11 refers to the output timing of the acquired unit data and determines whether the output timing is equal to the nearest timing Tn (step S108; acquisition means). When it is determined that the output timing of the acquired unit data is not equal to the nearest timing Tn (step S108; NO), the process of the CPU 11 proceeds to step S111.

[0035] When it is determined that the output timing of the acquired unit data is equal to the nearest timing Tn (step S108; YES), the CPU 11 calls and executes a simultaneous data addition process (step S109; holding means).

[0036] The CPU 11 determines whether the simultaneous data addition process has succeeded in adding the unit data to the most recent data 122 (step S110). If it is determined that the unit data has been added to the most recent data 122 successfully (step S110; YES), the process of the CPU 11 returns to step S106. As described above, if the determination process of step S141 determines that the number of memories I is not equal to or greater than the maximum number of memories Imax, the addition is successful. If it is determined that the simultaneous data addition process has failed to add the unit data to the most recent data 122 (step S110; NO), the process of the CPU 11 proceeds to step S111.

[0037] If it is determined in step S108 that the output timing of the unit data acquired is not equal to the most recent timing Tn, or if it is determined in step S110 that the unit data has not been successfully added to the most recent data 122, the process proceeds to step S111, where the CPU 11 returns the unit data that was not added to the head data of the queue (step S111). Then, the process of the CPU 11 proceeds to step S112.

[0038] When the process proceeds from steps S107 and S111 to step S112, the CPU 11 waits until the set nearest timing Tn arrives (step S112). When the nearest timing Tn arrives, the CPU 11 outputs the held nearest data 122 to the DSP 15 (step S113; output control means). Then, the process of the CPU 11 returns to step S101.

[0039] As described above, the electronic device 1 of this embodiment includes a communication unit 14 capable of receiving input data such as MIDI data including unit data (event data) related to sound output, and a CPU 11 for controlling the timing of outputting the unit data to a DSP 15 that generates sound output data corresponding to a sound to be emitted based on the input data. The CPU 11 acquires information regarding the output timing of a sound related to each of the acquired unit data. The CPU 11 collects in advance a plurality of unit data whose output timing is the most recent timing, and stores and holds them as the most recent data 122. The CPU 11 outputs the held unit data to the DSP 15 at the most recent timing. That is, the electronic device 1 can output a plurality of events designated to emit sounds at the same timing to the DSP 15 collectively without delay to generate sound output data. Therefore, the electronic device 1 can output sound output data with reduced variation in sound generation timing and improved output generation timing of sound signals. This allows the electronic device 1 to suppress unintended deterioration in the quality of the output sound.

[0040] The electronic device 1 also includes a RAM 12. The RAM 12 has a FIFO 121 capable of storing and outputting unit data included in input data received by the communication unit 14 in the order of reception, and a most recent data 122 for storing the held unit data. The input data has a plurality of unit data arranged in the order of output timing. The CPU 11 reads out unit data in order from the FIFO 121, and moves and stores the unit data to be output at the most recent timing in the most recent data 122. The CPU 11 outputs the unit data stored in the most recent data 122 to the DSP 15 at the most recent timing that has been set. In this way, the electronic device 1 extracts unit data to be output at the nearest timing from the received data and organizes them as separate data in advance. Therefore, the electronic device 1 does not need to select output data at the nearest timing that has been set, and can quickly send these data to the DSP 15 to generate sound output data.

[0041] Furthermore, if the unit data read from the FIFO 121 is not to be output at the most recent timing, the CPU 11 returns this read unit data to the FIFO 121 as the earliest stored data. The unit data in the FIFO 121 are arranged in the order in which they were received, and the input data are arranged in the order in which they were output. Therefore, the first unit data that is determined not to be output at the most recent timing is to be output at the timing following the most recent timing. By returning this unit data to the FIFO 121, new most recent data 122 can be stored and held by the same process every time after the most recent data 122 is output.

[0042] In addition, a maximum number Imax of unit data that can be simultaneously stored in the most recent data 122 is determined. When the maximum number Imax of unit data is stored in the most recent data 122, the CPU 11 does not read out the unit data from the FIFO 121 until the stored unit data is output to the DSP 15 at the most recent timing. This allows the electronic device 1 to avoid limitlessly storing the most recent data 122. For example, by setting the maximum storage number Imax to be equal to or less than the number of sound data that the DSP 15 can simultaneously generate, data that is greater than the number of sound data that the DSP 15 can simultaneously process is not stored. Alternatively, on the other hand, the maximum storage number Imax may be greater than the maximum number of sound data that the DSP 15 can simultaneously process. This allows the interval between two processing steps to be shortened even when the DSP 15 is forced to divide and process sound that is set to be output simultaneously in the input data into two or more steps.

[0043] The electronic musical instrument of this embodiment also includes the above-described electronic device configuration and a performance acceptance unit 17 that accepts a performance operation by a user and generates input data. For example, even when sound output data is generated and output by integrating the sound output related to the performance accepted by the performance acceptance unit 17 and the input data received from an external sound source S, the deviation between them can be appropriately suppressed.

[0044] The output control method of this embodiment also includes the following steps: Obtain information relating to the output timing of sound associated with each of the acquired unit data; Collect and store a plurality of unit data whose output timing is the most recent timing in advance; Output the stored unit data to the DSP 15 at the most recent timing; According to this output control method, a plurality of unit data designated to emit sound at the same timing can be output to the DSP 15 with a small time difference. Therefore, this output control method can reduce variations in sound generation timing with simple processing, and output sound output data so as to generate sound signals more accurately.

[0045] Moreover, by installing the program 131 relating to the above-described output control method in the electronic device 1 and executing it in the form of software, it is possible to easily obtain sound output data with reduced variation in output timing of the sound data.

[0046] The present invention is not limited to the above-described embodiment, but may be modified in various ways. For example, if it is difficult to restore data once read from FIFO 121, the data may be stored in another buffer area, and moved to new most recent data 122 after the most recent data 122 is output.

[0047] Furthermore, the FIFO 121 does not have to be a hardware FIFO, and may be a commonly used DRAM or the like.

[0048] In the above embodiment, only the most recent output data is collected in advance, but the present invention is not limited to this. Data from two or three output timings later may also be collected in advance under conditions such as not exceeding the data reception speed and not receiving real-time performance data immediately before. Also, whether or not the most recent data 122 is set may be switched depending on whether or not input data is acquired from outside via wireless communication. Also, even when the input data is not limited to the output order, it is effective to sort the acquired data by output timing as much as possible.

[0049] In addition, although the above embodiment has been described assuming that data is input via BLE, the present invention is not limited to this. If the input data is performance data transmitted and received together with output timing data, the input data may be acquired based on other communication standards.

[0050] Also, in this case, it is sufficient for the communication unit 14 to be capable of receiving. Alternatively, the electronic device 1 may be capable of transmitting specific control information or setting information to the sound source S via the communication unit 14 having a transmission function.

[0051] In the above description, the storage unit 13 is exemplified as a computer-readable medium for storing the program 131 related to the output data generation control of the present invention, and is composed of a non-volatile memory such as an HDD, SSD, or flash memory, but is not limited thereto. As other computer-readable media, other non-volatile memories such as MRAM, and portable recording media such as CD-ROMs and DVD disks can be applied. In addition, a carrier wave is also applied to the present invention as a medium for providing the data of the program related to the present invention via a communication line. In addition, the specific configurations, contents and procedures of the processing operations, etc. shown in the above embodiments can be modified as appropriate without departing from the spirit of the present invention. The scope of the present invention includes the scope of the invention described in the claims and its equivalents. [Explanation of symbols]

[0052] 1 Electronic equipment 11 CPU 12 RAM 121 FIFO 122 Latest Data 13 Storage section 131 Programs 14 Communications Department 15 DSP 16 Output section 17 Performance reception area Imax Maximum number of memories I Number of memories L Speaker S sound source Tn Latest timing

Claims

1. A receiving unit capable of receiving input data including unit data related to output; a control unit that controls a timing at which the unit data is output to a generation unit that generates output data based on the input data; Equipped with The control unit is acquiring information regarding output timings related to each of the acquired unit data; A plurality of the unit data whose output timing in the information is the same is stored together; The plurality of unit data held are output to the generating unit at the same timing. electronic equipment.

2. a first storage unit capable of storing and outputting the unit data included in the input data received by the receiving unit in the order of reception; A second storage unit that stores the retained setting data; Equipped with The input data includes a plurality of unit data arranged in the order of output timing, The control unit is reading the unit data in order from the first storage unit, and moving and storing the unit data to be output at the same timing in the second storage unit; The unit data stored in the second storage unit is output to the generation unit at the same timing.

2. The electronic device according to claim 1.

3. when the unit data read from the first storage unit are not to be output at the same timing, the control unit returns the unit data to the first storage unit as the earliest stored data.

3. The electronic device according to claim 2.

4. A maximum number of the unit data that can be stored simultaneously in the second storage unit is determined, the control unit, when the maximum number of unit data items has been stored in the second storage unit, does not read out the unit data items in the first storage unit until the stored unit data items are output to the generation unit at the same timing.

3. The electronic device according to claim 2.

5. An electronic device according to any one of claims 1 to 4; a performance reception unit that receives a performance operation by a user and generates the input data; An electronic musical instrument comprising:

6. An output control method for an electronic device having a receiving unit capable of receiving input data including unit data related to output, comprising: acquiring information regarding output timings related to each of the acquired unit data; A plurality of the unit data whose output timing in the information is the same is stored together; At the same timing, the stored unit data is output to a generating unit that generates output data based on the input data. Output control method.

7. A computer of an electronic device having a receiving unit capable of receiving input data including unit data related to output, an acquisition means for acquiring information regarding an output timing related to each of the acquired unit data; a holding means for collectively holding a plurality of the unit data whose output timing in the information is the same; an output control means for outputting the held unit data to a generation section which generates output data based on the input data at the same timing; A program that functions as a

Citation Information

Patent Citations

  • Music piece playing program and music piece player

    JP2009210917A