JP2024046785A - Effect imparting device, method, and program - Google Patents

Effect imparting device, method, and program Download PDF

Info

Publication number
JP2024046785A
JP2024046785A JP2022152069A JP2022152069A JP2024046785A JP 2024046785 A JP2024046785 A JP 2024046785A JP 2022152069 A JP2022152069 A JP 2022152069A JP 2022152069 A JP2022152069 A JP 2022152069A JP 2024046785 A JP2024046785 A JP 2024046785A
Authority
JP
Japan
Prior art keywords
block
data
calculation
processing unit
calculation processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2022152069A
Other languages
Japanese (ja)
Inventor
益男 横田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2022152069A priority Critical patent/JP2024046785A/en
Publication of JP2024046785A publication Critical patent/JP2024046785A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

【課題】音源で生成される楽音データに所定数のサンプルで構成されるブロック単位に基づく単位で音響効果を付与する効果付与技術に関し、楽音データにブロック単位で音響効果を付与する演算処理において、メモリの利用効率を向上させる。【解決手段】ブロック単位で割込み起動されるブロック割込み処理内で実行されるブロック判定処理(ブロック判定処理部)において、楽音データがブロック単位で演算処理条件に合致したか否か、例えばオール0の値であるか否かを示すブロック管理情報に基づいてブロック単位で効果付与を行う演算処理部での演算処理を、例えば通常演算処理と単純なオール0値の出力処理等とで調整する。【選択図】図10[Problem] This relates to an effect imparting technology that imparts sound effects to musical sound data generated by a sound source in units based on block units consisting of a predetermined number of samples, and improves memory utilization efficiency in the computational process that imparts sound effects to musical sound data in units of blocks. [Solution] In a block judgment process (block judgment processing unit) executed within a block interrupt process that is started by interrupt on a block basis, the computation process in the computation processing unit that imparts effects in units of blocks based on block management information that indicates whether musical sound data matches computational processing conditions in units of blocks, for example whether the data is all 0, is adjusted, for example, between normal computation and simple output processing of all 0 values. [Selected Figure] Figure 10

Description

本発明は、音源で生成される楽音データに所定数のサンプルで構成されるブロック単位に基づく単位で音響効果を付与する効果付与装置、方法、及びプログラムに関する。 The present invention relates to an effect imparting device, method, and program that imparts sound effects to musical sound data generated by a sound source in units based on block units consisting of a predetermined number of samples.

楽音信号に対してインパルス応答を畳み込むことにより残響や共鳴効果等の音響効果を付与する効果付与装置において、その畳込み手段として、周波数領域で畳み込みを行なうFFT/iFFT(Fast Fourier Transform/inverse Fast Fourier Transform:高速フーリエ変換/逆高速フーリエ変換)を用いる技術(例えば特許文献1)が知られている。
この場合、インパルス応答の係数データ、楽音信号ともに、各FFTフレームは複数回用いられることになる。
In an effect imparting device that imparts sound effects such as reverberation and resonance effects by convolving an impulse response with a musical sound signal, a technique is known that uses FFT/iFFT (Fast Fourier Transform/inverse Fast Fourier Transform) that performs convolution in the frequency domain (e.g., Patent Document 1).
In this case, each FFT frame is used multiple times for both the coefficient data of the impulse response and the tone signal.

特開2005-215058号公報JP 2005-215058 A

電子楽器ではCPU(中央演算処理装置)、音源LSI(LSI:大規模集積回路)、及びDSP(デジタルシグナルプロセッサ)などがメモリをシェアした構成をとることが多いため、1つの処理のメモリ占有率が高い場合に、電子楽器全体でのパフォーマンスが低下してしまうという課題があった。 Electronic musical instruments often have a configuration in which the CPU (Central Processing Unit), sound source LSI (Large Scale Integrated Circuit), and DSP (Digital Signal Processor) share memory, so if one process occupies a large amount of memory, there is a problem that the performance of the entire electronic musical instrument decreases.

そこで、本発明は、楽音データにブロック単位で音響効果を付与する演算処理において、メモリの利用効率を向上させることを目的とする。 The present invention aims to improve memory usage efficiency in the computational process of adding sound effects to musical sound data on a block-by-block basis.

態様の一例の効果付与装置は、音源で生成される楽音データにブロック単位で音響効果を付与する演算処理を実行する演算処理部と、前記楽音データが前記ブロック単位で演算処理条件を満たしたか否かを示すブロック管理情報に基づいて前記演算処理部での前記演算処理を調整する演算制御処理部と、を備える。
を備える
An example of an effect imparting device includes a calculation processing unit that executes calculation processing to impart sound effects on a block-by-block basis to musical sound data generated by a sound source, and a calculation control processing unit that adjusts the calculation processing in the calculation processing unit based on block management information indicating whether the musical sound data satisfies calculation processing conditions on a block-by-block basis.
Equipped

本発明によれば、楽音データにブロック単位で音響効果を付与する演算処理において、メモリの利用効率を向上させることが可能となる。 The present invention makes it possible to improve memory utilization efficiency in computational processing that applies sound effects to musical sound data on a block-by-block basis.

電子楽器の実施形態の例を示すブロック図である。1 is a block diagram illustrating an example embodiment of an electronic musical instrument. 電子楽器における楽音データの流れの例を示す図である。FIG. 2 is a diagram showing an example of the flow of musical tone data in an electronic musical instrument. 効果装置のブロック図である。FIG. 2 is a block diagram of an effects device. CONV演算処理部の動作説明図(その1)である。FIG. 11 is an explanatory diagram (part 1) of the operation of the CONV calculation processing unit. CONV演算処理部の動作説明図(その2)である。FIG. 13 is an explanatory diagram (part 2) of the operation of the CONV calculation processing unit. CONV演算処理部の動作説明図(その3)である。FIG. 11 is an explanatory diagram (part 3) of the operation of the CONV calculation processing unit. FFT演算を用いた周波数域畳込み処理における処理遅延の説明図である。1 is an explanatory diagram of a processing delay in frequency domain convolution processing using FFT calculation. FIRフィルタ演算処理部とCONV演算処理部の処理関係を示す説明図である。4 is an explanatory diagram showing the processing relationship between an FIR filter calculation processor and a CONV calculation processor; FIG. メイン処理動作の制御処理例を示すメインフローチャートである。11 is a main flowchart showing an example of control processing of a main processing operation. 初期化処理とブロック割込み処理の詳細処理例を示すフローチャートである。13 is a flowchart showing an example of detailed processing of an initialization process and a block interrupt process. ブロック判定処理の詳細処理例を示すフローチャートである。13 is a flowchart illustrating a detailed example of a block determination process. フレーム演算処理と演算処理の詳細処理例を示すフローチャートである。13 is a flowchart showing an example of detailed processing of frame calculation processing and calculation processing. CONV演算処理部の動作説明図(その4)である。FIG. 11 is an explanatory diagram (part 4) of the operation of the CONV calculation processing unit. ブロック判定処理の他の詳細処理例を示すフローチャートである。13 is a flowchart showing another detailed example of the block determination process.

以下、本発明を実施するための形態について図面を参照しながら詳細に説明する。本実施形態の電子楽器の効果付与部に用いられるフィルタ演算処理装置は、フィルタ次数を柔軟に変更可能なFIRフィルタ演算処理を実行することができ、また、フィルタ次数やインパルス応答特性が異なる複数のFIRフィルタ演算処理を、それらの組合せを柔軟に変更しながら同時に実行することが可能である。本実施形態における効果付与部は、このようなFIRフィルタ演算処理による時間域畳込み処理と、FFT演算を用いた周波数域畳込み処理とが組み合わされて実装される。この場合、周波数域畳込み処理におけるFFT点数と共にFIRのフィルタ次数を柔軟に決定することが可能となるため、電子楽器の楽音に、応答性を犠牲にすることなく、再現性の高い残響、共鳴効果を付与することが可能となる。 The embodiment of the present invention will be described in detail below with reference to the drawings. The filter calculation processing device used in the effect imparting section of the electronic musical instrument of this embodiment can execute FIR filter calculation processing that allows the filter order to be flexibly changed, and can simultaneously execute multiple FIR filter calculation processing with different filter orders and impulse response characteristics while flexibly changing the combinations of these. The effect imparting section in this embodiment is implemented by combining time domain convolution processing using such FIR filter calculation processing and frequency domain convolution processing using FFT calculation. In this case, it is possible to flexibly determine the FIR filter order along with the number of FFT points in the frequency domain convolution processing, so that it is possible to impart highly reproducible reverberation and resonance effects to the musical sounds of the electronic musical instrument without sacrificing responsiveness.

図1は、電子楽器100の実施形態の例を示すブロック図である。電子楽器100は、少なくとも1つのCPU(中央演算処理装置)101と、ROM(リードオンリーメモリ)102と、RAM(ランダムアクセスメモリ)103と、音源(TG:Tone Generator)104と、DSP(Digital Signal Processor)である効果付与部105と、鍵盤106と、ペダル107と、操作子108が、システムバス109に接続された構成を有する。また、音源(TG)104の出力は、サウンドシステム110に接続される。効果付与部105は、後述する効果装置211を備えている。 Figure 1 is a block diagram showing an example of an embodiment of an electronic musical instrument 100. The electronic musical instrument 100 has at least one CPU (Central Processing Unit) 101, a ROM (Read Only Memory) 102, a RAM (Random Access Memory) 103, a sound source (TG: Tone Generator) 104, an effect imparting section 105 which is a DSP (Digital Signal Processor), a keyboard 106, pedals 107, and an operator 108, all connected to a system bus 109. The output of the sound source (TG) 104 is connected to a sound system 110. The effect imparting section 105 is equipped with an effect device 211, which will be described later.

CPU101は、ROM102からRAM103にロードされた制御プログラムを実行することにより、鍵盤106や操作子108からの演奏操作情報に基づいて、音源104に発音指示を出す。 The CPU 101 executes a control program loaded from the ROM 102 to the RAM 103, and issues sound generation instructions to the sound source 104 based on performance operation information from the keyboard 106 and the controls 108.

音源(TG)104は、上記発音指示に従って、ROM102又はRAM103から波形データを読み出すことにより、楽音データを生成する。この楽音データは、効果付与部105を介して、サウンドシステム110に出力される。ここで、例えば操作者によってペダル107が踏まれると、効果付与部105が、楽音データにリバーブなどの残響音付与やピアノの弦の共鳴音付与などの効果付与を実行する。この結果、効果付与部105から出力された楽音データは、サウンドシステム110において、デジタル-アナログ変換器によってアナログ楽音信号に変換され、アナログアンプで増幅され、スピーカから放音される。 The tone generator (TG) 104 generates musical tone data by reading waveform data from the ROM 102 or RAM 103 in accordance with the sound generation instructions. This musical tone data is output to the sound system 110 via the effect imparting unit 105. Here, for example, when the operator depresses the pedal 107, the effect imparting unit 105 imparts effects to the musical tone data, such as imparting reverberation such as reverberation or the resonance of piano strings. As a result, the musical tone data output from the effect imparting unit 105 is converted into an analog musical tone signal by a digital-to-analog converter in the sound system 110, amplified by an analog amplifier, and emitted from a speaker.

図2は、図1の構成を有する電子楽器における楽音データの流れの例を示す図である。音源(TG)104は、CH1~CHnのnチャネルの発音チャネルの楽音データを生成する楽音生成部201(CH1)~201(CHn)を備え、それぞれ、操作者による鍵盤106での押鍵に基づいて発生する図1のCPU101からの発音指示に従い、押鍵毎に独立した楽音データを生成する。発音チャネルCHiに対応する楽音生成部201(CHi)(1≦i≦n)は、波形データを生成する波形生成部WG.CHi、生成された波形データの音色を加工するフィルタ処理部TVF.CHi、及び生成された波形データの振幅エンベロープを加工するアンプエンベロープ処理部TVA.CHiを備える。 Figure 2 is a diagram showing an example of the flow of musical tone data in an electronic musical instrument having the configuration of Figure 1. The tone generator (TG) 104 includes musical tone generators 201 (CH1) to 201 (CHn) that generate musical tone data for n tone generation channels CH1 to CHn, and generate independent musical tone data for each key pressed according to tone generation instructions from the CPU 101 of Figure 1 that are generated based on the key pressed by the operator on the keyboard 106. The musical tone generator 201 (CHi) (1 ≤ i ≤ n) corresponding to tone generation channel CHi includes a waveform generator WG.CHi that generates waveform data, a filter processor TVF.CHi that processes the tone of the generated waveform data, and an amplifier envelope processor TVA.CHi that processes the amplitude envelope of the generated waveform data.

ミキシング部202内の4つのミキサ203、204、205、及び206はそれぞれ、各楽音生成部201(CHi)(1≦i≦n)が出力する各楽音データに所定のレベルを乗算した後に累算することにより得られる、Lch(左チャネル)直接音出力データ207、Rch(右チャネル)直接音出力データ208、Lch効果音入力データ209、及びRch効果音入力データ210をそれぞれ、効果付与部105に出力する。なお、図2において、各ミキサ203、204、205、及び206内の記号「*、Σ」は、入力したデータに対して所定のレベルを乗算後に累算して出力することを示している。 The four mixers 203, 204, 205, and 206 in the mixing unit 202 output Lch (left channel) direct sound output data 207, Rch (right channel) direct sound output data 208, Lch sound effect input data 209, and Rch sound effect input data 210, which are obtained by multiplying each musical sound data output by each musical sound generating unit 201 (CHi) (1≦i≦n) by a predetermined level and then accumulating the data, to the effect imparting unit 105. Note that in FIG. 2, the symbols "*, Σ" in each mixer 203, 204, 205, and 206 indicate that the input data is multiplied by a predetermined level, then accumulated and output.

Lch効果音入力データ209及びRch効果音入力データ210はそれぞれ、効果付与部105内の効果装置211において残響や共鳴などの効果が付与されたLch効果音出力データ212及びRch効果音出力データ213として出力される。効果付与部105内で、Lch効果音出力データ212は、Lch直接音出力データ207と加算され、Lch楽音出力データ214として、図1のサウンドシステム110に出力される。同様に、Rch効果音出力データ213は、Rch直接音出力データ208と加算され、Rch楽音出力データ215として、サウンドシステム110に出力される。サウンドシステム110では、デジタルデータであるLch楽音出力データ214及びRch楽音出力データ215はそれぞれ、Lchアナログ楽音信号及びRchアナログ楽音信号に変換されて、それぞれアナログアンプにより増幅されて、Lch及びRchの各スピーカから放音される。 The Lch sound effect input data 209 and the Rch sound effect input data 210 are output as Lch sound effect output data 212 and Rch sound effect output data 213, respectively, to which effects such as reverberation and resonance have been applied by the effect device 211 in the effect application unit 105. In the effect application unit 105, the Lch sound effect output data 212 is added to the Lch direct sound output data 207, and output as Lch musical sound output data 214 to the sound system 110 in FIG. 1. Similarly, the Rch sound effect output data 213 is added to the Rch direct sound output data 208, and output as Rch musical sound output data 215 to the sound system 110. In the sound system 110, the Lch musical sound output data 214 and the Rch musical sound output data 215, which are digital data, are converted into Lch analog musical sound signals and Rch analog musical sound signals, respectively, and are amplified by analog amplifiers and emitted from the Lch and Rch speakers.

図3は、図2の効果付与部105内の効果装置211のブロック図である。効果装置211は、効果装置211(Lch)と効果装置211(Rch)とを有する。効果装置211(Lch)は、入力されたLch効果音入力データ209にLchの残響・共鳴効果を付与したLch効果音出力データ212を出力する。効果装置211(Rch)は、入力されたRch効果音入力データ210にRchの残響・共鳴効果を付与したRch効果音出力データ213を出力する。両者とも同じ構成であるため、以下、特に言及しない場合は、Lch及びRchの区別なく説明する。効果装置211(Lch)(効果装置211(Rch))は、FIRフィルタ演算処理部303及びCONV演算処理部304を備えている。 Figure 3 is a block diagram of the effect device 211 in the effect imparting unit 105 of Figure 2. The effect device 211 has an effect device 211 (Lch) and an effect device 211 (Rch). The effect device 211 (Lch) outputs Lch sound effect output data 212 obtained by imparting Lch reverberation and resonance effects to the input Lch sound effect input data 209. The effect device 211 (Rch) outputs Rch sound effect output data 213 obtained by imparting Rch reverberation and resonance effects to the input Rch sound effect input data 210. Since both have the same configuration, the following description will be made without distinction between Lch and Rch unless otherwise specified. The effect device 211 (Lch) (effect device 211 (Rch)) has an FIR filter calculation processing unit 303 and a CONV calculation processing unit 304.

効果装置211に入力するLch効果音入力データ209又はRch効果音入力データ210は、FIRフィルタ演算処理部303とCONV演算処理部304とに並列に入力する。FIRフィルタ演算処理部303は、残響・共鳴音のインパルス応答データの前半データ部分をサンプリング周期単位の時間域処理により、Lch効果音入力データ209又はRch効果音入力データ210(原音)に畳み込む時間域畳込み部である。演算処理部であるCONV演算処理部304は、上記インパルス応答データの後半データ部分を、所定数のサンプルで構成されるブロック単位のFFT演算を用いた周波数域処理により、Lch効果音入力データ209又はRch効果音入力データ210(原音)に畳み込む周波数域畳込み部である。FIRフィルタ演算処理部303とCONV演算処理部304は、図2の効果付与部105であるDSP内に実装されているRAM306を共通領域として使用しながら、演算処理を実行する。 The Lch sound effect input data 209 or Rch sound effect input data 210 input to the effect device 211 is input in parallel to the FIR filter calculation processing unit 303 and the CONV calculation processing unit 304. The FIR filter calculation processing unit 303 is a time domain convolution unit that convolves the first half of the data portion of the impulse response data of the reverberation and resonance sound into the Lch sound effect input data 209 or the Rch sound effect input data 210 (original sound) by time domain processing in sampling period units. The CONV calculation processing unit 304, which is a calculation processing unit, is a frequency domain convolution unit that convolves the second half of the data portion of the impulse response data into the Lch sound effect input data 209 or the Rch sound effect input data 210 (original sound) by frequency domain processing using FFT calculation in block units consisting of a predetermined number of samples. The FIR filter calculation processing unit 303 and the CONV calculation processing unit 304 perform calculation processing while using the RAM 306 implemented in the DSP, which is the effect imparting unit 105 in FIG. 2, as a common area.

FIRフィルタ演算処理部303とCONV演算処理部304の各出力は加算部305で加算されて、Lch効果音出力データ212又はRch効果音出力データ213として出力される。 The outputs of the FIR filter calculation processing unit 303 and the CONV calculation processing unit 304 are added in the addition unit 305 and output as the Lch sound effect output data 212 or the Rch sound effect output data 213.

図4から図7は、図3のCONV演算処理部304の動作説明図である。まず、図4は、ブロックサイズがN点の畳込み例を示している。FFT演算を用いた畳込みはそのままでは巡回畳込みとなるため、本実施形態では、インパルス応答データ(coef)と、Lch効果音入力データ209又はRch効果音入力データ210(以下、LchとRchを区別せずにこれらをまとめて効果音入力データ(sig)と呼ぶ)とを2N点でそれぞれFFT演算する際に、各ブロックの線状畳込みが得られるようにする。 Figures 4 to 7 are diagrams explaining the operation of the CONV calculation processing unit 304 in Figure 3. First, Figure 4 shows an example of convolution with a block size of N points. Convolution using FFT calculations will result in circular convolution if left as is, so in this embodiment, when performing FFT calculations at 2N points on the impulse response data (coef) and the Lch sound effect input data 209 or the Rch sound effect input data 210 (hereinafter, these will be collectively referred to as sound effect input data (sig) without distinguishing between Lch and Rch), a linear convolution of each block is obtained.

ここでは、2N点の各FFT演算403、404に先だって、401として示されるように、N点のインパルス応答データ(coef)(太枠部分)にN点のゼロデータ(細枠部分)が付加されて2N点のデータとされる。また、402として示されるように、効果音入力データ(sig)がブロックサイズN点分シフトされながらオーバーラップされて(太枠部分→破線太枠部分)2N点のデータとされる。そして、インパルス応答データ(coef)から生成された上記2N点のデータ401と効果音入力データ(sig)から生成された上記2N点のデータ402とに対して、それぞれ403及び404として示されるようにFFT演算が実行される結果、周波数領域の2N点のデータ405及び406が得られる。 Here, prior to each of the 2N-point FFT calculations 403 and 404, N-point zero data (thin frame part) is added to N-point impulse response data (coef) (bold frame part) to obtain 2N-point data, as shown as 401. Also, as shown as 402, the sound effect input data (sig) is overlapped while being shifted by the block size of N points (bold frame part → dashed thick frame part) to obtain 2N-point data. Then, FFT calculations are performed on the 2N-point data 401 generated from the impulse response data (coef) and the 2N-point data 402 generated from the sound effect input data (sig) as shown as 403 and 404, respectively, to obtain 2N-point data 405 and 406 in the frequency domain.

続いて、407として示されるように、周波数領域の2N点のデータ405及び406が各周波数点毎に複素乗算されることにより、2N点の複素乗算結果データ408が得られる。 Next, as shown by 407, the 2N points of frequency domain data 405 and 406 are complex multiplied for each frequency point to obtain 2N points of complex multiplication result data 408.

更に、409として示されるように、2N点の複素乗算結果データ408に対してiFFT(逆高速フーリエ変換)演算が実行される結果、畳込みが行われた2N点の時間域データ410が得られる。 Furthermore, as shown at 409, an iFFT (inverse fast Fourier transform) operation is performed on the 2N points of complex multiplication result data 408, resulting in 2N points of convolved time domain data 410.

そして、2N点の時間域データ410のうちの前半のN点のデータ(太枠部分)が、ブロックサイズがN点の重畳保留法での線状畳込み結果となり、このようにして生成されるブロックサイズN点ずつのデータが図3のLch効果音出力データ212又はRch効果音出力データ213として出力される。 Then, the first N points of data (thick framed portion) of the 2N points of time domain data 410 become the linear convolution result using the overlap reservation method with a block size of N points, and the data generated in this way for each block size of N points is output as the Lch sound effect output data 212 or the Rch sound effect output data 213 in Figure 3.

図5は、インパルス応答データ(coef)側もブロックサイズN点ずつ分割される場合の、ブロックサイズがN点の畳込み例を示している。この例では、各N点毎の畳込み結果が足し合わせられることで、長い時間のインパルス応答もN点ずつの小さなブロックに分割して畳込み演算を実行することができる。 Figure 5 shows an example of convolution with a block size of N points when the impulse response data (coef) is also divided into blocks of N points. In this example, the convolution results for each N point are added together, so that even long-time impulse responses can be divided into small blocks of N points to perform convolution operations.

図5において、501として示されるように、インパルス応答データ(coef)が、それぞれのブロックサイズがNずつの例えば分割データN1、N2、N3、N4に分割される。また、502として示されるように、効果音入力データ(sig)も、それぞれのブロックサイズがNずつの例えば分割データN1、N2、N3、N4に分割される。 In FIG. 5, as shown by 501, impulse response data (coef) is divided into, for example, divided data N1, N2, N3, and N4, each having a block size of N. Also, as shown by 502, sound effect input data (sig) is also divided into, for example, divided data N1, N2, N3, and N4, each having a block size of N.

その後は、図4の場合と同様にして、2N点の各FFT演算505、506に先だって、503として示されるように、インパルス応答データ(coef)中の上述のように分割されたN点の分割データ(太枠部分)にN点のゼロデータが付加されて2N点のデータとされる。また、504として示されるように、効果音入力データ(sig)が上述のように分割されて得られるブロックサイズN点分ずつシフトされながらオーバーラップされて(太枠部分→破線太枠部分)2N点のデータとされる。そして、インパルス応答データ(coef)を分割したN点のデータから生成された上記2N点のデータ503と効果音入力データ(sig)から生成された上記2N点のデータ504とに対して、それぞれ505及び506として示されるようにFFT演算が実行される結果、周波数領域の2N点のデータ507及び508が、509及び510のように順次2N点ずつ得られる。ここで、インパルス応答データ(coef)の分割データN1、N2、N3、N4(図5の501)から生成される2N点ずつの周波数データ群509(N1、N2、N3、N4)は、インパルス応答データ(coef)に変化がない限り、FFT演算により演算しメモリにプリセットしておくことができる。また、効果音入力データ(sig)から生成される2N点ずつの周波数データ群510は、インパルス応答データ(coef)に対応する周波数データ群509(N1、N2、N3、N4)と同じ分割データ数分だけ、t(N)、t(N-1)、t(N-2)、t(N-3)というようにリングバッファ形式で順次メモリに記憶されてよい。 After that, as in the case of FIG. 4, prior to each of the 2N-point FFT calculations 505 and 506, as shown in 503, N-point zero data is added to the N-point divided data (thick frame part) in the impulse response data (coef) divided as described above to obtain 2N-point data. Also, as shown in 504, the sound effect input data (sig) is shifted by the block size N points obtained by dividing as described above and overlapped (thick frame part → dashed thick frame part) to obtain 2N-point data. Then, FFT calculations are performed on the 2N-point data 503 generated from the N-point data divided from the impulse response data (coef) and the 2N-point data 504 generated from the sound effect input data (sig) as shown in 505 and 506, respectively, and 2N-point data 507 and 508 in the frequency domain are obtained in sequence, 2N points at a time, as shown in 509 and 510. Here, the frequency data group 509 (N1, N2, N3, N4) of 2N points each generated from the divided data N1, N2, N3, N4 (501 in FIG. 5) of the impulse response data (coef) can be calculated by FFT and preset in memory as long as there is no change in the impulse response data (coef). Also, the frequency data group 510 of 2N points each generated from the sound effect input data (sig) may be stored in memory in a ring buffer format, such as t(N), t(N-1), t(N-2), t(N-3), for the same number of divided data as the frequency data group 509 (N1, N2, N3, N4) corresponding to the impulse response data (coef).

続いて、511として示されるように、周波数データ群509(N1、N2、N3、N4)と周波数データ群510(t(N)、t(N-1)、t(N-2)、t(N-3))とが、2N点ずつ各周波数点毎に複素乗算されることにより、それぞれ2N点の複素乗算結果データN1*t(N)、N2*t(N-1)、N3*t(N-2)、N4*t(N-3)が得られ、更にこれらに対してiFFT演算が実行される結果、畳込みが行われた2N点ずつの時間域データ513が得られる。 Next, as shown by 511, frequency data group 509 (N1, N2, N3, N4) and frequency data group 510 (t(N), t(N-1), t(N-2), t(N-3)) are complex multiplied for each 2N frequency point to obtain 2N complex multiplication result data N1*t(N), N2*t(N-1), N3*t(N-2), N4*t(N-3), which are then subjected to an iFFT operation to obtain convolved time domain data 513 for each 2N points.

そして、2N点ずつの時間域データ513のうちのそれぞれ前半のN点ずつのデータ(太枠部分)が、図3のLch効果音出力データ212又はRch効果音出力データ213として出力される。 Then, the first N points of data (thick framed parts) of each of the 2N points of time domain data 513 are output as the Lch sound effect output data 212 or the Rch sound effect output data 213 in FIG. 3.

図6は、図3のCONV演算処理部304の動作を説明するための簡単な計算例を示した図である。 Figure 6 shows a simple calculation example to explain the operation of the CONV calculation processing unit 304 in Figure 3.

例えば、
conv(coef=[2 3 4 5 6 7 8 9]
sig=[1 2 3 4 5 6 7 8 9 10]
をブロックサイズN=2で計算した場合、畳込み結果の9番目と10番目は、200と244になるが、これを求めるためには、
ifft(fft([0 0 2 3])*fft([7 8 9 10]))
ifft(fft([0 0 4 5])*fft([5 6 7 8]))
ifft(fft([0 0 6 7])*fft([3 4 5 6]))
ifft(fft([0 0 8 9])*fft([1 2 3 4]))
の各計算結果の前半部分を足し合わせればよい。
なお、「fft()」及び「ifft()」はそれぞれ、括弧内のデータ群に対するFFT演算及びiFFT(逆FFT)演算を示す。
for example,
conv(coef = [2 3 4 5 6 7 8 9]
sig = [1 2 3 4 5 6 7 8 9 10]
When calculating with block size N=2, the 9th and 10th convolution results are 200 and 244.
ifft(fft([0 0 2 3])*fft([7 8 9 10]))
ifft(fft([0 0 4 5]) * fft([5 6 7 8]))
ifft(fft([0 0 6 7])*fft([3 4 5 6]))
ifft(fft([0 0 8 9])*fft([1 2 3 4]))
Simply add up the first half of each calculation result.
Note that "fft()" and "ifft()" respectively indicate an FFT operation and an iFFT (inverse FFT) operation on the data group within the parentheses.

上記演算例により、FFT演算を使った線状畳込みを実現できるが、FFT演算はブロック単位で計算が実行されるため、ブロックの頭で遅延が生じてしまう。図7は、FFT演算を用いた周波数域畳込み処理における処理遅延の説明図である。 The above calculation example allows linear convolution using FFT calculations to be realized, but because FFT calculations are performed on a block-by-block basis, delays occur at the beginning of the blocks. Figure 7 is an explanatory diagram of processing delays in frequency domain convolution processing using FFT calculations.

例えば、ブロック区間T1では、N1ブロックのデータが入力され、また後述する特定処理に分岐するための条件判定が行われる。次のブロック区間T2の先頭でブロック単位の割込みが発生すると、N2ブロックのデータの入力、及び後述する特定処理に分岐するための条件判定が行われると共に、N1ブロックのデータの畳込み処理(FFT演算、複素乗算、及びiFFT演算)が実行される。更に続くブロック区間T3の先頭でブロック単位の割込みが発生すると、N3ブロックの入力、及び後述する特定処理に分岐するための条件判定が行われると共に、N2ブロックのデータの畳込み処理と、N1ブロックのデータの出力処理が実行される。更に、ブロック区間T4の先頭でブロック単位の割込みが発生すると、N4ブロックの入力、及び後述する特定処理に分岐するための条件判定が行われると共に、とN3ブロックのデータの畳込み処理と、N2ブロックのデータの出力処理が実行される。続いて、ブロック区間T5の先頭でブロック単位の割込みが発生すると、N5ブロックの入力、及び後述する特定処理に分岐するための条件判定が行われると共に、とN4ブロックのデータの畳込み処理と、N3ブロックのデータの出力処理が実行される。 For example, in block section T1, N1 block data is input, and a condition determination is made to branch to specific processing described later. When a block-based interrupt occurs at the beginning of the next block section T2, N2 block data is input, and a condition determination is made to branch to specific processing described later, and convolution processing (FFT operation, complex multiplication, and iFFT operation) is performed on the N1 block data. When a block-based interrupt occurs at the beginning of the next block section T3, N3 block data is input, and a condition determination is made to branch to specific processing described later, and convolution processing of N2 block data and output processing of N1 block data are performed. When a block-based interrupt occurs at the beginning of block section T4, N4 block data is input, and a condition determination is made to branch to specific processing described later, and convolution processing of N3 block data and output processing of N2 block data are performed. Next, when a block-based interrupt occurs at the beginning of block section T5, the N5 block is input and a condition determination is made to branch to the specific processing described below, and convolution processing of the data in the N4 block and output processing of the data in the N3 block are performed.

図7に示されるタイミング関係からわかるように、FFT演算を使った線状畳込み処理では、701として示されるように、ブロックサイズNに対して2Nの処理遅延が発生する。そこで、図3の効果装置211では、CONV演算処理部304で発生する上記2Nの処理遅延をカバーするために、フィルタ次数=2NのFIRフィルタ演算処理部303が実装される。 As can be seen from the timing relationship shown in Figure 7, in linear convolution processing using FFT calculations, a processing delay of 2N occurs for block size N, as shown as 701. Therefore, in the effect device 211 of Figure 3, an FIR filter calculation processing unit 303 with a filter order of 2N is implemented to cover the above-mentioned 2N processing delay that occurs in the CONV calculation processing unit 304.

FIRフィルタ演算処理部303は、夫々が乗算処理部、累算処理部、及び遅延処理部とで構成されるフィルタ演算部がフィルタ次数に対応する個数縦属接続された構成を有する。 The FIR filter calculation processing unit 303 has a configuration in which filter calculation units, each of which is composed of a multiplication processing unit, an accumulation processing unit, and a delay processing unit, are connected in tandem in a number corresponding to the filter order.

また、効果音入力データの信号入力は、図2の音源(TG)104内のミキシング部202内のミキサ205又は206から、サンプリング周期単位で行われる。 In addition, the signal input of the sound effect input data is performed in sampling cycle units from the mixer 205 or 206 in the mixing section 202 in the sound source (TG) 104 in FIG. 2.

各次のフィルタ演算部は、サンプリング周期内で、その周期を細分化した周期を有するクロックに同期して実行され、全次数でのFIR演算処理及び最終段の累算処理部からの畳込み結果データの出力は、そのサンプリング周期内で完了する。これにより、図3のFIRフィルタ演算処理部303での畳込み処理では、遅延が生じない。 Each order of filter calculation unit is executed within the sampling period in synchronization with a clock having a period that is a subdivision of the sampling period, and the FIR calculation processing at all orders and the output of the convolution result data from the accumulation processing unit at the final stage are completed within that sampling period. As a result, no delay occurs in the convolution processing in the FIR filter calculation processing unit 303 in Figure 3.

図8は、FIRフィルタ演算処理部303とCONV演算処理部304の処理関係を示す説明図である。この図から理解されるように、FIRフィルタ演算処理部303のフィルタ次数がCONV演算処理部304のFFTサイズ(ブロックサイズNの2倍)に等しければ、CONV演算処理部304での処理遅延の影響は無視できる。
即ち、効果音入力データの最初の2NサンプルがFIRフィルタ演算処理部303に入力されると同時に、効果音入力データが、Nサンプルずつシフトされながら2NサンプルずつCONV演算処理部304に入力されるようにする。そして、図8に示されるように、まず、FIRフィルタ演算処理部303で、効果音入力データの最初の2Nサンプルに対して、サンプリング周期毎に効果音(例えば残響音又は共鳴音)のインパルス応答データの最初の2Nサンプルを畳込み演算して得られる、2Nサンプル分の畳込み結果データが、サンプリング周期毎に遅延なく出力される。また、CONV演算処理部304で、効果音入力データをNサンプルずつオーバーラップさせながら入力した2Nサンプル分ずつに対して、効果音のインパルス応答データの2N+1サンプル以降のNサンプル+値0のNサンプル=2Nサンプル分ずつを周波数域で畳込み演算して得られる、Nサンプル分ずつの畳込み結果データが、2Nサンプル分ずつ遅延して順次出力される。従って、図3の加算部305から、FIRフィルタ演算処理部303からの最初の2Nサンプル分の畳込み結果データを出力させるのに続き、CONV演算処理部304から順次出力されるNサンプル毎の畳込み結果データをサンプリング周期毎に順次出力させることにより、効果音入力データの全体に対してインパルス応答データを畳込み演算した効果音出力データ(Lch効果音出力データ212又はRch効果音出力データ213)を、図3の効果装置211から遅延なく出力することが可能となる。
8 is an explanatory diagram showing the processing relationship between the FIR filter calculation processing unit 303 and the CONV calculation processing unit 304. As can be seen from this diagram, if the filter order of the FIR filter calculation processing unit 303 is equal to the FFT size (twice the block size N) of the CONV calculation processing unit 304, the effect of processing delay in the CONV calculation processing unit 304 can be ignored.
That is, when the first 2N samples of the sound effect input data are input to the FIR filter calculation processing unit 303, the sound effect input data is shifted by N samples and input to the CONV calculation processing unit 304 by 2N samples. Then, as shown in Fig. 8, the FIR filter calculation processing unit 303 first performs a convolution operation on the first 2N samples of the sound effect input data with the first 2N samples of the impulse response data of the sound effect (e.g., reverberation or resonance) for each sampling period, and outputs 2N samples of convolution result data without delay for each sampling period. Also, the CONV calculation processing unit 304 performs a convolution operation on the 2N samples of the sound effect input data inputted while overlapping by N samples with the N samples of the impulse response data of the sound effect after 2N+1 samples + N samples of value 0 = 2N samples in the frequency domain, and outputs N samples of convolution result data sequentially with a delay of 2N samples. Therefore, following output of the first 2N samples of convolution result data from the FIR filter calculation processing unit 303 from the adder 305 in FIG. 3, the convolution result data for every N samples sequentially output from the CONV calculation processing unit 304 is sequentially output for each sampling period, whereby it is possible to output sound effect output data (Lch sound effect output data 212 or Rch sound effect output data 213) obtained by performing a convolution calculation on the entire sound effect input data with the impulse response data, from the effect device 211 in FIG. 3 without delay.

図9は、図2の効果装置211を実現するために図1のCPU101が実行するメイン処理動作の制御処理例を示すフローチャートである。この制御処理は、CPU101がROM102からRAM103にロードさせた制御処理プログラムを実行する動作である。 Figure 9 is a flowchart showing an example of a control process for a main processing operation executed by the CPU 101 in Figure 1 to realize the effect device 211 in Figure 2. This control process is an operation in which the CPU 101 executes a control processing program that has been loaded from the ROM 102 to the RAM 103.

図1の電子楽器100において、操作子108の電源スイッチがオンされた後、CPU101は、図9のメインフローチャートで示される制御処理の実行を開始する。CPU101はまず、初期化処理を実行する(ステップS901)。図10(a)は、図9のステップS901の初期化処理の詳細処理例を示すフローチャートである。 After the power switch of the control 108 is turned on in the electronic musical instrument 100 of FIG. 1, the CPU 101 starts executing the control process shown in the main flowchart of FIG. 9. The CPU 101 first executes an initialization process (step S901). FIG. 10(a) is a flowchart showing a detailed example of the initialization process of step S901 of FIG. 9.

初期化処理において、CPU101は、図1のRAM103の記憶内容、音源(TG)104の状態、電子楽器100の状態等の初期化を行う(図10(a)のステップS1001)。 In the initialization process, the CPU 101 initializes the contents stored in the RAM 103 in FIG. 1, the state of the tone generator (TG) 104, the state of the electronic musical instrument 100, etc. (step S1001 in FIG. 10(a)).

次に、CPU101は、データの状態を示すフラグF2、F1を初期化する(図10(a)のステップS1002)。F2は、F1の1つ前の割込みタイミングでのデータの状態を示すフラグである。これらのフラグF1、F2が値1の場合、対応する割込みタイミングにおける入力データ列(図2のLch効果音入力データ209又はRch効果音入力データ210)の値が0であることを示し、値0の場合、上記入力データ列に0以外の値があることを示している。 Next, the CPU 101 initializes flags F2 and F1, which indicate the state of the data (step S1002 in FIG. 10(a)). F2 is a flag that indicates the state of the data at the interrupt timing immediately preceding F1. When these flags F1 and F2 have a value of 1, this indicates that the value of the input data string (Lch sound effect input data 209 or Rch sound effect input data 210 in FIG. 2) at the corresponding interrupt timing is 0, and when the flags F1 and F2 have a value of 0, this indicates that the input data string contains a value other than 0.

続いて、CPU101は、ブロック単位の割込み(図7参照)を許可する(図10(a)のステップS1003)。 Next, the CPU 101 enables block-based interrupts (see FIG. 7) (step S1003 in FIG. 10(a)).

図9のフローチャートの説明に戻り、ステップS901での上述した初期化処理の後、CPU101は、電源スイッチがオフされるまで或いは操作者による演奏が終了すると判定するまで、ステップS902からS907の一連の処理を繰り返し実行する。 Returning to the explanation of the flowchart in FIG. 9, after the initialization process described above in step S901, the CPU 101 repeatedly executes the series of processes from steps S902 to S907 until the power switch is turned off or until it is determined that the operator has finished playing.

上記繰返し処理において、CPU101はまず、スイッチ処理を実行する(ステップS902)。ここでは、CPU101は、図1の操作子108の操作状態を検出する。 In the above-mentioned repeated process, the CPU 101 first executes a switch process (step S902). Here, the CPU 101 detects the operation state of the operator 108 in FIG. 1.

次に、CPU101は、操作者による押鍵を検出する押鍵検出処理を実行する(ステップS903)。ここでは、CPU101は、図1の鍵盤106の押鍵状態を検出する。 Next, the CPU 101 executes a key press detection process to detect a key pressed by the operator (step S903). Here, the CPU 101 detects the key press state of the keyboard 106 in FIG. 1.

次に、CPU101は、操作者によるペダル操作を検出するペダル検出処理を実行する(ステップS904)。ここでは、CPU101は、図1のペダル107の操作状態を検出する。 Next, the CPU 101 executes a pedal detection process to detect pedal operation by the operator (step S904). Here, the CPU 101 detects the operation state of the pedal 107 in FIG. 1.

次に、CPU101は、効果処理を実行する(ステップS905)。ここでは、CPU101は、ステップS902での例えば残響や共鳴効果を付与するための操作子108の操作状態の検出結果と、ステップS904でのペダル107の操作状態の検出結果とに基づいて、効果付与部105に、音源(TG)104が生成する図2のLch効果音入力データ209及びRch効果音入力データ210に対して、図3の効果装置211(Lch)及び効果装置211(Rch)による音響効果の付与処理を実行させる。 Next, the CPU 101 executes effect processing (step S905). Here, based on the detection result of the operation state of the operator 108 for applying, for example, reverberation or resonance effects in step S902 and the detection result of the operation state of the pedal 107 in step S904, the CPU 101 causes the effect applying unit 105 to apply sound effects by the effect device 211 (Lch) and effect device 211 (Rch) in FIG. 3 to the Lch sound effect input data 209 and Rch sound effect input data 210 in FIG. 2 generated by the sound source (TG) 104.

次に、CPU101は、その他の処理を実行する(ステップS906)。ここでは、CPU101は、例えば楽音エンベロープの制御処理等を実行する。 Next, the CPU 101 executes other processes (step S906). Here, the CPU 101 executes, for example, a process for controlling the musical tone envelope.

そして、CPU101は、発音処理を実行する(ステップS907)。ここでは、CPU101は、ステップS903での押鍵検出処理での鍵盤106の押鍵又は離鍵の状態に基づいて、音源(TG)104に対して発音又は消音の指示を行う。 Then, the CPU 101 executes sound generation processing (step S907). Here, the CPU 101 instructs the sound source (TG) 104 to generate or mute a sound based on the state of a key being pressed or released on the keyboard 106 in the key press detection processing in step S903.

本実施形態では、図1の効果付与部105における効果装置211内のCONV演算処理部304での演算処理は、図1のCPU101からNサンプルのサンプリング時間毎に発生するブロック単位の割込み(図7参照)に基づいて実行される。このように、CPU101は、内部のクロックと与えられた楽音のテンポ等に基づいて、図1及び図2の音源(TG)104から夫々NサンプルのLch直接音出力データ207及びRch直接音出力データ208が出力される毎に、ブロック割込みを発生させる。CPU101は、このブロック割込みが発生すると、図9のメイン処理の動作を中断して、ブロック割込み処理を実行する。 In this embodiment, the calculation process in the CONV calculation processing unit 304 in the effect device 211 in the effect applying unit 105 in FIG. 1 is executed based on a block-based interrupt (see FIG. 7) generated by the CPU 101 in FIG. 1 every sampling time of N samples. In this way, the CPU 101 generates a block interrupt every time N samples of Lch direct sound output data 207 and Rch direct sound output data 208 are output from the sound source (TG) 104 in FIG. 1 and FIG. 2, based on the internal clock and the tempo of the given musical tone. When this block interrupt occurs, the CPU 101 suspends the operation of the main process in FIG. 9 and executes the block interrupt process.

図10(b)は、CPU101がブロック割込み発生時に実行するブロック割込み処理の詳細処理例を示すフローチャートである。このブロック割込み処理において、まずCPU101は、ブロック判定処理を実行する(図10(b)のステップS1010)。 Figure 10(b) is a flowchart showing a detailed example of block interrupt processing executed by the CPU 101 when a block interrupt occurs. In this block interrupt processing, the CPU 101 first executes block determination processing (step S1010 in Figure 10(b)).

図4から図7の説明で前述したように、図3のCONV演算処理部304での処理では、音源(TG)104から効果付与部105に入力される楽音データであるLch効果音入力データ209及びRch効果音入力データ210は、Nサンプルというブロック単位で更新され、そのブロック単位の2倍の単位である2Nという演算フレームサンプル長で、FFTを含む演算処理が実行されることにより、音響効果が付与される。この場合に、CPU101は、ブロック判定処理部として動作する図10のステップS1010のブロック判定処理において、データ209又はデータ210が、ブロック=Nサンプル単位で演算処理条件を満たしたか否か、より具体的には、ブロック内の全てのデータサンプル値が0であるという条件に合致したか否かを判定し、その判定の結果をブロック管理情報として保持する。ブロック管理情報は例えば、1つ前及び現在のブロックの各判定の結果を、値1(演算処理条件に合致する場合)又は値0(演算処理条件に合致しない場合)として、例えば図1のRAM上の各変数データであるフラグF2及びフラグF1に保持した情報である。 4 to 7, in the processing in the CONV calculation processing unit 304 in FIG. 3, the Lch sound effect input data 209 and the Rch sound effect input data 210, which are musical sound data input from the sound source (TG) 104 to the effect imparting unit 105, are updated in block units of N samples, and sound effects are imparted by performing calculation processing including FFT with a calculation frame sample length of 2N, which is twice the block unit. In this case, in the block determination processing of step S1010 in FIG. 10, which operates as a block determination processing unit, the CPU 101 determines whether the data 209 or the data 210 satisfies the calculation processing condition in block = N sample units, more specifically, whether it meets the condition that all data sample values in the block are 0, and holds the result of the determination as block management information. The block management information is, for example, information that stores the results of each judgment of the previous and current blocks as a value of 1 (if the calculation processing conditions are met) or a value of 0 (if the calculation processing conditions are not met), for example, in flags F2 and F1, which are variable data in the RAM in FIG. 1.

図11は、図10(b)のステップS1010のブロック判定処理の詳細処理例を示すフローチャートである。図11のフローチャートの処理において、CPU101はまず、CPU101のレジスタRJ1の値と、図1のRAM103上の変数データである変数iの値を、それぞれ0にリセットする(図11のステップS1101)。 Figure 11 is a flowchart showing a detailed example of the block determination process in step S1010 in Figure 10(b). In the process of the flowchart in Figure 11, the CPU 101 first resets the value of the register RJ1 of the CPU 101 and the value of the variable i, which is variable data in the RAM 103 in Figure 1, to 0 (step S1101 in Figure 11).

次に、CPU101は、レジスタRJ1と、図3のCONV演算処理部304に入力すべきLch効果音入力データ209又はRch効果音入力データ210であるRAM103に一時記憶されるNサンプル分のブロック単位の各サンプルのデータ[i](0≦i≦N-1)とで、演算「(RJ1|データ[i])」として各データの対応するビット毎のOR(論理和)演算を実行し、各ビットのOR演算の結果を、レジスタRJ1に格納し直す(図11のステップS1102)。 Next, the CPU 101 performs an OR (logical sum) operation on the register RJ1 and data [i] (0≦i≦N-1) of each sample in blocks of N samples temporarily stored in the RAM 103, which is the Lch sound effect input data 209 or Rch sound effect input data 210 to be input to the CONV calculation processing unit 304 in FIG. 3, as the operation "(RJ1 | data [i])", and re-stores the result of the OR operation on each bit in the register RJ1 (step S1102 in FIG. 11).

その後、CPU101は、RAM103上の変数iの値を+1インクリメントする(ズ11のステップS1103)。 After that, the CPU 101 increments the value of the variable i in the RAM 103 by +1 (step S1103 of step S11).

そして、CPU101は、変数iの値がNより小さいか否かを判定する(図11のステップS1104)。 Then, the CPU 101 determines whether the value of the variable i is smaller than N (step S1104 in FIG. 11).

ステップS1104の判定がYESならば、CPU101は、ステップS1102の処理に戻って判定処理を続行する。 If the determination in step S1104 is YES, the CPU 101 returns to the processing in step S1102 and continues the determination process.

やがて、処理したサンプルがブロックサイズNのサンプル数を超えてステップS1104の判定がNOとなったら、CPU101は、レジスタRJ1の値が0であるか(全ビットが0であるか)否かを判定する(図11のステップS1105)。 When the number of processed samples exceeds the number of samples in block size N and the determination in step S1104 becomes NO, CPU 101 determines whether the value of register RJ1 is 0 (all bits are 0) (step S1105 in FIG. 11).

ステップS1105の判定がNOならば、CPU101は、RAM103上のフラグF1に値0を格納してフラグをoffする(図11のステップS1106)。 If the determination in step S1105 is NO, the CPU 101 stores the value 0 in flag F1 on the RAM 103 and turns off the flag (step S1106 in FIG. 11).

ステップS1105の判定がYESならば、CPU101は、RAM103上のフラグF1に値1を格納してフラグをonする(図11のステップS1107)。 If the determination in step S1105 is YES, the CPU 101 stores the value 1 in flag F1 on the RAM 103 and turns the flag on (step S1107 in FIG. 11).

図10(b)のブロック割込み処理の説明に戻り、CPU101は、図11で説明したステップS1010のブロック判定処理に続いて、フレーム演算処理を調整し、実行する(図10(b)のステップS1011)。 Returning to the explanation of the block interrupt process in FIG. 10(b), following the block determination process in step S1010 described in FIG. 11, the CPU 101 adjusts and executes the frame calculation process (step S1011 in FIG. 10(b)).

図12(a)は、演算制御処理部として動作する図10のステップS1011のフレーム演算処理の詳細処理例を示すフローチャートである。図12(a)のフローチャートの処理において、CPU101はまず、図11のフローチャートで示される図10のステップS1010のブロック判定処理においてRAM103上のフラグF1の値が1、即ち、現在のブロックのデータが演算処理条件に合致しており(値がオール0であり)、かつ、RAM103上のフラグF2の値も1,即ち、1つ前のブロックのデータが演算処理条件に合致している(値がオール0である)か否かを判定する(図12(a)のステップS1201)。 Fig. 12(a) is a flowchart showing a detailed example of the frame calculation process of step S1011 in Fig. 10 which operates as a calculation control processing unit. In the process of the flowchart in Fig. 12(a), the CPU 101 first determines whether or not the value of flag F1 on RAM 103 is 1 in the block determination process of step S1010 in Fig. 10 shown in the flowchart in Fig. 11, i.e., the data of the current block matches the calculation processing condition (its value is all 0), and the value of flag F2 on RAM 103 is also 1, i.e., the data of the previous block matches the calculation processing condition (its value is all 0) (step S1201 in Fig. 12(a)).

ステップS1201の判定がNOならば、CPU101は、現在のブロックと1つ前のブロックとからなる2Nサンプル分のFFTフレームが、値がオール0ではないことを示す非特定フレームの情報を、RAM103上の変数FLに格納する(図12(a)のステップS1202)。 If the determination in step S1201 is NO, the CPU 101 stores non-specific frame information indicating that the 2N sample FFT frame consisting of the current block and the previous block does not have all zero values in the variable FL on the RAM 103 (step S1202 in FIG. 12(a)).

一方、ステップS1201の判定がYESならば、CPU101は、現在のブロックと1つ前のブロックとからなる2Nサンプル分のFFTフレームが値がオール0であることを示す特定フレームの情報を、変数FLに格納する(図12(a)のステップS1203)。 On the other hand, if the determination in step S1201 is YES, the CPU 101 stores in the variable FL information about a specific frame indicating that the value of an FFT frame of 2N samples consisting of the current block and the previous block is all 0 (step S1203 in FIG. 12(a)).

その後、CPU101は、図1の効果付与部105内の図2の効果装置211内の図3のCONV演算処理部304に対して、上記変数FLの内容に応じた調整された演算処理を実行させる(図12(a)のステップS1204)。 Then, the CPU 101 causes the CONV calculation processing unit 304 in FIG. 3 within the effect device 211 in FIG. 2 within the effect imparting unit 105 in FIG. 1 to execute calculation processing adjusted according to the contents of the variable FL (step S1204 in FIG. 12(a)).

図12(b)は、図12(a)のステップS1204の演算処理の詳細処理例を示すフローチャートである。まずCPU101は、RAM103上の変数FLに特定フレームを示す情報が格納されているか否かを判定する(図12(b)のステップS1210)。 Figure 12(b) is a flowchart showing an example of detailed processing of the calculation process of step S1204 in Figure 12(a). First, the CPU 101 determines whether or not information indicating a specific frame is stored in the variable FL in the RAM 103 (step S1210 in Figure 12(b)).

ステップS1210の判定がNOならば、CPU101は、図1の効果付与部105内の図2の効果装置211内の図3のCONV演算処理部304に対して、図4から図6の説明で前述した通常の畳み込み演算処理を実行させる通常演算の実行を指示する(図12(b)のステップS1211)。 If the determination in step S1210 is NO, the CPU 101 instructs the CONV calculation processing unit 304 in FIG. 3 in the effect device 211 in FIG. 2 in the effect imparting unit 105 in FIG. 1 to execute a normal calculation to execute the normal convolution calculation process described above in the explanation of FIGS. 4 to 6 (step S1211 in FIG. 12(b)).

一方、ステップS1210の判定がYESならば、CPU101は、CONV演算処理部304に対して、上記通常の畳み込み演算処理とは異なる演算処理、例えば、所定のサンプル値、より具体的にはオール0の値を有する2Nサンプル分のFFTフレームデータを出力させる特定フレーム処理の実行を指示する(図12(b)のステップS1212)。このように、CPU101は、通常演算を実行するか、通常の畳み込み演算処理とは異なる演算処理を実行するかを調整する。 On the other hand, if the determination in step S1210 is YES, the CPU 101 instructs the CONV calculation processing unit 304 to execute a calculation process different from the above-mentioned normal convolution calculation process, for example, a specific frame process that outputs FFT frame data for 2N samples having predetermined sample values, more specifically, all-zero values (step S1212 in FIG. 12(b)). In this way, the CPU 101 adjusts whether to execute a normal calculation or a calculation process different from the normal convolution calculation process.

図13は、上述の特定フレーム処理を含むCONV演算処理部304の動作説明図である。前述した図6の動作説明図は、そのような特定フレーム処理は含まずに全て通常演算が実行される場合の例であった。これに対して、図13の動作説明図において、図6の場合と同様にブロックサイズN=2で計算した場合を考え、データとして、例えば、
conv(coef=[2 3 4 5 6 7 8 9]
sig=[1 2 0 0 0 0 0 0 9 10])
が入力した場合を考える。括弧内の数値は模式的に振幅値を表している。このように、楽音データsigには、特定処理に対応する状態として、3サンプル目から8サンプル目まで値0が入力されている。
13 is an explanatory diagram of the operation of the CONV calculation processing unit 304 including the above-mentioned specific frame processing. The explanatory diagram of the operation in FIG. 6 described above was an example of a case where all normal calculations are performed without including such specific frame processing. In contrast, in the explanatory diagram of the operation in FIG. 13, a case where calculation is performed with block size N=2 as in the case of FIG. 6, for example, the following data is used:
conv(coef = [2 3 4 5 6 7 8 9]
sig = [1 2 0 0 0 0 0 0 9 10]
In this way, the value 0 is input from the third sample to the eighth sample in the musical tone data sig as a state corresponding to a specific process.

この場合に例えば、図13(a)のブロック割込みのタイミングにおいて、図3のLch効果音入力データ209又はRch効果音入力データ210に対応する入力データdataとして2NサンプルからなるFFTフレーム[0 0 1 2]が演算対象とされた場合、現在のブロックデータ[1 2]は入力データdataの先頭で1つ前のブロックデータは存在せず便宜的にオール0=[0 0]が挿入されるため、図10(a)のステップS1002の初期化処理により、フラグF2=1と初期設定されたままとなる。
一方、現在のブロックの入力データdata=[1 2]はオール0の値ではないため、図11のブロック判定処理のステップS1101→ステップS1102~ステップS1104のN=2回の繰返し処理→ステップS1105→ステップS1106により、フラグF1=0に設定される。従って、図13(a)のブロック割込みタイミングでの2N=4サンプルの入力データdata=[0 0 1 2]によって表される1番目のFFTフレームは、フラグ(F2,F1)=(0,1)となって、図12(a)のステップS1201→S1202により非特定フレームとなる。この結果、係数coef=[0 0 2 3]と入力データdata=[0 0 1 2]との間では、図12(b)のステップS1210→S1211により通常演算処理が指示される。
この通常演算処理では、CPU101は、CONV演算処理部304に対して、図4から図6を用いて前述した通常の畳み込み演算処理の実行を指示する。
In this case, for example, at the timing of the block interrupt in FIG. 13(a), if an FFT frame [0 0 1 2] consisting of 2N samples is to be calculated as input data (data) corresponding to the Lch sound effect input data 209 or the Rch sound effect input data 210 in FIG. 3, the current block data [1 2] is at the beginning of the input data (data), and since there is no previous block data at the beginning, all 0's = [0 0] are inserted for the sake of convenience, and therefore flag F2 remains initialized as 1 by the initialization process in step S1002 in FIG. 10(a).
On the other hand, since the input data data=[1 2] of the current block is not all 0, the flag F1 is set to 0 by step S1101 of the block determination process in Fig. 11, N=2 repetitions of steps S1102 to S1104, step S1105, and step S1106. Therefore, the first FFT frame represented by the input data data=[0 0 1 2] of 2N=4 samples at the block interrupt timing in Fig. 13(a) has flag (F2, F1)=(0, 1), and becomes a non-specific frame by step S1201→S1202 in Fig. 12(a). As a result, between the coefficient coef=[0 0 2 3] and the input data data=[0 0 1 2], normal calculation processing is instructed by step S1210→S1211 in Fig. 12(b).
In this normal calculation process, the CPU 101 instructs the CONV calculation processing unit 304 to execute the normal convolution calculation process described above with reference to FIGS.

次に例えば、図13(b)のブロック割込みのタイミングにおいて、図13(a)のブロック割込みのタイミングの入力データdataがN=2サンプルシフトして、入力データdataとして2NサンプルからなるFFTフレーム[1 2 0 0]が演算対象とされたとき、1つ前のブロックデータ[1 2]は値がオール0ではなくそのフラグF2には、図13(a)のブロック割込みタイミングにおいて図12(a)のフレーム演算処理のステップS1205によりフラグF1からコピーされた値0がセットされている。
また、現在のブロックの入力データdata=[0 0]は値がオール0であるため、図11のブロック判定処理のステップS1101→ステップS1102~ステップS1104のN=2回の繰返し処理→ステップS1105→ステップS1107により、フラグF1=1に設定される。従って、図13(b)のブロック割込みタイミングでの2N=4サンプルの入力データdata=[1 2 0 0]によって表される2番目のFFTフレームは、フラグ(F2,F1)=(1,0)となって、図12(a)のステップS1201→S1202により非特定フレームとなる。この結果、係数coef=[0 0 2 3]と入力データdata=[1 2 0 0]との間では、図12(b)のステップS1210→S1211により前述した通常演算が指示される。
この通常演算処理では、図13(a)のブロック割込みタイミングの場合と同様に、CPU101は、CONV演算処理部304に対して、図4から図6を用いて前述した通常の畳み込み演算処理の実行を指示する。
Next, for example, at the block interrupt timing of FIG. 13(b), when the input data DATA at the block interrupt timing of FIG. 13(a) is shifted by N=2 samples and an FFT frame [1 2 0 0] consisting of 2N samples is used as the input data DATA for calculation, the value of the previous block data [1 2] is not all 0, and its flag F2 is set to the value 0 copied from flag F1 by step S1205 of the frame calculation process of FIG. 12(a) at the block interrupt timing of FIG. 13(a).
Also, since the input data data=[0 0] of the current block has a value of all 0, the flag F1 is set to 1 by step S1101 of the block determination process in Fig. 11, N=2 repetitions of steps S1102 to S1104, step S1105, and step S1107. Therefore, the second FFT frame represented by the input data data=[1 2 0 0] of 2N=4 samples at the block interrupt timing in Fig. 13(b) has flag (F2, F1)=(1, 0), and becomes a non-specific frame by step S1201→S1202 in Fig. 12(a). As a result, between the coefficient coef=[0 0 2 3] and the input data data=[1 2 0 0], the normal calculation described above is instructed by step S1210→S1211 in Fig. 12(b).
In this normal calculation process, similarly to the case of the block interrupt timing of FIG. 13A, the CPU 101 instructs the CONV calculation processing unit 304 to execute the normal convolution calculation process described above with reference to FIGS.

続いて例えば、図13(c)のブロック割込みのタイミングにおいて、図13(b)のブロック割込みのタイミングの入力データdataがN=2サンプルシフトして、入力データdataとして2NサンプルからなるFFTフレーム[0 0 0 0]が演算対象とされた場合、1つ前のブロックデータ[0 0]は値がオール0でそのフラグF2には、図13(b)のブロック割込みタイミングにおいて図12(a)のフレーム演算処理のステップS1205によりフラグF1からコピーされた値1がセットされている。
また、現在のブロックの入力データdata=[0 0]は値がオール0であるため、図11のブロック判定処理のステップS1101→ステップS1102~ステップS1104のN=2回の繰返し処理→ステップS1105→ステップS1107により、フラグF1=1に設定される。従って、図13(b)のブロック割込みタイミングでの2N=4サンプルの入力データdata=[0 0 0 0]によって表される3番目のFFTフレームは、フラグ(F2,F1)=(0,0)となって、図12(a)のステップS1201→S1203により、特定フレームとなる。この結果、係数coef=[0 0 2 3]と入力データdata=[0 0 0 0]との間では、図12(b)のステップS1210→S1212により特定フレーム処理が実行される。
この特定フレーム処理では、CPU101は、CONV演算処理部304に対して、オール0の値を有する2Nサンプル分のFFTフレームデータを出力させる。従って、この3番目のFFTフレームの処理においては、乗算のために必要であったメモリが解放され、他の処理がその空きスロットを利用できるようになり、効果付与部105におけるメモリの利用効率を向上させることが可能となる。
Next, for example, at the block interrupt timing of FIG. 13(c), if the input data 'data' at the block interrupt timing of FIG. 13(b) is shifted by N=2 samples and an FFT frame [0 0 0 0] consisting of 2N samples is used as the input data 'data' for calculation, the previous block data [0 0] has a value of all 0 and its flag F2 is set to the value 1 copied from flag F1 by step S1205 of the frame calculation process of FIG. 12(a) at the block interrupt timing of FIG. 13(b).
Also, since the input data data=[0 0] of the current block has a value of all 0, the flag F1 is set to 1 by step S1101 of the block determination process in Fig. 11, N=2 repetitions of steps S1102 to S1104, step S1105, and step S1107. Therefore, the third FFT frame represented by the input data data=[0 0 0 0] of 2N=4 samples at the block interrupt timing in Fig. 13(b) has flag (F2, F1)=(0, 0), and becomes a specific frame by step S1201→S1203 in Fig. 12(a). As a result, between the coefficient coef=[0 0 2 3] and the input data data=[0 0 0 0], specific frame processing is executed by step S1210→S1212 in Fig. 12(b).
In processing this particular frame, the CPU 101 causes the CONV calculation processing unit 304 to output FFT frame data for 2N samples having a value of all 0. Therefore, in processing this third FFT frame, the memory required for multiplication is released, and other processing can use the free slot, making it possible to improve the efficiency of memory usage in the effect imparting unit 105.

更に続いて例えば、図13(d)のブロック割込みのタイミングにおいて、図13(c)のブロック割込みのタイミングの入力データdataがN=2サンプルシフトして、入力データdataとして2NサンプルからなるFFTフレーム[0 0 0 0]が演算対象とされた場合、1つ前のブロックデータ[0 0]は値がオール0でそのフラグF2には、図13(c)のブロック割込みタイミングにおいて図12(a)のフレーム演算処理のステップS1205によりフラグF1からコピーされた値1がセットされている。
また、現在のブロックの入力データdata=[0 0]は値がオール0であるため、図11のブロック判定処理のステップS1101→ステップS1102~ステップS1104のN=2回の繰返し処理→ステップS1105→ステップS1107により、フラグF1=1に設定される。従って、図13(b)のブロック割込みタイミングでの2N=4サンプルの入力データdata=[0 0 0 0]によって表される4番目のFFTフレームは、フラグ(F2,F1)=(0,0)となって、図12(a)のステップS1201→S1203により、特定フレームとなる。この結果、係数coef=[0 0 2 3]と入力データdata=[0 0 0 0]との間では、図12(b)のステップS1210→S1212により特定フレーム処理が指示される。
図13(d)のブロック割込みタイミングにおいて実行される特定フレーム処理では、図13(c)のブロック割込みタイミングにおいて実行された特定フレーム処理の場合と同様に、CPU101は、CONV演算処理部304に対して、オール0の値を有する2Nサンプル分のFFTフレームデータを出力させる。従って、この4番目のFFTフレームの処理においても、3番目のFFTフレームの処理の場合と同様に、乗算のために必要であったメモリが解放され、他の処理がその空きスロットを利用できるようになり、効果付与部105におけるメモリの利用効率を向上させることが可能となる。
12A in step S1205 of the frame calculation process in FIG. 12A. Furthermore, for example, at the block interrupt timing of FIG. 13D, if the input data 'data' at the block interrupt timing of FIG. 13C is shifted by N=2 samples and an FFT frame [0 0 0 0] consisting of 2N samples is subjected to calculation as the input data 'data', the previous block data [0 0] has a value of all 0 and its flag F2 is set to the value 1 copied from flag F1 by step S1205 of the frame calculation process in FIG. 12A in step S1205 of the block interrupt timing of FIG. 13C.
Also, since the input data data=[0 0] of the current block has a value of all 0, the flag F1 is set to 1 by step S1101 of the block determination process in Fig. 11, N=2 repetitions of steps S1102 to S1104, step S1105, and step S1107. Therefore, the fourth FFT frame represented by the input data data=[0 0 0 0] of 2N=4 samples at the block interrupt timing in Fig. 13(b) has flag (F2, F1)=(0, 0), and becomes a specific frame by step S1201→S1203 in Fig. 12(a). As a result, between the coefficient coef=[0 0 2 3] and the input data data=[0 0 0 0], specific frame processing is instructed by step S1210→S1212 in Fig. 12(b).
In the specific frame processing executed at the block interrupt timing of Fig. 13(d), similarly to the specific frame processing executed at the block interrupt timing of Fig. 13(c), the CPU 101 causes the CONV calculation processing unit 304 to output 2N samples of FFT frame data having a value of all 0. Therefore, in the processing of this fourth FFT frame, similarly to the processing of the third FFT frame, the memory required for multiplication is released, and other processing can use the free slot, thereby making it possible to improve the efficiency of memory utilization in the effect imparting unit 105.

以下同様に、図13の動作説明図において、(e)、(f)、(g)、(h)、(k)、(l)、(m)、(n)、(q)、(r)、(s)、(t)、(w)、及び(x)のブロック割込みタイミングにおいては、CPU101は、CONV演算処理部304に対して、図4から図6を用いて前述した通常の畳み込み演算処理の実行を指示する。
一方、図13の動作説明図において、(i)、(j)、(o)、(p)、(u)、及び(v)のブロック割込みタイミングにおいては、CPU101は、CONV演算処理部304に対して、特定フレーム処理を指示し、オール0の値を有する2Nサンプル分のFFTフレームデータを出力させる。従って、これらのFFTフレームの処理においては、乗算のために必要であったメモリが解放され、他の処理がその空きスロットを利用できるようになり、効果付与部105におけるメモリの利用効率を向上させることが可能となる。
Similarly, in the operation explanatory diagram of FIG. 13, at the block interrupt timings of (e), (f), (g), (h), (k), (l), (m), (n), (q), (r), (s), (t), (w), and (x), the CPU 101 instructs the CONV calculation processing unit 304 to execute the normal convolution calculation processing described above with reference to FIGS. 4 to 6.
13, at the block interrupt timings of (i), (j), (o), (p), (u), and (v), the CPU 101 instructs the CONV calculation processing unit 304 to process a specific frame and causes it to output FFT frame data for 2N samples having a value of all 0. Therefore, in the processing of these FFT frames, the memory that was required for multiplication is released, and other processing can use the free slots, making it possible to improve the efficiency of memory usage in the effect imparting unit 105.

図14は、図10のブロック割込み処理におけるステップS1010のブロック判定処理の他の詳細処理例を示すフローチャートである。図14において、図11の場合と同じ処理を実行する処理には、同じステップ番号を付してある。 Figure 14 is a flowchart showing another detailed example of the block determination process of step S1010 in the block interrupt process of Figure 10. In Figure 14, the same step numbers are assigned to processes that execute the same processes as in Figure 11.

前述した図11のブロック判定処理の詳細処理例では、図11のステップS1102において、CPU101は、レジスタRJ1と、Nサンプル分のブロック単位の各サンプルのデータ[i](0≦i≦N-1)とで、演算「(Rj1|データ[i])」として各データの対応するビット毎のOR(論理和)演算を実行し、各ビットのOR演算の結果を、レジスタRJ1に格納し直す処理を繰り返すことにより、Nサンプル分のブロック単位の全てのサンプルのデータ[i](0≦i≦N-1)がオール0の値であることを検出し、特定フレームを検出した。 In the detailed processing example of the block determination process in FIG. 11 described above, in step S1102 in FIG. 11, the CPU 101 performs an OR (logical sum) operation on the register RJ1 and the data [i] (0≦i≦N-1) of each sample in a block unit of N samples as the operation "(Rj1|data [i])" for each corresponding bit of each data, and by repeatedly storing the results of the OR operation of each bit back in the register RJ1, it is detected that the data [i] (0≦i≦N-1) of all samples in a block unit of N samples is all 0, and a specific frame is detected.

これに対して図14のブロック判定処理の他の詳細処理例では、CPU101はまず、図14のステップS1401において、レジスタRJ1と、Nサンプル分のブロック単位の各サンプルのデータ[i](0≦i≦N-1)の模式的な振幅値の絶対値を演算した結果とで、演算「(Rj1|abs(データ[i]))」として各データの対応するビット毎のOR(論理和)演算を実行し、各ビットのOR演算の結果を、レジスタRJ1に格納し直す処理を繰り返す。ここで、「abs()」は、括弧内の数値の絶対値を演算する処理を表している。 In contrast to this, in another detailed processing example of the block determination process in FIG. 14, the CPU 101 first performs an OR (logical sum) operation on the corresponding bits of each data in step S1401 in FIG. 14 using register RJ1 and the result of calculating the absolute value of the schematic amplitude value of each sample data [i] (0≦i≦N-1) in block units of N samples as the operation "(Rj1|abs(data [i]))," and repeats the process of re-storing the results of the OR operation of each bit in register RJ1. Here, "abs()" represents the process of calculating the absolute value of the number in parentheses.

次に、CPU101は、ステップS1401→S1103→S1104→S1401のブロック全体のNサンプル分の繰返し処理によりレジスタRJ1に得られた値と、特定の閾値以下の値に対応するビットが0で、その閾値よりも大きい値に対応するビットが1であるマスキングデータThとで、「(RJ1&Th)」で示されるビット毎のAND(論理積)演算を実行し、各ビットのAND演算の結果を、レジスタRJ1に格納し直す処理を実行する(図14のステップS1402)。 Next, CPU 101 performs a bitwise AND (logical product) operation indicated by "(RJ1 & Th)" on the value obtained in register RJ1 by repeating the process of steps S1401 → S1103 → S1104 → S1401 for N samples of the entire block and masking data Th in which bits corresponding to values less than a specific threshold are 0 and bits corresponding to values greater than the threshold are 1, and then re-stores the results of the AND operation for each bit in register RJ1 (step S1402 in FIG. 14).

そして、CPU101は、図11のステップS1105からステップS1107の場合と同様にして、ステップS1402により得られたレジスタRJ1の値が0(全ビットが0)であれば、RAM103上のフラグF1に値1を格納してフラグをonし(図14のステップS1105の判定がYES→S1107)、そうでなければ、フラグF1に値0を格納してフラグをoffする(図14のステップS1105の判定がNO→S1106)。 Then, similarly to steps S1105 to S1107 in FIG. 11, if the value of register RJ1 obtained in step S1402 is 0 (all bits are 0), CPU 101 stores a value of 1 in flag F1 on RAM 103 and turns the flag on (YES in step S1105 in FIG. 14 → S1107), and if not, stores a value of 0 in flag F1 and turns the flag off (NO in step S1105 in FIG. 14 → S1106).

上述の図14のブロック判定処理の他の詳細処理例では、Nサンプル分のブロック単位のデータ[i](0≦i≦N-1)の値が、オール0ではなく小さな値を有している程度であれば、「(RJ1&Th)」で示されるビット毎のAND(論理積)演算により、レジスタRJ1に得られた小さな値の累積値が、マスキングデータThの上位ビット=1、下位ビット=0のマスキングデータの0値の下位ビットによってマスキングされて、その結果が0となり、レジスタRJ1に再設定されて、ステップS1105の判定がYESとなって、フラグF1=1、即ち特定フレームと判定される。 In another detailed processing example of the block determination process of FIG. 14 described above, if the values of block-based data [i] (0≦i≦N-1) for N samples are not all 0 but are small values, then the accumulated value of small values obtained in register RJ1 is masked by the lower bits of the masking data Th, which has upper bits = 1 and lower bits = 0, by a bit-wise AND (logical product) operation shown as "(RJ1 & Th)", and the result becomes 0, which is reset in register RJ1, the determination in step S1105 becomes YES, and flag F1 = 1, i.e., it is determined to be a specific frame.

一方、Nサンプル分のブロック単位のデータ[i](0≦i≦N-1)の値の何れかが大きな値を有していれば、「(RJ1&Th)」で示されるビット毎のAND(論理積)演算により、レジスタRJ1に得られた大きな値の累積値が、マスキングデータThの上位ビット=1とのAND演算によりマスキングされきれずに値として残ってしまい、その値がレジスタRJ1に再設定される結果、ステップS1105の判定がNOとなって、フラグF1=0、即ち非特定フレームと判定される。 On the other hand, if any of the values of the block-unit data [i] (0≦i≦N-1) for N samples has a large value, the bitwise AND (logical product) operation indicated by "(RJ1 & Th)" causes the accumulated value of the large value obtained in register RJ1 to be unable to be completely masked by the AND operation with the upper bit of the masking data Th = 1 and remain as a value, and this value is reset in register RJ1. As a result, the determination in step S1105 becomes NO, and flag F1 = 0, i.e., it is determined to be a non-specific frame.

以上のようにして、図14のブロック判定処理の他の詳細処理例では、ブロック単位のデータ[i](0≦i≦N-1)が微小な値を有している程度であれば、特定フレームと判定することにより、CONV演算処理部304における演算処理をより削減することが可能となり、効果付与部105全体の利用効率を向上させることが可能となる。 As described above, in another detailed processing example of the block determination process in FIG. 14, if the block-unit data [i] (0≦i≦N-1) has a very small value, it is determined to be a specific frame, making it possible to further reduce the calculation processing in the CONV calculation processing unit 304 and improve the utilization efficiency of the effect imparting unit 105 as a whole.

特には図示しないが、更に別の変形例として、ブロックがマスキングデータThで規定される閾値を跨いだ場合を検出して、閾値を跨ぐ場合は、入力するブロック単位のデータに対してエンベロープに相当するレベル操作を行ってから、特定フレーム処理を行うようにしてもよい。 Although not specifically shown, as yet another modified example, it is possible to detect when a block crosses a threshold defined by the masking data Th, and if the block crosses the threshold, perform a level operation equivalent to an envelope on the input block-based data before performing specific frame processing.

同様の意図で、入力の前段にノイズゲート処理を追加する形も考えられる。 With a similar intention, it is also possible to add noise gate processing before the input.

更に、ここまで説明した実施形態では、図2のLch効果音入力データ209又はRch効果音入力データ210を音源(TG)104から効果付与部105に受け渡す時にブロック判定を行っているが、音源(TG)104での楽音生成時にフラグ情報F1を生成して受け渡す形式としてもよい。 Furthermore, in the embodiment described so far, block determination is performed when the Lch sound effect input data 209 or the Rch sound effect input data 210 in FIG. 2 is transferred from the sound source (TG) 104 to the effect imparting unit 105, but flag information F1 may be generated and transferred when the sound source (TG) 104 generates musical tones.

また、上述の実施形態では、ブロック単位の演算処理としてFFTを使用した畳込み演算処理を例示したが、効果処理を行う場合でも、ブロック単位で所定条件の判定を行い、通常の演算か、特定フレーム処理を行うかを調整するようにしてもよい。同一ブロックを並列処理する場合などでも有効である。 In addition, in the above embodiment, convolution calculation processing using FFT was exemplified as block-based calculation processing, but even when performing effect processing, it is possible to determine a predetermined condition on a block-by-block basis and adjust whether to perform normal calculation or specific frame processing. This is also effective when processing the same block in parallel.

以上説明したようにして、本実施形態によれば、音源、CPU、効果付与部等でメモリを共有するような場合に、ブロック単位又はそれに基づくフレーム等の単位で楽音データが演算処理条件に合致したか否かを判定し、その判定の結果をブロック管理情報として保持し、そのブロック管理情報に基づいて音響効果を付与する演算処理を間引く等することにより、メモリアクセスを減少させるようにした。この結果、メモリスロットに空きができるので、他の処理が空いたスロットを使うことができ、効果付与装置全体の処理効率を向上させることが可能となる。
同一処理内容を行う場合はメモリアクセスが減るため、メモリが外部高速メモリなどの場合では電気的にも有利になる。
また、以上の説明では、本発明の音声出力音出力制御に係るプログラムをROM102に格納していることを示したが、これに限らず、コンピュータ読み取り可能な媒体としてフラッシュメモリなどの不揮発性メモリなどを適用してもよく、その他のコンピュータ読み取り可能な媒体として、MRAMなどの他の不揮発性メモリ、HDD(Hard Disk Drive)や、CD-ROM、DVDディスクなどの可搬型記録媒体を適用することが可能である。また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウェーブ(搬送波)も本発明に適用される。
その他、上記実施の形態で示した具体的な構成、処理動作の内容及び手順などは、本発明の趣旨を逸脱しない範囲において適宜変更可能である。本発明の範囲は、特許請求の範囲に記載した発明の範囲とその均等の範囲を含む。
As described above, according to this embodiment, when memory is shared by the sound source, CPU, effect imparting section, etc., it is judged whether the musical sound data matches the calculation processing conditions in units of blocks or in units of frames based thereon, and the result of the judgment is stored as block management information, and memory access is reduced by thinning out the calculation processing for imparting sound effects based on the block management information. As a result, memory slots become available, and other processing can use the vacant slots, making it possible to improve the processing efficiency of the entire effect imparting device.
Since the number of memory accesses is reduced when performing the same processing content, this is also advantageous electrically when the memory is an external high-speed memory.
In the above description, the program relating to the audio output sound output control of the present invention is stored in ROM 102, but the present invention is not limited to this. A non-volatile memory such as a flash memory may be used as the computer-readable medium, and other non-volatile memories such as MRAM, HDDs (Hard Disk Drives), CD-ROMs, DVDs, and other portable recording media may be used as the other computer-readable media. In addition, a carrier wave is also applied to the present invention as a medium for providing data of the program according 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.

100 電子楽器
101 CPU
102 ROM
103、306 RAM
104 音源(TG)
105 効果付与部
106 鍵盤
107 ペダル
108 操作子
109 システムバス
110 サウンドシステム
201 楽音生成部
202 ミキシング部
203、204、205、206 ミキサ
207 Lch直接音出力データ
208 Rch直接音出力データ
209 Lch効果音入力データ
210 Rch効果音入力データ
212 Lch効果音出力データ
213 Rch効果音出力データ
214 Lch楽音出力データ
215 Rch楽音出力データ
303 FIRフィルタ演算処理部
304 CONV演算処理部
305 加算部

100 Electronic musical instrument 101 CPU
102 ROM
103, 306 RAM
104 Sound source (TG)
REFERENCE SIGNS LIST 105 Effect applying section 106 Keyboard 107 Pedal 108 Operator 109 System bus 110 Sound system 201 Musical sound generating section 202 Mixing section 203, 204, 205, 206 Mixer 207 Lch direct sound output data 208 Rch direct sound output data 209 Lch sound effect input data 210 Rch sound effect input data 212 Lch sound effect output data 213 Rch sound effect output data 214 Lch musical sound output data 215 Rch musical sound output data 303 FIR filter calculation processing section 304 CONV calculation processing section 305 Addition section

Claims (9)

音源で生成される楽音データにブロック単位で音響効果を付与する演算処理を実行する演算処理部と、
前記楽音データが前記ブロック単位で演算処理条件を満たしたか否かを示すブロック管理情報に基づいて前記演算処理部での前記演算処理を調整する演算制御処理部と、
を備える効果付与装置。
A calculation processing unit that executes calculation processing for adding sound effects to musical sound data generated by a sound source in units of blocks;
an arithmetic control processing unit that adjusts the arithmetic processing in the arithmetic processing unit based on block management information that indicates whether or not the musical sound data satisfies an arithmetic processing condition in block units;
An effect imparting device comprising:
前記ブロック単位において、前記ブロック管理情報が前記演算処理条件に合致したことを示している場合に、前記演算制御処理部は前記演算処理部に対して、前記音響効果を付与する演算処理の代わりに、所定数のサンプル値を有するデータを出力する処理を指示する、請求項1に記載の効果付与装置。 The effect imparting device according to claim 1, wherein, when the block management information indicates that the calculation processing conditions are met in the block unit, the calculation control processing unit instructs the calculation processing unit to perform a process of outputting data having a predetermined number of sample values instead of a calculation process for imparting the sound effect. 前記演算処理は所定の演算フレームサンプル長の高速フーリエ変換演算を含み、
夫々の演算フレームにおいて、前記演算フレームに含まれる前記ブロック管理情報が前記演算処理条件に合致したことを示している場合に、前記演算制御処理部は前記演算処理部に対して、前記音響効果を付与する演算処理の代わりに、特定のサンプル値を有するデータを出力する処理を指示する、請求項2に記載の効果付与装置。
The arithmetic processing includes a fast Fourier transform calculation of a predetermined calculation frame sample length,
3. The effect imparting device of claim 2, wherein, in each calculation frame, when the block management information contained in the calculation frame indicates that the calculation processing conditions are met, the calculation control processing unit instructs the calculation processing unit to perform a process of outputting data having a specific sample value instead of a calculation process that imparts the sound effect.
前記演算処理条件は、前記ブロック内の全ての前記楽音データのサンプル値が前記特定のサンプル値であることである、請求項3に記載の効果付与装置。 The effect imparting device according to claim 3, wherein the calculation processing condition is that all sample values of the musical sound data in the block are the specific sample value. 前記演算処理条件は、前記ブロック内の全ての前記楽音データのサンプルの振幅値の絶対値が閾値以下であることである、請求項3に記載の効果付与装置。 The effect imparting device according to claim 3, wherein the calculation processing condition is that the absolute values of the amplitude values of all samples of the musical sound data in the block are equal to or less than a threshold value. 前記楽音データが前記ブロック単位で演算処理条件を満たしたか否かを判定し、前記判定の結果をブロック管理情報として保持するブロック判定処理部をさらに備える、請求項1に記載の効果付与装置。 The effect imparting device according to claim 1, further comprising a block determination processing unit that determines whether the musical sound data satisfies a calculation processing condition on a block basis and stores the result of the determination as block management information. 音源で生成される楽音データにブロック単位で音響効果を付与する演算処理と、
前記楽音データが前記ブロック単位で演算処理条件に合致したか否かを示すブロック管理情報に基づいて前記演算処理を調整する演算制御処理と、
を実行する効果付与方法。
A computation process for adding sound effects to the musical sound data generated by the sound source in units of blocks;
a calculation control process for adjusting the calculation process based on block management information indicating whether the musical sound data matches a calculation processing condition on a block basis;
A method of applying the effect.
前記演算処理条件は、前記ブロック内の全ての前記楽音データの振幅の絶対値が閾値以下であることである、請求項7に記載の効果付与方法。 The effect imparting method according to claim 7, wherein the calculation processing condition is that the absolute value of the amplitude of all of the musical sound data in the block is equal to or less than a threshold value. 音源で生成される楽音データにブロック単位で音響効果を付与する演算処理と、
前記楽音データが前記ブロック単位で演算処理条件を満たしたか否かを示すブロック管理情報に基づいて前記演算処理を調整する演算制御処理と、
をコンピュータに実行させるためのプログラム。

A computation process for adding sound effects to the musical sound data generated by the sound source in units of blocks;
a calculation control process for adjusting the calculation process based on block management information indicating whether the musical sound data satisfies a calculation processing condition on a block-by-block basis;
A program for causing a computer to execute the following.

JP2022152069A 2022-09-26 2022-09-26 Effect imparting device, method, and program Pending JP2024046785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022152069A JP2024046785A (en) 2022-09-26 2022-09-26 Effect imparting device, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022152069A JP2024046785A (en) 2022-09-26 2022-09-26 Effect imparting device, method, and program

Publications (1)

Publication Number Publication Date
JP2024046785A true JP2024046785A (en) 2024-04-05

Family

ID=90527132

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022152069A Pending JP2024046785A (en) 2022-09-26 2022-09-26 Effect imparting device, method, and program

Country Status (1)

Country Link
JP (1) JP2024046785A (en)

Similar Documents

Publication Publication Date Title
JP4726875B2 (en) Audio signal processing method and apparatus
US7612281B2 (en) Reverberation effect adding device
US10204610B2 (en) Musical note generation device, electronic musical instrument, method, and storage medium
CN108242232B (en) Musical sound generation device, electronic musical instrument, musical sound generation method, and storage medium
CN108630189B (en) Filter operation processing device, filter operation method, and effect providing device
CN104704855A (en) System and method for reducing latency in transposer-based virtual bass systems
JP2565073B2 (en) Digital signal processor
JP2024046785A (en) Effect imparting device, method, and program
JP7147814B2 (en) SOUND PROCESSING APPARATUS, METHOD AND PROGRAM
TW200903447A (en) Efficient identification of sets of audio parameters
JP7147804B2 (en) Effect imparting device, method and program
US6031916A (en) Sound effect adding device using DSP
JP5169584B2 (en) Impulse response processing device, reverberation imparting device and program
JP3120483B2 (en) Effect adding device
WO2023092368A1 (en) Audio separation method and apparatus, and device, storage medium and program product
JP3991475B2 (en) Audio data processing apparatus and computer system
WO2020195041A1 (en) Filter effect imparting device, electronic musical instrument, and control method for electronic musical instrument
JP2024046786A (en) AUDIO SIGNAL PROCESSING APPARATUS, METHOD, AND PROGRAM
JP3036417B2 (en) Signal processing device
JP2005148210A (en) Generating system, reproducing apparatus, generating method, reproducing method, and program
JP3027832B2 (en) Musical sound wave generator
JP2015079131A (en) Acoustic signal processing device and acoustic signal processing program
JPH04104200A (en) Device and method for voice speed conversion
JP4106739B2 (en) Digital signal processing method and digital signal processing apparatus
JPH07175477A (en) Signal processor

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20231011