JPS6339074B2 - - Google Patents

Info

Publication number
JPS6339074B2
JPS6339074B2 JP59029911A JP2991184A JPS6339074B2 JP S6339074 B2 JPS6339074 B2 JP S6339074B2 JP 59029911 A JP59029911 A JP 59029911A JP 2991184 A JP2991184 A JP 2991184A JP S6339074 B2 JPS6339074 B2 JP S6339074B2
Authority
JP
Japan
Prior art keywords
tone
key
channel
data
routine
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
Application number
JP59029911A
Other languages
Japanese (ja)
Other versions
JPS60149091A (en
Inventor
Hirokazu Kato
Akinori Endo
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP59029911A priority Critical patent/JPS60149091A/en
Publication of JPS60149091A publication Critical patent/JPS60149091A/en
Publication of JPS6339074B2 publication Critical patent/JPS6339074B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

この発明は電子オルガン等の電子楽器に関す
る。 周知のように、電子楽器には、キー(鍵)操作
検出用の多数のキースイツチおよび音色制御用の
操作子(トーンレバー)の操作状態を検出するた
めの多数のトーンレバースイツチ(あるいはヴオ
リユーム)が設けられている。そして、楽音発生
時においては、上述した各スイツチ等の動作状態
が常時走査され、この走査結果に基づいて楽音形
成が行われる。 ところで、上述したキースイツチ等の走査はス
イツチの数が多くなるほど時間がかかり、したが
つて、キーおよびトーンレバーの数が多い電子楽
器ほどスイツチ走査を効率よく短時間で行うこと
が必要となる。 そこでこの発明は、キースイツチ等の走査を効
率よく短時間で行うことができる電子楽器を提供
するもので、トーンレバーの操作状態の変化がキ
ーの操作状態の変化に比較してはるかに長い時間
をおいて発生することに着目し、トーンレバース
イツチ(あるいはヴオリユーム)の走査間隔(1
回の走査から次の走査までの時間間隔)をキース
イツチの走査間隔より大としたことを特徴として
いる。 さらに詳述すると、この発明は、 複数の鍵と、 複数の音色制御用の操作子と、 上記複数の鍵および上記複数の音色制御用の操
作子に対して共通に設けられ、上記複数の鍵を走
査して各鍵の押鍵状態を示す鍵状態を得る第1の
処理および上記複数の音色制御用の操作子を走査
して各操作子の操作状態を示す操作子情報を得る
第2の処理を選択的に実行するものであつて、処
理の第1のタイミングで上記第1の処理を繰返し
実行するとともに、該第1のタイミングの間隔よ
りも長い間隔の第2のタイミングで上記第2の処
理を繰返し実行する処理手段と を備え、上記鍵情報および上記操作子情報に基づ
き楽音の音高および音色を制御するようにしたこ
とを特徴とするものである。 以下、図面を参照しこの発明の実施例について
説明する。 第1図は、この発明による電子オルガン(電子
楽器)の構成を示すブロツク図であり、この図に
示す電子オルガンは大きく分けると鍵盤回路1
1、アサイナ12および楽音発生部13から構成
される。そして、上記アサイナ12は制御部1
4、演算部15、割込制御回路16、パルス発生
器17、データポート18を具備する演算制御部
19と、ROM(リードオンリーメモリ)20、
RAM(ランダムアクセスメモリ)21、レジス
タ22を具備する第1の記憶部23とから構成さ
れ、また楽音発生部13は、32個のチヤンネルを
有するウエイブジエネレータ(以下WGと称す)
25と、このWG25にエンベロープ情報を送出
するエンベロープジエネレータ26と、D/A
(デジタル/アナログ)変換回路27と、増幅器
28と、スピーカ29とから構成される。なお、
上述した制御部14および演算部15は通常マイ
クロコンピユータを用いて構成される。また、上
述したエンベロープとは楽音信号の包絡線のこと
である。すなわち、通常の楽音信号は第1図にお
いて符号Bにて示すように、立上り状態(アタツ
ク状態)B1、持続状態B2、立下り状態(デイ
ケイ状態)B3の3状態からなるエンベロープを
有している。 この電子オルガンはプログラムコントロールで
動作するもので、そのプログラムはROM20に
記憶されている処理プログラムと制御部14内の
マイクロプログラムメモリ45に記憶されている
各種マイクロプログラムから構成される。また、
WG25において楽音信号(デジタル信号)を形
成するために必要な各種トーンデータおよび周波
数データはROM20に記憶されている。そし
て、上記処理プログラムおよびマイクロプログラ
ムに基づいて、次の様に動作するものである。す
なわち、キーが押下されると、まず鍵盤回路11
が押下されたキーに対応するキースイツチ情報を
データバス30を介してアサイナ12に供給す
る。アサイナ12は供給されたキースイツチ情報
に対応する周波数データおよびトーンデータを
ROM20から読出し、読出したデータをWG2
5の複数のチヤンネルに対して割当てる。WG2
5の各チヤンネルは当該チヤンネルに割当てられ
たデータおよびエンベロープジエネレータ26か
ら供給されるエンベロープ情報に基づいて楽音信
号(デジタル信号)を形成する。そして、これら
各チヤンネルで形成された楽音信号がD/A変換
器27においてアナログ信号に変換され、増幅器
28を介してスピーカ29から楽音として放音さ
れる。 以上、この電子オルガンの概略を述べたが、次
にこの電子オルガンの詳細を説明する。 まず、鍵盤回路11はアドレスデコーダ34、
バツフアバスドライバ35、マトリツクス回路3
6から構成される。アドレスデコーダ34はアド
レスバス37を介して供給されるスイツチアドレ
ス信号をデコードするもので、この実施例では5
個の出力端を有し、またこれらの各出力端がマト
リツクス回路36の各列線にそれぞれ接続されて
いる。マトリツクス回路36は12行5列のマトリ
ツクスであり、このマトリツクスの各交点には、
トーンレバー(「ヴアイオリン」、「フルート」等
の音色を設定するためのレバー)38の各スイツ
チの接点および鍵盤キー39の各キースイツチの
接点が、図において符号Aにて示すように、ダイ
オードと共に介挿されている。なおこの実施例に
おいては、説明の便宜上トーンレバー38が6個
のトーンレバーからなり、また各トーンレバーは
いずれも4段階で音量を調整可能なものとし(し
たがつて、各トーンレバーに関する情報は2ビツ
トで現わされ、この2ビツトに対応してトーンレ
バースイツチは各トーンレバーに対し2個ずつ、
合計12個となる)、また鍵盤キー39は4オクタ
ーブ(12×4=48キー)から構成されるものとす
る。そして、各トーンレバーのスイツチがマトリ
ツクス回路36の左側(図において)1列に配置
され(図において破線で囲んだスイツチ2個が1
つのトーンレバーに対応する)、また鍵盤キー3
9の各キースイツチがマトリツクス回路36の右
側4列に配置されている。 バツフアバスドライバ35は上記各スイツチの
オン・オフ情報をデータバス30に出力するため
のバスドライであり、12個の入力端および出力端
を有し、入力端は各マトリツクス回路36の各行
線に接続されているとともに、出力端はデータバ
ス30に接続されている。 制御部14はインストラクシヨンレジスタ4
2、インストラクシヨンデコーダ43、マイクロ
プログラム・アドレスシーケンサ44、マイクロ
プログラムメモリ45(第2の記憶部)、パイプ
ラインレジスタ46から構成される。インストラ
クシヨンレジスタ42はROM20から読出され
る処理プログラムの各命令を一時記憶するもの
で、このインストラクシヨンレジスタ42に一時
記憶された命令はインストラクシヨンデコーダ4
3によつて解読され、マイクロプログラム・アド
レスシーケンサ44に供給される。マイクロプロ
グラムアドレスシーケンサ44はインストラクシ
ヨンデコーダ43の出力に基づいてマイクロプロ
グラムメモリ45のアドレスを指定し、この結
果、マイクロプログラムメモリ45から前述した
インストラクシヨンレジスタ42に一時記憶され
ている処理プログラムの命令に対応するマイクロ
プログラムが読出され、パイプラインレジスタ4
6に供給される。 演算部15はマイクロフアンクシヨン・デコー
ダ(以下、MFDと略称する)48、演算回路4
9等を有して構成され、制御部14から供給され
るマイクロプログラムの各命令を解読して所定の
処理を実行するものである。すなわち、MFD4
8はパイプラインレジスタ46から供給される上
記マイクロプログラムの各命令を解読し、この解
読結果に基づいて、レジスタ群50、マルチプレ
クサ51,52、演算回路49、メモリアドレス
レジスタ53、データレジスタ54、アウトプツ
トバツフア55,56へ各々制御信号を出力す
る。レジスタ群50はマイクロプログラムの各命
令を処理する過程で使用されるワーキングレジス
タであり、演算回路49の出力がMFD48から
の制御信号により読込まれ、またこのレジスタ群
50の出力はマルチプレクサ51の第2の入力端
に供給される。マルチプレクサ51は、その第1
の入力端がデータバス30に、第3の入力端がデ
ータレジスタ54の出力端に各々接続されてお
り、MFD48からの制御信号に基づいて第1〜
第3の入力端に得られるデータを選択的に演算回
路49へ出力するものである。マルチプレクサ5
2は、その第1の入力端がデータバス30に、第
2の入力端がデータレジスタ54の出力端に各々
接続されており、これら第1,第2の入力端に得
られるデータを選択的に演算回路49へ出力す
る。 演算回路49はマルチプレクサ51,52から
供給される各種データ(このデータには第1の記
憶部23の各メモリのアドレスを指定するアドレ
スデータおよび前述したキーをチヤンネルに割当
てる際使用されるデータがある)をMFD48か
らの制御信号に基づいて演算し、演算結果をメモ
リアドレスレジスタ53あるいはデータレジスタ
54へ供給する。メモアドレスレジスタ53は演
算回路49から供給されるアドレスデータを一時
記憶するもので、このメモリアドレスレジスタ5
3の出力はアウトプツトバツフア55を介してア
ドレスバス37へ出力される。データレジスタ5
4は演算回路49から供給されるデータ(キーを
チヤンネルに割当てる際使用されるデータ)を一
時記憶するもので、このデータレジスタ54の出
力はアウトプツトバツフア56を介してデータバ
ス30に出力される。 割込制御回路16は割込発生の際の各種処理を
行なうものである。ここで、この電子オルガンの
割込信号について説明する。この電子オルガンは
3個の割込信号INTR1,INTR2、INTR3を
有している。割込信号INTR1はパルス発生器1
7の出力に基づいて、割込制御回路16内で数m
sec毎に周期的に発生する割込信号であり、この
割込信号INTR1が発生すると、鍵盤キー39の
各キースイツチのオン/オフ情報がRAM21内
に読込まれる。割込信号INTR2はパルス発生器
17の出力を割込制御回路16内の分周器によつ
て分周して作られる割込信号であり、数100msec
毎に周期的に発生する。そして、この割込信号
INTR2が発生すると、トーンレバー38の各ス
イツチのオン/オフ情報がRAM21内に読込ま
れる。なお、割込信号INTR2の周期が割込信号
INTR1の周期よりはるかに大となつている理由
は、通常各キーが頻繁に操作されるのに対して、
各トーンレバーは各キーほど頻繁には操作されな
いからである。割込信号INTR3はWG25から
供給される割込信号であり、WG25内の各チヤ
ンネルにおいて形成された楽音信号が0となつた
時点で発生するものである。なお、この割込信号
INTR3については後述する。 そして、これらの割込信号INTR1〜INTR3
のいずれかが発生すると、制御部14がこれを検
知し、現在実行中のマイクロプログラムモジユー
ルが終了した時点で割込命令をインストラクシヨ
ンレジスタ42内に読込み、その解読を行なう。
なお、割込信号INTR1〜INTR3の優先順位
は、割込制御回路16において、 INTR3>INTR1>INTR2 の如く定められる。 ROM20は、前述したように処理プログラ
ム、周波数データおよびトーンデータ等を記憶す
るもので、アウトプツトバツフア55からアドレ
スバス37を介してアドレス信号が供給され、ま
た同アドレス信号によつて読出された処理プログ
ラムの各命令あるいは各種データがデータバス3
0に出力される。RAM21は、チヤンネル割当
ての際使用される各種データテーブル、データフ
アイル等が記憶されるもので、アウトプツトバツ
フア55からアドレス信号が供給され、またその
入出力端がデータバス30に接続されている。レ
ジスタ22は各種ステイタスあるいはコマンド
(後述)等が記憶されるもので、アウトプツトバ
ツフア55からアドレス信号が供給され、またそ
の入力端はデータバス30に接続されている。 データポート18はROM20に記憶されてい
る周波数データ、トーンデータおよびレジスタ2
2に記憶されている各種コマンドをWG25およ
びエンベロープジエネレータ26へ出力するため
のレジスタであり、アウトプツトバツフア55か
らアドレスが供給され、また、その入力端はデー
タバス30に接続されている。なお、上述した
ROM20,RAM21、レジスタ22およびデ
ータポート18の各記憶内容を第13図に示す。 次に、第1図に示す電子オルガンの動作を第2
図に示す流れ図に基づいて説明する。なお、以下
の説明において“1”とあるのは二値論理レベル
の“1”信号を示し、“0”とあるのは二値論理
レベルの“0”信号を示すものとする。 第2図イはプログラムの流れを示す流れ図であ
り、また第2図ロは割込処理ルーチンである。こ
の図に示すように、この電子オルガンのプログラ
ムはR1〜R8なる8個のメインルーチンおよび
I1〜I3なる3個の割込処理ルーチンから構成
される。そして、各ルーチンが複数のマイクロプ
ログラムモジユール化されマイクロプログラムメ
モリ45内に記憶され、またこれらのマイクロプ
ログラムモジユールを呼出すマクロ命令が処理プ
ログラムとしてROM20内に記憶されている。
以下、上記各ルーチンについて順次説明する。 (1) 初期リセツトルーチンR1 この電子オルガンにおいて電源が投入される
と、プログラムはまずこの初期リセツトルーチン
R1に入り、各部の初期リセツトが行なわれる。 (2) トーンレバー・オン/オフ検出ルーチンI1 この割込処理ルーチンは割込信号INTR2が数
100msecのインターバルで発生するたびに実行さ
れるもので、割込信号INTR2が発生した時点に
おける鍵盤回路11の各トーンレバースイツチの
オン/オフ状態を検出するものである。すなわ
ち、割込制御回路16において割込信号INTR2
が発生すると、アドレスデコーダ34にスイツチ
アドレス信号が供給され、このスイツチアドレス
信号に基づいて各トーンレバースイツチのオン/
オフ情報がバツフアバスドライバ35およびデー
タバス30を介してレジスタ22内に読込まれ
る。そして、この読込まれたトーンレバースイツ
チのオン/オフ情報に基づいて、レジスタ22内
に第3図に示すニユートーンレバー・ステイタス
テーブル(以下、NTSと略称する)60が作成
される。この場合、このNTS60においては、
各トーンレバー1〜6の音量設定が2進数によつ
て示されるようになつている。すなわち、図に示
す例においてはトーンレバー1,4,5,6が音
量「0」を要求し、トーンレバー2が音量「3」
を、トーンレバー3が音量「2」を要求してい
る。 (3) トーンレバー位置、変化検出ルーチンR2 前述した初期リセツトルーチンR1が終了する
と、プログラムはこのルーチンR2に進行する。
このルーチンR2は、現在のNTS60の内容が
前回このルーチンR2を実行した時点における同
NTS60の内容と異なつているか否かを検出す
るもので、このNTS60に内容とRAM21内に
作成されているオールドトーンレバー・ステイタ
ステーブル(以下、OTSと略称する;第3図参
照)61の内容とを比較することにより上記検出
が行なわれる。なおOTS61は前回このルーチ
ンR2を実行した時点におけるNTS60の内容
を示すもので、次に説明するルーチンR3におい
て作成される。そして、ルーチンR2を実行した
結果が「YES」(変化あり)の場合は、プログラ
ムがルーチンR3に進行し、また「NO」(変化
なし)の場合はルーチンR4に進行する。 (4) トーンレバー処理ルーチンR3 このルーチンR3は上記NTS60の内容に基
づいて第3図に示すトーンリクエストフアイル6
2をRAM21内に作成するものである。そし
て、この電子オルガンにおいては、このルーチン
R3において作成されるトーンリクエストフアイ
ル62に基づいてROM20内のトーンデータが
WG25の各チヤンネルに割当てられるようにな
つている。 すなわち、ROM20内には第3図に示すよう
に予め音量テーブル63、トーンレバー・インデ
ツクステーブル64およびトーンデータバンク6
5が設けられている。そして、音量テーブル63
には、トーンレバーによつて設定される音量
「1」〜「3」に対応する音量係数(WG25の
各チヤンネルはこの音量係数に基づいて音量設定
を行なう)が予め記憶され、トーンデータバンク
65には複数のトーンデータ、すなわち……トー
ンデータi−1、トーンデータi、トーンデータ
i+1、トーンデータi+2……が記憶され、ま
たトーンレバーインデツクステーブル64には、
各トーンレバー1〜6に対応するトーン(音色)
を構成するためのトーンデータのアドレスポイン
タが記憶されている。この場合、図に示す例につ
いて説明すると、トーンレバー1に対応するトー
ン(音色)はトーンデータi−1およびiから構
成され、したがつてトーンレバーインデツクステ
ーブル64のトーンレバー1に対応するスロツト
(記憶エリア)64aには、トーンデータバンク
65におけるトーンデータi−1,iの各先頭番
地、すなわちアドレスAおよびアドレスBが記憶
され、トーンレバー2に対応するトーンはトーン
データi+2によつて構成され、したがつてスロ
ツト64bにはアドレスDが記憶され、またトー
ンレバー3に対応するトーンはトーンデータi、
i+1から構成され、したがつてスロツト64c
にはアドレスB、アドレスCが記憶されている。
なお、この実施例においては各トーンレバーに対
応するトーンを構成するトーンデータの数を最大
2としたが、これは複数個可能であり、最大2に
制限する必要はない。 そして、プログラムがこのトーンレバー処理ル
ーチンR3(第4図にこのルーチンR3のフロー
チヤートを示す)に入ると、まずレジスタ22内
のNTS60(第3図)に記憶されているトーン
レバー1の音量情報が演算部15のレジスタ群5
0内に読出される。しかし、この場合音量が
「0」であるので、何らの処理も行なわれない。
次いで、トーンレバー2の音量情報がレジスタ群
50内に読出される。この場合、音量「3」が指
定されている。したがつてまずトーンレバーイン
デツクステーブル64のスロツト64b内のアド
レスポインタ(すなわち、アドレスD)がトーン
リクエストフアイル62のエリア62c内に書込
まれ、次いで音量テーブル63内の音量「3」に
対応する音量係数「1111111」が上記エリア62
c内に書込まれる(第3図参照)。次に、トーン
レバー3の音量情報がレジスタ群50内に読出さ
れる。この場合、音量「2」が指定されており、
したがつて、まずテーブル64のスロツト64c
内の第1のアドレスポインタ(すなわち、アドレ
スB)がトーンリクエストフアイル62のエリア
62d内に書込まれ、次に音量「2」に対応する
音量係数(「0100000」)が同エリア62d内に書
込まれ、次にスロツト64c内の第2のアドレス
ポインタ(すなわち、アドレスc)がエリア62
e内に書込まれ、次に音量「2」に対応する音量
係数(「0100000」)が同エリア62e内に書込ま
れる。このようにして、NTS60内の各トーン
レバーの音量情報が順次読出され、処理される。
そして、最後にトーンリクエストフアイル62内
に書込まれたアドレスポインタの数、すなわちト
ーンリクエストフアイル62に登録されたトーン
データの数が同トーンリクエストフアイル62の
ヘツダー(すなわち、エリア62a)に書込ま
れ、トーンリクエストフアイル62の作成が終了
する。トーンリクエストフアイル62の作成が終
了した後NTS60の内容をOTS61内に転送
し、プログラムはこのルーチンR3を出る。 このように、この電子オルガンにおいてはこの
ルーチンR3において第3図に示すようなトーン
リクエストフアイル62が作成される。この場
合、各トーンレバーはトーンレバーインデツクス
テーブル64のアドレスポインタのみと対応して
いるので、このテーブル64のアドレスポインタ
を変更することにより各トーンレバーに対し任意
のトーンデータ(音色)を対応させることができ
る。 なお、このトーンリクエストフアイル62にお
いて、エリア62bにはこのフアイル62に共通
する音色加工のための情報、例えばビブラート周
波数、ビブラート深さ、デイケイ長さ等が記憶さ
れている。すなわち、詳細な説明は省略するが、
予めこれらの音色加工のための情報をROM20
内に記憶しておき、音色加工用レバーの操作位置
にしたがつて音色加工情報をROM20から読出
しこのフアイル62に登録することにより、WG
25の各チヤンネルにおいて形成される楽音信号
に音色加工を施すことが可能になる。 ところで、上述したトーンリクエストフアイル
62作成の過程において、ヘツダー62aに記入
されるアドレスポインタ数の検出は、通常レジス
タ22内にトーンリクエストカウンタなるカウン
タを設け、アドレスポインタをフアイル62内に
書込むたびにこのトーンリクエストカウンタをイ
ンクリメントし、最後にこのトーンリクエストカ
ウンタのカウント結果を参照することにより行な
われる。また、上記過程おけるNTS60の内容
の順次読出し、トーンレバーインデツクステーブ
ル64の各スロツト内のアドレスポインタの順次
読出し、トーンリクエストフアイル62内の各エ
リアへの順次書込み等は、通常対応するポインタ
をたて、1つの処理が済むたびにこのポインタの
内容を進め、このポインタの内容に基づいて実行
されるものである。例えば、トーンリクエストフ
アイル62へアドレスポインタを書込む場合は、
まずトーンリクエストフアイルポインタなるポイ
ンタにエリア62cのエントリイアドレス(アド
レスE)をセツトし、このトーンリクエストフア
イルポインタに基づいてエリア62c内に書込
み、次いでトーンリクエストフアイルポインタの
内容をエリア62dのエントリイアドレス(アド
レスF)に進め、このエントリイアドレス(アド
レスF)に基づいてエリア62d内に書込み……
の如く行なわれる。しかしながら、これらの処理
はこの業界においては極く当然に行なわれる処理
であり、したがつてこの明細書においてはこれら
の処理過程の記載を省略している。 (5) キー・オン/オフ検出ルーチンI2 この割込処理ルーチンI2は割込信号INTR1
が数msecのインターバルで発生するたびに実行
されるもので、割込信号INTR1が発生した時点
における鍵盤回路11の各キースイツチのオン/
オフ状態を検出するものである。すなわち、割込
制御回路16において割込信号INTR1が発生す
ると、アドレスデコーダ34にスイツチアドレス
信号が供給され、このスイツチアドレス信号に基
づいてキースイツチのオン/オフ情報がバツフア
バスドライバ35およびデータバス30を介して
レジスタ22内に読込まれ、このレジスタ22内
に第5図に示すニユーキーボード・ステイタス・
テーブル(以下NKSと略称する)70が作成さ
れる。この図に示すNKS70において、“1”と
あるのはこの“1”に対応するキーが割込信号
INTR1発生時点において押下されていることを
示している。すなわち、この例では現在第1オク
ターブのC音、E音、第2オクターブのD#音、
第3オクターブのF#音、第4オクターブのA音
に各々対応するキーが押下されていることを示し
ている。なお、この図において無印は“0”を示
している。 (6) 押下キー位置・変化検出ルーチンR4 トーンレバー処理ルーチンR3が終了すると、
プログラムはこのルーチンR4に進行する。この
ルーチンR4は、現在のNKS70の状態が前回
このルーチンR4を実行した時点におけるNKS
70の状態と異なつているか否かを検出するもの
で、NKS70の内容と第5図に示すオールドキ
ーボード・ステイタステーブル(以下OKSと略
称する)71の内容とを比較することにより上記
検出が行なわれる。この場合、OKS71は前回
このルーチンR4を実行した時点におけるキース
イツチの状態を示すもので、後述するルーチンR
6において作成される。そして、このルーチンR
4を実行した結果が「YES」(変化あり)の場合
は、プログラムがルーチンR5に進行し、また
「NO」(変化なし)の場合はルーチンR2へ戻
る。 (7) キーオン・リクエストフアイル作成ルーチン
R5 このルーチンR5は新たに楽音発生をすべきキ
ー、言い換えれば新たに押下されたキーを検出
し、この検出結果に基づいて、第5図に示すキー
オン・リクエストフアイル(以下ON・RQと略
称する)72をRAM21上に作成するものであ
る。 このルーチンR5においては、まずOKS71
の各ビツトとNKS70の対応する各ビツトとの
間のエクスクルーシブオアがとられる(OKS
NKS)。この結果、状態が変化したキースイツチ
に対応するビツトのみ“1”となる。次いで、上
記演算結果とNKS70の各ビツトとの間のアン
ドがとられる。〔(NKS∧(OKSNKS)〕。この
結果、キースイツチが新たにオンとなつたビツト
のみ“1”となる。最後に、上記アンド演算の結
果とON・RQ72の各ビツトとの間のオアがと
られ、その結果が新たにON・RQ72に書込ま
れる。 ON・RQ=ON ・RQ∨{NKS∧(OKSNKS)} ……(1) ここで、最後のオア演算の意味について説明す
る。この電子オルガンは後に説明するキーオン・
チヤンネルアサインメントルーチンR7におい
て、ここで作られたON・RQ72に基づいて楽
音発生すべきキーをWG25の各チヤンネルに割
当てる処理を実行し、この割当て処理が修了した
時点で順次ON・RQ72の“1”ビツトを消去
するようになつている。ところで、このルーチン
R5が実行される時点で、前回ルーチンR5が実
行された際ON・RQ72に記入された“1”ビ
ツトが全て消去されているとは限らず、チヤンネ
ル割当処理をすべき“1”ビツトが残つている場
合がある。最後のオア演算は、この処理が済んで
いない“1”ビツトをON・RQ72上に残すた
めに行なわれるものである。第5図において第1
オクターブ・C音に丸印が付してあるのはこの処
理ビツトを示している。 (8) キーオフ・リクエストフアイル作成ルーチン
R6 このルーチンR6は楽音発生を停止すべきキ
ー、すなわち離鍵されたキーを検出し、この検出
結果に基づいて第5図に示すキーオフ・リクエス
トフアイル(以下、OF・RQと略称する)73を
RAM21上に作成するものである。 このルーチンR6においては、まずルーチンR
5と同様にOKS71、NKS70、OF・RQ3の
対応する各ビツト間で、 OF・RQ=OF ・RQ∨{∧(OKSNKS)} ……(2) なる演算がなされ、この演算結果がOF・RQ73
内に書込まれる。なおこの式において、は
NKS70の各ビツトの反転を意味している。ま
たオア演算の意味はルーチンR5の場合と同じで
ある。次にNKS70の内容がOKS71内に書込
まれる。すなわち、この処理により今回NKSと
して用いられたテーブルが次回のルーチンR4〜
R6の処理においてはOKS71として用いられ
ることになる。 (9) キーオン・チヤンネルアサインメントルーチ
ンR7 このルーチンR7はルーチンR5において作成
されたON・RQ72およびルーチンR3におい
て作成されたトーンリクエストフアイル62に基
づいて、新たに押下されたキーに対応する周波数
データおよびトーンデータをWG25の空チヤン
ネルに割当てる処理を実行するものである。 以下、第6図〜第8図を参照しこのルーチンR
7の実行過程を説明する。なお、第6図における
ON・RQ72は第5図におけるON・RQ72と
同一である。 プログラムがこのルーチンR7に入ると、まず
第7図に示すステツプS1に進行し、ON・RQ
72上の“1”ビツトの検出が行なわれる。この
検出は、ON・RQ72のまず第1オクターブに
対応するスロツトを左方(第6図において)へ1
ビツトずつシフトし、次いで第2オクターブに対
応するスロツトを左方へ1ビツトずつシフトし、
次いで第3,第4オクターブに対応するスロツト
を順次左方へシフトすることにより行なわれるも
ので、“1”ビツトを検出した時点で(ステツプ
S2)プログラムはステツプS3に進行する。第
6図に示す例においては、まず第1オクターブ・
C音の“1”ビツトが検出されるので、この時点
でプログラムがステツプS3に進行する。ステツ
プS3では、ROM20内に記載されている周波
数テーブルから第1オクターブ・C音に対応する
周波数データが読出され、レジスタ22内の周波
数データエリア75(予め設定されている)に転
送される。次いでステツプS4に進行すると、
RAM21上に用意されているビジイキーテーブ
ル76の第1オクターブ・C音に対応するスロツ
ト76aのエントリイアドレス(アドレスX)が
算出され、算出されたエントリイアドレス(アド
レスX)がレジスタ22内に一時記憶される。な
お、ビジイキーテーブル76とは予めRAM21
内に用意されているもので、各キーに対応して設
けられた48個のスロツト76a,76b,76c
……からなるものである。次に、ステツプS5に
進行すると、チヤンネルアサイメントテーブル
(以下CATと略称する)77内の空エリアの検出
が行なわれる。ここで、CAT77について説明
する。このCAT77は予めRAM21内に用意さ
れているもので、E1,E2……E15なる15個
のエリアから構成され、またこれらのエリアE
1,E2……E15は各々16ビツトからなる3個
のスロツトa1,b1,c1,a2,b2,c
2,……から構成されている。このCAT77は、
現在発音中の楽音(デイケイ状態にある楽音も含
む)がどのチヤンネルに割当てられているかを示
すテーブルであり、以下に説明するように、ある
キーに対応する楽音の発音が割当てられると各エ
リアE1,E2,……E15のヘツダー、すなわ
ちスロツトa1,a2,a3…………に該当キー
を表わすビジイキーテーブル76のエントリイア
ドレスが登録され、またスロツトb1,c1、ス
ロツトb2,c2…………に使用チヤンネルが登
録されるようになつている。この場合、スロツト
b,cの各ビツトがそれぞれWG25の32個のチ
ヤンネルに対応しており、さらに発音が割当てら
れたチヤンネルに対応するビツトに“1”が登録
される。 さて、プログラムがステツプS5に進行する
と、CAT77の各エリアのヘツダーを検索する
ことにより空エリアの検出が行なわれる。そし
て、例えばエリアE2が空エリアとして検出され
たとすると、エリアE2のエントリイアドレス
(アドレスY)がレジスタ22内に記憶され、そ
してステツプS6に進行する。ステツプS6で
は、レジスタ22内に設けられているビジイステ
イタスレジスタ78内の“0”ビツトの数が算出
される。このビジイステイタスレジスタ78は32
ビツトのレジスタであり、各ビツトが各々32個の
チヤンネルに対応し、また使用中のチヤンネルに
対応するビツトに“1”が登録されている。した
がつて、このステツプS6で算出される“0”ビ
ツトの数は現在の空チヤンネルの数に等しくな
る。ステツプS6においてビジイステイタスレジ
スタ78の“0”ビツトの数(空チヤンネルの
数)が算出されると、プログラムはステツプS7
へ進み、算出された“0”ビツトの数とトーンリ
クエストフアイル62(第3図参照)内に登録さ
れているトーンデータ数(すなわちトーンリクエ
ストフアイル62のヘツダー62a内に記憶され
ている数)とが比較される。この場合、“0”ビ
ツトの数がトーンデータ数より大きいかあるいは
等しいとすると(YES)、プログラムはステツプ
S8に進行する。ステツプS8では、ビジイステ
イタスレジスタ78内の“0”ビツトを検索する
ことにより空チヤンネルのチヤンネル番号が検出
される。第6図の例においては、まずスロツト7
8aの第2ビツトの“0”が検索され、これによ
り第2チヤンネルが空チヤンネルであることが検
出される。なお、ビジイステイタスレジスタ78
において、スロツト78aの第1〜第16ビツトが
各々第1〜第16チヤンネルに対応し、またスロツ
ト78bの第1〜第16ビツトが各々第17〜第32チ
ヤンネルに対応している。第2チヤンネルの空チ
ヤンネルが検出されると、プログラムはステツプ
S9に進行し、同チヤンネル番号「2」がチヤン
ネルレジスタ79内に格納される。次いで、ステ
ツプS10に進行すると、トーンリクエストフア
イル62に基づいてROM20内のトーンデータ
がレジスタ22内のトーンデータエリア80に転
送される。すなわち、第3図の例について説明す
ると、まずエリア62c内に記憶されているアド
レスDがレジスタ群50内に読出され、次いでこ
のアドレスDに基づいてROM20内のトーンデ
ータi+2が読出され、トーンデータエリア80
に転送される。次に、エリア62c内の音量係数
がエリア80に転送される。 そして、プログラムはステツプS11に進行
し、トーンデータの修飾(音色加工)が行なわれ
る。このトーンデータの修飾はトーンリクエスト
フアイル62のエリア62bに記憶されている音
色加工のための情報に基づいて行なわれるもの
で、この修飾によりトーンデータに音色加工(例
えば、ビブラートの付加)が施される。そして、
プログラムはステツプS12に進行する。ステツ
プS12では、チヤンネルレジスタ79に記憶さ
れている空チヤンネルのチヤンネル番号(この場
合、「2」に基づいてデータポート18(第1図)
の第2チヤンネルに対応する領域のエントリイア
ドレスが算出される。次いでステツプS13(第
8図)に進行すると、周波数データエリア75内
の周波数データおよびトーンデータエリア80内
のトーンデータ、音量係数が上記エントリイアド
レスに基づいてデータポート18の対応する領域
に出力される。次にオクターブS14に進行する
と、まずレジスタ22内に設けられた32ビツトの
スタートコマンドレジスタ81の第2チヤンネル
に対応するビツト(スロツト81aの第2ビツ
ト)に“1”がたてられ、次いでこのスタートコ
マンドレジスタ81の内容がデータポート18に
転送される。このようにして、データポート18
に転送された周波数データ、トーンデータ、音量
係数およびスタートコマンドはWG25の対応す
るチヤンネル(第2チヤンネル)に供給され、こ
れによりWG25の当該チヤンネル(第2チヤン
ネル)がスタートし、同第2チヤンネルにおいて
データポート18から供給されている周波数デー
タ、トーンデータ等に基づいて楽音信号が形成さ
れる。次に、プログラムはステツプS15に進
み、チヤンネルレジスタ79に記憶されているチ
ヤンネル番号「2」に基づいて、ステツプS5に
おいて検出されたエリアE2内のスロツトb2の
第2ビツトに“1”を書込む。(なお、このスロ
ツトb2の第2ビツトが第2チヤンネルに対応し
ている。)次いでステツプS16に進行し、チヤ
ンネルレジスタ79内のチヤンネル番号「2」に
基づいてビジイステイタスレジスタ78のスロツ
ト78aの第2ビツトに“1”が書込まれる。そ
して、ステツプS17へ進行する。 ステツプS17では、トーンリクエストフアイ
ル62に登録されている全てのトーンデータがチ
ヤンネル割当てされたか否かが判断される。この
場合、エリア62c(第3図)に登録されている
トーンデータの割当てのみしか済んでいないの
で、判断結果は「NO」であり、したがつてプロ
グラムはステツプS8に戻る。そして、上述した
ステツプS8〜S16の過程が再度繰返される。
すなわち、ステツプS8において空チヤンネルと
して第4チヤンネルが検出され、ステツプS9に
おいてチヤンネル番号「4」がチヤンネルレジス
タ79に格納され、ステツプS10においてトー
ンリクエストフアイル62のエリア62dに記憶
されているアドレスBに基づいてトーンデータバ
ンク65からトーンデータiが続出されトーンデ
ータエリア80に転送され、またエリア62d内
の音量係数がトーンデータエリア80に転送さ
れ、ステツプS11においてトーンデータの修飾
が行なわれ、ステツプS12においてデータポー
ト18の第4チヤンネルに対応する領域エントリ
イアドレスが算出され、ステツプS13において
周波数データエリア75内の周波数データおよび
トーンデータエリア80内のトーンデータ、音量
係数がデータポート18へ出力され、ステツプS
14においてスタートコマンドレジスタ81の第
4チヤンネルに対応するビツトに“1”がたてら
れ、これによりWG25の第4チヤンネルがスタ
ートし、ステツプS15,S16においてCAT
77のスロツトb2の第4ビツトおよびビジイス
テイタスレジスタ78のスロツト78aの第4ビ
ツトに“1”が書込まれ、そして、ステツプS1
7へ進行する。 ステツプS17では、再度全トーンデータの割
当てが終了したか否かが判断されるが、この場合
まだトーンリクエストフアイル62のエリア62
cに記憶されているアドレスCに対応するトーン
データの割当てが終了していないので、判断結果
は「NO」であり、したがつてプログラムは再度
ステツプS8へ戻り、ステツプS8〜S16の過
程が再度実行される。そして、このステツプS8
〜S16の過程が実行されると、トーンリクエス
トフアイル62のエリア62eに記憶されている
アドレスCに対応するトーンデータi+1が第5
チヤンネルに割当てられ、WG25の第5チヤン
ネルがスタートし、またCAT77のスロツトb
2の第5ビツトおよびビジイステイタスレジスタ
78のスロツト78aの第5ビツトに各々“1”
が書込まれる。 このようにして、第1オクターブ・C音のチヤ
ンネル割当てが終了し、スピーカ29からは、第
1オクターブのC音の音高で、かつそれぞれトー
ンデータi,i+1,i+2に対応する音色の3
種類の楽音が同時に発音される。また、この時点
でビジイステイタスレジスタ78、スタートコマ
ンドレジスタ81の第2,第4,第5チヤンネル
に対応するビツトには各々“1”が登録されてお
り、さらにCAT77のエリアE2の第2,第4,
第5チヤンネルに対応するビツトにも“1”が登
録されている。 そして、プログラムはステツプS17へ進行す
るが、このステツプでの判断結果は当然「YES」
であり、したがつてプログラムはステツプS18
へ進行する。このステツプS18では、割当処理
がなされた第1オクターブ・C音に対応するビジ
イーキーテーブル76のスロツト76aのエント
リイアドレス(アドレスX)が、CAT77のエ
リアE2のヘツダー(すなわち、スロツトa2)
に書込まれる。次いで、ステツプS19に進行す
ると、エリアE2のエントリイアドレス(アドレ
スY)がビジイキーテーブル76のスロツト76
a内に書込まれる。そして、ステツプS20に進
行し、ON・RQ72の第1オクターブ・C音に
対応する“1”ビツトが“0”とされる。こうし
て、第1オクターブ・C音に基づく割当処理が全
て終了する。 次に、プログラムは再びステツプS1に戻り、
ON・RQ72上の“1”ビツトの検出が行なわ
れる。この場合、第6図に示す例においては第2
オクターブ・D#音に対応する“1”ビツトが検
出され(ステツプS2)、したがつてプログラム
はステツプS3に進行し、以下上述した場合と全
く同様の割当処理がなされる。そして、第2オク
ターブ・D#音の割当処理が終了すると再び
ON・RQ72上の“1”ビツトの検出が行なわ
れ、次に検出された“1”ビツト(第3オクター
ブ・F#音)に対応する割当処理がなされる。こ
のようにしてON・RQ72上の“1”ビツトの
処理が全て終了すると、ステツプS2での判断結
果は「NO」となり、ルーチンR7における処理
が全て終了する。 次に、第7図におけるステツプS21について
説明する。上述した説明においてはステツプS7
における判断結果を「YES」として説明を進め
たが、これは「NO」となる場合もあり得る。す
なわち、ビジイステイタスレジスタ78の“0”
ビツトの数がトーンリクエストフアイル62のヘ
ツダー62a内に登録されている数より少ない場
合、言い換えればトーンデータをチヤンネルに割
当てたくとも、空チヤンネルの数が少なく、割当
てることができない場合は、ステツプS7の判断
結果は「NO」となり、プログラムはステツプS
21へ進む。このステツプS21では、デイケイ
状態にあるチヤンネルのチヤンネル番号を後述す
るダンプコマンドレジスタ85(第9図参照)へ
ロードし、さらにこのダンプコマンドレジスタ8
5の内容をデータポート18へ出力することによ
り、WG25においてデイケイ状態にあるチヤン
ネルを強制的に停止させてしまう。そして、ルー
チンR7を出る。このような処理をしておくと、
WG終了処理ルーチンI3においてビジイステイ
タスレジスタ78の対応する“1”ビツトが
“0”とされ、これにより空チヤンネルの数が増
加し、トーンデータの割当てが可能となる。な
お、この処理の意味は、デイケイ状態にある楽音
の発音より新たに押下されたキーに対応する楽音
の発音の方を優先するということである。また、
この処理を行なうために、レジスタ22内に設け
られたデイケイ状態のチヤンネル番号を記憶する
デイケイステイタスレジスタ82が利用される。 次に、CAT77のスロツトb2の第6ビツト
の“1”(丸印を付してある)について説明する。
この第6ビツトの“1”は今回第1オクターブ・
C音のキーが押下されたことにより割当てられた
ものではなく、前回同キーが押下された際割当て
られたものである。すなわち、前回押下されたキ
ーが離されると該キーが割当てられた各チヤンネ
ルにおいて所定のデイケイ時間を経た後楽音信号
の発生が停止し(なお、この楽音信号発生の停止
は各チヤンネル同時とは限らない)、楽音信号の
発生が停止したチヤンネルに対応するCAT77
内の“1”ビツトが“0”とされるが、ある割当
てチヤンネルのデイケイ時間が長い場合は該チヤ
ンネルにおいて今回同キーを押下した時点まで前
回の楽音信号が発生し続けていることがある。こ
の場合、同キーの新たに押下した時点でビジイキ
ーテーブル76のスロツト76aにはCAT77
のエリアE2のエントリイアドレス(アドレス
Y)が登録されており、またエリアE2には楽音
信号が発生し続けているチヤンネルに対応するビ
ツト(スロツトb2の第6ビツト)に“1”が残
つている。したがつて、今回の押下キーに対する
チヤンネル割当てはエリアE2に登録され、さら
にスロツトb2の第6ビツトの“1”も同エリア
E2にそのまま残されることになる。(なお、楽
音信号の発生が停止した場合の処理については後
述する割込処理ルーチンI3を参照のこと。) なお、この実施例においてはトーンリクエスト
フアイル62内の各トーンデータ毎にチヤンネル
をスタートされているが、各チヤンネルをまとめ
て同時にスタートさせることも可能である。 (10) キーオフ・チヤンネルマネジメントルーチン
R8 このルーチンR8は、ルーチンR6において作
成されたOF・RQ73およびルーチンR7におい
作成されたビジイキーテーブル76、CAT77
に基づいて、離されたキー(押下状態が解除され
たキー)に対応する楽音を消去するものである。
以下、このルーチンR6の実行過程を第9図,第
10図を参照し説明する。なお、第9図における
OF・RQ73は第5図におけるOF・RQ73と同
一である。 プログラムがこのルーチンR8に入ると、まず
第10図に示すステツプS1に進行し、OF・RQ
73上の“1”ビツトの検出が行なわれる。な
お、この検出は前述したON・RQ72上の“1”
ビツトの検出(第7図のステツプS1)の場合と
全く同様に行なわれる。そして、第9図に示す例
においては、まず第1オクターブ・A#音の
“1”ビツトが検出され(ステツプS2)、プログ
ラムがステツプS3に進行する。ステツプS3で
は、検出された“1”ビツトの位置(OF・RQ7
3上の位置)に基づいて、ビジイキーテーブル7
6の第1オクターブ・A#音に対応するスロツト
76mのエントリイアドレス(アドレスVとす
る)が算出される。 次にステツプS4に進行すると、算出されたエ
ントリイアドレス(アドレスV)に基づいてスロ
ツト76mの内容が読出され、レジスタ群50内
に転送される。この場合、スロツト76mの内容
は、第1オクターブ・A#音に関するチヤンネル
割当てがCAT77のエリアEnに登録されている
とすると、エリアEnのエントリイアドレス(ア
ドレスUとする)である。次にステツプS5に進
行すると、スロツト76mの内容(アドレスU)
に基づいてエリアEnのスロツトbnおよびcnの内
容が読出され、デイケイコマンドレジスタ84は
たはダンプコマンドレジスタ85のいずれかにロ
ードされる。 なお、いずれにロードされかはこの電子オルガ
ンの操作部に設けられた切替スイツチによつて制
御される。そして、ステツプS6に進行すると、
ステツプS5においてエリアEnの内容がロード
されたレジスタ84または85の内容がデータポ
ート18に出力され、これにより第1オクター
ブ・A#音に対応する楽音の発音が割当てられて
いるチヤンネル(第9図に示す例についていえ
ば、第1,第7,第8チヤンネル)の楽音信号の
発生が停止される。この場合、ステツプS5にお
いてデイケイコマンドレジスタ84にロードされ
た場合は、楽音がデイケイをもつて徐々に消去さ
れ、ダンプコマンドレジスタ85にロードされた
場合は、楽音が即座に消去される。次いでステツ
プS7へ進行すると、OF・RQ73上の第1オク
ターブ・A#音の“1”ビツトが消去され、再び
ステツプS1に戻る。そして、ステツプS1にお
いて第3オクターブ・F音の“1”ビツトが検出
されると、ステツプS2の判断結果が「YES」
となり、上述した場合と同様にステツプS3〜S
6の過程が実行され、第3オクターブ・F音が割
当てられているチヤンネルの楽音信号が停止さ
れ、またはデイケイ状態とされる。そして、ステ
ツプS7において第3オクターブ・F音の“1”
ビツトが消去され、再びステツプS1に戻る。こ
のようにして、OF・RQ73上の“1”ビツトの
処理が全て終了するとステツプS2での判断結果
が「NO」となり、このルーチンR8における処
理が終了する。 (11) WG終了処理ルーチンI3 この割込処理ルーチンI3は、WG25のチヤ
ンネルにおける楽音信号の発生が完全に停止した
時(デイケイ状態が終了した時)WG25から発
生する割込信号INTR6に基づいて実行されるも
ので、その主な目的はビジイステイタスレジスタ
78(第6図,第11図)の当該チヤンネルに対
応するビツトを“0”とし、これにより同チヤン
ネルを空チヤンネルとして新たに他のキーに対応
する楽音の発生を割当て得るようにすることであ
る。 すなわち、1個の押下されたキーに対応して、
複数のチヤンネル(上述した第3図,第6図等の
例においては3個のチヤンネル)において発生す
る楽音信号は、必ずしも同一タイミングで停止す
るとは限らず、例えばパーカツシブ系の音の場合
はキーが押下されているにもかかわらず停止して
しまうことがある。このような場合に、同一キー
に対応する他のチヤンネルの楽音信号が全て停止
するまで、すでに楽音信号が停止したチヤンネル
を待機させるとすると、チヤンネル使用の効率が
非常に悪いものになる。この電子オルガンはこの
ような点を考慮し、楽音発生が停止したチヤンネ
ルを即座に他のキーに解放し得るように、この割
込処理ルーチンI3を設けている。 以下、第11図,第12図を参照しこの割込処
理ルーチンI3の実行過程について説明する。な
お以下の説明においては、いま第7チヤンネルに
おいて楽音信号の発生が停止し、またこの第7チ
ヤンネルがCAT77のエリアE6に登録されて
いるものとする。 第7チヤンネルにおいて楽音信号の発生が停止
し、これによりWG25から割込信号INTR3が
発生すると、プログラムは先ず第12図に示すス
テツプS1に進行する。そして、このステツプS
1においてビジイステイタスレジスタ78のスロ
ツト78aの第7ビツト(第7チヤンネルに対
応)が“0”とされ、次いでステツプS2に進行
する。このステツプS2および次のステツプS3
はCAT77に登録されている第7チヤンネルを
消去する、具体的にいえばエリアE6の第7チヤ
ンネルに対応するスロツトb6の第7ビツトの
“1”を消去するためのものである。そしてこの
処理を行なわれなければならない理由は次の通り
である。例えば、第7チヤンネルにおいて今まで
発生していた楽音信号がパーカツシブ系の楽音信
号であり、また同楽音信号の発生が停止した時点
で同楽音信号に対応するキー(最初のキーと称
す)がまだ押下されたままであつたとする。そし
て、同楽音信号が停止した時点でビジイステイタ
スレジスタ78の第7チヤンネルに対応するビツ
トが“0”とされることにより(ステツプS1)、
最初のキーが離される前に新たに押下されたキー
(次のキーと称す)に対応する楽音の発生がこの
第7チヤンネルに割当てられる可能性がある。こ
のような場合に上述した処理を行なつていないと
すると、最初のキーが離された時点で同最初のキ
ーに対応するCAT77のエリアの内容が例えば
デイケイコマンドレジスタ84に転送され、さら
にこのデイケイコマンドレジスタ84の内容がデ
ータポート18に出力されて、次のキーに対応す
る楽音の発生が割当てられている第7チヤンネル
をもデイケイ状態に移行させてしまうことにな
る。このような不都合を除くためにステツプS2
およびS3による処理が必要となる。 さて、プログラムがステツプS2に進行すると
CAT77のエリアE1のヘツダー(スロツトa
1)が“0”であるか否かが判断される。この場
合、例えば「NO」(“0”でない)とすると、プ
ログラムはステツプS3に進行する。ステツプS
3では、まずエリアE1のスロツトb1,c1の
各ビツトとビジイステイタスレジスタ78の対応
するビツトとの間で論理ANDがとられ、次いで
この演算結果がスロツトb1,c1内に格納され
る。これによりスロツトb1の第7ビツトに
“1”があつた場合はその“1”が消去される。
なお、この例においてはエリアE6のスロツトb
6の第7ビツトに“1”があるので、エリアE6
のスロツトb1の第7ビツトに“1”はないはな
い。したがつて、上記AND演算の結果は、演算
前のエリアE1の内容と同一となる。 ステツプS3の実行が終了するとステツプS4
へ進行する。このステツプS4では、エリアE1
の内容(スロツトb1,c1の内容)が全て
“0”か否かが判断される。この場合、エリアE
1には“1”が残つているので判断結果は
「NO」となり、プログラムはステツプS6へ進
む。このステツプS6では上述したステツプS3
における処理がヘツダーが“0”でない全てのエ
リアE1〜E15においてなされたか否かが判断
される。この場合、エリアE1の処理しかなされ
ていないので、判断結果は「NO」であり、した
がつてプログラムは再びステツプS2に戻る。ス
テツプS2では、今度はエリアE2のヘツダー
(スロツトa2)が“0”か否かが判断される。
この場合、ヘツダーが“0”とすると
(「YES」)、プログラムはステツプS6に進む。
このステツプS6での判断結果は「NO」であ
り、プログラムは再びステツプS2に進み、エリ
アE3のヘツダーが調べられる。このうにしてエ
リアE1,E2,……と順次各エリアが調べら
れ、またステツプS3の処理がなされ、そしてス
テツプS2においてエリアE6のヘツダー(スロ
ツトa6)が調べられたとする。この場合、ステ
ツプS2における判断結果は「NO」となり、ス
テツプS3に進む。そして、このステツプS3に
おいてビジイステイタスレジスタ78の内容とエ
リアE6のスロツトb6,c6の内容との論理
ANDがとられることにより、スロツトb6の第
7ビツトの“1”が消去される(“0”とされ
る)。次いで、ステツプS4へ進行すると、エリ
アE6のスロツトb6,c6の内容が全て“0”
であるか否かが判断され、この場合、まだ“1”
が残つているとするとプログラムはステツプS6
へ進行する。こうして、全エリアE1〜E15に
ついての処理が終了するとプログラムはこの割込
処理ルーチンI3を出る。 次に、例えばいま第8チヤンネルが終了し、ま
たこの第8チヤンネルがCAT77のエリアE7
に登録されており、さらにこの第8チヤンネルで
発生していた楽音信号のデイケイ時間が比較的長
かつた場合について説明する。 割込信号INTR3が発生し、プログラムがステ
ツプS1に進行すると、ビジイステイタスレジス
タ78のスロツト78aの第8ビツト(第8チヤ
ンネルに対応)の“1”が消去される。次いで、
前述した場合と同様にしてエリアE1〜E6が処
理された後、ステツプS3においてエリアE7の
スロツトb7の第8ビツトの“1”が消去され、
そしてステツプS4へ進む。ここで、第8チヤン
ネルの楽音信号のデイケイ時間が比較的長かつた
ため、第8チヤンネルが終了した時点ではエリア
E7の他の“1”ビツトが全て消去されていたと
する。この場合、ステツプS3の実行によつてス
テツプS4の判断結果は「YES」となり、プロ
グラムはステツプS5へ進行する。そして、この
ステツプS5において、まずエリアE7のヘツダ
ーに記憶されているビジイキーテーブル76(第
9図参照)のエントリイアドレスに基づいて、同
エントリイアドレスによつて指示されるビジイキ
ーテーブル76のスロツトの内容が消去され、次
にエリアE7のヘツダーが消去される。すなわ
ち、エリアとビジイキーテーブルとの結合が解か
れる。そして、この処理によりエリアE7が他の
キーに対して解放されることになる。 なお、参考までにこれまでに説明したROM2
0,RAM21レジスタ22の各内容をまとめて
第13図に示す。 最後に、第1図に示すトーンレバー38として
用いられるエンコーダスイツチを第14図に示す
原理図を用いて説明する。基板38a上には、図
示する4つの領域a,b,c,d間に連続して導
体(図中斜線で示す)が形成された接点38b,
領域a,cに導体が形成され且つ領域b,dに絶
縁体(図中白い部分で示す)が形成された点38
c、領域a,bに導体が形成され且つ領域c,d
に絶縁体が形成された接点38dがそれぞれ配設
され、更にこれら各接点38b,38c,38d
上の各領域a,b,c,d上をこれら接点38b
〜38dに接触しながら図中の矢印方向eまたは
fにスライドできるようにした導体からなる接点
スライダ38eが配設されている。また上記各接
点38b,38c,38dはそれぞれ対応する端
子38f,38g,38hに接続されている。更
に上記端子38fにはスキヤンストローブ信号が
加えられている。他方、端子38g,38hはそ
れぞれ対応するダイオードD0,D1のカソード
に接続され、上記ダイオードD0,D1の各アノ
ードはそれぞれ対応するバツフアアンプB0,B
1の入力端に接続されている。更にまた上記ダイ
オードD0,D1の各アノードは一端が電源+
Vccに接続された抵抗R0,R1の各他端にも接
続され、また上記バツフアアンプB0,B1の出
力端からは信号BIT<0>またはBIT<1>が出
力されるように構成されている。 上記スキヤンストローブ信号は、上述したエン
コーダスイツチをスキヤンするための信号で、こ
の実施例の場合前述した第1図のアドレスデコー
ダ34にスイツチアドレス信号が供給されたとき
に該デコーダ34から出力される。 エンコーダスイツチが上記のように構成されて
いるので、たとえば第14図に示すエンコーダス
イツチが第3図におけるトーンレバー1として使
用されているときには、このエンコーダスイツチ
の接点スライダ38eは第14図に想像線で示す
領域dの位置に設定されていることになる。つま
り、接点38c,38dの各領域dは接点38b
と電気的に遮断されているから、端子38fにス
キヤンストローブ信号が入力されても各ダイオー
ドD0,D1のアノードは電源+Vccの電圧レベ
ルにあり、したがつて各バツフアアンプB0,B
1の出力信号BIT<0>、BIT<1>の出力レベ
ルはともに2値論理レベル“0”である。したが
つてトーンレバー1は音量0のリクエスト状体に
あることになる。 なお、上記エンコーダスイツチは2ビツトのバ
イナリコードによる4段階の音量切換え用とした
が、更に3ビツト、4ビツトのようなバイナリコ
ードによる多数段階の音量切換え用にすることも
容易である。またエンコーダスイツチとしてはバ
イナリコードのみならずグレイコードのような他
のコードによるものでも使用できる。 以上説明したように、この発明によればトーン
レバースイツチの走査間隔をキースイツチの走査
間隔より大としたので、トーンレバースイツチの
走査をキースイツチの走査と同時に行う場合に比
較し、スイツチ走査に要する時間を短縮すること
ができる。この結果、特にマイクロコンピユータ
を用いた電子楽器においては、スイツチ走査以外
の時間が多くなることから、この時間で種々の処
理が可能となり、実用的効果が大である。
The present invention relates to an electronic musical instrument such as an electronic organ. As is well known, electronic musical instruments include a large number of key switches for detecting key operations and a large number of tone lever switches (or tone levers) for detecting the operation status of tone control operators (tone levers). It is provided. When musical tones are generated, the operating states of the above-mentioned switches and the like are constantly scanned, and musical tones are formed based on the results of this scanning. Incidentally, the scanning of the above-mentioned key switches takes more time as the number of switches increases. Therefore, the more keys and tone levers an electronic musical instrument has, the more efficient it becomes to scan the switches in a short time. Therefore, the present invention provides an electronic musical instrument that can efficiently scan key switches and the like in a short time, so that changes in the operating state of the tone lever take a much longer time than changes in the operating state of the keys. Focusing on the phenomenon that occurs in
It is characterized in that the time interval from one scan to the next scan is larger than the scan interval of the key switch. More specifically, the present invention provides: a plurality of keys, a plurality of timbre control operators, and a plurality of timbre control operators provided in common to the plurality of keys and the plurality of timbre control operators; A first process of scanning the plurality of timbre control operators to obtain key status indicating the key depression status of each key, and a second process of scanning the plurality of timbre control operators to obtain operator information indicating the operation status of each operator. The process is selectively executed, and the first process is repeatedly executed at a first timing of the process, and the second process is repeatedly executed at a second timing that is longer than the interval between the first timings. and processing means for repeatedly executing the process described above, and the pitch and timbre of musical tones are controlled based on the key information and the operator information. Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an electronic organ (electronic musical instrument) according to the present invention.The electronic organ shown in this diagram can be roughly divided into keyboard circuit 1.
1, an assigner 12, and a tone generator 13. The assigner 12 is the controller 1
4, a calculation control unit 19 including a calculation unit 15, an interrupt control circuit 16, a pulse generator 17, and a data port 18; a ROM (read only memory) 20;
It is composed of a RAM (random access memory) 21 and a first storage section 23 having a register 22, and the musical tone generating section 13 is a wave generator (hereinafter referred to as WG) having 32 channels.
25, an envelope generator 26 that sends envelope information to this WG 25, and a D/A
It is composed of a (digital/analog) conversion circuit 27, an amplifier 28, and a speaker 29. In addition,
The control section 14 and calculation section 15 described above are usually constructed using a microcomputer. Furthermore, the above-mentioned envelope is the envelope of the musical tone signal. That is, a normal musical tone signal has an envelope consisting of three states: a rising state (attack state) B1, a sustaining state B2, and a falling state (decay state) B3, as indicated by the symbol B in FIG. . This electronic organ operates under program control, and its program is composed of a processing program stored in the ROM 20 and various microprograms stored in the microprogram memory 45 in the control section 14. Also,
Various tone data and frequency data necessary for forming musical tone signals (digital signals) in the WG 25 are stored in the ROM 20. Based on the above processing program and microprogram, the system operates as follows. That is, when a key is pressed, the keyboard circuit 11 first
supplies key switch information corresponding to the pressed key to the assigner 12 via the data bus 30. The assigner 12 outputs frequency data and tone data corresponding to the supplied key switch information.
Read from ROM20 and transfer the read data to WG2
Allocate to multiple channels of 5. WG2
Each of the channels 5 forms a musical tone signal (digital signal) based on data assigned to the channel and envelope information supplied from the envelope generator 26. The musical tone signals formed by these channels are converted into analog signals by the D/A converter 27, and are emitted as musical tones from the speaker 29 via the amplifier 28. The outline of this electronic organ has been described above, and now the details of this electronic organ will be explained. First, the keyboard circuit 11 includes an address decoder 34,
Buffer bus driver 35, matrix circuit 3
Consists of 6. The address decoder 34 decodes the switch address signal supplied via the address bus 37.
Each of these output terminals is connected to each column line of the matrix circuit 36, respectively. The matrix circuit 36 is a matrix of 12 rows and 5 columns, and at each intersection of this matrix,
The contacts of each switch of the tone lever (a lever for setting tones such as "Violin" and "Flute") 38 and the contacts of each key switch of the keyboard key 39 are connected together with diodes as shown by symbol A in the figure. It is inserted. In this embodiment, for convenience of explanation, it is assumed that the tone lever 38 consists of six tone levers, and each tone lever can adjust the volume in four stages (therefore, the information regarding each tone lever is It is represented by 2 bits, and corresponding to these 2 bits, two tone lever switches are set for each tone lever.
12 keys in total), and the keyboard keys 39 are composed of 4 octaves (12×4=48 keys). The switches of each tone lever are arranged in one row on the left side of the matrix circuit 36 (in the figure) (the two switches surrounded by broken lines in the figure are one row).
(corresponds to two tone levers), and keyboard key 3.
Nine key switches are arranged in four columns on the right side of the matrix circuit 36. The buffer bus driver 35 is a bus driver for outputting on/off information of each of the switches to the data bus 30, and has 12 input terminals and an output terminal, and the input terminal is connected to each row line of each matrix circuit 36. The output terminal is connected to the data bus 30. The control unit 14 includes an instruction register 4
2, an instruction decoder 43, a microprogram/address sequencer 44, a microprogram memory 45 (second storage section), and a pipeline register 46. The instruction register 42 temporarily stores each instruction of the processing program read from the ROM 20, and the instructions temporarily stored in the instruction register 42 are transferred to the instruction decoder 4.
3 and supplied to the microprogram address sequencer 44. The microprogram address sequencer 44 specifies the address of the microprogram memory 45 based on the output of the instruction decoder 43, and as a result, the processing program temporarily stored in the instruction register 42 is transferred from the microprogram memory 45. The microprogram corresponding to the instruction is read and the pipeline register 4
6. The calculation unit 15 includes a microfunction decoder (hereinafter abbreviated as MFD) 48 and a calculation circuit 4.
9, etc., and decodes each instruction of the microprogram supplied from the control unit 14 and executes a predetermined process. That is, MFD4
8 decodes each instruction of the microprogram supplied from the pipeline register 46, and based on the decoding result, register group 50, multiplexers 51, 52, arithmetic circuit 49, memory address register 53, data register 54, output Control signals are output to buffers 55 and 56, respectively. The register group 50 is a working register used in the process of processing each instruction of the microprogram, and the output of the arithmetic circuit 49 is read by the control signal from the MFD 48. is supplied to the input end of The multiplexer 51
The input terminal of is connected to the data bus 30, the third input terminal is connected to the output terminal of the data register 54, and the first to third input terminals are connected to the output terminal of the data register 54.
The data obtained at the third input terminal is selectively outputted to the arithmetic circuit 49. multiplexer 5
2 has its first input terminal connected to the data bus 30 and its second input terminal connected to the output terminal of the data register 54, respectively, and selectively transmits data obtained at these first and second input terminals. It is output to the arithmetic circuit 49. The arithmetic circuit 49 receives various data supplied from the multiplexers 51 and 52 (this data includes address data specifying the address of each memory in the first storage section 23 and data used when allocating the above-mentioned keys to channels). ) is calculated based on the control signal from the MFD 48, and the calculation result is supplied to the memory address register 53 or data register 54. The memo address register 53 temporarily stores address data supplied from the arithmetic circuit 49.
The output of No. 3 is output to the address bus 37 via the output buffer 55. data register 5
4 temporarily stores data supplied from the arithmetic circuit 49 (data used when assigning keys to channels), and the output of this data register 54 is output to the data bus 30 via an output buffer 56. Ru. The interrupt control circuit 16 performs various processes when an interrupt occurs. Here, the interrupt signal of this electronic organ will be explained. This electronic organ has three interrupt signals INTR1, INTR2, and INTR3. Interrupt signal INTR1 is pulse generator 1
Based on the output of 7, the interrupt control circuit 16
This is an interrupt signal that is periodically generated every sec, and when this interrupt signal INTR1 is generated, on/off information of each key switch of the keyboard keys 39 is read into the RAM 21. The interrupt signal INTR2 is an interrupt signal generated by frequency-dividing the output of the pulse generator 17 by a frequency divider in the interrupt control circuit 16, and has a frequency of several 100 msec.
Occurs periodically. And this interrupt signal
When INTR2 occurs, on/off information for each switch of the tone lever 38 is read into the RAM 21. Note that the period of interrupt signal INTR2 is the interrupt signal
The reason why the cycle is much larger than that of INTR1 is that normally each key is operated frequently, but
This is because each tone lever is not operated as frequently as each key. The interrupt signal INTR3 is an interrupt signal supplied from the WG 25, and is generated when the musical tone signal formed in each channel within the WG 25 becomes 0. Note that this interrupt signal
INTR3 will be described later. And these interrupt signals INTR1 to INTR3
When any of the above occurs, the control unit 14 detects this, reads the interrupt instruction into the instruction register 42, and decodes it when the currently executing microprogram module is completed.
The priorities of the interrupt signals INTR1 to INTR3 are determined in the interrupt control circuit 16 as INTR3>INTR1>INTR2. As mentioned above, the ROM 20 stores processing programs, frequency data, tone data, etc., and is supplied with an address signal from the output buffer 55 via the address bus 37, and read out using the same address signal. Each instruction or various data of the processing program is transferred to the data bus 3.
Output to 0. The RAM 21 stores various data tables, data files, etc. used in channel assignment, and is supplied with address signals from the output buffer 55, and its input/output ends are connected to the data bus 30. . The register 22 stores various statuses or commands (described later), and is supplied with an address signal from an output buffer 55, and its input end is connected to the data bus 30. Data port 18 is connected to frequency data, tone data stored in ROM 20, and register 2.
This is a register for outputting various commands stored in WG 25 and envelope generator 26 to WG 25 and envelope generator 26. Addresses are supplied from output buffer 55, and its input end is connected to data bus 30. In addition, the above
The contents stored in the ROM 20, RAM 21, register 22 and data port 18 are shown in FIG. Next, the operation of the electronic organ shown in FIG.
The explanation will be based on the flowchart shown in the figure. In the following description, "1" indicates a binary logic level "1" signal, and "0" indicates a binary logic level "0" signal. FIG. 2A is a flowchart showing the flow of the program, and FIG. 2B is an interrupt processing routine. As shown in this figure, the program of this electronic organ consists of eight main routines R1 to R8 and three interrupt processing routines I1 to I3. Each routine is converted into a plurality of microprogram modules and stored in the microprogram memory 45, and macro instructions for calling these microprogram modules are stored in the ROM 20 as processing programs.
Each of the above routines will be sequentially explained below. (1) Initial Reset Routine R1 When power is turned on in this electronic organ, the program first enters this initial reset routine R1, and initial resets of each part are performed. (2) Tone lever on/off detection routine I1 This interrupt processing routine
This is executed every time the interrupt signal INTR2 occurs at an interval of 100 msec, and detects the on/off state of each tone lever switch in the keyboard circuit 11 at the time the interrupt signal INTR2 occurs. That is, in the interrupt control circuit 16, the interrupt signal INTR2
When this occurs, a switch address signal is supplied to the address decoder 34, and each tone lever switch is turned on/off based on this switch address signal.
Off information is read into register 22 via buffer bus driver 35 and data bus 30. Based on the read tone lever switch on/off information, a new tone lever status table (hereinafter abbreviated as NTS) 60 shown in FIG. 3 is created in the register 22. In this case, in this NTS60,
The volume setting of each tone lever 1-6 is indicated by a binary number. That is, in the example shown in the figure, tone levers 1, 4, 5, and 6 request a volume of "0", and tone lever 2 requests a volume of "3".
, the tone lever 3 requests a volume of "2". (3) Tone lever position and change detection routine R2 When the above-mentioned initial reset routine R1 is completed, the program advances to this routine R2.
This routine R2 specifies that the current contents of NTS60 are the same as when this routine R2 was executed last time.
This is to detect whether the contents are different from the contents of the NTS60 and the contents of the old tone lever status table (hereinafter referred to as OTS; see Figure 3) 61 created in the RAM21. The above detection is performed by comparing the . Note that OTS61 indicates the contents of NTS60 at the time when this routine R2 was executed last time, and is created in routine R3, which will be explained next. If the result of executing routine R2 is "YES" (change), the program proceeds to routine R3, and if "NO" (no change), the program proceeds to routine R4. (4) Tone lever processing routine R3 This routine R3 processes the tone request file 6 shown in FIG. 3 based on the contents of the above NTS60.
2 is created in the RAM 21. In this electronic organ, the tone data in the ROM 20 is stored based on the tone request file 62 created in this routine R3.
It is now assigned to each channel of WG25. That is, as shown in FIG. 3, the ROM 20 contains a volume table 63, a tone lever index table 64, and a tone data bank 6 in advance.
5 is provided. And the volume table 63
In the tone data bank 65, volume coefficients (each channel of WG 25 sets the volume based on this volume coefficient) corresponding to the volume "1" to "3" set by the tone lever are stored in advance. stores a plurality of tone data, namely tone data i-1, tone data i, tone data i+1, tone data i+2, etc., and the tone lever index table 64 stores:
Tones corresponding to each tone lever 1 to 6
An address pointer of tone data for configuring the tone data is stored. In this case, to explain the example shown in the figure, the tone corresponding to tone lever 1 is composed of tone data i-1 and i, and therefore the slot corresponding to tone lever 1 of tone lever index table 64 is (Storage area) 64a stores the respective leading addresses of tone data i-1 and i in tone data bank 65, that is, address A and address B, and the tone corresponding to tone lever 2 is composed of tone data i+2. Therefore, the address D is stored in the slot 64b, and the tone corresponding to the tone lever 3 is the tone data i,
i+1 and therefore slot 64c
Address B and address C are stored in .
In this embodiment, the maximum number of tone data constituting the tone corresponding to each tone lever is two, but it is possible to have a plurality of pieces of tone data, and there is no need to limit the number to two. When the program enters this tone lever processing routine R3 (a flowchart of this routine R3 is shown in FIG. 4), first, the tone lever 1 volume information stored in the NTS60 (FIG. 3) in the register 22 is the register group 5 of the calculation unit 15
Read within 0. However, since the volume is "0" in this case, no processing is performed.
Then, the volume information of the tone lever 2 is read into the register group 50. In this case, volume "3" is specified. Therefore, the address pointer in slot 64b of tone lever index table 64 (i.e., address D) is first written into area 62c of tone request file 62, and then corresponds to volume "3" in volume table 63. The volume coefficient "1111111" is the area 62 above.
c (see Figure 3). Next, the volume information of the tone lever 3 is read into the register group 50. In this case, volume "2" is specified,
Therefore, first, the slot 64c of the table 64
The first address pointer (that is, address B) in the tone request file 62 is written in the area 62d, and then the volume coefficient ("0100000") corresponding to the volume "2" is written in the same area 62d. The second address pointer in slot 64c (i.e., address c) is then placed in area 62.
Then, the volume coefficient ("0100000") corresponding to the volume "2" is written in the same area 62e. In this way, the volume information of each tone lever in the NTS 60 is sequentially read out and processed.
Finally, the number of address pointers written in the tone request file 62, that is, the number of tone data registered in the tone request file 62, is written in the header (i.e., area 62a) of the tone request file 62. , the creation of the tone request file 62 is completed. After the creation of the tone request file 62 is completed, the contents of the NTS 60 are transferred to the OTS 61, and the program exits from this routine R3. In this way, in this electronic organ, a tone request file 62 as shown in FIG. 3 is created in this routine R3. In this case, each tone lever corresponds only to the address pointer of the tone lever index table 64, so by changing the address pointer of this table 64, arbitrary tone data (timbre) can be made to correspond to each tone lever. be able to. Note that in this tone request file 62, information for tone processing common to this file 62, such as vibrato frequency, vibrato depth, decay length, etc., is stored in area 62b. In other words, although detailed explanation is omitted,
Information for these tone processing is stored in ROM20 in advance.
By storing tone processing information in the ROM 20 and registering it in this file 62 according to the operation position of the tone processing lever,
It becomes possible to perform timbre processing on musical tone signals formed in each of the 25 channels. By the way, in the process of creating the tone request file 62 described above, the number of address pointers written in the header 62a is normally detected by providing a counter called a tone request counter in the register 22, and detecting the number of address pointers written in the header 62a every time an address pointer is written in the file 62. This is done by incrementing this tone request counter and finally referring to the count result of this tone request counter. In addition, in the above process, sequential reading of the contents of the NTS 60, sequential reading of address pointers in each slot of the tone lever index table 64, sequential writing to each area in the tone request file 62, etc. are normally performed by following the corresponding pointers. The contents of this pointer are advanced each time one process is completed, and execution is performed based on the contents of this pointer. For example, when writing an address pointer to the tone request file 62,
First, the entry address (address E) of the area 62c is set in a pointer called the tone request file pointer, and the entry address (address E) of the area 62d is written based on this tone request file pointer. Proceed to F) and write in area 62d based on this entry address (address F)...
It is done as follows. However, these treatments are quite common in this industry, and therefore, description of these treatment steps is omitted in this specification. (5) Key on/off detection routine I2 This interrupt processing routine I2 uses the interrupt signal INTR1
This is executed every time the interrupt signal INTR1 occurs at an interval of several milliseconds, and turns on/off each key switch in the keyboard circuit 11 at the time the interrupt signal INTR1 occurs.
This detects the off state. That is, when the interrupt signal INTR1 is generated in the interrupt control circuit 16, a switch address signal is supplied to the address decoder 34, and based on this switch address signal, key switch on/off information is transmitted to the buffer bus driver 35 and the data bus 30. The new keyboard status shown in FIG.
A table (hereinafter abbreviated as NKS) 70 is created. In the NKS70 shown in this figure, "1" means that the key corresponding to this "1" is the interrupt signal.
This shows that it was pressed at the time of INTR1 occurrence. In other words, in this example, the current C note, E note in the first octave, D# note in the second octave,
This indicates that keys corresponding to the F# note in the third octave and the A note in the fourth octave are being pressed. Note that in this figure, no mark indicates "0". (6) Pressed key position/change detection routine R4 When tone lever processing routine R3 is completed,
The program advances to this routine R4. This routine R4 indicates that the current state of NKS70 is the NKS at the time when this routine R4 was executed last time.
The above detection is performed by comparing the contents of the NKS 70 and the contents of the old keyboard status table (hereinafter abbreviated as OKS) 71 shown in FIG. 5. . In this case, OKS71 indicates the state of the key switch at the time when this routine R4 was executed last time.
6. And this routine R
If the result of executing step 4 is "YES" (change), the program proceeds to routine R5, and if "NO" (no change), the program returns to routine R2. (7) Key-on request file creation routine R5 This routine R5 detects a key that should generate a new musical tone, in other words, a newly pressed key, and based on this detection result, creates a key-on request as shown in FIG. A file (hereinafter abbreviated as ON.RQ) 72 is created on the RAM 21. In this routine R5, first OKS71
An exclusive OR is taken between each bit of the NKS 70 and the corresponding bit of the NKS 70 (OKS
NKS). As a result, only the bit corresponding to the key switch whose state has changed becomes "1". Next, the above calculation result and each bit of NKS 70 are ANDed. [(NKS∧(OKSNKS)]. As a result, only the bit where the key switch is newly turned on becomes “1”.Finally, the OR between the result of the above AND operation and each bit of ON/RQ72 is determined. and the result is newly written to ON・RQ72. ON・RQ=ON・RQ∨{NKS∧(OKSNKS)}...(1) Here, we will explain the meaning of the last OR operation.This electronic The organ is a key-on organ, which will be explained later.
In the channel assignment routine R7, a process is executed to assign keys for generating musical tones to each channel of WG25 based on the ON・RQ72 created here, and when this assignment process is completed, “1” of ON・RQ72 is executed. ``It's supposed to erase bits. By the way, at the time this routine R5 is executed, all the "1" bits written in ON-RQ72 when the routine R5 was executed last time are not necessarily erased, and the "1" bits that should be processed for channel allocation are not always cleared. ``There may be some bits left. The final OR operation is performed to leave unprocessed "1" bits on the ON.RQ 72. In Figure 5, the first
The circle marked on the octave C note indicates this processing bit. (8) Key-off request file creation routine R6 This routine R6 detects a key that should stop generating musical tones, that is, a key that has been released, and based on this detection result, creates a key-off request file (hereinafter referred to as (abbreviated as OF・RQ) 73
It is created on the RAM21. In this routine R6, first the routine R
5, the following operation is performed between the corresponding bits of OKS71, NKS70, and OF・RQ3: OF・RQ=OF・RQ∨{∧(OKSNKS)} ……(2) The result of this operation is OF・RQ73.
written inside. Note that in this formula, is
This means the inversion of each bit of NKS70. Furthermore, the meaning of the OR operation is the same as in routine R5. Next, the contents of NKS 70 are written into OKS 71. In other words, through this process, the table used as NKS this time will be used in the next routine R4~
It will be used as OKS71 in R6 processing. (9) Key-on channel assignment routine R7 This routine R7 generates the frequency data corresponding to the newly pressed key based on the ON-RQ72 created in routine R5 and the tone request file 62 created in routine R3. It executes the process of allocating tone data to an empty channel of WG25. Hereinafter, with reference to FIGS. 6 to 8, this routine R
The execution process of step 7 will be explained. In addition, in Figure 6
ON.RQ72 is the same as ON.RQ72 in FIG. When the program enters this routine R7, it first proceeds to step S1 shown in FIG.
Detection of the "1" bit on 72 is performed. This detection is performed by first moving the slot corresponding to the first octave of ON・RQ72 to the left (in Figure 6).
Shift by bit, then shift the slot corresponding to the second octave to the left by 1 bit,
This is then carried out by sequentially shifting the slots corresponding to the third and fourth octaves to the left, and when a "1" bit is detected (step S2), the program proceeds to step S3. In the example shown in Figure 6, first, the first octave
Since the "1" bit of the C note is detected, the program advances to step S3 at this point. In step S3, frequency data corresponding to the first octave C note is read from the frequency table written in the ROM 20 and transferred to the frequency data area 75 (preset) in the register 22. Next, proceeding to step S4,
The entry address (address be done. Note that the busy key table 76 is the RAM 21
There are 48 slots 76a, 76b, 76c provided corresponding to each key.
It consists of... Next, in step S5, an empty area in the channel assignment table (hereinafter abbreviated as CAT) 77 is detected. Here, CAT77 will be explained. This CAT77 is prepared in advance in the RAM21, and is composed of 15 areas E1, E2...E15, and these areas E
1, E2...E15 are three slots a1, b1, c1, a2, b2, c each consisting of 16 bits.
It is composed of 2,... This CAT77 is
This table shows which channel the musical tone currently being produced (including musical tones in decay state) is assigned to.As explained below, when the musical tone corresponding to a certain key is assigned, each area E1 , E2, . . . E15, that is, the entry addresses of the busy key table 76 representing the corresponding keys are registered in the headers of slots a1, a2, a3... Channels used are now being registered. In this case, each bit of slots b and c corresponds to 32 channels of WG 25, and "1" is registered in the bit corresponding to the channel to which the sound is assigned. Now, when the program advances to step S5, an empty area is detected by searching the header of each area of CAT77. For example, if area E2 is detected as an empty area, the entry address (address Y) of area E2 is stored in the register 22, and the process proceeds to step S6. In step S6, the number of "0" bits in the busy status register 78 provided in the register 22 is calculated. This busy status register 78 is 32
This is a bit register, each bit corresponding to 32 channels, and "1" is registered in the bit corresponding to the channel in use. Therefore, the number of "0" bits calculated in step S6 is equal to the current number of empty channels. When the number of "0" bits (the number of empty channels) of the busy status register 78 is calculated in step S6, the program proceeds to step S7.
Then, the calculated number of "0" bits and the number of tone data registered in the tone request file 62 (see FIG. 3) (that is, the number stored in the header 62a of the tone request file 62) are calculated. are compared. In this case, if the number of "0" bits is greater than or equal to the number of tone data (YES), the program proceeds to step S8. In step S8, the channel number of the empty channel is detected by searching the "0" bit in the busy status register 78. In the example of Fig. 6, first, slot 7
The second bit of 8a is searched for "0", thereby detecting that the second channel is an empty channel. Note that the busy status register 78
In the slot 78a, the 1st to 16th bits correspond to the 1st to 16th channels, respectively, and the 1st to 16th bits of the slot 78b correspond to the 17th to 32nd channels, respectively. When an empty second channel is detected, the program proceeds to step S9, where the channel number "2" is stored in the channel register 79. Next, in step S10, the tone data in the ROM 20 is transferred to the tone data area 80 in the register 22 based on the tone request file 62. That is, to explain the example of FIG. 3, first, the address D stored in the area 62c is read out into the register group 50, then tone data i+2 in the ROM 20 is read out based on this address D, and the tone data area 80
will be forwarded to. Next, the volume coefficient in area 62c is transferred to area 80. The program then proceeds to step S11, where the tone data is modified (timbre processing). This modification of the tone data is performed based on the information for timbre processing stored in the area 62b of the tone request file 62, and by this modification, the tone data is subjected to timbre processing (for example, addition of vibrato). Ru. and,
The program advances to step S12. In step S12, the data port 18 (see FIG.
The entry address of the area corresponding to the second channel is calculated. Next, proceeding to step S13 (FIG. 8), the frequency data in the frequency data area 75, the tone data in the tone data area 80, and the volume coefficient are output to the corresponding area of the data port 18 based on the entry address. . Next, when the program advances to octave S14, "1" is set to the bit corresponding to the second channel of the 32-bit start command register 81 provided in the register 22 (the second bit of the slot 81a), and then this bit is set to "1". The contents of start command register 81 are transferred to data port 18. In this way, data port 18
The frequency data, tone data, volume coefficient, and start command transferred to the WG25 are supplied to the corresponding channel (second channel), and this causes the corresponding channel (second channel) of the WG25 to start. A musical tone signal is formed based on frequency data, tone data, etc. supplied from the data port 18. Next, the program proceeds to step S15, and based on the channel number "2" stored in the channel register 79, "1" is written to the second bit of slot b2 in area E2 detected in step S5. . (The second bit of this slot b2 corresponds to the second channel.) Next, the process advances to step S16, and based on the channel number "2" in the channel register 79, the slot 78a of the busy status register 78 is selected. "1" is written to the second bit. Then, the process advances to step S17. In step S17, it is determined whether all the tone data registered in the tone request file 62 has been allocated to a channel. In this case, since only the tone data registered in area 62c (FIG. 3) has been assigned, the determination result is "NO", and the program returns to step S8. Then, the process of steps S8 to S16 described above is repeated again.
That is, the fourth channel is detected as an empty channel in step S8, the channel number "4" is stored in the channel register 79 in step S9, and the fourth channel is detected as an empty channel in step S10 based on the address B stored in the area 62d of the tone request file 62. Tone data i is successively outputted from the tone data bank 65 and transferred to the tone data area 80, the volume coefficient in the area 62d is transferred to the tone data area 80, the tone data is modified in step S11, and the tone data is modified in step S12. The area entry address corresponding to the fourth channel of the data port 18 is calculated, and the frequency data in the frequency data area 75 and the tone data and volume coefficient in the tone data area 80 are output to the data port 18 in step S13.
In step S14, "1" is set in the bit corresponding to the fourth channel of the start command register 81, and as a result, the fourth channel of WG25 is started, and in steps S15 and S16, CAT is started.
77, the fourth bit of slot b2 and the fourth bit of slot 78a of the busy status register 78 are written with "1".
Proceed to 7. In step S17, it is determined again whether all tone data has been allocated, but in this case, the area 62 of the tone request file 62 is still
Since the assignment of the tone data corresponding to the address C stored in c has not been completed, the judgment result is "NO", and therefore the program returns to step S8 again and the process of steps S8 to S16 is repeated. executed. And this step S8
When the steps from ~S16 are executed, the tone data i+1 corresponding to the address C stored in the area 62e of the tone request file 62 is
Channel 5 of WG25 has started, and slot b of CAT77 has started.
2 and the fifth bit of slot 78a of busy status register 78 are each set to “1”.
is written. In this way, the channel assignment of the first octave/C note is completed, and the speaker 29 outputs three tones at the pitch of the C note of the first octave and corresponding to tone data i, i+1, and i+2, respectively.
Different types of musical tones are sounded at the same time. Furthermore, at this point, "1" is registered in the bits corresponding to the second, fourth, and fifth channels of the busy status register 78 and start command register 81, and furthermore, "1" is registered in the bits corresponding to the second, fourth, and fifth channels of the busy status register 78 and the start command register 81. Fourth,
"1" is also registered in the bit corresponding to the fifth channel. The program then proceeds to step S17, but the judgment result at this step is naturally "YES".
Therefore, the program proceeds to step S18.
Proceed to. In this step S18, the entry address (address
written to. Next, when the process advances to step S19, the entry address (address Y) of the area E2 is stored in the slot 76 of the busy key table 76.
written in a. The process then proceeds to step S20, where the "1" bit corresponding to the first octave C tone of ON.RQ72 is set to "0". In this way, all assignment processing based on the first octave/C note is completed. Next, the program returns to step S1 again.
A "1" bit on ON.RQ 72 is detected. In this case, in the example shown in FIG.
A "1" bit corresponding to the octave D# tone is detected (step S2), and the program therefore advances to step S3, where the assignment process is performed in exactly the same way as in the case described above. Then, when the second octave/D# note assignment process is completed,
A "1" bit on the ON/RQ 72 is detected, and then an assignment process corresponding to the detected "1" bit (third octave/F# note) is performed. When all the "1" bits on the ON.RQ 72 are processed in this manner, the determination result at step S2 becomes "NO" and all processing in routine R7 is completed. Next, step S21 in FIG. 7 will be explained. In the above explanation, step S7
Although the explanation has been given assuming that the judgment result in step 2 is ``YES'', this may also be ``NO''. In other words, the busy status register 78 is “0”
If the number of bits is less than the number registered in the header 62a of the tone request file 62, in other words, if tone data cannot be assigned to a channel due to the small number of empty channels, then step S7 is performed. The judgment result is “NO” and the program moves to step S.
Proceed to 21. In step S21, the channel number of the channel in the decay state is loaded into the dump command register 85 (see FIG. 9), which will be described later.
By outputting the contents of 5 to the data port 18, the channel in the decay state in the WG 25 is forcibly stopped. Then, the routine exits from R7. If you do this kind of processing,
In the WG termination processing routine I3, the corresponding "1" bit of the busy status register 78 is set to "0", thereby increasing the number of empty channels and making it possible to allocate tone data. The meaning of this processing is that the sounding of the musical tone corresponding to the newly pressed key is given priority over the sounding of the musical tone in the decay state. Also,
To perform this process, a decay status register 82 provided within the register 22 and storing the channel number of the decay state is utilized. Next, the sixth bit "1" (marked with a circle) of slot b2 of CAT77 will be explained.
This 6th bit “1” is the 1st octave.
It is not assigned when the C key was pressed, but was assigned when the same key was pressed last time. In other words, when the previously pressed key is released, the generation of the musical tone signal stops after a predetermined decay time in each channel to which that key is assigned (note that the generation of musical tone signals does not necessarily stop at the same time for each channel). (No), CAT77 corresponding to the channel where musical tone signal generation has stopped.
However, if the decay time of a certain assigned channel is long, the previous musical tone signal may continue to be generated in that channel until the moment the same key is pressed this time. In this case, when the same key is pressed again, the slot 76a of the busy key table 76 is filled with CAT77.
The entry address (address Y) of area E2 is registered, and "1" remains in the bit (sixth bit of slot b2) corresponding to the channel in which musical tone signals continue to be generated. . Therefore, the channel assignment for the key pressed this time is registered in area E2, and furthermore, the sixth bit "1" of slot b2 is also left as is in area E2. (For processing when the generation of musical tone signals stops, please refer to interrupt processing routine I3 described later.) In this embodiment, a channel is started for each tone data in the tone request file 62. However, it is also possible to start all channels at the same time. (10) Key-off channel management routine R8 This routine R8 includes the OF・RQ73 created in routine R6 and the busy key table 76 and CAT77 created in routine R7.
Based on this, the musical tone corresponding to the released key (key whose pressed state is released) is erased.
The execution process of this routine R6 will be explained below with reference to FIGS. 9 and 10. In addition, in Fig. 9
OF.RQ73 is the same as OF.RQ73 in FIG. When the program enters this routine R8, it first proceeds to step S1 shown in FIG.
Detection of the "1" bit on 73 is performed. Note that this detection is “1” on ON・RQ72 mentioned above.
The process is carried out in exactly the same manner as in the case of bit detection (step S1 in FIG. 7). In the example shown in FIG. 9, the "1" bit of the first octave A# note is first detected (step S2), and the program proceeds to step S3. In step S3, the position of the detected “1” bit (OF・RQ7
3) based on the busy key table 7
The entry address (referred to as address V) of slot 76m corresponding to the first octave A# note of No. 6 is calculated. Next, in step S4, the contents of the slot 76m are read out based on the calculated entry address (address V) and transferred into the register group 50. In this case, the content of the slot 76m is the entry address (address U) of the area En, assuming that the channel assignment for the first octave/A# note is registered in the area En of the CAT 77. Next, when proceeding to step S5, the contents of slot 76m (address U)
The contents of slots bn and cn of area En are read out based on , and loaded into either Decay command register 84 or dump command register 85 . Note that which one is loaded is controlled by a changeover switch provided in the operating section of this electronic organ. Then, when proceeding to step S6,
In step S5, the contents of the register 84 or 85 loaded with the contents of the area En are output to the data port 18, and the channel to which the tone corresponding to the A# note of the first octave is assigned (see Fig. 9) is outputted to the data port 18. In the example shown in , the generation of musical tone signals of the first, seventh, and eighth channels is stopped. In this case, if the musical tone is loaded into the decay command register 84 in step S5, the musical tone is gradually erased as it decays, and if it is loaded into the dump command register 85, the musical tone is erased immediately. Next, when the program proceeds to step S7, the "1" bit of the first octave A# note on the OF.RQ 73 is erased, and the program returns to step S1 again. Then, when the "1" bit of the third octave F note is detected in step S1, the judgment result in step S2 is "YES".
As in the above case, steps S3 to S
Step 6 is executed, and the musical tone signal of the channel to which the third octave/F note is assigned is stopped or put into a decay state. Then, in step S7, the third octave F note "1"
The bit is erased and the process returns to step S1. In this way, when all the "1" bits on the OF.RQ 73 are processed, the determination result in step S2 becomes "NO" and the processing in this routine R8 is completed. (11) WG end processing routine I3 This interrupt processing routine I3 is executed based on the interrupt signal INTR6 generated from WG 25 when the generation of musical tone signals in the channel of WG 25 has completely stopped (when the decay state has ended). Its main purpose is to set the bit corresponding to the channel in the busy status register 78 (Figs. 6 and 11) to "0", thereby making the same channel an empty channel and using it as a new key. The object of the present invention is to make it possible to allocate the occurrence of a musical tone corresponding to a musical tone. That is, in response to one pressed key,
Musical sound signals generated in multiple channels (three channels in the examples shown in Figures 3 and 6 above) do not necessarily stop at the same timing; for example, in the case of percussive sounds, the key is It may stop even though it is pressed. In such a case, if a channel whose musical tone signal has already stopped is made to wait until all musical tone signals of other channels corresponding to the same key have stopped, the efficiency of channel use will be extremely poor. Taking these points into consideration, this electronic organ is provided with this interrupt processing routine I3 so that the channel in which musical tone generation has stopped can be immediately released to other keys. The execution process of this interrupt processing routine I3 will be explained below with reference to FIGS. 11 and 12. In the following description, it is assumed that the generation of musical tone signals has now stopped in the seventh channel, and that this seventh channel is registered in area E6 of the CAT77. When the generation of musical tone signals stops in the seventh channel and an interrupt signal INTR3 is generated from the WG 25, the program first proceeds to step S1 shown in FIG. 12. And this step S
1, the seventh bit (corresponding to the seventh channel) of the slot 78a of the busy status register 78 is set to "0", and the process then proceeds to step S2. This step S2 and the next step S3
is for erasing the seventh channel registered in CAT77, specifically, erasing "1" in the seventh bit of slot b6 corresponding to the seventh channel of area E6. The reason why this process must be performed is as follows. For example, the musical tone signal that has been generated until now in the seventh channel is a percussive musical tone signal, and at the time when the generation of the musical tone signal has stopped, the key corresponding to the musical tone signal (referred to as the first key) is still Assume that the button remains pressed down. Then, when the musical tone signal stops, the bit corresponding to the seventh channel of the busy status register 78 is set to "0" (step S1).
It is possible that the occurrence of a musical tone corresponding to a newly pressed key (referred to as the next key) before the first key is released is assigned to this seventh channel. If the above-mentioned process is not performed in such a case, when the first key is released, the contents of the CAT77 area corresponding to the first key are transferred to, for example, the Decay command register 84, and then this The contents of the Decay command register 84 are output to the data port 18, and the seventh channel, which is assigned to generate the musical tone corresponding to the next key, is also shifted to the Decay state. In order to eliminate such inconvenience, step S2
and processing by S3 is required. Now, when the program advances to step S2
CAT77 area E1 header (slot a
It is determined whether or not 1) is "0". In this case, for example, if the answer is "NO" (not "0"), the program proceeds to step S3. Step S
3, a logical AND is first performed between each bit in slots b1 and c1 of area E1 and the corresponding bit in busy status register 78, and then the result of this operation is stored in slots b1 and c1. As a result, if "1" is found in the seventh bit of slot b1, that "1" is erased.
In this example, slot b in area E6
Since “1” is in the 7th bit of 6, area E6
The 7th bit of slot b1 is not "1". Therefore, the result of the AND operation is the same as the content of area E1 before the operation. When the execution of step S3 is completed, step S4
Proceed to. In this step S4, area E1
It is determined whether the contents of (the contents of slots b1 and c1) are all "0". In this case, area E
Since "1" remains in "1", the judgment result is "NO" and the program proceeds to step S6. In this step S6, the above-mentioned step S3
It is determined whether the processing in step 1 has been performed in all areas E1 to E15 whose headers are not "0". In this case, since only area E1 has been processed, the determination result is "NO" and the program returns to step S2 again. In step S2, it is determined whether or not the header (slot a2) of area E2 is "0".
In this case, if the header is set to "0"("YES"), the program proceeds to step S6.
The result of the determination at step S6 is "NO", and the program proceeds to step S2 again, where the header of area E3 is examined. It is assumed that the areas E1, E2, . In this case, the determination result in step S2 is "NO" and the process advances to step S3. Then, in step S3, the logic between the contents of the busy status register 78 and the contents of slots b6 and c6 in area E6 is determined.
By performing the AND operation, "1" in the seventh bit of slot b6 is erased (set to "0"). Next, when proceeding to step S4, the contents of slots b6 and c6 of area E6 are all "0".
In this case, it is still “1”.
If there remains, the program goes to step S6.
Proceed to. In this way, when the processing for all areas E1 to E15 is completed, the program exits from this interrupt processing routine I3. Next, for example, the 8th channel has just ended, and this 8th channel is in area E7 of CAT77.
A case will be explained in which the decay time of the musical tone signal generated in the eighth channel is relatively long. When the interrupt signal INTR3 is generated and the program proceeds to step S1, "1" in the eighth bit (corresponding to the eighth channel) of the slot 78a of the busy status register 78 is erased. Then,
After areas E1 to E6 are processed in the same manner as in the case described above, in step S3, "1" in the 8th bit of slot b7 of area E7 is erased.
Then, the process advances to step S4. Here, it is assumed that because the decay time of the musical tone signal of the eighth channel was relatively long, all other "1" bits in area E7 had been erased by the time the eighth channel ended. In this case, by executing step S3, the determination result in step S4 becomes "YES", and the program proceeds to step S5. In step S5, first, based on the entry address of the busy key table 76 (see FIG. 9) stored in the header of the area E7, the slot of the busy key table 76 specified by the entry address is selected. The contents are erased, and then the header of area E7 is erased. In other words, the connection between the area and the busy key table is released. Through this process, area E7 is released for other keys. For reference, the ROM2 explained so far
0, RAM 21 The contents of each register 22 are summarized in FIG. Finally, the encoder switch used as the tone lever 38 shown in FIG. 1 will be explained using the principle diagram shown in FIG. 14. On the substrate 38a, there are contacts 38b, in which conductors (indicated by diagonal lines in the figure) are formed continuously between the four regions a, b, c, and d shown in the figure.
Point 38 where conductors are formed in areas a and c and insulators (indicated by white areas in the figure) are formed in areas b and d.
c, conductors are formed in areas a and b, and areas c and d
Contacts 38d each having an insulator formed thereon are disposed, and each of these contacts 38b, 38c, 38d
These contact points 38b are connected to each area a, b, c, d above.
A contact slider 38e made of a conductor is provided so as to be able to slide in the direction of the arrow e or f in the figure while contacting the contact point slider 38e. The contacts 38b, 38c, and 38d are connected to corresponding terminals 38f, 38g, and 38h, respectively. Furthermore, a scan strobe signal is applied to the terminal 38f. On the other hand, the terminals 38g and 38h are connected to the cathodes of the corresponding diodes D0 and D1, respectively, and the anodes of the diodes D0 and D1 are connected to the corresponding buffer amplifiers B0 and B, respectively.
It is connected to the input terminal of 1. Furthermore, one end of each anode of the diodes D0 and D1 is connected to the power supply +
It is also connected to the other ends of resistors R0 and R1 connected to Vcc, and is configured so that a signal BIT<0> or BIT<1> is output from the output ends of the buffer amplifiers B0 and B1. The scan strobe signal is a signal for scanning the encoder switch described above, and in this embodiment is output from the address decoder 34 of FIG. 1 when the switch address signal is supplied to the address decoder 34 of FIG. Since the encoder switch is constructed as described above, for example, when the encoder switch shown in FIG. 14 is used as the tone lever 1 in FIG. It is set at the position of area d shown by. In other words, each area d of the contacts 38c and 38d is the contact point 38b.
Therefore, even if a scan strobe signal is input to the terminal 38f, the anodes of the diodes D0 and D1 are at the voltage level of the power supply +Vcc, and therefore the buffer amplifiers B0 and B
The output levels of the output signals BIT<0> and BIT<1> of 1 are both the binary logic level "0". Therefore, the tone lever 1 is in a request state with a volume of 0. Although the encoder switch described above is used for changing the volume in four stages using a 2-bit binary code, it can easily be used for changing the volume in multiple stages using a binary code such as 3-bit or 4-bit. Furthermore, as an encoder switch, not only binary code but also other codes such as Gray code can be used. As explained above, according to the present invention, the scan interval of the tone lever switch is made larger than the scan interval of the key switch, so the time required for the switch scan is longer than when the scan of the tone lever switch is performed at the same time as the scan of the key switch. can be shortened. As a result, especially in an electronic musical instrument using a microcomputer, there is a large amount of time required for tasks other than switch scanning, so various processes can be performed in this time, which has a great practical effect.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図ないし第13図はこの発明による電子オ
ルガンの一実施例を示す図であり、第1図は全体
の構成を示す図、第2図イはプログラムの流れを
示すフローチヤート、第2図ロは割込処理ルーチ
ンを示す図、第3図は第2図に示すトーンレバー
処理ルーチンR3の実行時において関係する
ROM20,RAM21、レジスタ22の記憶内
容を示す図、第4図は上記ルーチンR3のフロー
チヤート、第5図は第2図に示すキーオン・リク
エストフアイル作成ルーチンR5、キーオフ・リ
クエストフアイル作成ルーチンR6の実行時にお
いて関係するRAM21、レジスタ22の記憶内
容を示す図、第6図は第2図に示すキーオン・チ
ヤンネルアサインメントルーチンR7の実行時に
おいて関係するRAM21、レジスタ22の内容
を示す図、第7図,第8図は共に上記ルーチンR
7のフローチヤート、第9図は第2図に示すキー
オフ・チヤンネルマネジメントルーチンR8の実
行時において関係するRAM21、レジスタ22
の内容を示す図、第10図は上記ルーチンR8の
フローチヤート、第11図は第2図に示すWG終
了処理ルーチンI3の実行時において関係する
RAM21、レジスタ22の内容を示す図、第1
2図は上記ルーチンI3のフローチヤート、第1
3図はROM20、RAM21、レジスタ22、
データポート18の各記憶内容をまとめて示した
図、第14図はトーンレバーとして用いられるエ
ンコーダスイツチの構成を示す図である。 11……鍵盤回路、14……制御部、15……
演算部、16……割込制御回路、17……パルス
発生器、38……トーンレバー、39……鍵盤キ
ー。
1 to 13 are diagrams showing one embodiment of the electronic organ according to the present invention, in which FIG. 1 shows the overall configuration, FIG. 2A is a flowchart showing the flow of the program, and FIG. B is a diagram showing the interrupt processing routine, and FIG. 3 is related to the execution of the tone lever processing routine R3 shown in FIG.
4 is a flowchart of the routine R3, and FIG. 5 is a diagram showing the execution of the key-on request file creation routine R5 and the key-off request file creation routine R6 shown in FIG. 2. FIG. 6 is a diagram showing the stored contents of the RAM 21 and registers 22 that are relevant at the time of execution of the key-on channel assignment routine R7 shown in FIG. 2. FIG. , FIG. 8 both show the above routine R.
7, the flowchart in FIG. 9 shows the RAM 21 and register 22 involved when the key-off channel management routine R8 shown in FIG. 2 is executed.
FIG. 10 is a flowchart of the above routine R8, and FIG. 11 is related to the execution of the WG termination processing routine I3 shown in FIG.
Diagram showing the contents of RAM 21 and register 22, 1st
Figure 2 is a flowchart of the above routine I3, the first
Figure 3 shows ROM20, RAM21, register 22,
FIG. 14 is a diagram illustrating the contents stored in the data port 18, and is a diagram illustrating the configuration of an encoder switch used as a tone lever. 11... Keyboard circuit, 14... Control section, 15...
Arithmetic unit, 16...Interrupt control circuit, 17...Pulse generator, 38...Tone lever, 39...Keyboard key.

Claims (1)

【特許請求の範囲】 1 複数の鍵と、 複数の音色制御用の操作子と、 上記複数の鍵および上記複数の音色制御用の操
作子に対して共通に設けられ、上記複数の鍵を走
査して各鍵の押鍵状態を示す鍵状態を得る第1の
処理および上記複数の音色制御用の操作子を走査
して各操作子の操作状態を示す操作子情報を得る
第2の処理を選択的に実行するものであつて、処
理の第1のタイミングで上記第1の処理を繰返し
実行するとともに、該第1のタイミングの間隔よ
りも長い間隔の第2のタイミングで上記第2の処
理を繰返し実行する処理手段と を備え、上記鍵情報および上記操作子情報に基づ
き楽音の音高および音色を制御するようにしたこ
とを特徴とする電子楽器。
[Scope of Claims] 1. A plurality of keys, a plurality of tone control operators, and a device provided in common to the plurality of keys and the plurality of tone color control operators, and configured to scan the plurality of keys. a first process to obtain a key state indicating a key depression state of each key, and a second process to scan the plurality of timbre control operators to obtain operator information indicating an operating state of each operator. It is selectively executed, and the first process is repeatedly executed at a first timing of the process, and the second process is executed at a second timing at a longer interval than the first timing. 1. An electronic musical instrument, characterized in that the electronic musical instrument is equipped with a processing means for repeatedly executing the above, and controls the pitch and timbre of musical tones based on the key information and the operator information.
JP59029911A 1984-02-20 1984-02-20 Electronic musical instrument Granted JPS60149091A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59029911A JPS60149091A (en) 1984-02-20 1984-02-20 Electronic musical instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59029911A JPS60149091A (en) 1984-02-20 1984-02-20 Electronic musical instrument

Publications (2)

Publication Number Publication Date
JPS60149091A JPS60149091A (en) 1985-08-06
JPS6339074B2 true JPS6339074B2 (en) 1988-08-03

Family

ID=12289170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59029911A Granted JPS60149091A (en) 1984-02-20 1984-02-20 Electronic musical instrument

Country Status (1)

Country Link
JP (1) JPS60149091A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62148997A (en) * 1985-12-23 1987-07-02 ヤマハ株式会社 State information processing for key and operating element for electronic musical apparatus

Also Published As

Publication number Publication date
JPS60149091A (en) 1985-08-06

Similar Documents

Publication Publication Date Title
US4681008A (en) Tone information processing device for an electronic musical instrument
US4881440A (en) Electronic musical instrument with editor
US5119710A (en) Musical tone generator
US4387617A (en) Assigner for electronic musical instrument
US4724736A (en) Keyboard musical instruments with transpositional function
JPS5943758B2 (en) Assigner for electronic musical instruments
JP2629891B2 (en) Music signal generator
JPS6339074B2 (en)
JPS6339075B2 (en)
JPS6113599B2 (en)
JPS6252317B2 (en)
JPH0474718B2 (en)
JPS6339073B2 (en)
JPS6252316B2 (en)
JPS62208099A (en) Musical sound generator
GB2091470A (en) Electronic Musical Instrument
JPH11202866A (en) Method and device for musical sound generation
JP2900457B2 (en) Electronic musical instrument
JP2936872B2 (en) Music control device
JPS61173297A (en) Electronic musical instrument
JPS61175692A (en) Electronic musical instrument
JP3278857B2 (en) Musical tone generator
JPH0515279B2 (en)
JP2814479B2 (en) Electronic musical instrument
JPH0827624B2 (en) Automatic playing device