JP3237226B2 - Loop waveform generation device and loop waveform generation method - Google Patents

Loop waveform generation device and loop waveform generation method

Info

Publication number
JP3237226B2
JP3237226B2 JP23246392A JP23246392A JP3237226B2 JP 3237226 B2 JP3237226 B2 JP 3237226B2 JP 23246392 A JP23246392 A JP 23246392A JP 23246392 A JP23246392 A JP 23246392A JP 3237226 B2 JP3237226 B2 JP 3237226B2
Authority
JP
Japan
Prior art keywords
sampling
loop
waveform
point
waveform data
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.)
Expired - Fee Related
Application number
JP23246392A
Other languages
Japanese (ja)
Other versions
JPH0683362A (en
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 JP23246392A priority Critical patent/JP3237226B2/en
Publication of JPH0683362A publication Critical patent/JPH0683362A/en
Application granted granted Critical
Publication of JP3237226B2 publication Critical patent/JP3237226B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、デジタル波形データか
らループ波形を生成するためのループ波形生成装置及び
ループ波形生成方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a loop waveform generator and a loop waveform generator for generating a loop waveform from digital waveform data.

【0002】[0002]

【従来の技術】グランドピアノなどのアコースティック
楽器の演奏音をマイクなどで集音して得られるアナログ
楽音信号をアナログ/デジタル変換し、その結果得られ
るデジタル楽音データをメモリに記憶させて電子楽器の
音源とするPCM(Pulse CodeModulation)方式による
音源方式が普及している。
2. Description of the Related Art An analog tone signal obtained by collecting the performance sound of an acoustic instrument such as a grand piano with a microphone or the like is converted from analog to digital. A sound source system based on a PCM (Pulse Code Modulation) system as a sound source has become widespread.

【0003】PCM音源方式は、元の楽器の音に極めて
忠実な楽音を発音可能であるという利点を有するが、音
質の良い楽音を得るためには、アナログ/デジタル変換
時のサンプリング周波数を高くし、かつ、量子化ビット
数を増やす必要がある。しかし、このようにすると、デ
ジタル楽音データのデータ量が膨大になってしまい、メ
モリ容量の増加を招き、電子楽器のコストの大幅な増加
をもたらしてしまうという問題点を有している。
[0003] The PCM tone generator has the advantage that a tone that is extremely faithful to the sound of the original musical instrument can be produced, but in order to obtain a tone with good sound quality, the sampling frequency at the time of analog / digital conversion must be increased. It is necessary to increase the number of quantization bits. However, in this case, the data volume of the digital musical sound data becomes enormous, which causes an increase in the memory capacity and a significant increase in the cost of the electronic musical instrument.

【0004】そのような問題点を解決するために、いわ
ゆるループ波形方式と呼ばれる技術がある。ループ波形
方式においては、楽音の発音開始から消音までの1発音
単位のデジタル楽音データが、一般的に、時間的に周波
数特性の変化が大きく周期性に乏しいアタック音区間
(又は子音区間)と、その区間以降の、時間的に周波数
特性の変化が小さく、ピッチ周期に同期して一定の波形
が繰り返される持続音区間(又は母音区間)から構成さ
れることに着目し、アタック音区間のデジタル楽音デー
タはそのまま音源データとしてメモリに記憶され、持続
音区間のデジタル楽音データについては、その区間を構
成する繰り返し波形の1繰返し波形単位分のデジタル楽
音データ(以下、これをループ波形と呼ぶ)のみが音源
データとしてメモリに記憶される。そして、楽音再生時
には、まず、アタック音区間に対応するデジタル楽音デ
ータがそのままメモリから読み出されてD/A変換さ
れ、その後、持続音区間に対応するループ波形データ
が、消音指示がなされるまで繰り返しメモリから読み出
されてD/A変換される。このような再生方式をループ
再生と呼ぶことにする。
To solve such a problem, there is a technique called a so-called loop waveform method. In the loop waveform method, digital tone data of one tone unit from the start of tone generation to silence is generally composed of an attack sound section (or a consonant section) having a large temporal change in frequency characteristics and poor periodicity; Paying attention to the fact that it is composed of a continuous sound section (or a vowel section) in which a change in frequency characteristics is small in time and a constant waveform is repeated in synchronization with the pitch cycle after that section, the digital tone in the attack sound section The data is stored as it is in the memory as sound source data, and only digital tone data of one repetitive waveform unit (hereinafter, referred to as a loop waveform) of a repetitive waveform constituting the interval is stored as digital tone data of a continuous tone section. It is stored in the memory as sound source data. At the time of musical tone reproduction, first, digital musical tone data corresponding to the attack tone section is read from the memory as it is and D / A converted, and thereafter, the loop waveform data corresponding to the sustain tone section is outputted until the mute instruction is given. The data is repeatedly read from the memory and D / A converted. Such a reproduction method will be referred to as loop reproduction.

【0005】上述のようなループ波形方式では、メモリ
には、アタック音区間に対応するデジタル楽音データ
と、持続音区間を代表するループ波形を記憶させるだけ
でよいため、メモリ容量を大幅に削減することができ
る。
In the above-described loop waveform method, it is only necessary to store digital musical tone data corresponding to an attack sound section and a loop waveform representing a sustained sound section in a memory, so that the memory capacity is greatly reduced. be able to.

【0006】[0006]

【発明が解決しようとする課題】ループ波形方式では、
元の1発音単位のデジタル楽音データから、アタック音
区間のデジタル楽音データと共に、持続音区間を代表す
るループ波形を切り出す必要がある。
In the loop waveform method,
It is necessary to cut out a loop waveform representing the sustained sound section together with the digital sound data of the attack sound section from the original digital sound data of one sounding unit.

【0007】そして、ループ波形を切り出す場合、その
デジタル楽音データの先頭のサンプリングポイント(以
後、これをループスタートポイントと呼ぶ)と最後のサ
ンプリングポイント(以後、これをループエンドポイン
トと呼ぶ)を決定する必要がある。
When a loop waveform is cut out, a first sampling point (hereinafter referred to as a loop start point) and a last sampling point (hereinafter referred to as a loop end point) of the digital musical sound data are determined. There is a need.

【0008】ループ再生時には、ループスタートポイン
トから、ループエンドポイントの1サンプル手前のサン
プリングポイントまでのループ区間で各サンプリングポ
イントが繰り返し再生されることになるが、この場合、
波形の接続部において振幅値が滑らかに接続される必要
がある。従って、ループスタートポイントとループエン
ドポイントは、振幅がゼロの時点、即ち、波形がゼロク
ロスする時点である必要がある。
At the time of loop reproduction, each sampling point is repeatedly reproduced in a loop section from the loop start point to the sampling point one sample before the loop end point. In this case,
The amplitude values need to be connected smoothly at the connection points of the waveforms. Therefore, the loop start point and the loop end point need to be at the time when the amplitude is zero, that is, when the waveform crosses zero.

【0009】しかし、一般に、必ずしもサンプリングポ
イントが波形がゼロクロスする位置と一致するとは限ら
ないため、従来は、ループスタートポイントとループエ
ンドポイントを波形のゼロクロス位置と完全に一致させ
ることはできなかった。
However, in general, since the sampling point does not always coincide with the position where the waveform crosses zero, conventionally, the loop start point and the loop end point could not completely coincide with the zero cross position of the waveform.

【0010】従って、従来は、図24(a) に示すよう
に、ループスタートポイント及びループエンドポイント
として、波形のゼロクロス位置に近いサンプリングポイ
ントを選ばざるを得ず、そのために、図24(b) の矩形
部に示されるように、いわゆるループノイズが発生し、
再生される電子楽器の楽音の音質が低下してしまうとい
う問題点を有していた。
Therefore, conventionally, as shown in FIG. 24A, a sampling point close to the zero-cross position of the waveform has to be selected as a loop start point and a loop end point. As shown in the rectangular part, so-called loop noise occurs,
There is a problem that the tone quality of the reproduced electronic musical instrument is degraded.

【0011】本発明の課題は、簡単な指定に基づいて、
ループスタートポイントとループエンドポイントが波形
のゼロクロス位置に一致するようなループ波形をデジタ
ル波形データから生成することを可能とすることにあ
る。
The object of the present invention is based on a simple specification.
An object of the present invention is to make it possible to generate a loop waveform from digital waveform data such that a loop start point and a loop end point coincide with the zero-cross position of the waveform.

【0012】[0012]

【課題を解決するための手段】本発明は、第1のサンプ
リング周期でサンプリングされたデジタル波形データか
ら、第1のサンプリング周期によって繰り返し再生(ル
ープ再生)されるべき1繰返し波形単位分のデジタル波
形データを、ループ波形データとして生成するループ波
形生成装置を前提とする。
According to the present invention, there is provided a digital waveform corresponding to one repetitive waveform unit to be repeatedly reproduced (loop reproduced) at a first sampling period from digital waveform data sampled at a first sampling period. It is assumed that a loop waveform generation device generates data as loop waveform data.

【0013】まず、繰り返し再生時(ループ再生時)の
任意の音高を指定する音高指定手段を有する。次に、音
高指定手段で指定された音高に対応する1基本周期の整
数倍の所定周期であって第1のサンプリング周期によっ
て所定の許容誤差範囲内で割り切られる周期に関して、
その所定周期を第1のサンプリング周期によって所定の
許容誤差範囲内で割り切って得られる数をサンプリング
ポイント数として算出するサンプリングポイント数算出
手段を有する。
First, there is provided a pitch specifying means for specifying an arbitrary pitch at the time of repetitive reproduction (at the time of loop reproduction). Next, with respect to a predetermined period which is an integral multiple of one basic period corresponding to the pitch specified by the pitch specifying means and which is divisible within a predetermined allowable error range by the first sampling period,
There is provided sampling point number calculation means for calculating a number obtained by dividing the predetermined period by the first sampling period within a predetermined allowable error range as the number of sampling points.

【0014】更に、デジタル波形データに基づいて、
述の所定周期分の波形区間の先頭である第1のゼロクロ
ス位置から、その所定周期分の波形区間の末尾である第
2のゼロクロス位置までの区間を、ループ区間として抽
出するループ区間抽出手段を有する。例えば、このルー
プ区間抽出手段は、まず、ユーザに、1繰返し波形単位
分の波形区間の先頭である第1のゼロクロス位置の直前
のサンプリングポイントと、その波形区間の末尾である
第2のゼロクロス位置の直前のサンプリングポイント
を、それぞれループスタート初期ポイント及びループエ
ンド初期ポイントとして指定させる。次に、ループ区間
抽出手段は、ループスタート初期ポイントからその直後
の第1のゼロクロス位置までの時間を算出し、その時間
だけ波形全体をシフトさせてループスタート初期ポイン
トと第1のゼロクロス位置を一致させ、その後、第2の
ゼロクロス位置の直前に位置するように補正されたルー
プエンド初期ポイントからその直後の第2のゼロクロス
位置までの時間を算出し、第2のゼロクロス位置を確定
させる。
Furthermore, based on the digital waveform data, prior to
From a first zero cross position is the head of the waveform segment of a predetermined period of predicates, the loop section extracting means for extracting a section up to the second zero-cross position that is the end of the waveform segment of the predetermined period, as a loop segment Have. For example, the loop section extracting means may first provide the user with a sampling point immediately before the first zero-cross position, which is the beginning of a waveform section for one repetitive waveform unit, and a sampling point at the end of the waveform section. The sampling points immediately before the zero-cross position 2 are designated as a loop start initial point and a loop end initial point, respectively. Next, the loop section extracting means calculates the time from the initial point of the loop start to the first zero-cross position immediately thereafter, shifts the entire waveform by that time, and matches the initial point of the loop start with the first zero-cross position. Then, the time from the loop end initial point corrected so as to be located immediately before the second zero-cross position to the second zero-cross position immediately thereafter is calculated, and the second zero-cross position is determined.

【0015】そして、上述のループ区間のデジタル波形
データを、そのループ区間の先頭の第1のゼロクロス位
置とそのループ区間の末尾の第2のゼロクロス位置がサ
ンプリングポイントとして含まれるように、ループ区間
長を前述したサンプリングポイント数で除算することに
より得られる第2のサンプリング周期で再サンプリング
することによって、ループ波形データを生成する再サン
プリング手段を有する。この手段による再サンプリング
処理は、例えば、第2のサンプリング周期で進む時間位
置毎のサンプル値を、第1のサンプリング周期でサンプ
リングされたデジタル波形データのサンプリングポイン
トのうち上述の時間位置近傍のものを使用してラグラン
ジェの補間関数などを使用した補間演算によって算出す
る処理である。
The digital waveform data of the above-described loop section is divided into loop section lengths such that the first zero cross position at the beginning of the loop section and the second zero cross position at the end of the loop section are included as sampling points. Is re-sampled at the second sampling period obtained by dividing by the above-mentioned number of sampling points, thereby generating loop waveform data. The re-sampling process by this means is, for example, a method in which a sample value at each time position that advances in the second sampling period is obtained by sampling the sampling points of the digital waveform data sampled in the first sampling period near the above-described time position This is a process of calculating by an interpolation operation using a Lagrange's interpolation function or the like.

【0016】本発明は、上述の各手段の機能に対応する
各過程を実行するループ波形生成方法としても実現する
ことができる。
The present invention can also be realized as a loop waveform generation method for executing each step corresponding to the function of each of the above-described means.

【0017】[0017]

【作用】本発明は、再生時のサンプリング周期(サンプ
ル読み出し周期)が一定ならば、楽音の1基本周期あた
りのサンプリングポイント数とその楽音が再生されると
きの音高は1対1に対応するという事実を利用してい
る。
According to the present invention, the sampling period ( sample
If the readout cycle is constant, the fact that the number of sampling points per basic cycle of a musical tone and the pitch at which the musical tone is reproduced corresponds to one to one is used.

【0018】この場合、ユーザなどによって指定された
任意の音高に対応する1基本周期は必ずしも一定のサン
プリング周期で割り切れるとは限らない。しかし、指定
された任意の音高に対応する1基本周期の整数倍の周期
であれば、その整数倍の周期が一定のサンプリング周期
でほぼ割り切れる場合が必ず存在する。
In this case, one basic cycle corresponding to an arbitrary pitch specified by a user or the like is not always divisible by a fixed sampling cycle. However, if the cycle is an integral multiple of one basic cycle corresponding to a designated arbitrary pitch, the cycle of the integral multiple is almost always divisible by a fixed sampling cycle.

【0019】そこで、本発明では、まず、ユーザなどに
よって指定された任意の音高に対応する1基本周期の整
数倍の所定周期であって、第1のサンプリング周期によ
って所定の許容誤差範囲内で割り切られるような周期に
関して、その所定周期を第1のサンプリング周期によっ
て所定の許容誤差範囲内で割り切って得られる数が、指
定された音高を有する波形信号が第1のサンプリング周
期でサンプリングされる場合のその波形信号の前述の所
定周期あたりのサンプリングポイント数として算出され
る。
Therefore, according to the present invention, first, a predetermined period which is an integral multiple of one basic period corresponding to an arbitrary pitch specified by a user or the like and is within a predetermined allowable error range by the first sampling period. A waveform signal having a designated pitch is sampled at the first sampling period, and a number obtained by dividing the predetermined period within the predetermined allowable error range by the first sampling period with respect to such a divisible period is sampled. This is calculated as the number of sampling points per predetermined period of the waveform signal in that case.

【0020】次に、例えばユーザによる指定に基づい
て、デジタル波形データ上で、ループ再生されるべき前
述の所定周期分の波形区間が指定されると、その波形区
間の先頭である第1のゼロクロス位置からそのループ区
間の末尾である第2のゼロクロス位置までのループ区間
が抽出される。
Next, when a waveform section for the above-mentioned predetermined period to be loop-reproduced is designated on the digital waveform data based on, for example, a designation by a user, the first zero crossing which is the head of the waveform section is performed. A loop section from the position to the second zero-cross position at the end of the loop section is extracted.

【0021】そして、上述のループ区間が、そのループ
区間の先頭の第1のゼロクロス位置とそのループ区間の
末尾の第2のゼロクロス位置がサンプリングポイントと
して含まれるように、ループ区間長を“算出されたサン
プリングポイント数”で除算することにより得られる第
2のサンプリング周期で再サンプリングされる。
The length of the loop section is calculated such that the above-mentioned loop section includes the first zero-cross position at the beginning of the loop section and the second zero-cross position at the end of the loop section as sampling points. Is resampled in the second sampling period obtained by dividing by the “number of sampling points”.

【0022】この結果、“算出されたサンプリングポイ
ント数+1”サンプルからなるループ波形データが生成
され、その開始ポイントであるループスタートポイント
とその終了ポイントであるループエンドポイントは、上
記ループ区間の先頭の第1のゼロクロス位置と末尾の第
2のゼロクロス位置に正確に一致する。
As a result, loop waveform data composed of “calculated number of sampling points + 1” samples is generated, and the loop start point as the start point and the loop end point as the end point are set at the beginning of the loop section. It exactly matches the first zero-cross position and the last second zero-cross position.

【0023】このようにして生成された、“算出された
サンプリングポイント数+1”サンプル分のループ波形
データは、メモリなどにセーブされる。このセーブされ
たループ波形データのうち、ループ区間の先頭の第1の
ゼロクロス位置のサンプリングポイントから、ループ区
間の末尾の第2のゼロクロス位置のサンプリングポイン
トの1サンプル手前のサンプリングポイントまでの、
“算出されたサンプリングポイント数”サンプルからな
るループ波形データが、第1のサンプリング周期でルー
プ再生されることにより、ループノイズを含まず、かつ
聴覚上問題のない範囲内で、指定された任意の音高にほ
ぼ一致した波形が得られる。
The loop waveform data for the “calculated number of sampling points + 1” samples thus generated is saved in a memory or the like. In the saved loop waveform data, the sampling point from the sampling point at the first zero-cross position at the beginning of the loop section to the sampling point one sample before the sampling point at the second zero-cross position at the end of the loop section,
Loop waveform data composed of “calculated sampling point number” samples is loop-reproduced in the first sampling cycle, so that the loop waveform data does not include loop noise and has no auditory problem within a specified range. A waveform almost matching the pitch is obtained.

【0024】[0024]

【実施例】以下、図面を参照しながら本発明の実施例に
つき詳細に説明する。 <本発明の実施例の構成>図1は、本発明の1実施例の
外観図であり、図2はその全体構成図である。
Embodiments of the present invention will be described below in detail with reference to the drawings. <Structure of Embodiment of the Present Invention> FIG. 1 is an external view of an embodiment of the present invention, and FIG.

【0025】制御/処理部205がループ波形を生成す
るための制御処理をスタートさせると、まず、ソースと
なる1発音単位分のPCM楽音波形データが、波形入出
力部206に設置されるハードディスク又はフロッピー
ディスクに記憶されたソース波形ファイル101からパ
ソコン本体103内のRAM204にロードされるとと
もに、その波形が表示部202のディスプレイ102上
に表示される。
When the control / processing unit 205 starts a control process for generating a loop waveform, first, PCM musical tone waveform data for one tone unit as a source is stored in a hard disk or a hard disk installed in the waveform input / output unit 206. The source waveform file 101 stored on the floppy disk is loaded into the RAM 204 in the personal computer 103, and the waveform is displayed on the display 102 of the display unit 202.

【0026】次に、ユーザは、表示された波形上で、ル
ープさせたい波形区間の先頭と最終位置を、ポインティ
ングデバイスであるマウス105を用いて指定する。こ
の指定が行われると、制御/処理部205は、ループ波
形を生成するための演算処理をスタートし、その結果、
所望のループ波形が生成され、それが波形入出力部20
6に設置されるハードディスク又はフロッピーディスク
に記憶される作成波形ファイル106にファイルされ
る。
Next, the user specifies the start and end positions of the waveform section to be looped on the displayed waveform by using the mouse 105 as a pointing device. When this designation is made, the control / processing unit 205 starts arithmetic processing for generating a loop waveform, and as a result,
A desired loop waveform is generated, and is output to the waveform input / output unit 20.
6 is stored in a created waveform file 106 stored on a hard disk or a floppy disk installed in the computer 6.

【0027】制御/処理部205のROM203には、
ループ波形生成処理に関する一連の制御プログラムが格
納され、RAM204には、上述したPCM楽音波形デ
ータがロードされるほか、ループ波形生成処理において
使用される各種変数が記憶される。 <本発明の第1の動作原理>上述の構成を有する本発明
の第1の動作原理として、所定の基準音高を有するルー
プ波形データが生成される場合の動作原理について説明
する。
The ROM 203 of the control / processing unit 205 includes
A series of control programs related to the loop waveform generation processing are stored, and the RAM 204 stores the above-described PCM musical tone waveform data and various variables used in the loop waveform generation processing. <First Operation Principle of the Present Invention> As the first operation principle of the present invention having the above-described configuration, an operation principle when loop waveform data having a predetermined reference pitch is generated will be described.

【0028】第1の動作原理は、再生時のサンプリング
周期が一定ならば、楽音の1基本周期あたりのサンプリ
ングポイント数とその楽音が再生されるときの音高は1
対1に対応するという事実を利用している。
The first principle of operation is that if the sampling period at the time of reproduction is constant, the number of sampling points per basic period of a musical tone and the pitch at which the musical tone is reproduced are one.
It takes advantage of the fact that there is a one-to-one correspondence.

【0029】まず、ユーザは、基準となる音高を決定す
る。次に、ユーザは、基準音高に対応する1基本周期を
割り切るサンプリング周期Tを決定する。
First, the user determines a reference pitch. Next, the user determines a sampling period T that divides one basic period corresponding to the reference pitch.

【0030】次に、基準音高を有する楽音がサンプリン
グ周期Tでサンプリングされる場合のその楽音の1基本
周期あたりのサンプリングポイント数Mが、次式によっ
て算出される。
Next, when a musical tone having a reference pitch is sampled at the sampling period T, the number M of sampling points per basic period of the musical tone is calculated by the following equation.

【0031】[0031]

【数1】 (Equation 1)

【0032】続いて、任意の音高を有するアナログ楽音
信号がサンプリング周期TでA/D変換されPCM楽音
波形データが得られる。次に、ユーザは、A/D変換に
よって得られたPCM楽音波形データの持続音区間で、
ゼロクロス位置から始ってゼロクロス位置で終わる1基
本周期分の波形区間の見当をつけ、その波形区間の先頭
と末尾を指定する。
Subsequently, the analog tone signal having an arbitrary pitch is A / D-converted at the sampling period T to obtain PCM tone waveform data. Next, the user makes a continuous sound section of the PCM musical tone waveform data obtained by the A / D conversion,
A waveform section for one basic cycle starting from the zero-cross position and ending at the zero-cross position is registered, and the start and end of the waveform section are designated.

【0033】この指定に基づいて、指定された先頭位置
に最も近く、かつ直後に波形のゼロクロス位置が存在す
るサンプリングポイントと、指定された末尾位置に最も
近く、かつ直後に波形のゼロクロス位置が存在するサン
プリングポイントが、それぞれループスタート初期ポイ
ント及びループエンド初期ポイントとして算出される。
Based on this designation, the sampling point closest to the designated start position and immediately after the zero-cross position of the waveform, and the sampling point closest to the designated end position and immediately following the zero-cross position of the waveform Sampling points to be calculated are calculated as a loop start initial point and a loop end initial point, respectively.

【0034】これらの算出されたループスタート初期ポ
イント及びループエンド初期ポイントに基づいて、ルー
プスタート初期ポイントの直後に位置する上述の1基本
周期分の波形区間の先頭のゼロクロス位置から、ループ
エンド初期ポイントの直後に位置する上述の1基本周期
分の波形区間の末尾のゼロクロス位置までの区間が、ル
ープ区間として抽出され、そのループ区間長が算出され
る。
Based on the calculated loop start initial point and loop end initial point, the loop end initial point is calculated from the zero cross position at the beginning of the above-described one basic period waveform section immediately after the loop start initial point. The section up to the zero-cross position at the end of the above-described one basic cycle of the waveform section located immediately after is extracted as a loop section, and the loop section length is calculated.

【0035】そして、次の数2式により算出されるサン
プリング周期T′で、上述のループ区間が、その先頭の
ゼロクロス位置とその末尾のゼロクロス位置がサンプリ
ングポイントとして含まれるように再サンプリング(リ
サンプリング)される。
Then, at the sampling period T 'calculated by the following equation (2), the above loop section is resampled (resampled) so that the leading zero-cross position and the trailing zero-cross position are included as sampling points. ) Is done.

【0036】[0036]

【数2】 (Equation 2)

【0037】この結果、ループ区間の両端のゼロクロス
位置のサンプリングポイントが含まれM+1サンプルか
らなるループ波形データが生成され、その開始ポイント
であるループスタートポイントとその終了ポイントであ
るループエンドポイントは、波形の先頭のゼロクロス位
置と末尾のゼロクロス位置に正確に一致する。
As a result, loop waveform data including M + 1 samples including the sampling points at the zero cross positions at both ends of the loop section is generated, and the loop start point as the start point and the loop end point as the end point are represented by the waveform Exactly matches the leading zero-cross position and the trailing zero-cross position.

【0038】このようにして生成されたM+1サンプル
分のループ波形データは、メモリなどにセーブされる。
このセーブされたM+1サンプル分のループ波形データ
のうち、ループ区間の先頭のゼロクロス位置のサンプリ
ングポイントから、ループ区間の末尾のゼロクロス位置
のサンプリングポイントの1サンプル手前のサンプリン
グポイントまでのMサンプルからなるループ波形データ
がサンプリング周期Tでループ再生されることにより、
ループノイズを含まず、かつ、基準音高に正確に一致し
た楽音が得られる。 <本発明の実施例の具体的動作(その1)>上述の本発
明の第1の動作原理に基づくループ波形データを生成す
るための本発明の実施例の具体的動作その1について説
明する。
The loop waveform data for M + 1 samples thus generated is saved in a memory or the like.
Of the saved loop waveform data for M + 1 samples, a loop consisting of M samples from the sampling point at the beginning zero-cross position of the loop section to the sampling point one sample before the sampling point at the end zero-cross position of the loop section. By performing loop reproduction of the waveform data at the sampling period T,
A tone that does not include loop noise and that exactly matches the reference pitch can be obtained. <Specific Operation of Embodiment of the Present Invention (Part 1)> A specific operation of the embodiment of the present invention for generating loop waveform data based on the above-described first operation principle of the present invention will be described.

【0039】まず、ユーザは、基準音高として、例えば
基本周波数が442.000HzであるA4の音高を決
定する。次に、ユーザは、基準音高に対応する1基本周
期を割り切るサンプリング周期Tとして、例えば、A4
の音高に対応する1基本周期である1/442〔秒〕を
割り切るサンプリング周期T=1/5304〔秒〕を決
定する。ユーザは、図2のキー入力部201を操作する
ことにより、上述のサンプリング周期を波形入出力部2
06にセットする。この場合のサンプリング周波数は5
304〔Hz〕となる。
First, the user determines, for example, the pitch of A4 whose fundamental frequency is 442.000 Hz as the reference pitch. Next, the user sets, for example, A4 as a sampling period T that divides one basic period corresponding to the reference pitch.
A sampling period T = 1/5304 [seconds] that divides 1/442 [second], which is one basic period corresponding to the pitch of sound, is determined. The user operates the key input unit 201 shown in FIG.
Set to 06. The sampling frequency in this case is 5
304 [Hz].

【0040】次に、図2の制御/処理部205は、前述
した数1式に基づいて、基準音高を有する楽音がサンプ
リング周期Tでサンプリングされる場合のその楽音の1
基本周期あたりのサンプリングポイント数Mを算出す
る。例えば、A4の音高を有する楽音がサンプリング周
期T=1/5304〔秒〕でサンプリングされる場合の
その楽音の1基本周期あたりのサンプリングポイント数
Mは、数1式より、次のように算出される。 M=(1/442)/(1/5304)=12〔ポイント〕 上述のようにして算出された基準音高に対応する1基本
周期あたりのサンプリングポイント数Mは、図2のRA
M204に記憶される。
Next, the control / processing unit 205 shown in FIG. 2 performs one of the musical tones having the reference pitch at the sampling period T on the basis of the above equation (1).
The number M of sampling points per basic cycle is calculated. For example, when a musical tone having a pitch of A4 is sampled at a sampling period T = 1/5304 [seconds], the number M of sampling points per basic period of the musical tone is calculated as follows from Expression 1. Is done. M = (1/442) / (1/5304) = 12 [points] The number M of sampling points per one basic period corresponding to the reference pitch calculated as described above is RA in FIG.
It is stored in M204.

【0041】続いて、ユーザのキー入力部201に対す
る操作に基づいて、任意の音高を有するアナログ楽音信
号がサンプリング周期TでA/D変換され、PCM楽音
波形データが、図2の波形入出力部206に設置される
ハードディスク又はフロッピーディスクに、ソース波形
ファイル101として記憶される。
Subsequently, an analog tone signal having an arbitrary pitch is A / D-converted at a sampling period T based on a user's operation on the key input section 201, and PCM tone waveform data is converted into a waveform input / output signal shown in FIG. The source waveform file 101 is stored on a hard disk or a floppy disk installed in the unit 206.

【0042】その後、ユーザのキー入力部201に対す
る操作に基づいて、制御/処理部205が、図3の動作
フローチャートによって示されるループ波形を生成する
ための制御処理プログラムをスタートさせる。
Thereafter, based on the user's operation on the key input unit 201, the control / processing unit 205 starts a control processing program for generating a loop waveform shown by the operation flowchart of FIG.

【0043】まず、ステップS301では、ソースとな
る1発音単位分のPCM楽音波形データが、波形入出力
部206に設置されるハードディスク又はフロッピーデ
ィスクに記憶されたソース波形ファイル101からパソ
コン本体103内のRAM204にロードされるととも
に、その波形が表示部202のディスプレイ102上に
表示される。
First, in step S301, PCM musical tone waveform data for one tone unit as a source is obtained from a source waveform file 101 stored in a hard disk or a floppy disk installed in the waveform input / output unit 206 and stored in the personal computer main unit 103. While being loaded into the RAM 204, the waveform is displayed on the display 102 of the display unit 202.

【0044】次に、表示された波形上で、ユーザがルー
プ再生させたい波形区間の先頭(ループスタート)と末
尾(ループエンド)をマウス105を用いて指定する
と、ステップS302の判定がYESとなる。
Next, when the user designates the beginning (loop start) and end (loop end) of the waveform section to be loop-reproduced on the displayed waveform using the mouse 105, the determination in step S302 becomes YES. .

【0045】次のステップS303では、指定された先
頭位置に最も近く、かつ直後に波形のゼロクロス位置が
存在するサンプリングポイントと、指定された末尾位置
に最も近く、かつ直後に波形のゼロクロス位置が存在す
るサンプリングポイントが、図4(a) に示されるよう
に、それぞれループスタート初期ポイントLSIP及び
ループエンド初期ポイントLEIPとして算出される。
これら各ポイントは、RAM204に読み込まれたPC
M楽音波形データの先頭のサンプリングポイントを番号
“0”とし、それ以降のサンプリングポイント毎に順次
増加する番号(0、1、2、3、・・・)で表される。
In the next step S303, the sampling point closest to the specified head position and immediately after the zero cross position of the waveform, and the sampling point closest to the specified end position and immediately after the zero cross position of the waveform The sampling points to be calculated are calculated as a loop start initial point LSIP and a loop end initial point LEIP, respectively, as shown in FIG.
These points are stored in the PC read into the RAM 204.
The leading sampling point of the M musical tone waveform data is numbered “0”, and is represented by numbers (0, 1, 2, 3,...) That sequentially increase for each subsequent sampling point.

【0046】続くステップS304〜S308の処理に
よって、上述の算出されたLSIP及びLEIPに基づ
き、LSIPの直後に位置する上述の1基本周期分の波
形区間の先頭のゼロクロス位置から、LEIPの直後に
位置する上述の1周期分の波形区間の末尾のゼロクロス
位置までの区間が、ループ区間として抽出される。
In the subsequent steps S304 to S308, based on the above-described calculated LSIP and LEIP, the position of the zero-cross position at the head of the waveform section of one basic period immediately after the LSIP is shifted to the position immediately after the LEIP. The section up to the zero-cross position at the end of the above-described waveform section for one cycle is extracted as a loop section.

【0047】まず、ステップS304では、図4(a) に
示されるように、ループスタート初期ポイントLSIP
からその直後のゼロクロス位置までの時間ΔtLSが算出
される。
First, in step S304, as shown in FIG. 4A, the loop start initial point LSIP
Is calculated from the time Δt LS to the zero-cross position immediately after.

【0048】上記の時間ΔtLSを算出するためのステッ
プS304の詳細な動作を、図5〜図9の説明図と図1
0の動作フローチャートに基づいて説明する。図10に
おいて、まず、ステップS1001において、RAM2
04に変数として記憶されるベース時点bが、ループス
タート初期ポイントLSIPの時点LSIP・Tに初期
設定される。但し、Tは、RAM204に記憶されてい
る波形データがA/D変換されたときのサンプリング周
期である。
The detailed operation of step S304 for calculating the above-mentioned time Δt LS will be described with reference to FIGS.
A description will be given based on the operation flowchart of FIG. In FIG. 10, first, in step S1001, the RAM2
The base time point b stored as a variable in 04 is initialized to the time point LSIP · T of the loop start initial point LSIP. Here, T is a sampling period when the waveform data stored in the RAM 204 is A / D converted.

【0049】次に、ステップS1002で、RAM20
4に記憶される変数mに値2が代入され、続くステップ
S1003で、RAM204に変数として記憶される時
間dが値T/mに設定される。従って、d=T/2とな
る。
Next, in step S1002, the RAM 20
The value 2 is substituted for the variable m stored in 4 and the time d stored as a variable in the RAM 204 is set to the value T / m in the subsequent step S1003. Therefore, d = T / 2.

【0050】続いて、ステップS1004で、ループス
タート初期ポイントLSIPに初期設定されたベース時
点bから時間d=T/2だけ経過した時点x=b+dが
計算される。この時点xは、RAM204に記憶されて
いる楽音波形の先頭からの経過時間を表し、xはRAM
204に記憶される変数である。
Subsequently, at step S1004, a time point x = b + d, which is a time d = T / 2 from the base time point b initially set at the loop start initial point LSIP, is calculated. The time point x represents the elapsed time from the beginning of the musical tone waveform stored in the RAM 204, and x is the RAM time.
This is a variable stored in 204.

【0051】次に、ステップS1005で、時点xにお
ける楽音波形の補間値f(x)が、後述するラグランジ
ュの補間公式を用いて算出される。この補間値f(x)
も、RAM204に記憶される変数である。
Next, in step S1005, the interpolation value f (x) of the musical tone waveform at the time point x is calculated using the Lagrange interpolation formula described later. This interpolation value f (x)
Are also variables stored in the RAM 204.

【0052】ステップS1006では、補間値f(x)
がコンピュータ計算精度上の“0”になったか否かが判
定される。この判定がNOならば、ステップS1007
において、補間値f(x)の符号とループスタート初期
ポイントLSIPの位置におけるサンプル値SMP(L
SIP)の符合が同じであるか否かが判定される。
In step S1006, the interpolation value f (x)
Is determined to be "0" on the computer calculation accuracy. If this determination is NO, step S1007
, The sign of the interpolation value f (x) and the sample value SMP (L
It is determined whether the sign of (SIP) is the same.

【0053】今、例えば図5に示されるように、楽音波
形のゼロクロス位置は、ループスタート初期ポイントL
SIPと、その次のサンプリングポイント(LSIP+
1)の間に位置する。
Now, for example, as shown in FIG. 5, the zero-cross position of the tone waveform is determined by the loop start initial point L.
SIP and the next sampling point (LSIP +
Located between 1).

【0054】そして、図5に示されるように、ループス
タート初期ポイントLSIPにおけるサンプル値SMP
(LSIP)と、時点xにおける補間値f(x)が同符
合の場合には、ゼロクロス位置は時点x=b+dより後
の時点に存在することになる。
Then, as shown in FIG. 5, the sample value SMP at the loop start initial point LSIP is obtained.
When (LSIP) and the interpolation value f (x) at the time point x are the same, the zero cross position exists at a time point after the time point x = b + d.

【0055】この場合には、ステップS1008におい
て、図6に示されるように、ベース時点bが、元のベー
ス時点LSIP・Tから時間d=T/2だけ経過した時
点LSIP・T+T/2に移される。その後、ステップ
S1009において、変数mの値2が2倍されて値4と
され、ステップS1003において、時間dが新たな時
間T/mに再設定される。図6では、時間d=が、元の
時間T/2から、その1/2に相当する新たな時間T/
4に再設定される。そして、ステップS1004におい
て、新たなベース時点b=LSIP・T+T/2から新
たな時間d=T/m=T/4だけ経過した時点x=b+
dが計算され、次のステップS1005で、補間値f
(x)が算出される。そして、ステップS1006の判
定の後、ステップS1007で、補間値f(x)の符号
が判定される。
In this case, in step S1008, as shown in FIG. 6, the base time point b is shifted to the time point LSIP · T + T / 2 after the time d = T / 2 has elapsed from the original base time point LSIP · T. It is. Then, in step S1009, the value 2 of the variable m is doubled to a value 4, and in step S1003, the time d is reset to a new time T / m. In FIG. 6, the time d = is changed from the original time T / 2 to a new time T /
It is reset to 4. Then, in step S1004, a time x = b + after a new time d = T / m = T / 4 has elapsed from the new base time b = LSIP · T + T / 2.
d is calculated, and in the next step S1005, the interpolation value f
(X) is calculated. After the determination in step S1006, the sign of the interpolation value f (x) is determined in step S1007.

【0056】図6の場合には、サンプル値SMP(LS
IP)とf(x)が異符合であり、この場合には、ゼロ
クロス位置は時点xより前の時点に存在することにな
る。この場合には、ステップS1008は実行されない
ため、図7に示されるように、ベース時点b=LSIP
・T+T/2は移動されない。そして、ステップS10
09において、変数mの値4が2倍されて値8とされ、
ステップS1003において、時間dが新たな時間T/
mに再設定される。図7では、時間dが、元の時間T/
4から、その1/2に相当する時間T/8に再設定され
る。そして、ステップS1004において、ベース時点
b=LSIP・T+T/2から新たな時間d=T/m=
T/8だけ経過した時点x=b+dが計算され、次のス
テップS1005で、補間値f(x)が算出される。そ
して、ステップS1006の判定の後、ステップS10
07で、補間値f(x)の符号が判定される。
In the case of FIG. 6, the sample value SMP (LS
IP) and f (x) are opposite signs, and in this case, the zero cross position exists at a time point before the time point x. In this case, since step S1008 is not executed, as shown in FIG. 7, the base time point b = LSIP
• T + T / 2 is not moved. Then, step S10
In 09, the value 4 of the variable m is doubled to a value 8,
In step S1003, the time d is changed to a new time T /
m. In FIG. 7, the time d is equal to the original time T /
From 4, the time is reset to a time T / 8 corresponding to a half thereof. Then, in step S1004, a new time d = T / m = from the base time point b = LSIP · T + T / 2.
The time point x = b + d after a lapse of T / 8 is calculated, and in the next step S1005, the interpolation value f (x) is calculated. After the determination in step S1006, step S10
At 07, the sign of the interpolated value f (x) is determined.

【0057】図7の場合には、サンプル値SMP(LS
IP)とf(x)が異符合であり、この場合には、ゼロ
クロス位置は時点xより前の時点に存在することにな
る。この場合も、図6の場合と同様、ステップS100
8は実行されないため、図8に示されるように、ベース
時点b=LSIP・T+T/2は移動されない。そし
て、ステップS1009において、変数mの値8が2倍
されて値16とされ、ステップS1003において、時
間dが新たな時間T/mに再設定される。図8では、時
間dが、元の時間T/8から、その1/2に相当する時
間T/16に再設定される。そして、ステップS100
4において、ベース時点b=LSIP・T+T/2から
新たな時間d=T/m=T/16だけ経過した時点x=
b+dが計算され、次のステップS1005で、補間値
f(x)が算出される。そして、ステップS1006の
判定の後、ステップS1007で、補間値f(x)の符
号が判定される。
In the case of FIG. 7, the sample value SMP (LS
IP) and f (x) are opposite signs, and in this case, the zero cross position exists at a time point before the time point x. In this case, as in the case of FIG.
8, the base time b = LSIP.T + T / 2 is not moved, as shown in FIG. Then, in step S1009, the value 8 of the variable m is doubled to a value 16, and in step S1003, the time d is reset to a new time T / m. In FIG. 8, the time d is reset from the original time T / 8 to a time T / 16 corresponding to a half thereof. Then, step S100
At 4, a new time d = T / m = time T / 16 after the base time b = LSIP · T + T / 2, x =
b + d is calculated, and in the next step S1005, an interpolation value f (x) is calculated. After the determination in step S1006, the sign of the interpolation value f (x) is determined in step S1007.

【0058】図8の場合には、サンプル値SMP(LS
IP)とf(x)が同符合であり、この場合には、ゼロ
クロス位置は時点xより後の時点に存在することにな
る。この場合には、図5の場合と同様、ステップS10
08において、図9に示されるように、ベース時点b
が、元のベース時点LSIP・T+T/2から時間d=
T/16だけ経過した時点LSIP・T+T/2+T/
16に移される。その後、ステップS1009におい
て、変数mの値16が2倍されて値32とされ、ステッ
プS1003において、時間dが新たな時間T/mに再
設定される。図9では、時間dが、元の時間T/16か
ら、その1/2に相当する時間T/32に再設定され
る。そして、ステップS1004において、ベース時点
b=LSIP・T+T/2+T/16から新たな時間d
=T/m=T/32だけ経過した時点x=b+dが計算
され、次のステップS1005で、補間値f(x)が算
出される。そして、ステップS1006の判定の後、ス
テップS1007で、補間値f(x)の符号が判定され
る。
In the case of FIG. 8, the sample value SMP (LS
IP) and f (x) have the same sign, and in this case, the zero cross position exists at a time point after the time point x. In this case, as in the case of FIG.
At 08, as shown in FIG.
Is the time d = from the original base time LSIP · T + T / 2
LSIP · T + T / 2 + T /
Moved to 16. Thereafter, in step S1009, the value 16 of the variable m is doubled to a value 32, and in step S1003, the time d is reset to a new time T / m. In FIG. 9, the time d is reset from the original time T / 16 to a time T / 32 corresponding to a half thereof. Then, in step S1004, a new time d from the base time point b = LSIP · T + T / 2 + T / 16
= T / m = T / 32, x = b + d is calculated, and in the next step S1005, an interpolation value f (x) is calculated. After the determination in step S1006, the sign of the interpolation value f (x) is determined in step S1007.

【0059】以上のように、順次ベース時点bが移動さ
れ、それに加えられる時間dが小さくされてゆくと、次
第に波形信号の補間値f(x)が減少し、最終的に、コ
ンピュータの計算精度上の“0”にほぼ等しくなり、ス
テップS1006の判定がYESとなる。このときの時
点xが、ループスタート初期ポイントLSIPの直後の
ゼロクロス位置の時点となる。
As described above, as the base time point b is sequentially shifted and the time d added thereto is reduced, the interpolation value f (x) of the waveform signal gradually decreases, and finally, the calculation accuracy of the computer is reduced. It becomes almost equal to the above “0”, and the determination in step S1006 becomes YES. The time point x at this time is the time point of the zero cross position immediately after the loop start initial point LSIP.

【0060】従って、ループスタート初期ポイントLS
IPからその直後のゼロクロス位置までの時間Δt
LSは、ステップS1010において、ΔtLS=x−LS
IP・Tとして求めることができる。
Therefore, the loop start initial point LS
Time Δt from IP to zero cross position immediately after IP
In step S1010, LS determines that Δt LS = x−LS
It can be obtained as IP · T.

【0061】以上、ループスタート初期ポイントLSI
Pからその直後のゼロクロス位置までの時間ΔtLSを算
出するための図10の動作フローチャートで示される図
3のステップS304の動作において、時点xにおける
補間値f(x)を算出するための図10のステップS1
005の演算について説明する。
As described above, the loop start initial point LSI
FIG. 10 for calculating an interpolation value f (x) at time point x in the operation of step S304 in FIG. 3 shown in the operation flowchart of FIG. 10 for calculating the time Δt LS from P to the zero-cross position immediately thereafter. Step S1
The calculation of 005 will be described.

【0062】補間値f(x)は、次の数3式で示される
ラグランジュの補間公式を用いて演算される。
The interpolation value f (x) is calculated using Lagrange's interpolation formula expressed by the following equation (3).

【0063】[0063]

【数3】 (Equation 3)

【0064】以下にラグランジュの補間公式について説
明する。図11は、ラグランジュの補間公式の基礎とな
る直線補間を示したもので、原波形f=f(x)のサン
プリングポイント時点x0 及びx1 と、それぞれのサン
プル値f(x0 )及びf(x1 )とから、2点を通る直
線(1次式)の式が得られ、その直線の式にxを代入す
ることにより、時点xにおける補間値f(x)が算出さ
れる。
The Lagrange interpolation formula will be described below. Figure 11 shows the linear interpolation to be interpolated official basis Lagrange, original waveform f = the sampling point when x 0 and x 1 of f (x), each sample value f (x 0) and f From (x 1 ), an equation of a straight line (primary equation) passing through two points is obtained, and by substituting x into the equation of the straight line, the interpolation value f (x) at the time point x is calculated.

【0065】それに対して、図12のように、原波形f
=f(x)上のサンプリングポイント時点x0 、x1
及びx2 と、それぞれのサンプル値f(x0 )、f(x
1 )、及びf(x2 )とから、図12の細線で示される
2次曲線の式が得られ、その式にxを代入することによ
り、前述の直線補間に比べてより原波形に忠実な時点x
における補間値f(x)が算出される。
On the other hand, as shown in FIG.
= Sampling point times x 0 , x 1 on f (x),
And a x 2, each of the sample values f (x 0), f ( x
1 ) and f (x 2 ), an equation of a quadratic curve shown by a thin line in FIG. 12 is obtained, and by substituting x into the equation, the original waveform can be more faithfully compared to the above-described linear interpolation. Time x
Is calculated.

【0066】以上のように、原波形上のサンプル値を2
点、3点、4点、・・・、n点と増やしていけば、更に
精度の高い補間データが得られる。ラグランジュの補間
公式は、このような考え方に基づいて導き出されたn点
のサンプル値を用いた場合の補間公式で、上述した数3
式で示される。
As described above, the sample value on the original waveform is
If the number of points is increased to three, four,..., N, interpolation data with higher accuracy can be obtained. Lagrange's interpolation formula is an interpolation formula using sample values of n points derived based on such a concept.
It is shown by the formula.

【0067】数3式において、xが求める補間位置で、
f(x)が求めるべき補間値である。また、x0
1 、・・・、xn は、原波形のサンプリングポイント
時点であり、f(x0 )、f(x1 )、・・・、f(x
n )は各サンプリングポイント時点におけるサンプル値
を示す。この式で、n=1とおくと、同式は直線補間の
式となる。即ち、直線補間は2点ラグランジュ補間とい
える。
In the equation (3), x is an interpolation position to be obtained.
f (x) is an interpolation value to be obtained. X 0 ,
x 1 ,..., x n are the sampling points of the original waveform, and f (x 0 ), f (x 1 ),.
n ) indicates the sample value at each sampling point. If n = 1 is set in this equation, the equation becomes a linear interpolation equation. That is, linear interpolation can be said to be two-point Lagrange interpolation.

【0068】図13には、前述した図10のステップS
1005において、時点xにおける補間値f(x)が算
出される場合に、上述の数3式でn=15とした場合
に、サンプリングポイント時点x0 、x1 、・・・、x
15と、サンプル値f(x0 )、f(x1 )、・・・、f
(x15)に対して代入されるべき値が示されている。
FIG. 13 shows step S in FIG.
In 1005, when the interpolation value f (x) at the time point x is calculated, and when n = 15 in the above equation 3, the sampling point time points x 0 , x 1 ,.
15 and sample values f (x 0 ), f (x 1 ),.
The value to be substituted for (x 15 ) is shown.

【0069】まず、サンプリングポイント時点x7 にル
ープスタート初期ポイントLSIPの時点LSIP・T
が代入され、また、x7 から7点前のx0 から、x7
ら8点後にあるx15までの16点に対し、各サンプリン
グポイント時点(LSIP−7)・Tから(LSIP+
8)・Tまでが、それぞれ代入される。
[0069] First of all, the time LSIP · T of the loop start initial point LSIP to the sampling point point x 7
There is assigned, also from x 0 from x 7 7 temae, to 16 points to x 15 in the x 7 after eight points, each sampling point time (LSIP-7) from · T (LSIP +
8) Up to T are substituted.

【0070】次に、サンプル値f(x0 )〜f(x15
には、各サンプリングポイント(LSIP−7)、(L
SIP−6)、・・・、(LSIP+8)におけるそれ
ぞれのサンプル値SMP(LSIP−7)、SMP(L
SIP−6)、・・・SMP(LSIP+8)が代入さ
れる。なお、マイナスの値となるサンプリングポイント
時点に対応するサンプル値には0が代入される。
Next, the sample values f (x 0 ) to f (x 15 )
Are the sampling points (LSIP-7), (L
, (LSIP + 8), SMP (LSIP-7), SMP (L
SIP-6),... SMP (LSIP + 8) are substituted. Note that 0 is substituted for the sample value corresponding to the sampling point at which the value becomes a negative value.

【0071】このようにして数3式が計算され、図10
のステップS1004で得られた時点xにおける補間値
f(x)が求められる。以上のようにして、図3のステ
ップS304において、図4(a) に示されるように、ル
ープスタート初期ポイントLSIPからその直後のゼロ
クロス位置までの時間ΔtLSが算出される。
Equation 3 is calculated as described above, and FIG.
The interpolation value f (x) at the time point x obtained in step S1004 is obtained. As described above, in step S304 of FIG. 3, as shown in FIG. 4A, the time Δt LS from the loop start initial point LSIP to the immediately succeeding zero-cross position is calculated.

【0072】次に、図3のステップS305において、
図4(b) に示されるように、RAM204に記憶されて
いる1発音単位分のPCM楽音波形データAについて、
全サンプリングポイントの時点が、上述の時間ΔtLS
け遅らせられる方向にシフトされ、その結果、図4(b)
のBで示されるような波形データが得られる。
Next, in step S305 in FIG.
As shown in FIG. 4B, with respect to the PCM musical tone waveform data A for one sounding unit stored in the RAM 204,
The time points of all sampling points are shifted in a direction delayed by the above-mentioned time Δt LS, and as a result, FIG.
Waveform data as shown by B in FIG.

【0073】上述の図3のステップS305の処理につ
いて、図14の動作フローチャートを用いて更に詳細に
説明する。まず、ステップS1401において、各サン
プリングポイントが波形データの先頭から何番目である
かを表すサンプリングポイントkが0に初期設定され
る。このポイントkは、RAM204に変数として記憶
される。
The processing in step S305 in FIG. 3 will be described in more detail with reference to the operation flowchart in FIG. First, in step S1401, a sampling point k indicating the number of each sampling point from the beginning of the waveform data is initialized to zero. This point k is stored in the RAM 204 as a variable.

【0074】次に、PCM楽音波形データにおいて、サ
ンプリングポインkの時点kTから時間ΔtLSだけ遅
れた時点の補間値が、前述の数3式のラグランジュの補
間公式に基づきf(kT+ΔtLS)として算出され、そ
の補間値f(kT+ΔtLS)がサンプリングポイントk
の新たなサンプル値SMT’(k)としてRAM204
に記憶される。
Next, the PCM tone waveform data, the interpolation value at the time delayed by a time Delta] t LS from time kT of the sampling point k is, as f (kT + Δt LS) based officially interpolation Lagrange equation (3) described above Is calculated, and the interpolation value f (kT + Δt LS ) is calculated at the sampling point k.
RAM 204 as a new sample value SMT ′ (k)
Is stored.

【0075】図15には、上述の補間値f(kT+Δt
LS)が算出される場合に、前述した数3式でn=15と
した場合に、サンプリングポイント時点x0 、x1 、・
・・、x15と、サンプル値f(x0 )、f(x1 )、・
・・、f(x15)に対して代入されるべき値が示されて
いる。
FIG. 15 shows the interpolation value f (kT + Δt)
LS ) is calculated, and when n = 15 in the above equation (3), sampling point times x 0 , x 1 ,.
..., and x 15, the sample value f (x 0), f ( x 1), ·
.., The values to be substituted for f (x 15 ) are shown.

【0076】まず、サンプリングポイント時点x7 にサ
ンプリングポイントkの時点kTが代入され、また、x
7 から7点前のx0 から、x7 から8点後にあるx15
での16点に対し、各サンプリングポイント時点(k−
7)・Tから(k+8)・Tまでが、それぞれ代入され
る。
First, the time point kT of the sampling point k is substituted for the sampling point time point x 7 , and x
For 16 points from x 0 7 points before 7 to x 15 8 points after x 7 , each sampling point time point (k−
7) · T to (k + 8) · T are respectively substituted.

【0077】次に、サンプル値f(x0 )〜f(x15
には、各サンプリングポイント(k−7)、(k−
6)、・・・、(k+8)における、RAM204に記
憶されている元のPCM楽音波形データのそれぞれのサ
ンプル値SMP(k−7)、SMP(k−6)、・・・
SMP(k+8)が代入される。なお、マイナスの値と
なるサンプリングポイント時点に対応するサンプル値に
は0が代入される。
Next, the sample values f (x 0 ) to f (x 15 )
Has sampling points (k-7), (k-
6),..., (K + 8), sample values SMP (k−7), SMP (k−6),... Of the original PCM musical tone waveform data stored in the RAM 204.
SMP (k + 8) is substituted. Note that 0 is substituted for the sample value corresponding to the sampling point at which the value becomes a negative value.

【0078】このようにして数3式が計算され、補間値
f(kT+ΔtLS)が算出され、新たなサンプル値SM
P′(k)とされる。続いて、ステップS1403にお
いて、サンプリングポイントkの値が1つ進められ、次
のステップS1404で、そのkの値が、RAM204
に記憶されている元のPCM楽音波形データの最終のサ
ンプリングポイントである波形エンドポイントWEPを
超えたか否かが判定される。
Equation 3 is calculated in this way, an interpolation value f (kT + Δt LS ) is calculated, and a new sample value SM is calculated.
P ′ (k). Subsequently, in step S1403, the value of the sampling point k is advanced by one, and in the next step S1404, the value of the k is stored in the RAM 204.
Is determined to have exceeded the waveform end point WEP, which is the last sampling point of the original PCM musical tone waveform data stored in.

【0079】その判定がNOであるならば、ステップS
1402に戻り、新たなサンプリングポイントkの時点
kTから時間ΔtLSだけ遅れた時点の補間値が、前述し
た数3式のラグランジュの補間公式に基づきf(kT+
ΔtLS)として算出され、その補間値f(kT+Δ
LS)がサンプリングポイントkの新たなサンプル値S
MP′(k)としてRAM204に記憶される。
If the determination is NO, step S
Returning to 1402, the interpolation value at the time point delayed by the time Δt LS from the time point kT of the new sampling point k is calculated as f (kT +
Δt LS ), and the interpolation value f (kT + Δ)
t LS ) is the new sample value S at sampling point k
It is stored in the RAM 204 as MP ′ (k).

【0080】サンプリングポイントkが波形エンドポイ
ントWEPを超えたら、処理が終了する。以上の処理で
示される図3のステップS305において、RAM20
4に記憶されている1発音単位分のPCM楽音波形デー
タについて、全サンプリングポイントの時点が時間Δt
LSだけ遅らせられる方向にシフトされる。
When the sampling point k exceeds the waveform end point WEP, the processing ends. In step S305 of FIG.
Of the PCM musical tone waveform data for one sounding unit stored in No.4, the time points of all sampling points correspond to the time Δt.
Shifted in the direction delayed by LS .

【0081】上述した図3のステップS305の処理の
結果、図4(b) のBとして示されるように、ΔtLSの時
間だけ遅らせられる方向にシフトされた波形データにお
いては、元のループスタート初期ポイントLSIPに対
応するサンプリングポイントは、楽音波形のゼロクロス
位置に正確に一致する。
As a result of the processing in step S305 in FIG. 3 described above, as shown by B in FIG. 4B, in the waveform data shifted in the direction delayed by the time Δt LS , the initial loop start The sampling point corresponding to the point LSIP exactly matches the zero-cross position of the musical sound waveform.

【0082】一方、元のPCM楽音波形データにおいて
は、ループエンド初期ポイントLEIPは波形のゼロク
ロス位置の直前のサンプリングポイントであったが、Δ
LSの時間だけ遅れる方向に波形シフトされて得られる
新たな波形データにおいては、ループエンド初期ポイン
トLEIPに対応するサンプリングポイントが波形のゼ
ロクロス位置の直後にずれてしまう可能性がある。即
ち、ΔtLSは、元の楽音波形データがA/D変換された
ときのサンプリング周期Tより短い時間であり、また、
元の楽音波形上でのループエンド初期ポイントLEIP
とその直後のゼロクロス位置との時間差もサンプリング
周期Tより短い時間である。従って、両者の大小関係に
よって、ΔtLSの時間だけ遅れる方向に波形シフトされ
て得られる新たな波形データにおいては、ループエンド
初期ポイントLEIPに対応するサンプリングポイント
は、波形のゼロクロス位置の直前にとどまるか、直後に
移動するかのどちらかになる。
On the other hand, in the original PCM tone waveform data, the loop end initial point LEIP was the sampling point immediately before the zero cross position of the waveform, but Δ
In new waveform data obtained by shifting the waveform in the direction delayed by the time t LS , the sampling point corresponding to the loop end initial point LEIP may be shifted immediately after the zero-cross position of the waveform. That is, Δt LS is a time shorter than the sampling period T when the original tone waveform data is A / D converted, and
Loop end initial point LEIP on original tone waveform
Is also shorter than the sampling period T. Therefore, in the new waveform data obtained by shifting the waveform in the direction delayed by the time Δt LS according to the magnitude relationship between the two, the sampling point corresponding to the loop end initial point LEIP remains immediately before the zero-cross position of the waveform. , Or just move right after.

【0083】そこで、図3のステップS306におい
て、波形シフトされて得られる新たな楽音波形上でのル
ープ区間の末尾のゼロクロス位置の直前のサンプリング
ポイントを、補正されたループエンド初期ポイントLE
IP′として求め直す補正処理が実行される。
Therefore, in step S306 of FIG. 3, the sampling point immediately before the zero-cross position at the end of the loop section on the new musical tone waveform obtained by shifting the waveform is changed to the corrected loop end initial point LE.
Correction processing for re-determining as IP 'is executed.

【0084】今、元の楽音波形データ上におけるループ
エンド初期ポイントLEIPのサンプル値SMP(LE
IP)の符号と、波形シフトされて得られる新たな楽音
波形データ上における元のループエンド初期ポイントL
EIPに対応するサンプリングポイントのサンプル値S
MP′(LEIP)の符号がそれぞれ判別される。
Now, the sample value SMP (LE) of the loop end initial point LEIP on the original musical sound waveform data
IP) and the original loop end initial point L on new tone waveform data obtained by shifting the waveform.
Sample value S of sampling point corresponding to EIP
The sign of MP '(LEIP) is determined.

【0085】そして、これらの符号が同じであれば、波
形シフトされて得られる新たな楽音波形データ上におい
て、元のループエンド初期ポイントLEIPに対応する
サンプリングポイントは波形のゼロクロス位置の直前に
とどまっているため、LEIPがそのまま補正されたル
ープエンド初期ポイントLEIP′とされる。
If these codes are the same, the sampling point corresponding to the original loop end initial point LEIP on the new musical tone waveform data obtained by shifting the waveform remains immediately before the zero-cross position of the waveform. Therefore, the LEIP is directly used as the corrected loop end initial point LEIP ′.

【0086】一方、上記2つの符号が異なれば、波形シ
フトされて得られる新たな楽音波形データ上において、
元のループエンド初期ポイントLEIPに対応するサン
プリングポイントは波形のゼロクロス位置の直後にずれ
ているため、元のループエンド初期ポイントLEIPに
対応するサンプリングポイントの1つ手前のサンプリン
グポイント(LEIP−1)が、補正されたループエン
ド初期ポイントLEIP′とされる。
On the other hand, if the two codes are different, new tone waveform data obtained by shifting the waveform
Since the sampling point corresponding to the original loop end initial point LEIP is shifted immediately after the zero-cross position of the waveform, the sampling point (LEIP-1) immediately before the sampling point corresponding to the original loop end initial point LEIP is , The corrected loop end initial point LEIP ′.

【0087】以上のようにして、補正されたループエン
ド初期ポイントLEIP′が新たに求められる。次に、
図3のステップS307においては、図4(b) に示され
るように、補正後のループエンド初期ポイントLEI
P′からその直後のゼロクロス位置までの時間ΔtLE
算出される。
As described above, a corrected loop end initial point LEIP 'is newly obtained. next,
In step S307 in FIG. 3, as shown in FIG. 4B, the corrected loop end initial point LEI
The time Δt LE from P ′ to the zero cross position immediately after P ′ is calculated.

【0088】上述の時間ΔtLEの算出処理は、図10の
動作フローチャートで示されるステップS304におけ
るループスタート初期ポイントLSIPからその直後の
ゼロクロス位置までの時間ΔtLSの算出処理と同じであ
る。ただし、図10のステップS1001のループスタ
ート初期ポイントLSIPが、ループエンド初期ポイン
トLEIPに置き換えられる。また、ステップS100
7のLSIPにおける元の楽音波形データのサンプル値
SMP(LSIP)が、LEIPにおける波形シフトさ
れた波形データのサンプル値SMP′(LEIP)に、
また、ステップS1010のΔtLSがΔtLEに置き換え
られる。
The process of calculating the time Δt LE described above is the same as the process of calculating the time Δt LS from the loop start initial point LSIP to the zero cross position immediately after that in step S304 shown in the operation flowchart of FIG. However, the loop start initial point LSIP in step S1001 in FIG. 10 is replaced with a loop end initial point LEIP. Step S100
7, the sample value SMP (LSIP) of the original musical sound waveform data in the LSIP of FIG. 7 is replaced with the sample value SMP ′ (LEIP) of the waveform-shifted waveform data in the LEIP.
Further, Δt LS in step S1010 is replaced with Δt LE .

【0089】上述の図3のステップS307の処理によ
って時間ΔtLEが算出されたら、次に、図3のステップ
S308で、ループスタート時点(ループスタートタイ
ム)LSTとループエンド時点(ループエンドタイム)
LETの計算が行われる。ループスタート時点LSTと
は波形データのループ区間の先頭のゼロクロス位置をい
い、ループエンド時点LETとは波形データのループ区
間の末尾のゼロクロス位置をいう。
After the time Δt LE is calculated by the above-described processing in step S307 in FIG. 3, next, in step S308 in FIG. 3, the loop start time (loop start time) LST and the loop end time (loop end time)
The calculation of LET is performed. The loop start time LST refers to the zero cross position at the beginning of the loop section of the waveform data, and the loop end time LET refers to the zero cross position at the end of the loop section of the waveform data.

【0090】ここで、ループスタート時点LSTは、図
16の上段に示されるように、図3のステップS305
の波形シフト処理によってRAM204に新たに得られ
た波形データにおける元のループスタート初期ポイント
LSIPに対応するサンプリングポイントの時点に一致
している。即ち、ループスタート時点LSTは、次式に
よって求めることができる。
Here, the loop start time LST is, as shown in the upper part of FIG. 16, the step S305 in FIG.
At the sampling point corresponding to the original loop start initial point LSIP in the waveform data newly obtained in the RAM 204 by the waveform shift processing. That is, the loop start time LST can be obtained by the following equation.

【0091】[0091]

【数4】 (Equation 4)

【0092】である。但し、Tは、元の波形データがA
/D変換されたときのサンプリング周期である。一方、
ループエンド時点LETは、図16の上段に示されるよ
うに、図3のステップS306で求められた補正後のル
ープエンド初期ポイントLEIP′の時点に時間ΔtLE
を加算した時点に等しい。即ち、ループエンド時点LE
Tは、次式によって求めることができる。
Is as follows. However, T means that the original waveform data is A
This is a sampling cycle when the / D conversion is performed. on the other hand,
As shown in the upper part of FIG. 16, the loop end time LET is a time Δt LE at the time of the corrected loop end initial point LEIP ′ obtained in step S306 of FIG.
Is equal to the time when That is, the loop end time LE
T can be obtained by the following equation.

【0093】[0093]

【数5】 (Equation 5)

【0094】上述した数4式と数5式によって、図3の
ステップS308において、ループスタート時点LST
とループエンド時点LETが算出された後、図3のステ
ップS309で、前述した<本発明の第1の動作原理>
の数2式に対応する次式によって、LSTとLETをサ
ンプリングポイントとして含むリサンプリングを行うた
めのサンプリング周期T′が算出される。
According to the above equations (4) and (5), in step S308 in FIG.
And the loop end time LET is calculated, and in step S309 of FIG. 3, the first operation principle of the present invention is described above.
A sampling period T ′ for performing resampling including LST and LET as sampling points is calculated by the following equation corresponding to the equation (2).

【0095】[0095]

【数6】 (Equation 6)

【0096】ここで、Mは、<本発明の第1の動作原理
>で前述したように、基準音高(例えばA4)を有する
楽音がサンプリング周期Tでサンプリングされる場合の
その楽音の1基本周期あたりのサンプリングポイント数
であり、前述したように、ループ波形データの生成処理
開始時に数1式に基づいて演算され、図2のRAM20
4に予め記憶されている。例えばA4の音高を有する楽
音がサンプリング周期T=1/5304〔秒〕でサンプ
リングされる場合には、前述したようにM=12であ
る。
Here, M is one basic tone of a tone having a reference pitch (for example, A4) when the tone is sampled at the sampling period T, as described in <First principle of operation of the present invention>. This is the number of sampling points per cycle, and is calculated based on Equation 1 at the start of the loop waveform data generation process, as described above.
4 is stored in advance. For example, when a musical tone having a pitch of A4 is sampled at a sampling period T = 1/5304 [sec], M = 12 as described above.

【0097】続く、図3のステップS310において、
上述の数6式に基づいて算出されるサンプリング周期
T′で、ループスタート時点LSTからループエンド時
点LETまでのループ区間が、その先頭のゼロクロス位
置とその末尾のゼロクロス位置がサンプリングポイント
として含まれるようにリサンプリングされるこの結果、
ループ区間の両端のゼロクロス位置のサンプリングポイ
ントが含まれM+1サンプルからなるループ波形データ
が生成され、その開始ポイントであるループスタートポ
イントとその終了ポイントであるループエンドポイント
は、波形の先頭のゼロクロス位置と末尾のゼロクロス位
置に正確に一致する。このようにして生成されたM+1
サンプル分のループ波形データのうち、ループ区間の先
頭のゼロクロス位置のサンプリングポイントから、ルー
プ区間の末尾のゼロクロス位置のサンプリングポイント
の1サンプル手前のサンプリングポイントまでのMサン
プルからなるループ波形データをサンプリング周期Tで
ループ再生することにより、ループノイズを含まず、か
つ、基準音高に正確に一致した楽音を得ることができる
わけである。
Subsequently, in step S310 in FIG.
In the sampling period T ′ calculated based on the above equation 6, the loop section from the loop start point LST to the loop end point LET includes the leading zero-cross position and the trailing zero-cross position as sampling points. As a result,
Loop waveform data consisting of M + 1 samples including the sampling points of the zero cross positions at both ends of the loop section is generated. The loop start point as the start point and the loop end point as the end point are defined as the zero cross position at the beginning of the waveform. Exactly matches the trailing zero-cross position. M + 1 generated in this way
Of the loop waveform data for the sample, the loop period of the loop waveform data consisting of M samples from the sampling point at the leading zero-cross position of the loop section to the sampling point one sample before the sampling point at the zero-cross position at the end of the loop section is sampled. By performing loop reproduction at T, it is possible to obtain a musical tone that does not include loop noise and that exactly matches the reference pitch.

【0098】但し、本発明の実施例では、ループ区間を
ループ再生する前にアタック音区間の再生を可能とし、
更には必要に応じて、ループ区間をループ再生した後に
例えばリリース区間の再生をも可能とするために、RA
M204に記憶されている前述した波形シフトされた波
形データのうち、ループ区間だけでなく、波形データ全
体がリサンプリングされる。
However, in the embodiment of the present invention, it is possible to reproduce the attack sound section before the loop reproduction of the loop section,
Further, if necessary, for example, to enable reproduction of a release section after loop reproduction of the loop section,
Of the above-mentioned waveform-shifted waveform data stored in M204, not only the loop section but also the entire waveform data is resampled.

【0099】この場合、波形データ全体をその波形の先
頭からサンプリング周期T′でリサンプリングすると、
通常、図16のループスタート時点LSTはサンプリン
グポイントと一致しない。これは、波形データの先頭か
らループスタート時点LSTまでの時間が、必ずしもサ
ンプリング周期T′で割り切れるとは限らないからであ
る。
In this case, when the entire waveform data is resampled at the sampling period T 'from the beginning of the waveform,
Normally, the loop start time LST in FIG. 16 does not coincide with the sampling point. This is because the time from the beginning of the waveform data to the loop start time LST is not always divisible by the sampling period T '.

【0100】そこで、ループスタート時点LSTをサン
プリングポイントと一致させるために、波形データ全体
がリサンプリングされる際に、リサンプリングが開始さ
れる時点が、その波形データの先頭のサンプリングポイ
ントの時点から所定時間だけずらされる。
Therefore, in order to match the loop start time LST with the sampling point, when the entire waveform data is resampled, the time at which resampling is started is determined by a predetermined time from the time of the first sampling point of the waveform data. Staggered by time.

【0101】このような処理を含む図3のステップS3
10のリサンプリング処理を図17の詳細動作フローチ
ャートに沿って説明する。まず、ステップS1701に
おいて、各サンプリングポイントが波形データの先頭か
ら何番目であるかを表すサンプリングポイントkが0に
初期設定される。このポイントkは、RAM204に変
数として記憶される。
Step S3 of FIG. 3 including such processing
The resampling process of No. 10 will be described with reference to the detailed operation flowchart of FIG. First, in step S1701, a sampling point k indicating the number of each sampling point from the beginning of the waveform data is initialized to zero. This point k is stored in the RAM 204 as a variable.

【0102】ステップS1702では、リサンプリング
が開始される時点の初期値iが演算される。この初期値
iは、ループスタート時点の時間値LSTから、その時
間値LSTをサンプリング周期T′で割った値の整数部
分INT(LST/T′)を減算して得られた時間値に
等しい。即ち、初期値iは次式により算出される。
In step S1702, an initial value i at the time when resampling is started is calculated. This initial value i is equal to the time value obtained by subtracting the integer part INT (LST / T ') of the time value LST divided by the sampling period T' from the time value LST at the time of the loop start. That is, the initial value i is calculated by the following equation.

【0103】[0103]

【数7】 (Equation 7)

【0104】続くステップS1703〜S1707の処
理の繰返しでは、上述した初期値iから始まりサンプリ
ング周期T′ずつ進む各時点の波形値が前述した数3式
のラグランジュの補間公式に基づいて演算され、それが
順次サンプリング値とされることによって、リサンプリ
ング処理が実行される。
In the subsequent repetition of the processing in steps S1703 to S1707, the waveform values at each time point starting from the initial value i and proceeding by the sampling period T 'are calculated based on the Lagrangian interpolation formula of the above equation (3). Are sequentially taken as sampling values, whereby a resampling process is executed.

【0105】図17のステップS1703〜S1707
の処理を、図18〜図20の説明図を用いながら説明す
る。始めに、図18(a) に示されるように、例えばサン
プリング周期T=3とすると、RAM204に既に記憶
されている波形シフトされた波形データにおいて、各サ
ンプリングポイント0、1、2、・・・、6、・・・に
対応する各サンプル値SMP′(0)、SMP′
(1)、SMP′(2)、・・・、SMP′(6)、・
・・は、Tの間隔で位置する各サンプリング時点x=
0、3、6、・・・、18、・・・に存在する。
Steps S1703 to S1707 in FIG.
Will be described with reference to the explanatory diagrams of FIGS. First, as shown in FIG. 18A, for example, assuming that the sampling cycle T = 3, in the waveform-shifted waveform data already stored in the RAM 204, each sampling point 0, 1, 2,. , 6,... Corresponding to the sample values SMP '(0), SMP'
(1), SMP '(2), ..., SMP' (6), ...
.. Indicates that each sampling time point x =
0, 3, 6,..., 18,.

【0106】そして、図18(b) に示されるように、例
えばサンプリング周期T′=4とすると、サンプリング
時点0からずれた例えば時点1から始まり、T′の間隔
で位置する各サンプリング時点i=1、5、9、13、
17、・・・においてリサンプリングが行われ、各サン
プリング時点に対応する各サンプリングポイントk=
0、1、2、3、4、・・・について、新たなサンプル
値OUT(k)=OUT(0)、OUT(1)、OUT
(2)、OUT(3)、OUT(4)、・・・が算出さ
れる。
Then, as shown in FIG. 18 (b), for example, assuming that the sampling period T '= 4, each sampling time i = 4 starts at a time 1 shifted from the sampling time 0 and is located at an interval of T'. 1, 5, 9, 13,
17, resampling is performed, and each sampling point k =
New sample values OUT (k) = OUT (0), OUT (1), OUT for 0, 1, 2, 3, 4,.
(2), OUT (3), OUT (4),... Are calculated.

【0107】このとき、T′の間隔で位置する各サンプ
リング時点iに対応するサンプリングポイントkのサン
プル値OUT(k)は、サンプリング時点iを含んでそ
の前後8点、計16点のサンプリング周期Tの間隔で位
置するサンプリング時点xに対応するサンプリングポイ
ントにおけるRAM204内の波形データのサンプル値
を用いて、前述の数3式のラグランジュの補間公式に基
づいて算出される。
At this time, the sampling value OUT (k) of the sampling point k corresponding to each sampling time point i located at the interval of T 'includes the sampling point T including the sampling time point i and eight points before and after the sampling point i, for a total of 16 points. Using the sample values of the waveform data in the RAM 204 at the sampling point corresponding to the sampling time point x located at the interval of, the calculation is performed based on the Lagrangian interpolation formula of the above equation (3).

【0108】ここで、図19に示されるように、前述し
たTの間隔で位置するサンプリング時点xのうち、T′
の間隔で位置する各サンプリング時点iの直前のサンプ
リング時点に対応するサンプリングポイントjは、次式
で示されるように、サンプリング時点iを元のサンプリ
ング周期Tで割った値の整数部分INT(i/T)に等
しい。
Here, as shown in FIG. 19, of the sampling times x located at the above-mentioned interval T, T ′
The sampling point j corresponding to the sampling time point immediately before each sampling time point i located at the interval of is represented by an integer part INT (i / i / () obtained by dividing the sampling time point i by the original sampling period T, as shown in the following equation. T).

【0109】[0109]

【数8】 (Equation 8)

【0110】例えば、図18において、例えばi=13
ならばj=4と算出される。従って、サンプリング時点
i=13の直前のサンプリングポイントはj=4とな
り、それに対応するサンプリング時点xはx=j・T=
4×3=12となり、また、サンプリングポイントj=
4に対応してRAM204に記憶されている波形データ
のサンプル値はSMP′(4)となる。
For example, in FIG. 18, for example, i = 13
Then, j = 4 is calculated. Therefore, the sampling point immediately before the sampling point i = 13 is j = 4, and the corresponding sampling point x is x = j · T =
4 × 3 = 12, and the sampling point j =
The sample value of the waveform data stored in the RAM 204 corresponding to No. 4 is SMP '(4).

【0111】上述したサンプリングポイントjは、図1
7のステップS1703で演算される。次に、後述する
図17のステップS1704の判定の後、図17のステ
ップS1705において、図19に示されるように、サ
ンプリング時点iに対応する補間値が前述した数3式の
ラグランジュの補間公式に基づいてf(i)として算出
され、それがサンプリングポイントkの新たなサンプル
値OUT(k)としてRAM204に記憶される。
The sampling point j described above corresponds to FIG.
7 is calculated in step S1703. Next, after the determination in step S1704 in FIG. 17 described later, in step S1705 in FIG. 17, as shown in FIG. 19, the interpolation value corresponding to the sampling time i is calculated by the Lagrange interpolation formula of the above-described equation (3). F (i), which is stored in the RAM 204 as a new sample value OUT (k) at the sampling point k.

【0112】図20には、補間値f(i)が算出される
場合に、前述した数3式でn=15とした場合に、サン
プリングポイント時点x0 、x1 、・・・、x15と、サ
ンプル値f(x0 )、f(x1 )、・・・、f(x15
に対して代入されるべき値が示されている。
[0112] Figure 20, when the interpolated value f (i) is calculated, when the n = 15 in Equation 3 described above, the sampling point point x 0, x 1, ···, x 15 And sample values f (x 0 ), f (x 1 ),..., F (x 15 )
The values to be assigned to are shown.

【0113】まず、サンプリングポイント時点x7 にサ
ンプリングポイントjの時点j・Tが代入され、また、
7 から7点前のx0 から、x7 から8点後にあるx15
までの16点に対し、各サンプリングポイント時点(j
−7)・Tから(j+8)・Tまでが、それぞれ代入さ
れる。
First, the time point j · T of the sampling point j is substituted for the sampling point time point x 7 , and
From x 0 from x 7 7 temae, x 15 to from x 7 after 8 points
For each of the 16 points up to the point of each sampling point (j
−7) · T to (j + 8) · T are substituted.

【0114】次に、サンプル値f(x0 )〜f(x15
には、各サンプリングポイント(j−7)、(j−
6)、・・・、(j+8)における、RAM204に記
憶されている波形シフトされた波形データのそれぞれの
サンプル値SMP′(j−7)、SMP′(j−6)、
・・・SMP′(j+8)が代入される。なお、マイナ
スの値となるサンプリングポイント時点に対応するサン
プル値には0が代入される。
Next, the sample values f (x 0 ) to f (x 15 )
Has sampling points (j-7), (j-
6),..., (J + 8), sample values SMP ′ (j−7), SMP ′ (j−6) of the waveform-shifted waveform data stored in the RAM 204.
... SMP '(j + 8) is substituted. Note that 0 is substituted for the sample value corresponding to the sampling point at which the value becomes a negative value.

【0115】このようにして図17のステップS170
5において、1つのサンプリング時点iに対応する1つ
のサンプリングポイントkの新たなサンプル値OUT
(k)が求まった後、図17のステップS1706で
は、サンプリングポイントkが1つ進められ、ステップ
S1707では、サンプリング時点iがサンプリング周
期T′だけ進められる。
Thus, step S170 in FIG.
5, a new sample value OUT of one sampling point k corresponding to one sampling time i
After (k) is obtained, in step S1706 of FIG. 17, the sampling point k is advanced by one, and in step S1707, the sampling point i is advanced by the sampling period T '.

【0116】その後、ステップS1703に戻り、ここ
で、新たなサンプリング時点iの直前のサンプリング時
点に対応するサンプリングポイントjが算出される。そ
して、ステップS1704において、そのjの値が、R
AM204に記憶されている波形シフトされた波形デー
タの最終のサンプリングポイントである波形エンドポイ
ントWEPを超えたか否かが判定される。
Thereafter, the flow returns to step S1703, where the sampling point j corresponding to the sampling point immediately before the new sampling point i is calculated. Then, in step S1704, the value of j is R
It is determined whether or not a waveform end point WEP which is a final sampling point of the waveform-shifted waveform data stored in the AM 204 has been exceeded.

【0117】その判定がNOなら、ステップS1705
で新たなサンプリング時点iに対応する新たなサンプル
値OUT(k)が算出され、上述の判定がYESとなっ
た時点で、図3のステップS310のリサンプリング処
理を終了する。
If the determination is NO, step S1705
Then, a new sample value OUT (k) corresponding to a new sampling time point i is calculated, and when the above determination is YES, the resampling process of step S310 in FIG. 3 is ended.

【0118】以上のリサンプリング処理によって、図1
6に示されるように、ループ区間の両端のゼロクロス位
置のサンプリングポイントが含まれM+1サンプルから
なるループ波形データを含む波形データが生成され、ル
ープ区間の開始ポイントであるループスタートポイント
LSPとその終了ポイントであるループエンドポイント
LEPは、ループ区間の先頭のゼロクロス位置であるル
ープスタート時点LSTと末尾のゼロクロス位置である
ループエンド時点LETに正確に一致する。
By the resampling process described above, FIG.
As shown in FIG. 6, waveform data including loop waveform data including M + 1 samples including sampling points at the zero cross positions at both ends of the loop section is generated, and a loop start point LSP which is a start point of the loop section and an end point thereof. Is exactly the same as the loop start time LST, which is the beginning zero cross position of the loop section, and the loop end time LET, which is the end zero cross position.

【0119】最後、図3のステップS311では、上述
のループスタートポイントLSPとループエンドポイン
トLEPは、ステップS310でのリサンプリング処理
によってRAM204に得られた波形データOUT
(k)の先頭部分にヘッダデータとして付加され、次の
ステップS312で、RAM204に得られた上述のヘ
ッダデータを含む波形データが、図2の波形入出力部2
06に設置されるハードディスク又はフロッピーディス
クに、図1の作成波形ファイル106としてセーブさ
れ、ループ波形生成処理を終了する。
Finally, in step S311 of FIG. 3, the above-mentioned loop start point LSP and loop end point LEP are set to the waveform data OUT obtained in the RAM 204 by the resampling process in step S310.
(K) is added as header data to the head portion, and in the next step S312, the waveform data including the above header data obtained in the RAM 204 is stored in the waveform input / output unit 2 shown in FIG.
The saved waveform file 106 is saved on the hard disk or floppy disk installed at 06 as the created waveform file 106 in FIG. 1, and the loop waveform generation processing ends.

【0120】このようにして生成されたM+1サンプル
分のループ波形データを含む波形データは、後に電子楽
器のROMなどに記憶され、楽音の音源として活用され
る。この場合、ループ区間より手前の波形データがサン
プリング周期Tでそのままメモリから読み出されて再生
されることにより例えばアタック音区間が再生された
後、ループスタートポイントLSPからループエンドポ
イントLEPの1サンプル手前のサンプリングポイント
までのMサンプルからなるループ波形データがサンプリ
ング周期Tでループ再生されることにより、ループノイ
ズを含まず、かつ、基準音高に正確に一致した楽音を発
音させることが可能となる。 <本発明の第2の動作原理>本発明の第2の動作原理と
して、任意の音高を有するループ波形データが生成され
る場合の動作原理について説明する。
The waveform data including the loop waveform data for M + 1 samples generated in this way is stored in the ROM of the electronic musical instrument later and used as a tone generator. In this case, the waveform data before the loop section is read out from the memory as it is at the sampling period T and reproduced, so that, for example, the attack sound section is reproduced, and then one sample before the loop end point LEP from the loop start point LSP. By performing loop reproduction of the loop waveform data composed of M samples up to the sampling point at the sampling period T, it is possible to generate a musical tone that does not include loop noise and that exactly matches the reference pitch. <Second Operation Principle of the Present Invention> As a second operation principle of the present invention, an operation principle when loop waveform data having an arbitrary pitch is generated will be described.

【0121】まず、ユーザが予め、基準となる音高と、
その基準音高に対応する1基本周期を割り切るサンプリ
ング周期Tを決定しておく点は、前述の第1の動作原理
の場合と同様である。第2の動作原理では更に、ユーザ
は任意の音高を指定する。
First, the user previously sets a reference pitch,
The point that a sampling period T that divides one basic period corresponding to the reference pitch is determined is the same as in the case of the first operation principle described above. In the second operating principle, the user further specifies an arbitrary pitch.

【0122】次に、前述した第1の動作原理では、基準
音高を有する楽音がサンプリング周期Tでサンプリング
される場合のその楽音の1基本周期あたりのサンプリン
グポイント数Mが、数1式によって算出された。これに
対して、第2の動作原理では、次のような演算が行われ
る。
Next, according to the first principle of operation described above, when a musical tone having a reference pitch is sampled at a sampling period T, the number M of sampling points per basic period of the musical tone is calculated by the following equation (1). Was done. On the other hand, in the second operation principle, the following calculation is performed.

【0123】前述したように、基準音高に対応する1基
本周期はサンプリング周期Tで割り切れるため、前述し
た第1の動作原理における数1式により算出されるよう
に、基準音高を有する楽音がサンプリング周期Tでサン
プリングされる場合のその楽音の1基本周期あたりのサ
ンプリングポイント数Mは整数となる。従って、前述し
たように、Mポイントからなる1基本周期分のループ波
形データをサンプリング周期Tでループ再生すれば、そ
の音高は正確に基準音高に一致する。
As described above, since one basic period corresponding to the reference pitch is divisible by the sampling period T, the musical tone having the reference pitch is calculated by the above-mentioned equation (1) in the first operation principle. The number M of sampling points per basic period of the musical tone when sampled at the sampling period T is an integer. Therefore, as described above, if the loop waveform data of one basic cycle consisting of M points is reproduced in a loop at the sampling cycle T, the pitch exactly matches the reference pitch.

【0124】これに対して、指定された任意の音高に対
応する1基本周期は必ずしも上述のサンプリング周期T
で割り切れるとは限らない。従って、整数ポイントから
なる1基本周期分のループ波形データをサンプリング周
期Tでループ再生しても、その音高を指定された任意の
音高に一致させることができない場合が生ずる。
On the other hand, one basic cycle corresponding to a designated arbitrary pitch is not necessarily the sampling cycle T described above.
Is not necessarily divisible by Therefore, even if the loop waveform data of one basic cycle consisting of integer points is loop-reproduced at the sampling cycle T, the pitch may not be able to match the specified pitch.

【0125】しかし、指定された任意の音高に対応する
1基本周期の整数倍の周期であれば、その整数倍の周期
がサンプリング周期Tでほぼ割り切れる場合が必ず存在
する。例えば前述したように、基準音高をA4=442
〔Hz〕、その音高に対応する1基本周期を割り切るサ
ンプリング周期Tを1/5304〔秒〕とする。そし
て、例えば、G4の音高は393.777〔Hz〕であ
って、その音高に対応する1基本周期は、次式で示され
るように、サンプリング周期Tの整数倍とはならない。 (1/393.777)/(1/5304)≒13.47 しかし、G4の音高に対応する1基本周期の2倍は、次
式で示されるように、サンプリング周期Tのほぼ27
倍、即ち整数倍となる。 {(1/393.777)×2}/(1/5304)≒26.94≒27 以上の関係を図21に示す。
However, if the period is an integral multiple of one basic period corresponding to a designated arbitrary pitch, the period of the integral multiple is almost always divisible by the sampling period T. For example, as described above, the reference pitch is A4 = 442.
[Hz], and a sampling period T that divides one basic period corresponding to the pitch is set to 1/5304 [seconds]. Then, for example, the pitch of G4 is 393.777 [Hz], and one basic cycle corresponding to the pitch is not an integral multiple of the sampling cycle T as shown by the following equation. (1 / 393.777) / (1/5304) ≒ 13.47 However, twice of one basic period corresponding to the pitch of G4 is approximately 27 times the sampling period T as shown in the following equation.
Times, that is, an integral multiple. {(1 / 393.777) × 2} / (1/5304) {26.94} 27 The above relationship is shown in FIG.

【0126】従って、上述の27ポイントからなる2基
本周期分のループ波形データをサンプリング周期Tでル
ープ再生すれば、その音高は、次式で示されるように算
出され、聴覚上問題のない範囲内で、指定されたG4の
音高=393.777にほぼ一致する。 1/〔{(1/5304)×27}/2〕=392.889 〔Hz〕 そこで、まず、指定された任意の音高に対応する1基本
周期の整数倍の周期であって、サンプリング周期Tによ
って所定の許容誤差範囲内で割り切られる周期を定め
る。そして、指定された音高に対応する1基本周期の上
記整数倍の周期をサンプリング周期Tによって所定の許
容誤差範囲内で割り切って得られる数のサンプリングポ
イントからなる上記整数倍の周期分のループ波形データ
を、サンプリング周期Tでループ再生すれば、その音高
は、聴覚上問題のない範囲内で、指定された音高にほぼ
一致する。
Therefore, if the loop waveform data of the above-mentioned two basic cycles consisting of 27 points is reproduced in a loop at the sampling cycle T, the pitch is calculated as shown in the following equation, and the pitch is within a range where there is no problem in hearing. Within, the pitch of the designated G4 is almost equal to 393.777. 1 / [{(1/5304) × 27} / 2] = 392.889 [Hz] Therefore, first, a sampling period which is an integral multiple of one basic period corresponding to a designated arbitrary pitch, T defines a cycle that is divisible within a predetermined allowable error range. Then, a loop waveform corresponding to the integral multiple of the period consisting of a number of sampling points obtained by dividing the integral multiple of one basic cycle corresponding to the designated pitch by a sampling cycle T within a predetermined allowable error range. If the data is loop-reproduced at the sampling period T, the pitch substantially matches the designated pitch within a range where there is no problem in hearing.

【0127】即ち、まず、次式の値が所定の許容誤差範
囲内で整数となるような整数nが決定される。許容誤差
は、例えば±0.2程度である。
That is, first, an integer n such that the value of the following equation becomes an integer within a predetermined allowable error range is determined. The tolerance is, for example, about ± 0.2.

【0128】[0128]

【数9】 (Equation 9)

【0129】次に、上述の決定された整数nを使用し
て、数9式の演算結果に最も近い整数が、次式によって
演算される。
Next, using the above determined integer n, the integer closest to the result of the operation of Expression 9 is calculated by the following expression.

【0130】[0130]

【数10】 (Equation 10)

【0131】なお、演算“INT”は、括弧内の数値の
整数部分を抽出する演算であり、括弧内において、数9
式に対応する数値に0.5が加算されてその整数部分が
抽出されることにより、数9式に対応する数値を四捨五
入した整数値が得られることになる。
The operation "INT" is an operation for extracting the integer part of the numerical value in parentheses.
By adding 0.5 to the numerical value corresponding to the expression and extracting the integer part, an integer value obtained by rounding the numerical value corresponding to Expression 9 is obtained.

【0132】数10式の演算の結果得られる整数値M′
は、上述の指定された音高を有する楽音がサンプリング
周期Tでサンプリングされる場合のその楽音のn基本周
期あたりのサンプリングポイント数となる。
Integer value M 'obtained as a result of the operation of equation (10)
Is the number of sampling points per n basic periods of a musical tone having the above-mentioned designated pitch when the musical tone is sampled at the sampling period T.

【0133】続いて、任意の音高を有するアナログ楽音
信号がサンプリング周期TでA/D変換されPCM楽音
波形データが得られる点は、前述した第1の動作原理の
場合と同様である。
Subsequently, the analog tone signal having an arbitrary pitch is A / D converted at the sampling period T to obtain PCM tone waveform data, as in the case of the first operation principle described above.

【0134】更に、ユーザは、A/D変換によって得ら
れたPCM楽音波形データの持続音区間で、ゼロクロス
位置から始ってゼロクロス位置で終わるn基本周期分の
波形区間の見当をつけ、その波形区間の先頭と末尾を指
定する。
Further, the user gives an estimate of a waveform section for n basic cycles starting from the zero-cross position and ending at the zero-cross position in the continuous sound section of the PCM musical tone waveform data obtained by the A / D conversion, and Specify the start and end of the section.

【0135】続いて、上述の指定に対応してループスタ
ート初期ポイント及びループエンド初期ポイントが算出
され、それらに基づいてループ区間が抽出されループ区
間長が算出されまでの処理は、前述した第1の動作原理
の場合と同様である。
Subsequently, the loop start initial point and the loop end initial point are calculated in accordance with the above specification, and the loop section is extracted on the basis thereof and the loop section length is calculated. The operation principle is the same as that of the above.

【0136】そして、次の数11式により算出されるサ
ンプリング周期T′で、上述のn基本周期分のループ区
間が、その先頭のゼロクロス位置とその末尾のゼロクロ
ス位置がサンプリングポイントとして含まれるようにリ
サンプリングされる。
In the sampling period T 'calculated by the following equation (11), the loop section for the above-mentioned n basic periods is set so that the leading zero-cross position and the trailing zero-cross position are included as sampling points. Resampled.

【0137】[0137]

【数11】 [Equation 11]

【0138】この結果、n基本周期分のループ区間の両
端のゼロクロス位置のサンプリングポイントが含まれ
M′+1サンプルからなるループ波形データが生成さ
れ、その開始ポイントであるループスタートポイントと
その終了ポイントであるループエンドポイントは、波形
の先頭のゼロクロス位置と末尾のゼロクロス位置に正確
に一致する。
As a result, loop waveform data including M ′ + 1 samples including the sampling points of the zero cross positions at both ends of the loop section for n basic cycles is generated, and the loop start point and the end point thereof are generated. A certain loop end point exactly matches the leading zero-cross position and the trailing zero-cross position of the waveform.

【0139】このようにして生成されたM′+1サンプ
ルからなるn基本周期分のループ波形データは、メモリ
などにセーブされる。このセーブされたM′+1サンプ
ル分のループ波形データのうち、ループ区間の先頭のゼ
ロクロス位置のサンプリングポイントから、ループ区間
の末尾のゼロクロス位置のサンプリングポイントの1サ
ンプル手前のサンプリングポイントまでのM′サンプル
からなるn基本周期分のループ波形データがサンプリン
グ周期Tでループ再生されることにより、ループノイズ
を含まず、かつ、聴覚上問題のない範囲内で、指定され
た音高にほぼ一致した楽音が得られる。 <本発明の実施例の具体的動作(その2)>上述の本発
明の第2の動作原理に基づくループ波形データを生成す
るための本発明の実施例の具体的動作その2について説
明する。
The loop waveform data of n basic periods composed of M '+ 1 samples generated in this way is saved in a memory or the like. Of the saved loop waveform data of M '+ 1 samples, M' samples from the sampling point at the leading zero-cross position of the loop section to the sampling point one sample before the sampling point at the zero-cross position at the end of the loop section. Is reproduced in a loop at the sampling period T, so that a musical tone substantially matching the designated pitch within a range that does not include loop noise and has no auditory problem. can get. <Specific operation (part 2) of embodiment of the present invention> A specific operation 2 of the embodiment of the present invention for generating loop waveform data based on the above-described second operation principle of the present invention will be described.

【0140】まず、ユーザは、前述した具体的動作その
1の場合と同様に、例えばA4の基準音高と、その基準
音高に対応する1基本周期を割り切る、例えばT=1/
5304〔秒〕なるサンプリング周期Tを決定するのに
加えて任意の音高を指定する。
First, the user divides the reference pitch of A4 and one basic period corresponding to the reference pitch, for example, T = 1 /
In addition to determining the sampling period T of 5304 [seconds], an arbitrary pitch is designated.

【0141】次に、ユーザは、前述の数9式の値が所定
の許容誤差範囲内で整数となるような整数nを決定す
る。図22には、基準音高をA4=442〔Hz〕、そ
の音高に対応する1基本周期を割り切るサンプリング周
期Tを1/5304〔秒〕としたときに、任意の音高の
正確なピッチ周波数と、整数nの例と、そのn基本周期
分のループ波形データがサンプリング周期Tでループ再
生されたときのピッチ周波数が示されている。ユーザ
は、この図に基づいて、指定した音高に対応する整数n
を決定し、図2のキー入力部201から入力する。な
お、図22に対応するテーブルを例えば図2のROM2
03に記憶させておき、ユーザが指定した音高に対応し
て、整数nが自動的に算出されるようにしてもよい。
Next, the user determines an integer n such that the value of equation 9 becomes an integer within a predetermined allowable error range. FIG. 22 shows that when the reference pitch is A4 = 442 [Hz] and the sampling period T that divides one basic period corresponding to the reference pitch is 1/5304 [seconds], an accurate pitch of an arbitrary pitch is obtained. A frequency, an example of an integer n, and a pitch frequency when loop waveform data for the n basic cycles are loop-reproduced at a sampling cycle T are shown. Based on this figure, the user can select an integer n corresponding to the designated pitch.
Is determined and input from the key input unit 201 of FIG. It should be noted that the table corresponding to FIG.
03, and the integer n may be automatically calculated according to the pitch specified by the user.

【0142】次に、図2の制御/処理部205は、上述
の指定音高と整数nとサンプリング周期Tに基づいて、
前述した数10式に基づいて、指定音高を有する楽音が
サンプリング周期Tでサンプリングされる場合のその楽
音のn基本周期あたりのサンプリングポイント数M′を
算出する。このサンプリングポイント数M′は、図2の
RAM204に記憶される。
Next, the control / processing unit 205 shown in FIG. 2 performs the following based on the designated pitch, the integer n, and the sampling period T.
Based on equation (10), the number of sampling points M 'per n basic periods of the musical tone when the musical tone having the designated pitch is sampled at the sampling period T is calculated. This sampling point number M 'is stored in the RAM 204 of FIG.

【0143】続いて、前述した具体的動作その1の場合
と同様に、ユーザのキー入力部201に対する操作に基
づいて、任意の音高を有するアナログ楽音信号がサンプ
リング周期TでA/D変換され、PCM楽音波形データ
が、図2の波形入出力部206に設置されるハードディ
スク又はフロッピーディスクに、ソース波形ファイル1
01として記憶される。
Subsequently, analog tone signals having an arbitrary pitch are A / D-converted at a sampling period T based on the user's operation on the key input unit 201, as in the case of the first specific operation described above. , PCM musical tone waveform data is stored in a hard disk or floppy disk installed in the waveform input / output unit 206 of FIG.
01 is stored.

【0144】その後、前述した具体的動作その1の場合
と同様に、ユーザのキー入力部201に対する操作に基
づいて、制御/処理部205が、図3の動作フローチャ
ートによって示されるループ波形を生成するための制御
処理プログラムをスタートさせる。
Thereafter, as in the case of the first specific operation described above, the control / processing unit 205 generates a loop waveform shown by the operation flowchart of FIG. 3 based on the user's operation on the key input unit 201. The control processing program to start.

【0145】図3のステップS301の処理は、前述し
た具体的動作その1の場合と同様である。図3のステッ
プS302が実行されるタイミングでは、ユーザは、表
示部202のディスプレイ102上に表示されているP
CM楽音波形データの持続音区間で、ゼロクロス位置か
ら始ってゼロクロス位置で終わるn基本周期分の波形区
間の見当をつけ、その波形区間の先頭と末尾を指定す
る。
The processing in step S301 in FIG. 3 is the same as in the first specific operation described above. At the timing when step S302 in FIG. 3 is executed, the user sets the P displayed on the display 102 of the display unit 202.
In the continuous sound section of the CM musical sound waveform data, a waveform section for n basic cycles starting from the zero-cross position and ending at the zero-cross position is registered, and the start and end of the waveform section are designated.

【0146】図3のステップS303〜S308までの
処理は、前述した具体的動作その1の場合と全く同様で
ある。次の図3のステップS309においては、前述の
<本発明の第2の動作原理>の数11式に対応する次式
によって、ループスタートポイントLSTとループエン
ドポイントLETをサンプリングポイントとして含むリ
サンプリングを行うためのサンプリング周期T′が算出
される。
The processing of steps S303 to S308 in FIG. 3 is exactly the same as the specific operation 1 described above. In the next step S309 in FIG. 3, resampling including the loop start point LST and the loop end point LET as sampling points is performed by the following equation corresponding to equation (11) of the <second operation principle of the present invention>. A sampling period T 'for performing the calculation is calculated.

【0147】[0147]

【数12】 (Equation 12)

【0148】ここで、M′は、<本発明の第2の動作原
理>で前述したように、任意の音高(例えばG4)を有
する楽音がサンプリング周期Tでサンプリングされる場
合のその楽音のn基本周期あたりのサンプリングポイン
ト数であり、前述したように、ループ波形データの生成
処理開始時に数10式に基づいて演算され、図2のRA
M204に予め記憶されている。
Here, M 'is a value of a tone having an arbitrary pitch (for example, G4) when the tone is sampled at the sampling period T, as described in the second principle of the present invention. This is the number of sampling points per n basic periods. As described above, the number of sampling points is calculated based on Expression 10 at the start of the loop waveform data generation processing.
It is stored in advance in M204.

【0149】続く図3のステップS310〜S312の
処理は、前述した具体的動作その1の場合と全く同様で
ある。この結果、n基本周期分のループ区間の両端のゼ
ロクロス位置のサンプリングポイントが含まれM′+1
サンプルからなるループ波形データを含む波形データが
生成され、ループ区間の開始ポイントであるループスタ
ートポイントLSPとその終了ポイントであるループエ
ンドポイントLEPは、例えば図23に示されるよう
に、ループ区間の先頭のゼロクロス位置と末尾のゼロク
ロス位置に正確に一致する。
The processing in steps S310 to S312 in FIG. 3 is exactly the same as that in the first specific operation described above. As a result, the sampling points at the zero cross positions at both ends of the loop section for n basic cycles are included and M ′ + 1
Waveform data including loop waveform data composed of samples is generated, and a loop start point LSP which is a start point of a loop section and a loop end point LEP which is an end point thereof are, for example, as shown in FIG. Exactly matches the zero-crossing position of the.

【0150】このようにして生成されたM′+1サンプ
ルからなるn基本周期分のループ波形データを含む波形
データは、後に電子楽器のROMなどに記憶され、楽音
の音源として活用される。この場合、ループ区間より手
前の波形データがサンプリング周期Tでそのままメモリ
から読み出されて再生されることにより例えばアタック
音区間が再生された後、ループスタートポイントLSP
からループエンドポイントLEPの1サンプル手前のサ
ンプリングポイントまでのM′サンプルからなるn基本
周期分のループ波形データがサンプリング周期Tでルー
プ再生されることによって、ループノイズを含まず、か
つ、聴覚上問題のない範囲内で、指定された音高にほぼ
一致した楽音を発音させることが可能となる。
The waveform data including the loop waveform data of n basic cycles composed of M '+ 1 samples generated in this way is later stored in a ROM of an electronic musical instrument, and is used as a tone sound source. In this case, the waveform data before the loop section is read out from the memory as it is at the sampling period T and reproduced, so that, for example, after the attack sound section is reproduced, the loop start point LSP
Is loop-reproduced in the sampling period T from n 'basic cycles consisting of M' samples from the sampling point one sample before the loop end point LEP to a loop-free loop noise, and an auditory problem. Within this range, it is possible to produce a musical tone that substantially matches the designated pitch.

【0151】上述した本発明の実施例の具体的動作その
2において、図22からわかるように、指定音高が、例
えば、G3、A3、D4、E4、A4(基準音高)、D
5、E5、A5などの場合には、n=1であるため、数
10式、数11式、及び数12式は、それぞれ、前述し
た数1式、数2式、及び数6式で基準音高を指定音高に
置き換えた場合に等しくなる。従って、この場合には、
音高の指定動作が加わる以外は、前述した本発明の実施
例の具体的動作その1と実質的に同じ動作が実行される
ことになる。
In the second specific operation of the embodiment of the present invention, as can be seen from FIG. 22, the designated pitches are, for example, G3, A3, D4, E4, A4 (reference pitch), D
In the case of 5, E5, A5, etc., since n = 1, the equations (10), (11) and (12) are based on the above-mentioned equations (1), (2) and (6), respectively. This is equivalent to replacing the pitch with the specified pitch. Therefore, in this case,
Except for the addition of the pitch designation operation, substantially the same operation as the first specific operation of the embodiment of the present invention described above is performed.

【0152】[0152]

【発明の効果】本発明によれば、持続音を発音するため
のループ波形の作成処理において、簡単な操作でループ
スタートポイントとループエンドポイントを、それぞれ
ゼロクロス位置に合わせることが可能となり、ループノ
イズを含まず、かつ聴覚上問題のない範囲内で、指定さ
れた任意の音高にほぼ一致した波形が得られる。
According to the present invention, the loop start point and the loop end point can be respectively adjusted to the zero-cross position by a simple operation in the process of creating a loop waveform for generating a continuous sound, and the loop noise is reduced. , And within a range in which there is no problem in hearing, a waveform substantially matching the designated arbitrary pitch can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の1実施例の外観図である。FIG. 1 is an external view of one embodiment of the present invention.

【図2】本発明の1実施例の全体構成図である。FIG. 2 is an overall configuration diagram of one embodiment of the present invention.

【図3】ループ波形生成処理の動作フローチャートであ
る。
FIG. 3 is an operation flowchart of a loop waveform generation process.

【図4】波形シフト前後の波形とゼロクロス位置との関
係を示す波形図である。
FIG. 4 is a waveform diagram showing a relationship between a waveform before and after a waveform shift and a zero-cross position.

【図5】ループスタート初期ポイントからその直後のゼ
ロクロス位置までの時間の算出方法の原理図(その1)
である。
FIG. 5 is a principle diagram of a method for calculating a time from an initial point of a loop start to a zero-cross position immediately after the initial point (part 1);
It is.

【図6】ループスタート初期ポイントからその直後のゼ
ロクロス位置までの時間の算出方法の原理図(その2)
である。
FIG. 6 is a principle diagram of a method for calculating a time from a loop start initial point to a zero cross position immediately after the initial point (part 2);
It is.

【図7】ループスタート初期ポイントからその直後のゼ
ロクロス位置までの時間の算出方法の原理図(その3)
である。
FIG. 7 is a principle diagram of a method for calculating a time from a loop start initial point to a zero cross position immediately after the loop start point (part 3);
It is.

【図8】ループスタート初期ポイントからその直後のゼ
ロクロス位置までの時間の算出方法の原理図(その4)
である。
FIG. 8 is a principle diagram of a calculation method of a time from an initial point of a loop start to a zero cross position immediately after the loop start point (part 4);
It is.

【図9】ループスタート初期ポイントからその直後のゼ
ロクロス位置までの時間の算出方法の原理図(その5)
である。
FIG. 9 is a principle diagram of a method for calculating a time from a loop start initial point to a zero cross position immediately after the initial point (part 5).
It is.

【図10】図3のステップS304の詳細動作フローチ
ャートである。
FIG. 10 is a detailed operation flowchart of step S304 in FIG. 3;

【図11】直線補間の説明図である。FIG. 11 is an explanatory diagram of linear interpolation.

【図12】3点によるラグランジュ補間の説明図であ
る。
FIG. 12 is an explanatory diagram of Lagrange interpolation using three points.

【図13】数3式に対して代入される値を示す図(その
1)である。
FIG. 13 is a diagram (No. 1) showing values substituted into Expression 3;

【図14】図3のステップS305の波形シフト処理に
関する詳細動作フローチャートである。
FIG. 14 is a detailed operation flowchart relating to a waveform shift process in step S305 in FIG. 3;

【図15】数3式に対して代入される値を示す図(その
2)である。
FIG. 15 is a diagram (No. 2) illustrating values substituted for Expression 3.

【図16】リサンプリング前後の波形とゼロクロス位置
との関係を示す波形図である。
FIG. 16 is a waveform diagram showing a relationship between waveforms before and after resampling and a zero-cross position.

【図17】図3のステップS310のリサンプリング処
理に関する詳細動作フローチャートである。
FIG. 17 is a detailed operation flowchart relating to a resampling process in step S310 of FIG. 3;

【図18】リサンプリング前後のサンプル値のタイミン
グを示す動作タイミングチャートである。
FIG. 18 is an operation timing chart showing timings of sample values before and after resampling.

【図19】補間値f(i)と、その前後におけるシフト
された波形データのサンプル値を示す図である。
FIG. 19 is a diagram showing an interpolation value f (i) and sample values of shifted waveform data before and after the interpolation value f (i).

【図20】数3式に対して代入される値を示す図(その
3)である。
FIG. 20 is a diagram (No. 3) illustrating values substituted for Expression 3.

【図21】A4以外の音がサンプリング周期Tでサンプ
リングされるときの波形図である。
FIG. 21 is a waveform diagram when a sound other than A4 is sampled at a sampling period T.

【図22】音高ごとの正確なピッチ周波数と、整数nの
値と、ループ再生時のピッチ周波数を示した図である。
FIG. 22 is a diagram showing an accurate pitch frequency for each pitch, a value of an integer n, and a pitch frequency during loop reproduction.

【図23】本発明の実施例の具体的動作(その2)の説
明図である。
FIG. 23 is an explanatory diagram of a specific operation (part 2) of the embodiment of the present invention.

【図24】従来例におけるループノイズの説明図であ
る。
FIG. 24 is an explanatory diagram of loop noise in a conventional example.

【符号の説明】[Explanation of symbols]

101 ソース波形ファイル 102 ディスプレイ 103 パソコン本体 104 キーボード 105 マウス 106 作成波形ファイル 201 キー入力部 202 表示部 203 ROM 204 RAM 205 制御/処理部 206 波形入出力部 101 source waveform file 102 display 103 personal computer 104 keyboard 105 mouse 106 created waveform file 201 key input unit 202 display unit 203 ROM 204 RAM 205 control / processing unit 206 waveform input / output unit

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 第1のサンプリング周期でサンプリング
されたデジタル波形データから、前記第1のサンプリン
グ周期によって繰り返し再生されるべき1繰返し波形単
位分のデジタル波形データを、ループ波形データとして
生成するループ波形生成装置において、 前記繰り返し再生時の音高を指定する音高指定手段と、 該音高指定手段で指定された音高に対応する1基本周期
の整数倍の所定周期であって前記第1のサンプリング周
期によって所定の許容誤差範囲内で割り切られる周期に
関して、該所定周期を前記第1のサンプリング周期によ
って前記所定の許容誤差範囲内で割り切って得られる数
をサンプリングポイント数として算出するサンプリング
ポイント数算出手段と、 前記デジタル波形データに基づいて、前記所定周期分の
波形区間の先頭である第1のゼロクロス位置から、前記
所定周期分の波形区間の末尾である第2のゼロクロス位
置までの区間を、ループ区間として抽出するループ区間
抽出手段と、 前記ループ区間の前記デジタル波形データを、前記第1
のゼロクロス位置と前記第2のゼロクロス位置がサンプ
リングポイントとして含まれるように、前記ループ区間
の時間長を前記サンプリングポイント数で除算すること
により得られる第2のサンプリング周期で再サンプリン
グすることによって、前記ループ波形データを生成する
再サンプリング手段と、 を有することを特徴とするループ波形生成装置。
1. A loop waveform for generating digital waveform data for one repetitive waveform unit to be repeatedly reproduced in the first sampling period from digital waveform data sampled in a first sampling period as loop waveform data. In the generation device, a pitch designation means for designating a pitch at the time of the repetitive reproduction, and a first cycle which is an integral multiple of one basic cycle corresponding to the pitch designated by the pitch designation means, Regarding a cycle that is divisible within a predetermined allowable error range by a sampling cycle, a sampling point number calculation that calculates a number obtained by dividing the predetermined cycle within the predetermined allowable error range by the first sampling cycle as a sampling point number. Means, based on the digital waveform data, a waveform section for the predetermined period. Loop section extracting means for extracting, as a loop section, a section from the first zero-cross position, which is the beginning of the waveform section, to the second zero-cross position, which is the end of the waveform section for the predetermined period; The data is stored in the first
By re-sampling at a second sampling period obtained by dividing the time length of the loop section by the number of the sampling points so that the zero-cross position and the second zero-cross position are included as sampling points, Resampling means for generating loop waveform data; and a loop waveform generation device.
【請求項2】 第1のサンプリング周期でサンプリング
されたデジタル波形データから、前記第1のサンプリン
グ周期によって繰り返し再生されるべき1繰返し波形単
位分のデジタル波形データを、ループ波形データとして
生成するループ波形生成方法において、 前記繰り返し再生時の音高を指定し、 該指定された音高に対応する1基本周期の整数倍の所定
周期であって前記第1のサンプリング周期によって所定
の許容誤差範囲内で割り切られる周期に関して、該所定
周期を前記第1のサンプリング周期によって前記所定の
許容誤差範囲内で割り切って得られる数をサンプリング
ポイント数として算出し、 前記デジタル波形データに基づいて、前記所定周期分の
波形区間の先頭である第1のゼロクロス位置から、前記
所定周期分の波形区間の末尾である第2のゼロクロス位
置までの区間を、ループ区間として抽出し、 前記ループ区間の前記デジタル波形データを、前記第1
のゼロクロス位置と前記第2のゼロクロス位置がサンプ
リングポイントとして含まれるように、前記ループ区間
の時間長を前記サンプリングポイント数で除算すること
により得られる第2のサンプリング周期で再サンプリン
グすることによって、前記ループ波形データを生成す
る、 ことを有することを特徴とするループ波形生成方法。
2. A loop waveform for generating, as loop waveform data, digital waveform data for one repetitive waveform unit to be repeatedly reproduced at the first sampling period, from digital waveform data sampled at a first sampling period. In the generation method, a pitch at the time of the repetitive reproduction is specified, and a predetermined cycle of an integral multiple of one basic cycle corresponding to the specified pitch within a predetermined allowable error range by the first sampling cycle. Regarding the divisible period, a number obtained by dividing the predetermined period within the predetermined allowable error range by the first sampling period is calculated as the number of sampling points, and based on the digital waveform data, From the first zero-cross position, which is the beginning of the waveform section, A section up to a second zero-cross position at the end is extracted as a loop section, and the digital waveform data in the loop section is extracted as the first section.
By re-sampling at a second sampling period obtained by dividing the time length of the loop section by the number of the sampling points so that the zero-cross position and the second zero-cross position are included as sampling points, A method for generating loop waveform data, the method comprising: generating loop waveform data.
【請求項3】 前記再サンプリング手段による、前記デ
ジタル波形データに対する前記第2のサンプリング周期
による再サンプリング処理は、前記第2のサンプリング
周期で進む時間位置毎のサンプル値を、前記第1のサン
プリング周期でサンプリングされた前記デジタル波形デ
ータのサンプリングポイントのうち前記時間位置近傍の
ものを使用して補間演算によって算出する処理である、 ことを特徴とする請求項1に記載のループ波形生成
3. A re-sampling process of said digital waveform data by said re-sampling means in said second sampling cycle is performed by converting a sample value for each time position advanced in said second sampling cycle into said first sampling cycle. The loop waveform generation device according to claim 1, wherein the calculation is performed by interpolation using a sampling point near the time position among the sampling points of the digital waveform data sampled in ( 1 ).
Place .
【請求項4】 前記補間演算は、ラグランジェの補間関
数を使用した補間演算である、 ことを特徴とする請求項3に記載のループ波形生成
4. The loop waveform generation device according to claim 3, wherein the interpolation calculation is an interpolation calculation using a Lagrange's interpolation function.
Place .
【請求項5】 前記デジタル波形データに対する前記第5. The digital waveform data according to claim 5, wherein
2のサンプリング周期による再サンプリング処理は、前The resampling process with the sampling period of 2
記第2のサンプリング周期で進む時間位置毎のサンプルThe sample at each time position to advance in the second sampling cycle
値を、前記第1のサンプリング周期でサンプリングされValues are sampled at said first sampling period
た前記デジタル波形データのサンプリングポイントのうThe sampling point of the digital waveform data
ち前記時間位置近傍のものを使用して補間演算によってBy using an interpolation operation using the one near the time position,
算出する処理である、The process of calculating ことを特徴とする請求項2に記載のループ波形生成方3. The loop waveform generation method according to claim 2, wherein:
法。Law.
【請求項6】 前記補間演算は、ラグランジェの補間関6. The interpolation operation according to claim 1, wherein the Lagrange interpolation function is used.
数を使用した補間演算である、Is an interpolation operation using numbers. ことを特徴とする請求項5に記載のループ波形生成方6. The method according to claim 5, wherein the loop waveform is generated.
法。Law.
JP23246392A 1992-08-31 1992-08-31 Loop waveform generation device and loop waveform generation method Expired - Fee Related JP3237226B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23246392A JP3237226B2 (en) 1992-08-31 1992-08-31 Loop waveform generation device and loop waveform generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23246392A JP3237226B2 (en) 1992-08-31 1992-08-31 Loop waveform generation device and loop waveform generation method

Publications (2)

Publication Number Publication Date
JPH0683362A JPH0683362A (en) 1994-03-25
JP3237226B2 true JP3237226B2 (en) 2001-12-10

Family

ID=16939687

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23246392A Expired - Fee Related JP3237226B2 (en) 1992-08-31 1992-08-31 Loop waveform generation device and loop waveform generation method

Country Status (1)

Country Link
JP (1) JP3237226B2 (en)

Also Published As

Publication number Publication date
JPH0683362A (en) 1994-03-25

Similar Documents

Publication Publication Date Title
US5703311A (en) Electronic musical apparatus for synthesizing vocal sounds using format sound synthesis techniques
US5890115A (en) Speech synthesizer utilizing wavetable synthesis
EP1688912B1 (en) Voice synthesizer of multi sounds
KR100256718B1 (en) Sound pitch converting apparatus
JP2007011217A (en) Musical sound synthesizer and program
US5808222A (en) Method of building a database of timbre samples for wave-table music synthesizers to produce synthesized sounds with high timbre quality
JP3206128B2 (en) Loop waveform generation device and loop waveform generation method
JP2003345400A (en) Method, device, and program for pitch conversion
JP3237226B2 (en) Loop waveform generation device and loop waveform generation method
Dutilleux et al. Time‐segment Processing
JP3206129B2 (en) Loop waveform generation device and loop waveform generation method
JPH10319993A (en) Data editing device
JPH0486796A (en) Musical tone generator
JP2001005450A (en) Method of encoding acoustic signal
JP2000099009A (en) Acoustic signal coding method
JP4331289B2 (en) Method for encoding an acoustic signal
US6314403B1 (en) Apparatus and method for generating a special effect on a digital signal
JP4565846B2 (en) Pitch converter
JP3904012B2 (en) Waveform generating apparatus and method
WO2006043790A1 (en) Apparatus and method for reproducing midi file
JP2000010595A (en) Device and method for converting voice and storage medium recording voice conversion program
GB2294799A (en) Sound generating apparatus having small capacity wave form memories
JPS58178395A (en) Time axis extension for voice signal
JP2687698B2 (en) Electronic musical instrument tone control device
JP4305022B2 (en) Data creation device, program, and tone synthesis device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20010904

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081005

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091005

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091005

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101005

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111005

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees