JPH04251295A - Electronic equipment and electronic musical instrument - Google Patents

Electronic equipment and electronic musical instrument

Info

Publication number
JPH04251295A
JPH04251295A JP3012741A JP1274191A JPH04251295A JP H04251295 A JPH04251295 A JP H04251295A JP 3012741 A JP3012741 A JP 3012741A JP 1274191 A JP1274191 A JP 1274191A JP H04251295 A JPH04251295 A JP H04251295A
Authority
JP
Japan
Prior art keywords
function
card
data
instruction
automatic performance
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.)
Granted
Application number
JP3012741A
Other languages
Japanese (ja)
Other versions
JP2745831B2 (en
Inventor
Mikio Ito
幹生 伊藤
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 JP3012741A priority Critical patent/JP2745831B2/en
Priority to US07/811,025 priority patent/US5300723A/en
Publication of JPH04251295A publication Critical patent/JPH04251295A/en
Application granted granted Critical
Publication of JP2745831B2 publication Critical patent/JP2745831B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To decrease operation switches in number without increasing the cost, to easily discriminate the function of the operation switches, and to prevent malfunction. CONSTITUTION:Bar codes indicating plural functions which are brought to effect by a card 21 mounted on a main body are drawn, function by function, on the card 21. When this card 21 is inserted into a card slot part 20, a card sensor reads the bar codes out. Then a CPU carries a function indicated by a bar code to effect. The bar codes corresponding to two kinds of function are drawn on one card 21 and the insertion direction of the card 21 is changed to change the function to be executed. Thus, the insertion direction is changed to add plural functions to one card.

Description

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

【0001】0001

【産業上の利用分野】この発明は、複数の操作スイッチ
を有し、これらの操作スイッチに応じて各種処理を行な
う電子機器および電子楽器に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to electronic equipment and electronic musical instruments that have a plurality of operation switches and perform various processes in accordance with these operation switches.

【0002】0002

【従来の技術】一般に、電子機器は、複数の機能を有し
ており、これに加えて、これらの機能のうち、どの機能
を実行するかを選択したり、データを入力するための複
数の操作スイッチを有している。操作スイッチには、少
なくとも1つか、あるいは複数の機能が割当てられてい
る。ここで、電子楽器を例にとって説明する。電子楽器
は、演奏のための鍵盤の他に、音色選択、伴奏のスタイ
ル(ワルツ、ボサノバ等のリズムパターン)選択、演奏
を記憶するメモリ領域を選択するためのソング選択等を
行なうための操作スイッチを操作パネル上に備えている
[Prior Art] Generally, electronic devices have multiple functions, and in addition, multiple functions for selecting which of these functions to perform and inputting data. It has an operation switch. At least one or more functions are assigned to each operation switch. Here, an explanation will be given using an electronic musical instrument as an example. In addition to the keyboard for playing, electronic musical instruments have operation switches for selecting tones, accompaniment styles (rhythm patterns such as waltz, bossa nova, etc.), song selection for selecting memory areas for storing performances, etc. is provided on the operation panel.

【0003】また、1つの操作スイッチに複数の機能を
割当てるための、機能選択用の操作スイッチ(モードス
イッチ)等も設けられている。また、上記電子楽器にお
いて、その自動伴奏機能を用いたカラオケ採点機能を有
するものもある。このような電子楽器では、自動伴奏と
、マイク等から入力される歌声または楽器の演奏とを比
較し、自動伴奏とのズレの程度に応じて採点している。 なお、この種の技術は、特開昭59−97172号に示
されている。
[0003]Furthermore, a function selection operation switch (mode switch) is also provided for assigning a plurality of functions to one operation switch. Furthermore, some of the above-mentioned electronic musical instruments have a karaoke scoring function using the automatic accompaniment function. In such electronic musical instruments, the automatic accompaniment is compared with the singing voice input from a microphone or the like or the musical instrument performance, and a score is given according to the degree of deviation from the automatic accompaniment. Note that this type of technology is disclosed in Japanese Patent Laid-Open No. 59-97172.

【0004】0004

【発明が解決しようとする課題】ところで、上述した電
子機器では、多くの操作スイッチをパネル面に備えてい
るため、該パネル面が繁雑になり、誤操作しやすくなる
とともに、構成が複雑になるためコストアップにつなが
るという問題を生じた。また、複数の機能が割当てられ
た場合には、操作スイッチがどのモードにいて、何の機
能を有しているのかが判別しにくいため、誤操作しやす
いという問題を生じた。
[Problems to be Solved by the Invention] However, in the above-mentioned electronic equipment, since many operation switches are provided on the panel surface, the panel surface becomes complicated, making it easy to operate erroneously and making the configuration complicated. This resulted in a problem that led to an increase in costs. Further, when a plurality of functions are assigned, it is difficult to determine which mode the operation switch is in and what function it has, resulting in the problem of easy operation errors.

【0005】また、上述した電子楽器によるカラオケ採
点機能では、演奏の全時間、すなわち1つの音が持続し
て発音されている場合でも、その間、互いのデータを比
較していたため、処理時間が長くなるという問題を生じ
た。
[0005] Furthermore, in the above-mentioned karaoke scoring function using an electronic musical instrument, the processing time is long because data is compared with each other during the entire performance time, that is, even when one note is continuously sounded. The problem arose.

【0006】請求項1記載の発明は、上述した事情に鑑
みてなされたもので、パネル面が繁雑にならず、かつ、
操作スイッチの機能が判別しやすく、さらに、誤操作し
にくく、コストアップにもつながらない電子機器を提供
することを目的としている。また、請求項2記載の発明
は、互いのデータの比較に要する処理時間を短縮できる
電子楽器を提供することを目的としている。
The invention as claimed in claim 1 has been made in view of the above-mentioned circumstances, and the panel surface does not become complicated, and
The purpose of the present invention is to provide an electronic device in which the functions of operation switches are easy to distinguish, are difficult to operate erroneously, and do not lead to increased costs. Another object of the invention is to provide an electronic musical instrument that can shorten the processing time required for comparing mutual data.

【0007】[0007]

【課題を解決するための手段】上述した問題点を解決す
るために、請求項1記載の発明では、電子機器本体と、
特定の機能を指示するデータが複数所定の位置に記録さ
れた外部記憶手段である機能指示手段と、該機能指示手
段を着脱自在に前記電子機器本体に装着可能な装着手段
と、該装着手段に前記機能指示手段が装着されると、該
機能指示手段に記録された前記複数の指示データのうち
、前記機能指示手段の装着方向に応じた1つの指示デー
タを読取る読取り手段と、前記読み取った指示データに
基づいて該指示データに対応する機能を前記電子機器本
体で実行可能なように制御する制御手段とを具備し、前
記機能指示手段と前記装着手段とは前記機能指示手段を
少なくとも2種の向きで前記装着手段に装着可能な形状
を有することを特徴とする。
[Means for Solving the Problems] In order to solve the above-mentioned problems, the invention according to claim 1 provides an electronic device main body;
a function instruction means which is an external storage means in which a plurality of data instructing a specific function are recorded at predetermined positions; a mounting means capable of detachably attaching the function instruction means to the electronic device body; a reading means for reading one instruction data corresponding to the mounting direction of the function instruction means from among the plurality of instruction data recorded on the function instruction means when the function instruction means is attached; control means for controlling a function corresponding to the instruction data to be executable on the electronic device main body based on the instruction data, and the function instruction means and the mounting means are configured to control at least two types of the function instruction means. It is characterized in that it has a shape that can be attached to the attachment means in any orientation.

【0008】請求項2記載の発明では、自動演奏データ
を記憶する記憶手段と、所定のタイミングに従って前記
自動演奏データを読み出す読み出し手段と、前記読み出
された自動演奏データの発音および消音タイミングに従
って外部から入力される外部信号の発音および消音タイ
ミングの双方またはいずれか一方を生成するタイミング
発生手段と、前記自動演奏データの発音および消音タイ
ミングの双方またはいずれか一方の前後に所定期間のウ
ィンドウを設定するウィンドウ発生手段と、前記ウィン
ドウ内においてのみ、前記自動演奏データの発音および
消音タイミングの双方またはいずれか一方と、前記外部
信号の発音および消音タイミングの双方またはいずれか
一方とのずれの程度を比較する比較手段と、該比較手段
の比較結果に応じて採点する採点手段とを具備すること
を特徴とする。
In the invention as set forth in claim 2, there is provided a storage means for storing automatic performance data, a reading means for reading out the automatic performance data according to a predetermined timing, and an external storage means for storing the automatic performance data according to sound generation and muting timings of the read automatic performance data. timing generation means for generating both or either one of the sound generation and mute timings of an external signal inputted from the automatic performance data; and setting a window of a predetermined period before and after either or both of the sound generation and mute timings of the automatic performance data. A window generating means compares, only within the window, the degree of deviation between the sound generation and/or mute timing of the automatic performance data and the sound generation and/or mute timing of the external signal. It is characterized by comprising a comparison means and a scoring means for scoring according to the comparison result of the comparison means.

【0009】[0009]

【作用】請求項1記載の発明によれば、機能指示手段が
装着手段に装着されると、該機能指示手段に記録された
複数の指示データのうち、機能指示手段の装着方向に応
じて、1つの指示データが読取り手段によって読取られ
る。そして、読み取った指示データに基づいて該指示デ
ータに対応する機能が制御手段によって実行される。ま
た、機能指示手段の装着方向を変えると、その装着方向
に応じて、該機能に対応した指示データが読取り手段に
よって読取られる。この結果、制御手段によって実行さ
れる機能が変更される。
According to the invention as set forth in claim 1, when the function instruction means is attached to the attachment means, among the plurality of instruction data recorded on the function instruction means, depending on the attachment direction of the function instruction means, One piece of instruction data is read by the reading means. Based on the read instruction data, the control means executes a function corresponding to the instruction data. Moreover, when the mounting direction of the function instruction means is changed, instruction data corresponding to the function is read by the reading means according to the mounting direction. As a result, the functions performed by the control means are changed.

【0010】請求項2記載の発明によれば、読み出し手
段が所定のタイミングに従って記憶手段から自動演奏デ
ータを読み出す。また、該自動演奏データの発音および
消音タイミングに従って外部から外部信号が入力される
。次に、タイミング発生手段が外部信号の発音および消
音タイミングの双方またはいずれか一方を生成する。 そして、比較手段がウィンドウ発生手段が設定した所定
期間のウィンドウ内においてのみ、自動演奏データの発
音および消音タイミングの双方またはいずれか一方と、
外部信号の発音および消音タイミングの双方またはいず
れか一方とのずれの程度を比較する。さらに、採点手段
が比較手段の比較結果に応じて採点する。
According to the second aspect of the invention, the reading means reads out the automatic performance data from the storage means according to a predetermined timing. Further, an external signal is inputted from the outside in accordance with the sound generation and mute timing of the automatic performance data. Next, the timing generating means generates the sound generation and/or mute timing of the external signal. Then, the comparison means determines the sound generation and/or mute timing of the automatic performance data only within the predetermined period of the window set by the window generation means.
The degree of deviation from the sound generation and/or mute timing of the external signal is compared. Furthermore, the scoring means scores according to the comparison result of the comparison means.

【0011】[0011]

【実施例】次に図面を参照してこの発明の実施例につい
て説明する。図1はこの発明の一実施例の構成を示すブ
ロック図である。この実施例では、自動演奏を行なった
り、該自動演奏に合せて唄われる歌を採点する電子楽器
を例にとって説明する。図において、鍵盤1は、複数の
白鍵および黒鍵からなるキーボードであり、各鍵(以下
、キーという)毎に押鍵、離鍵を検出するためのスイッ
チおよびその速度を検出する検出器等が設けられている
。これらのキーの状態は、押鍵検出回路2によって検出
される。押鍵検出回路2は、押鍵されたキーのキーオン
信号、キーコードおよびキーベロシティなどの演奏情報
をデータバスDBを介してCPU3へ供給する。
Embodiments Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. This embodiment will be explained by taking as an example an electronic musical instrument that performs automatic performance and scores a song sung along with the automatic performance. In the figure, a keyboard 1 is a keyboard consisting of a plurality of white keys and black keys, and includes a switch for detecting key depression and key release for each key (hereinafter referred to as a key), a detector for detecting the speed, etc. is provided. The states of these keys are detected by the key press detection circuit 2. The pressed key detection circuit 2 supplies performance information such as a key-on signal of a pressed key, a key code, and a key velocity to the CPU 3 via the data bus DB.

【0012】次に、パネルSW4は、電源スイッチ、音
量スイッチなどの複数の操作スイッチからなる。SW検
出回路5は、上記操作スイッチが押されたか否かを検出
する回路であり、押された操作スイッチの情報をデータ
バスDBを介してCPU3へ供給する。カードセンサ6
は、操作スイッチの機能を設定するためのカード(詳細
は後述する)が、電子楽器本体の操作パネル面に設けら
れたカードスロット部に挿入されたことを検出するセン
サである。カードが挿入されると、所定の挿入信号を検
出回路7へ出力する。検出回路7は、挿入信号を検出す
ると、カードの種類を表すデータを判別し、データバス
DBを介してCPU3へ供給する。
Next, the panel SW4 includes a plurality of operation switches such as a power switch and a volume switch. The SW detection circuit 5 is a circuit that detects whether or not the operation switch is pressed, and supplies information on the pressed operation switch to the CPU 3 via the data bus DB. Card sensor 6
is a sensor that detects that a card (details will be described later) for setting the function of the operation switch is inserted into a card slot provided on the operation panel surface of the main body of the electronic musical instrument. When the card is inserted, a predetermined insertion signal is output to the detection circuit 7. When the detection circuit 7 detects the insertion signal, it determines data representing the type of card and supplies it to the CPU 3 via the data bus DB.

【0013】タイマ8は、所定の基準クロックCLを発
生し、これをCPU3へ供給する。上述したCPU3は
、電子楽器全体を制御するとともに、ROM9に記憶さ
れたプログラムに従い、カードデータに基づいて操作ス
イッチの機能を設定するとともに、上述した演奏情報、
操作スイッチの情報およびカードデータ等に基づいて楽
音データを生成し、音源回路10へ供給する。また、上
記処理において生じる演算結果などは、RAM11に記
憶される。音源回路10は、上記楽音データのレベル調
整などを行ない、該楽音データをD/A変換器12へ供
給する。楽音データは、D/A変換器12によってアナ
ログ信号に変換された後、スピーカSPによって発音さ
れる。
The timer 8 generates a predetermined reference clock CL and supplies it to the CPU 3. The above-mentioned CPU 3 controls the entire electronic musical instrument, sets the functions of the operation switches based on the card data according to the program stored in the ROM 9, and also sets the above-mentioned performance information,
Musical tone data is generated based on operation switch information, card data, etc., and is supplied to the tone generator circuit 10. Further, calculation results generated in the above processing are stored in the RAM 11. The sound source circuit 10 adjusts the level of the musical tone data and supplies the musical tone data to the D/A converter 12. The musical tone data is converted into an analog signal by the D/A converter 12 and then produced by the speaker SP.

【0014】また、演奏データROM13には、自動演
奏のための複数の曲目に対する演奏データが記憶されて
おり、所定のプログラムが実行されると、CPU3によ
って該当する演奏曲目の演奏データが読み出され、音源
回路10、D/A変換器12およびスピーカSPによっ
て発音される。また、上記自動演奏に合せて唄われる歌
を採点する機能、いわゆるカラオケ採点機能が所定のプ
ログラムに従って実行される際には、歌声は、マイクM
C、アンプ14および波形整形回路15を介してCPU
3に供給される。アンプ14は、歌声を所定のレベルに
増幅し、これを波形整形回路15およびスピーカSPへ
供給する。波形整形回路15は、音声を所定の周期およ
び幅を有する連続パルス信号に変換する。
Furthermore, the performance data ROM 13 stores performance data for a plurality of pieces of music for automatic performance, and when a predetermined program is executed, the performance data of the corresponding performance piece is read out by the CPU 3. , sound source circuit 10, D/A converter 12, and speaker SP. In addition, when the function of scoring the song sung along with the automatic performance, the so-called karaoke scoring function, is executed according to a predetermined program, the singing voice is
C, CPU via amplifier 14 and waveform shaping circuit 15
3. Amplifier 14 amplifies the singing voice to a predetermined level and supplies it to waveform shaping circuit 15 and speaker SP. The waveform shaping circuit 15 converts audio into a continuous pulse signal having a predetermined period and width.

【0015】次に、上述した各部の配置について、図2
に示す電子楽器の全体外見図を参照して説明する。なお
、図1に対応する部分には、同一の符号を付け説明を省
略する。図において、操作パネル15のほぼ中央部には
、前述したカードスロット部20が設けられている。 カードスロット部20は、カードのエッジ部分のみを保
持するようになっており、同カードの表面を見ることが
できるように、窓が設けられている。機能選択スイッチ
SW1,SW2,SW3,SW4は、カードスロット部
20の側部に配列されている。また、他の電源スイッチ
PW、デモスイッチSW5およびボリュウームスイッチ
SW6,7も所定の位置に配置されている。電源スイッ
チPWは、電源投入用のスイッチであり、デモスイッチ
SW5は、自動演奏用のスイッチである。また、ボリュ
ームスイッチSW6は、音量を下げるためのものであり
、一方、スイッチSW7は、音量を上げるためのもので
ある。
Next, FIG. 2 shows the arrangement of the above-mentioned parts.
This will be explained with reference to the overall external view of the electronic musical instrument shown in FIG. Note that parts corresponding to those in FIG. 1 are given the same reference numerals and explanations will be omitted. In the figure, the aforementioned card slot section 20 is provided approximately at the center of the operation panel 15. The card slot section 20 is designed to hold only the edge portion of the card, and is provided with a window so that the front surface of the card can be seen. Function selection switches SW1, SW2, SW3, and SW4 are arranged on the side of the card slot section 20. Further, other power switch PW, demo switch SW5, and volume switches SW6 and SW7 are also arranged at predetermined positions. The power switch PW is a switch for turning on the power, and the demo switch SW5 is a switch for automatic performance. Further, the volume switch SW6 is used to lower the volume, while the switch SW7 is used to increase the volume.

【0016】次に、上述したカードスロット部20およ
びその周辺に設けられた機能選択スイッチSW1〜SW
4、ならびにカードについて、図3ないし図5を参照し
て説明する。まず、図3および図4は、操作パネル15
のカードスロット部20およびその周辺に設けられた機
能選択スイッチSW1〜SW4の配置を示す正面図であ
る。
Next, the function selection switches SW1 to SW provided in the card slot section 20 and its surroundings are explained.
4 and the card will be explained with reference to FIGS. 3 to 5. First, FIGS. 3 and 4 show the operation panel 15
FIG. 3 is a front view showing the arrangement of the card slot section 20 and function selection switches SW1 to SW4 provided around it.

【0017】この図において、カードスロット部20に
は、カード21が挿入されている。このカード21の表
面には、該カード21の一端Aを上方にして挿入した場
合(図3参照)に上記機能選択スイッチSW1〜SW4
に割当てられる機能を示す文字と、他端Bを上方にして
挿入した場合(図4参照)に上記機能選択スイッチSW
1〜SW4に割当てられる機能を示す文字とが、それぞ
れの挿入方向に応じて正立するように印刷されている。 この例の場合、一端Aを上方にして挿入した場合には、
自動演奏される曲目が印刷されており、一方、他端Bを
上方にして挿入した場合には、自動演奏に合せて唄われ
る歌を採点する機能、いわゆるカラオケ採点機能におけ
る曲目が印刷されている。これら機能を示す印刷文字は
、機能選択スイッチSW1〜SW4に幾何的に対応する
ように所定の位置に印刷されている。
In this figure, a card 21 is inserted into a card slot portion 20. As shown in FIG. On the surface of this card 21, when the card 21 is inserted with one end A upward (see FIG. 3), the function selection switches SW1 to SW4 are provided.
When inserted with the other end B facing upward (see Figure 4), the function selection switch SW
Characters indicating the functions assigned to SW1 to SW4 are printed so as to stand upright according to the direction in which they are inserted. In this example, if one end is inserted with A facing upward,
The number of songs to be played automatically is printed, and if the other end B is inserted upwards, the number of songs for the so-called karaoke scoring function, which is a function for scoring songs sung along with the automatic performance, is printed. . Printed characters indicating these functions are printed at predetermined positions so as to correspond geometrically to the function selection switches SW1 to SW4.

【0018】また、カード21の裏面には、図5に示す
ように、カード機能を表すバーコードB1およびB2が
所定の位置に印刷されており、ストップビット、パリテ
ィビットおよびカード機能データから構成されている。 このカード機能データは、7ビットから構成されており
、「0」を除いた「1」〜「127」の値をとり、これ
により127種のカード機能が識別できる。したがって
、この例のように、1枚のカード21に2種類の機能が
設定されている場合には、少なくとも64枚のカードを
用意できる。また、カードスロット部20の所定の位置
には、バーコード読取り装置が設けられている。
Further, as shown in FIG. 5, on the back of the card 21, bar codes B1 and B2 representing card functions are printed at predetermined positions, and are composed of a stop bit, a parity bit, and card function data. ing. This card function data is composed of 7 bits, and takes values from ``1'' to ``127'' excluding ``0'', so that 127 types of card functions can be identified. Therefore, when two types of functions are set on one card 21 as in this example, at least 64 cards can be prepared. Further, a barcode reading device is provided at a predetermined position of the card slot section 20.

【0019】次に、上述した実施例の動作について、図
6ないし図12に示すフローチャートを参照して説明す
る。電源が投入されると、図6に示すフローチャートが
CPU3によって実行される。このルーチンは、メイン
ルーチンである。まず、ステップSA1において、各種
変数、レジスタ等のイニシャライズを行なう。次に、ス
テップSA2へ進み、図7に示す押鍵処理を行なう。図
7の押鍵処理では、まず、ステップSB1において、鍵
盤1のキーをスキャンする。次に、ステップSB2にお
いて、キーオンイベントが有ったか否かを判断する。そ
して、キーイベントが有った場合には、このステップS
B2における判断結果は「YES」となり、ステップS
B3へ進む。ステップSB3では、キーイベントが生じ
たキーに対して発音処理を行なう。
Next, the operation of the above embodiment will be explained with reference to the flowcharts shown in FIGS. 6 to 12. When the power is turned on, the flowchart shown in FIG. 6 is executed by the CPU 3. This routine is the main routine. First, in step SA1, various variables, registers, etc. are initialized. Next, the process advances to step SA2, and the key press process shown in FIG. 7 is performed. In the key pressing process shown in FIG. 7, first, in step SB1, the keys on the keyboard 1 are scanned. Next, in step SB2, it is determined whether a key-on event has occurred. Then, if there is a key event, this step S
The judgment result in B2 is "YES", and step S
Proceed to B3. In step SB3, a sound generation process is performed on the key where the key event has occurred.

【0020】一方、ステップSB2における判断結果が
「NO」の場合か、あるいは上述したステップSB3の
処理が終了した場合には、ステップSB4に進む。ステ
ップSB4では、キーオフイベントが有ったか否かを判
断する。そして、キーオフイベントが有った場合には、
ステップSB4における判断結果は「YES」となり、
ステップSB5へ進む。ステップSB5では、キーイベ
ントが生じたキーに対して消音処理を行なう。
On the other hand, if the determination result in step SB2 is "NO" or if the process in step SB3 described above is completed, the process advances to step SB4. In step SB4, it is determined whether a key-off event has occurred. And if there is a key-off event,
The judgment result in step SB4 is "YES",
Proceed to step SB5. In step SB5, a mute process is performed on the key where the key event has occurred.

【0021】一方、ステップSB4における判断結果が
「NO」の場合か、あるいは上述したステップSB5の
処理が終了した場合には、当該押鍵処理を終了して、図
6に示すメインルーチンへ戻る。メインルーチンでは、
ステップSA3へ進む。ステップSA3では、図8に示
すカードスキャン処理を行なう。
On the other hand, if the determination result in step SB4 is "NO" or if the process in step SB5 described above is completed, the key press process is completed and the process returns to the main routine shown in FIG. In the main routine,
Proceed to step SA3. In step SA3, card scanning processing shown in FIG. 8 is performed.

【0022】図8のカードスキャン処理では、まず、ス
テップSC1において、カード21がカードスロット部
20に挿入されたか否かを判断する。そして、このステ
ップSC1における判断結果が「YES」の場合には、
ステップSC2へ進む。ステップSC2では、カード2
1の裏面に印刷されたバーコードを読取る。そして、ス
テップSC3へ進み、バーコードデータの読取りが正し
く行なわれたか否かを判断する。ステップSC3におけ
る判断結果が「NO」の場合、すなわち、読取りが正し
く行なわれなかった場合には、ステップSC8へ進む。 ステップSC8では、バーコードの読取りが正しく行な
われなかったことを知らせるために、ビープ音などを発
生し、カード21の抜取りを促す。
In the card scanning process shown in FIG. 8, first, in step SC1, it is determined whether or not the card 21 has been inserted into the card slot section 20. Then, if the judgment result in step SC1 is "YES",
Proceed to step SC2. In step SC2, card 2
Read the barcode printed on the back of 1. Then, the process proceeds to step SC3, where it is determined whether or not the barcode data has been read correctly. If the determination result in step SC3 is "NO", that is, if the reading was not performed correctly, the process advances to step SC8. At step SC8, a beep sound or the like is generated to notify that the barcode has not been read correctly, and prompts the card 21 to be removed.

【0023】次に、ステップSC9において、カード2
1が抜取られたか否かを判断する。ここで、カード21
がまだ抜取られていないと、ステップSC9における判
断結果は「NO」となり、抜取られるまで、当該ステッ
プSC9を繰返し実行する。そして、カード21が抜取
られると、ステップSC9における判断結果は「YES
」となり、ステップSC1へ戻る。このように、バーコ
ードの読取りが正しく行なわれるまで、上述したルーチ
ンを繰返す。
Next, in step SC9, card 2
1 is extracted or not. Here, card 21
If it has not yet been extracted, the determination result in step SC9 is "NO", and step SC9 is repeatedly executed until it is extracted. Then, when the card 21 is removed, the judgment result in step SC9 is "YES".
” and returns to step SC1. In this way, the above-described routine is repeated until the barcode is correctly read.

【0024】一方、ステップSC3における判断結果が
「YES」の場合、すなわち、バーコードの読取りが正
しく行なわれた場合には、ステップSC4へ進む。ステ
ップSC4では、読取ったデータ、すなわち、カード機
能ナンバをレジスタFUNCに一時保管する。例えば、
図3に示すように、カード21の一端Aが上方になるよ
うに挿入された場合には、レジスタFUNCには、「1
」がセットされ、他端Bが上方になるように挿入された
場合には、「2」がセットされる。次に、ステップSC
5において、レジスタFUNCのデータ(カード機能)
を参照し、カード機能に応じて、その機能で使用される
レジスタ等の初期値を設定する。なお、カード21が挿
入されていない場合でも、機能選択スイッチSW1〜S
W4が機能するように、その時の使用するレジスタには
、デフォルト値が設定される。
On the other hand, if the determination result in step SC3 is "YES", that is, if the barcode has been read correctly, the process advances to step SC4. At step SC4, the read data, ie, the card function number, is temporarily stored in the register FUNC. for example,
As shown in FIG. 3, when the card 21 is inserted with one end A facing upward, the register FUNC contains "1".
" is set, and when the other end B is inserted upward, "2" is set. Next, step SC
5, register FUNC data (card function)
, and set the initial values of registers, etc. used by the card function according to the card function. Note that even if the card 21 is not inserted, the function selection switches SW1 to S
In order for W4 to function, default values are set in the registers used at that time.

【0025】次に、ステップSC6へ進み、レジスタC
ARDに「1」をセットする。このレジスタCARDは
、カード21の挿入状態を表すフラグである。次に、ス
テップSC7へ進み、機能選択スイッチSW1〜SW4
がその機能を実行することが可能になったことを知らせ
るために、所定の音を発音し、当該カードスキャン処理
を終了してメインルーチンへ戻る。一方、カード21が
挿入されない場合には、ステップSC1における判断結
果が「NO」となり、ステップSC10へ進む。ステッ
プSC10では、カード21の抜取りがあったか否かを
判断する。そして、このステップSC10における判断
結果が「NO」の場合には、そのまま当該ルーチンを終
了してメインルーチンへ戻る。
Next, proceeding to step SC6, the register C
Set "1" to ARD. This register CARD is a flag indicating the insertion state of the card 21. Next, proceed to step SC7, and select function selection switches SW1 to SW4.
The card emits a predetermined sound to notify that it is now possible to perform its function, ends the card scanning process, and returns to the main routine. On the other hand, if the card 21 is not inserted, the determination result in step SC1 is "NO" and the process proceeds to step SC10. In step SC10, it is determined whether or not the card 21 has been removed. If the determination result in step SC10 is "NO", the routine is immediately terminated and the process returns to the main routine.

【0026】一方、ステップSC10における判断結果
が「YES」の場合、すなわちカード21の抜取りがあ
った場合には、ステップSC11へ進み、機能選択スイ
ッチSW1〜SW4がカード無しの機能を実行できるよ
うにデフォルト値を設定するためのカード終了設定処理
を行なう。次に、ステップSC12へ進み、レジスタF
UNCを「0」にして、カード21が挿入されていない
ことを示す状態にする。そして、当該処理を終了し、メ
インルーチンへ戻る。上述したようにカードスキャン処
理が終了すると、メインルーチンでは、ステップSA4
へ進み、図9に示すカード機能処理を行なう。
On the other hand, if the determination result in step SC10 is "YES", that is, if the card 21 has been removed, the process advances to step SC11, and the function selection switches SW1 to SW4 are set so that they can execute the function without a card. Performs card termination setting processing to set default values. Next, proceeding to step SC12, the register F
The UNC is set to "0" to indicate that the card 21 is not inserted. Then, the process ends and returns to the main routine. When the card scanning process is completed as described above, the main routine proceeds to step SA4.
Then, the card function processing shown in FIG. 9 is performed.

【0027】このカード機能処理では、まず、ステップ
SD1において、レジスタCARDが「1」であるか否
かを判断する。ここで、カード21が挿入されていない
と、レジスタCARDが「0」であるため、ステップS
D1における判断結果は「NO」となり、そのまま当該
ルーチンを終了してメインルーチンへ戻る。一方、カー
ド21が挿入されている場合には、ステップSD1にお
ける判断結果は「YES」となり、ステップSD2へ進
む。ステップSD2では、レジスタFUNCを参照して
、どの機能を有するカードが挿入されているかを判断す
る。ここで、例えば、図3に示すように、カード21の
一端Aが上方になるように挿入されているとすると、レ
ジスタFUNCには「1」がセットされているため、ス
テップSD3へ進む。ステップSD3では、図10に示
す自動演奏処理を行なう。
In this card function processing, first, in step SD1, it is determined whether the register CARD is "1". Here, if the card 21 is not inserted, the register CARD is "0", so step S
The determination result in D1 is "NO", and the routine is immediately terminated and the process returns to the main routine. On the other hand, if the card 21 is inserted, the determination result in step SD1 is "YES" and the process advances to step SD2. In step SD2, the register FUNC is referred to to determine which function the card has inserted. For example, if it is assumed that the card 21 is inserted with one end A facing upward as shown in FIG. 3, the register FUNC is set to "1", so the process proceeds to step SD3. In step SD3, automatic performance processing shown in FIG. 10 is performed.

【0028】自動演奏処理では、まず、ステップSE1
において、機能選択スイッチSW1〜SW4をスキャン
する。次に、ステップSE2において、機能選択スイッ
チSW1〜SW4のいずれかが押下されたか否かを判断
する。ここで、機能選択スイッチSW1〜SW4のいず
れも押下されていない場合には、ステップSE2の判断
結果は「NO」となり、ステップSE7へ進む。ステッ
プSE7では、プレイフラグPLAY1,2,3または
4のうち、いずれかが「1」であるか否かを判断する。 このプレイフラグPLAY1〜PLAY4は、各々、「
1」と「0」の状態をとり、「1」は、該当する機能選
択スイッチSW1〜SW4に割当てられた曲目を演奏中
であることを示し、「0」は演奏していないことを示す
In the automatic performance process, first, step SE1
, scan the function selection switches SW1 to SW4. Next, in step SE2, it is determined whether any of the function selection switches SW1 to SW4 has been pressed. Here, if none of the function selection switches SW1 to SW4 have been pressed, the determination result in step SE2 is "NO" and the process proceeds to step SE7. In step SE7, it is determined whether any of the play flags PLAY1, PLAY2, 3, or 4 is "1". These play flags PLAY1 to PLAY4 are each "
1" and "0". "1" indicates that the music piece assigned to the corresponding function selection switch SW1 to SW4 is being played, and "0" indicates that it is not being played.

【0029】そして、プレイフラグPLAY1〜PLA
Y4のいずれかが「1」であると、ステップSE7にお
ける判断結果は「YES」となり、ステップSE8へ進
む。ステップSE8では、テンポクロックTCに基づい
て、「1」がセットされているプレイフラグPLAYの
演奏データを演奏データROM13から読み出して音源
回路10へ出力する。なお、上記テンポクロックTCは
、所定の期間で生じる割込みで実行される図11に示す
タイマインタラプトルーチンにおいてインクリメントさ
れる。タイマインタラプトルーチンでは、まず、ステッ
プSF1において、ウィンドウカウンタWCをインクリ
メントする。このウィンドウカウンタWCは、カラオケ
採点処理において用いられるカウンタであり、詳細は後
述する。次に、ステップSF2において、上記テンポク
ロックTCをインクリメントし、終了すると、所定のル
ーチンへ戻る。
[0029] Then, play flags PLAY1 to PLA
If either Y4 is "1", the determination result in step SE7 is "YES" and the process advances to step SE8. In step SE8, the performance data of the play flag PLAY set to "1" is read out from the performance data ROM 13 and output to the sound source circuit 10 based on the tempo clock TC. Note that the tempo clock TC is incremented in the timer interrupt routine shown in FIG. 11, which is executed by an interrupt occurring at a predetermined period. In the timer interrupt routine, first, in step SF1, a window counter WC is incremented. This window counter WC is a counter used in the karaoke scoring process, and details will be described later. Next, in step SF2, the tempo clock TC is incremented, and upon completion, the process returns to a predetermined routine.

【0030】また、自動演奏処理のステップSE8では
、演奏データの最終(END)が検出されると、該当す
るプレイフラグPLAYを「0」にリセットする。一方
、ステップSE8の処理が終了した場合か、あるいは、
いずれのプレイフラグPLAY1〜PLAY4も「0」
で、上述したステップSE7における判断結果が「NO
」の場合には、カード機能処理へ戻り、さらに、引続い
てメインルーチンへ戻る。一方、ステップSE2におけ
る判断結果が「YES」の場合、すなわち、機能選択ス
イッチSW1〜SW4のいずれかが押下された場合には
、ステップSE3へ進む。ステップSE3では、機能選
択スイッチSW1〜SW4のうち、押下されたスイッチ
のプレイフラグPLAY1〜PLAY4を反転する。こ
れによって、機能選択スイッチSW1,2,3または4
を押下する度に、各々がオン状態とオフ状態とを交互に
繰返す。
Further, in step SE8 of the automatic performance processing, when the end (END) of the performance data is detected, the corresponding play flag PLAY is reset to "0". On the other hand, if the process of step SE8 is finished, or
All play flags PLAY1 to PLAY4 are "0"
Then, the judgment result in step SE7 mentioned above is "NO".
'', the process returns to card function processing, and then returns to the main routine. On the other hand, if the determination result in step SE2 is "YES", that is, if any of the function selection switches SW1 to SW4 is pressed, the process advances to step SE3. In step SE3, the play flags PLAY1 to PLAY4 of the pressed switch among the function selection switches SW1 to SW4 are inverted. By this, function selection switch SW1, 2, 3 or 4
Each time you press , each alternates between an on state and an off state.

【0031】次に、ステップSE4へ進み、機能選択ス
イッチSW1〜SW4のうち、押下されたスイッチに対
応するプレイフラグPALY1〜PLAY4が「1」で
あるか否かを判断する。そして、ステップSE4におけ
る判断結果が「YES」の場合、すなわち、新たに押下
された場合には、ステップSE5へ進む。ステップSE
5では、曲の初めから演奏するために、テンポクロック
TCを「0」にリセットする。次に、ステップSE6に
おいて、選択された曲目だけを演奏するように、押下さ
れたスイッチ以外のプレイフラグPLAYを「0」にリ
セットする。そして、ステップSE7へ進む。この場合
、プレイフラグPLAY1〜PLAY4のいずれかが「
1」にセットされているので、ステップSE7における
判断結果は「YES」となり、ステップSE8へ進む。 そして、ステップSE8において、曲の初めから演奏が
行なわれる。
Next, the process proceeds to step SE4, and it is determined whether or not the play flags PALY1 to PLAY4 corresponding to the pressed switch among the function selection switches SW1 to SW4 are "1". If the determination result in step SE4 is "YES", that is, if the button has been pressed anew, the process advances to step SE5. Step SE
In step 5, the tempo clock TC is reset to "0" in order to play the song from the beginning. Next, in step SE6, the play flags PLAY of the switches other than the pressed switch are reset to "0" so that only the selected song is played. Then, the process advances to step SE7. In this case, one of the play flags PLAY1 to PLAY4 is "
1", the determination result in step SE7 is "YES" and the process advances to step SE8. Then, in step SE8, the music is played from the beginning.

【0032】一方、ステップSE4における判断結果が
「NO」の場合、すなわち、機能選択スイッチSW1〜
SW4のうち、押下されたスイッチのプレイフラグPL
AYが「0」の場合には、そのプレイフラグPLAYに
対応する曲目に対して、演奏停止が選択されたわけであ
るので、カウンタ類をリセットせずに、直接、ステップ
SE7へ進む。ステップSE7では、他にプレイフラグ
PLAYに「1」がセットされているか否かを判断し、
この場合は、「0」であるので、判断結果は「NO」と
なり、カード機能処理へ戻り、さらに、引続いてメイン
ルーチンへ戻る。メインルーチンでは、ステップSA5
へ進み、楽音生成のためのその他の処理を行ない、その
後、ステップSA1へ戻り、上述した処理を繰返し実行
する。
On the other hand, if the determination result in step SE4 is "NO", that is, the function selection switches SW1 to
Play flag PL of the pressed switch among SW4
If AY is "0", this means that the performance stop has been selected for the song corresponding to the play flag PLAY, and therefore the process directly proceeds to step SE7 without resetting the counters. In step SE7, it is determined whether or not the play flag PLAY is set to "1".
In this case, since it is "0", the judgment result is "NO", and the process returns to the card function processing, and then returns to the main routine. In the main routine, step SA5
The process proceeds to step SA1 to perform other processing for musical tone generation, and then returns to step SA1 to repeat the above-described process.

【0033】[カラオケ採点処理]次に、前述したカー
ド21を、他端Bを上方にして挿入した場合について、
その動作を図12に示すフローチャートを参照して説明
する。なお、前述した処理に共通の部分については、説
明を省略する。この場合、各機能選択スイッチSW1〜
SW4には、自動演奏時と同様に、演奏曲目が設定され
るようになっており、この電子楽器は、所定期間のウィ
ンドウを生成し、該ウィンドウの期間内においてのみ、
自動演奏される伴奏の楽音の発音タイミングと歌い手の
発声タイミングとのズレおよび楽音の消音タイミングと
歌い手の消声タイミングとのズレを検出し、それらのズ
レの程度によって採点する。
[Karaoke scoring process] Next, regarding the case where the aforementioned card 21 is inserted with the other end B facing upward,
The operation will be explained with reference to the flowchart shown in FIG. Note that descriptions of parts common to the processes described above will be omitted. In this case, each function selection switch SW1~
The music to be played is set in SW4 in the same way as during automatic performance, and this electronic musical instrument generates a window of a predetermined period, and only within the period of the window,
The deviation between the sounding timing of automatically played accompaniment musical tones and the vocalization timing of a singer, and the deviation between the muting timing of musical tones and the muting timing of the singer are detected, and scores are given based on the degree of these deviations.

【0034】図14は、(a)マイクMCの入力波形、
(b)波形整形回路15の出力波形および(c)自動伴
奏における音符データを示す波形図である。この図にお
いて、マイクMCから入力されたアナログ信号の音声信
号は、波形整形回路15によってパルス信号に変換され
る。CPU3は、このパルス信号の長さを判断して、音
声かノイズかを決定する。そして、ノイズと判定した場
合には、入力なしとみなす。上述した方向でカード21
を挿入すると、前述した図8に示すカードスキャン処理
では、ステップSC4において、レジスタFUNCには
「2」が代入される。そして、ステップSC5では、レ
ジスタFUNCに基づいて機能選択スイッチSW1〜S
W4にカード機能に応じた値が設定される。
FIG. 14 shows (a) the input waveform of the microphone MC;
(b) A waveform diagram showing the output waveform of the waveform shaping circuit 15 and (c) note data in automatic accompaniment. In this figure, an analog audio signal input from a microphone MC is converted into a pulse signal by a waveform shaping circuit 15. The CPU 3 judges the length of this pulse signal and determines whether it is voice or noise. If it is determined to be noise, it is assumed that there is no input. Card 21 in the direction mentioned above
In the card scanning process shown in FIG. 8 described above, "2" is assigned to the register FUNC in step SC4. Then, in step SC5, function selection switches SW1 to S are selected based on the register FUNC.
A value corresponding to the card function is set in W4.

【0035】次に、図9に示すカード機能処理では、ス
テップSD2において、レジスタFUNCが「2」であ
るため、ステップSD4へ進み、図12に示すカラオケ
採点処理を実行する。図12に示すカラオケ採点処理で
は、まず、ステップSG1において、機能選択スイッチ
SW1〜SW4をスキャンする。次に、ステップSG2
において、スキャンの結果、機能選択スイッチSW1〜
SW4が押下されたか否かを判断する。ここで、機能選
択スイッチSW1〜SW4のうち、いずれかが押下され
たとすると、ステップSG2における判断結果は「YE
S」となり、ステップSG3へ進む。ステップSG3で
は、機能選択スイッチSW1〜SW4のうち、押下され
たスイッチのプレイフラグNPLAY1〜NPLAY4
を反転する。これによって、機能選択スイッチSW1,
2,3または4を押下する度に、オン状態とオフ状態と
を交互に繰返す。すなわち、オン状態であったスイッチ
はオフ状態になり、逆に、オフ状態にあったスイッチは
オン状態になる。
Next, in the card function process shown in FIG. 9, since the register FUNC is "2" in step SD2, the process proceeds to step SD4, and the karaoke scoring process shown in FIG. 12 is executed. In the karaoke scoring process shown in FIG. 12, first, in step SG1, the function selection switches SW1 to SW4 are scanned. Next, step SG2
As a result of the scan, the function selection switches SW1 to
It is determined whether SW4 has been pressed. Here, if any one of the function selection switches SW1 to SW4 is pressed, the determination result in step SG2 is "YE".
S'' and the process proceeds to step SG3. In step SG3, play flags NPLAY1 to NPLAY4 of the pressed switch among the function selection switches SW1 to SW4 are set.
Invert. As a result, the function selection switch SW1,
Each time 2, 3 or 4 is pressed, the on state and off state are alternately repeated. That is, a switch that was in an on state becomes an off state, and conversely, a switch that was in an off state becomes an on state.

【0036】次に、ステップSG4へ進み、機能選択ス
イッチSW1〜SW4のうち、押下されたスイッチに対
応するプレイフラグNPALY1〜NPLAY4が「1
」であるか否かを判断する。そして、ステップSG4に
おける判断結果が「YES」の場合、すなわち、新たに
押下された場合には、ステップSG5へ進む。ステップ
SG5では、曲の初めから演奏するために、テンポクロ
ックTCを「0」にリセットする。次に、ステップSG
6において、選択された曲目だけを演奏するために、押
下されたスイッチ以外のプレイフラグNPLAYを「0
」にリセットする。
Next, the process advances to step SG4, where the play flags NPALY1 to NPLAY4 corresponding to the pressed switch among the function selection switches SW1 to SW4 are set to "1".
”. If the determination result in step SG4 is "YES", that is, if the button has been pressed anew, the process advances to step SG5. In step SG5, the tempo clock TC is reset to "0" in order to play the song from the beginning. Next, step SG
In step 6, in order to play only the selected song, set the play flag NPLAY for the switches other than the pressed switch to "0".
”.

【0037】上述したステップSG6における処理が終
了した場合、あるいは機能選択スイッチSW1〜SW4
が押下されずに、ステップSG2における判断結果が「
NO」となった場合、また、機能選択スイッチSW1〜
SW4のいずれかがオフ状態にするために押下されて、
ステップSG4における判断結果が「NO」となった場
合には、ステップSG7へ進む。ステップSG7では、
プレイフラグNPLAY1〜NPLAY4のいずれかが
「1」であるか否かを判断する。そして、このステップ
SG7における判断結果が「NO」の場合には、そのま
ま当該処理を終了し、カード機能処理へ戻り、さらに、
引続いてメインルーチンへ戻る。メインルーチンでは、
ステップSA5へ進み、楽音生成のためのその他の処理
を行ない、その後、ステップSA1へ戻り、上述した処
理を繰返し実行する。
[0037] When the process in step SG6 described above is completed, or when the function selection switches SW1 to SW4 are
is not pressed, and the judgment result in step SG2 is "
If the result is “NO”, the function selection switch SW1~
When one of SW4 is pressed to turn off,
If the determination result in step SG4 is "NO", the process advances to step SG7. In step SG7,
It is determined whether any of the play flags NPLAY1 to NPLAY4 is "1". If the determination result in step SG7 is "NO", the process is immediately terminated, the process returns to the card function process, and further,
Then return to the main routine. In the main routine,
Proceeding to step SA5, other processing for musical tone generation is performed, and then returning to step SA1, where the above-described processing is repeatedly executed.

【0038】一方、ステップSG7における判断結果が
「YES」の場合、すなわち、以前から機能選択スイッ
チSW1〜SW4のうちのいずれかが押下されていた場
合か、あるいは、新たに押下された場合には、ステップ
SG8へ進む。ステップSG8では、テンポクロックT
Cに基づいて、「1」がセットされていたプレイフラグ
PLAYの演奏データを演奏データROM13から読み
出して音源回路10へ出力する。この際の演奏データ(
音符データ)は、図14に示す(c)のようになる。 音符データの発音タイミングを符号KON、消音タイミ
ングを符号KOFFで示している。この時、メロディデ
ータと伴奏データの双方が読み出されるが、メロディデ
ータのみ音量を下げるデータが出力される。次に、ステ
ップSG9へ進み、演奏データとしてエンドデータ(演
奏の最終を示す)が読み出されたか否かを判断する。こ
こで、エンドデータが読み出されると、ステップSG9
における判断結果は「YES」となり、ステップSG1
0へ進む。ステップSG10では、演奏が終了したこと
を示すファンファーレデータを音源回路10へ出力する
。この結果、スピーカSPからはファンファーレが発音
される。この実施例の場合、自動演奏される伴奏の楽音
の発音タイミングと歌い手の発声タイミングとのズレが
多く、採点結果が所定の範囲内に入っていないと、伴奏
は最終まで演奏されない。
On the other hand, if the judgment result in step SG7 is "YES", that is, if any of the function selection switches SW1 to SW4 has been pressed before, or if it is newly pressed, , proceed to step SG8. In step SG8, the tempo clock T
Based on C, the performance data of the play flag PLAY set to "1" is read out from the performance data ROM 13 and output to the sound source circuit 10. The performance data at this time (
The musical note data) is as shown in FIG. 14(c). The sound generation timing of musical note data is indicated by the symbol KON, and the mute timing is indicated by the symbol KOFF. At this time, both melody data and accompaniment data are read out, but data that lowers the volume of only the melody data is output. Next, the process advances to step SG9, where it is determined whether end data (indicating the end of the performance) has been read out as the performance data. Here, when the end data is read, step SG9
The judgment result in step SG1 is "YES", and step SG1
Go to 0. In step SG10, fanfare data indicating that the performance has ended is output to the sound source circuit 10. As a result, a fanfare is emitted from the speaker SP. In this embodiment, there is a large discrepancy between the timing of the automatically played accompaniment tones and the vocalization timing of the singer, and if the scoring results are not within a predetermined range, the accompaniment will not be played to the end.

【0039】一方、まだ、エンドデータが読み出されず
、演奏データが継続しているとすると、ステップSG9
における判断結果は「NO」となり、ステップSG11
へ進む。ステップSG11では、タイミングクロックT
Cに「6」を加算する。次に、ステップSG12へ進み
、タイミングクロックTCに基づいて演奏データROM
13から演奏データを読み出す。そして、ステップSG
13において、演奏データが有るか否かを判断する。 このステップSG13における判断結果が「YES」の
場合には、ステップSG14へ進む。ステップSG14
では、ウィンドウカウンタWCを「0」にクリアする。
On the other hand, if the end data has not yet been read out and the performance data continues, step SG9
The judgment result in step SG11 is "NO".
Proceed to. In step SG11, the timing clock T
Add "6" to C. Next, the process advances to step SG12, where the performance data ROM is stored based on the timing clock TC.
The performance data is read from 13. And step SG
In step 13, it is determined whether or not there is performance data. If the determination result in step SG13 is "YES", the process advances to step SG14. Step SG14
Now, clear the window counter WC to "0".

【0040】ステップSG14の処理が終了した場合、
または、ステップSG13における判断結果が「NO」
の場合には、ステップSG15へ進む。ステップSG1
5では、ウィンドウカウンタWCが「12」より小さい
か否かを判断する。ここで、図15に示す波形図を参照
してウィンドウカウンタWCについて説明する。この図
において、(a)は波形整形回路15が出力するパルス
波形で、図14の(b)に示す波形と同一のものである
。また、(b)は音符データであり、図14の(c)に
示す波形と同一のものである。このウィンドウカウンタ
WCは、図15に示すように、音符の発音タイミングと
消音タイミングにおけるウィンドウのためのカウンタで
あり、ウィンドウは、各タイミングの前後に16分音符
分設けられている。4分音符が24クロックの時、上記
ウィンドウは12クロック分の時間となる。そして、ス
テップSG15における判断結果が「YES」の場合に
は、ステップSG16へ進む。
[0040] When the process of step SG14 is completed,
Or, the judgment result in step SG13 is "NO".
In this case, the process advances to step SG15. Step SG1
In step 5, it is determined whether the window counter WC is smaller than "12". Here, the window counter WC will be explained with reference to the waveform diagram shown in FIG. In this figure, (a) is a pulse waveform output by the waveform shaping circuit 15, which is the same as the waveform shown in (b) of FIG. 14(b) is musical note data, which is the same waveform as shown in FIG. 14(c). As shown in FIG. 15, this window counter WC is a counter for a window at the sounding timing and muting timing of a note, and the windows are provided for 16th notes before and after each timing. When a quarter note is 24 clocks long, the window is 12 clocks long. If the determination result in step SG15 is "YES", the process advances to step SG16.

【0041】ステップSG16では、マイク入力または
キーデータに変化があったか否かを判断する。そして、
ステップSG16における判断結果が「YES」の場合
には、ステップSG17へ進む。ステップSG17では
、ウィンドウカウンタWCに基づいて所定のテーブルか
ら得点Pを読み出し、レジスタPOINTの内容に得点
Pを加算した後、再びレジスタPOINTへ格納する。 すなわち、ウィンドウカウンタWCが「12」以下の時
は、そのカウンタの値に応じた得点を加算する。例えば
、図15に示すように、■のようにタイミングが大きく
ずれた場合には、得点なしとし、■のようにタイミング
が少しずれた場合には、低い得点とし、さらに、■のよ
うにタイミングがほぼ一致している場合には、高い得点
とする。そして、ステップSG18へ進む。
In step SG16, it is determined whether or not there has been a change in microphone input or key data. and,
If the determination result in step SG16 is "YES", the process advances to step SG17. In step SG17, the score P is read from a predetermined table based on the window counter WC, and after adding the score P to the contents of the register POINT, it is stored in the register POINT again. That is, when the window counter WC is "12" or less, a score corresponding to the value of the counter is added. For example, as shown in Figure 15, if the timing is greatly off as shown in ■, no points will be given, if the timing is slightly off as shown in ■, a low score will be given, and furthermore, if the timing is slightly off as shown in If they almost match, a high score is given. Then, the process advances to step SG18.

【0042】一方、ウィンドクロックWCが「12」よ
り大きく、ステップSG15における判断結果が「NO
」となった場合、または、ウィンドクロックWCが「1
2」より小さいが、マイク入力またはキーデータに変化
がなく、ステップSG16における判断結果が「NO」
となった場合には、得点を加算することなく、ステップ
SG18へ進む。ステップSG18では、タイミングク
ロックTCから「6」を減算する。そして、ステップS
G19では、タイミングクロックTCに基づいてテーブ
ルから総得点を読み出す。この総得点とは、所定の間隔
のタイミングクロックTCに設けられた、その時点にお
ける合格点である。次に、ステップSG20において、
レジスタPOINTに格納されているそれまでの(曲の
途中までの)得点と上記総得点とを比較し、それまでの
得点が総得点より小さいか否かを判断する。そして、ス
テップSG20における判断結果が「YES」の場合に
は、ステップSG21へ進む。ステップSG21では、
それまでの得点が合格点に達していないために、プレイ
フラグNPLAYを「0」にクリアし、演奏を終了する
。そして、当該カラオケ採点処理を終了し、カード機能
処理へ戻り、さらに、引続いてメインルーチンへ戻る。 メインルーチンでは、ステップSA5へ進み、その他の
処理を行ない、その後、ステップSA1へ戻り、上述し
た処理を繰返し実行する。
On the other hand, the wind clock WC is greater than "12", and the determination result at step SG15 is "NO".
”, or the wind clock WC is “1”.
2", but there is no change in the microphone input or key data, and the judgment result in step SG16 is "NO".
If so, the process proceeds to step SG18 without adding any points. In step SG18, "6" is subtracted from the timing clock TC. And step S
In G19, the total score is read from the table based on the timing clock TC. This total score is the passing score at that point in time, which is set on the timing clock TC at predetermined intervals. Next, in step SG20,
The score up to that point (up to the middle of the song) stored in the register POINT is compared with the total score, and it is determined whether the score up to that point is smaller than the total score. If the determination result in step SG20 is "YES", the process advances to step SG21. In step SG21,
Since the score up to that point has not reached the passing score, the play flag NPLAY is cleared to "0" and the performance is ended. Then, the karaoke scoring process is ended, the process returns to the card function process, and then the process returns to the main routine. In the main routine, the process advances to step SA5 to perform other processing, and then returns to step SA1 to repeatedly execute the above-described processing.

【0043】一方、それまでの得点が総得点より大きい
場合には、ステップSG20における判断結果は「NO
」となり、演奏を終了させることなく、当該カラオケ採
点処理を一旦、終了し、カード機能処理へ戻り、さらに
、引続いてメインルーチンへ戻る。したがって、この場
合には、演奏が終了するまで、カラオケ採点処理が引続
き行なわれる。そして、演奏が途中で終ることなく最後
までいくと、前述したように、ステップSG9における
判断結果が「YES」となり、ステップSG10へ進み
、ファンファーレデータを音源回路10へ出力する。 そして、ファンファーレは、スピーカSPによって発音
される。以下、ステップSG11〜SG21が前述同様
に実行される。
On the other hand, if the score up to that point is greater than the total score, the judgment result at step SG20 is "NO".
”, the karaoke scoring process is temporarily ended without ending the performance, the process returns to the card function process, and then the process returns to the main routine. Therefore, in this case, the karaoke scoring process continues until the performance ends. When the performance reaches the end without ending midway, the determination result in step SG9 becomes ``YES'' as described above, and the process proceeds to step SG10, where fanfare data is output to the sound source circuit 10. Then, the fanfare is sounded by the speaker SP. Thereafter, steps SG11 to SG21 are executed in the same manner as described above.

【0044】以上の結果、従来のカラオケ採点を行なう
電子楽器のように、演奏の全時間内について比較してい
たようなことはせずに、所定期間のウィンドウを生成し
、該ウィンドウの期間内においてのみ、自動演奏される
伴奏の楽音の発音タイミングと歌い手の発声タイミング
とのズレおよび楽音の消音タイミングと歌い手の消声タ
イミングとのズレを検出し、それらのズレの程度によっ
て採点するようにしたため、比較に要する処理時間を短
縮できるという利点が得られる。なお、上述した実施例
では、カラオケ採点処理において、歌声を採点の対象と
したが、鍵盤1による演奏を採点対象としてもよい。
As a result of the above, instead of comparing the entire performance time as in conventional electronic musical instruments that perform karaoke scoring, a window of a predetermined period is generated and the comparison is made within the period of the window. Only in this system, the discrepancies between the timing of automatically played accompaniment tones and the singer's vocalization timing, as well as the discrepancies between the muting timing of musical tones and the singer's muting timing, are detected, and scores are given based on the degree of these discrepancies. , the advantage is that the processing time required for comparison can be shortened. In addition, in the above-mentioned embodiment, in the karaoke scoring process, the singing voice was the subject of scoring, but the performance on the keyboard 1 may also be the subject of scoring.

【0045】また、実施例では、発音タイミングおよび
消音タイミングのみで採点したが、これに限らず、ピッ
チ抽出を行なったり、キーコードを参照することにより
、入力された音との周波数(ピッチ)を採点の対象とし
てもよい。また、マイク入力の信号は、波形整形回路1
5において、図16に示すように、(a)に示すパルス
信号を積分回路等で(b)に示す波形に整形した後、さ
らに、ロジックICによって(c)に示すような演奏デ
ータと同じフォーマットに変換して比較してもよい。 このようにすれば、音符データとの比較が容易になる。 また、カード21は、その挿入方向を、実施例の上下以
外に、表と裏、または縦と横などにすることで機能を変
えるようにしてもよい。
[0045]Although in the example, scores were given only based on the sound production timing and mute timing, the frequency (pitch) of the input sound can be determined by extracting the pitch or by referring to the key code. It may also be subject to scoring. In addition, the microphone input signal is transmitted to the waveform shaping circuit 1.
5, as shown in FIG. 16, after shaping the pulse signal shown in (a) into the waveform shown in (b) using an integrating circuit, etc., the pulse signal is further shaped into the same format as the performance data shown in (c) using a logic IC. You can also convert and compare. In this way, comparison with musical note data becomes easy. Further, the function of the card 21 may be changed by inserting the card 21 in a direction other than the top and bottom as in the embodiment, such as front and back, or vertical and horizontal.

【0046】[0046]

【発明の効果】以上、説明したように、請求項1記載の
発明によれば、機能指示手段に記録された複数の指示デ
ータのうち、該機能手段の装着手段への装着方向に応じ
て、選択的に1つを読取り手段によって読取り、該指示
データに指示される機能を制御手段によって実行するよ
うにし、機能指示手段の装着方向が変ると、それに応じ
て読取られる指示データが変り、上記装着方向に応じた
機能が実行されるようにしたたため、パネル面が繁雑に
ならず、かつ、操作スイッチの機能が判別しやすく、さ
らに、誤操作しにくく、コストアップにもつながらない
という利点が得られる。
As described above, according to the invention as set forth in claim 1, among the plurality of instruction data recorded in the function instruction means, the instruction data is set according to the direction in which the function means is attached to the attachment means. One is selectively read by the reading means, and the function instructed by the instruction data is executed by the control means, and when the mounting direction of the function instruction means changes, the instruction data read changes accordingly, and the function instructed by the instruction data is executed by the control means. Since the function is executed according to the direction, the panel surface is not cluttered, the functions of the operation switches are easy to distinguish, and furthermore, there are advantages that erroneous operation is difficult to occur and does not lead to an increase in cost.

【0047】また、請求項2記載の発明によれば、比較
手段がウィンドウ発生手段が設定した所定期間のウィン
ドウ内においてのみ、自動演奏データの発音および消音
タイミングの双方またはいずれか一方と、外部信号の発
音および消音タイミングの双方またはいずれか一方との
ずれの程度を比較し、採点手段が比較手段の比較結果に
応じて採点するようにしたため、比較に要する処理時間
が短縮されるという利点が得られる。
Further, according to the invention as set forth in claim 2, the comparison means compares the sound generation and/or mute timing of the automatic performance data and the external signal only within the predetermined period window set by the window generation means. Since the scoring means compares the degree of deviation from both or either of the pronunciation and muting timings and scores according to the comparison result of the comparison means, there is an advantage that the processing time required for comparison is shortened. It will be done.

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

【図1】  本発明の一実施例の構成を示すブロック図
である。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】  本実施例の電子楽器の全体外見図である。FIG. 2 is an overall external view of the electronic musical instrument of this embodiment.

【図3】  本実施例のカード21とその周辺に設けら
れた機能選択スイッチの正面図である。
FIG. 3 is a front view of the card 21 of this embodiment and a function selection switch provided around it.

【図4】  本実施例のカード21を上下逆さに装着し
た場合の該カード21とその周辺に設けられた機能選択
スイッチの正面図である。
FIG. 4 is a front view of the card 21 of this embodiment and the function selection switch provided around it when the card 21 is installed upside down.

【図5】  本実施例のカード21の裏面に描かれたバ
ーコードを示す背面図である。
FIG. 5 is a rear view showing a barcode drawn on the back side of the card 21 of this embodiment.

【図6】  本実施例のメインルーチンを示すフローチ
ャートである。
FIG. 6 is a flowchart showing the main routine of this embodiment.

【図7】  本実施例の押鍵処理を示すフローチャート
である。
FIG. 7 is a flowchart showing key press processing in this embodiment.

【図8】  本実施例のカードスキャン処理を示すフロ
ーチャートである。
FIG. 8 is a flowchart showing card scanning processing in this embodiment.

【図9】  本実施例のカード機能処理を示すフローチ
ャートである。
FIG. 9 is a flowchart showing card function processing in this embodiment.

【図10】  本実施例の自動演奏処理を示すフローチ
ャートである。
FIG. 10 is a flowchart showing automatic performance processing in this embodiment.

【図11】  本実施例のタイマインタラプトルーチン
を示すフローチャートである。
FIG. 11 is a flowchart showing a timer interrupt routine of this embodiment.

【図12】  本実施例のカラオケ採点処理を示すフロ
ーチャートである。
FIG. 12 is a flowchart showing the karaoke scoring process of this embodiment.

【図13】  本実施例のカラオケ採点処理を示すフロ
ーチャートである。
FIG. 13 is a flowchart showing the karaoke scoring process of this embodiment.

【図14】  各々、(a)マイクMCの入力波形図、
(b)波形整形回路の出力波形図および(c)音符デー
タの波形図である。
[Figure 14] (a) Input waveform diagram of microphone MC, respectively;
(b) An output waveform diagram of the waveform shaping circuit, and (c) a waveform diagram of musical note data.

【図15】  本実施例によるウィンドウおよびそれを
用いた比較処理を説明するための波形図である。
FIG. 15 is a waveform diagram for explaining a window and a comparison process using the window according to the present embodiment.

【図16】  各々、(a)マイクMCの入力波形をデ
ジタルに変換したパルス信号を示す波形図、(b)該パ
ルス信号を積分して整形した波形図、(c)該積分した
波形をロジックICによって演奏データと同じフォーマ
ットに整形した波形図である。
[Figure 16] (a) A waveform diagram showing a pulse signal obtained by converting the input waveform of the microphone MC into digital, (b) A waveform diagram obtained by integrating and shaping the pulse signal, (c) A logic diagram of the integrated waveform It is a waveform diagram shaped into the same format as performance data by an IC.

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

1……鍵盤、3……CPU(制御手段、読み出し手段、
タイミング発生手段、ウィンドウ発生手段、比較手段、
採点手段)、4……パネルSW、6……カードセンサ(
読取り手段)、13……演奏データROM(記憶手段)
、20……カードスロット部(装着手段)、21……カ
ード(機能指示手段)、SW1〜SW4……機能選択ス
イッチ
1...Keyboard, 3...CPU (control means, reading means,
timing generation means, window generation means, comparison means,
Scoring means), 4... Panel SW, 6... Card sensor (
reading means), 13... performance data ROM (storage means)
, 20...Card slot section (installation means), 21...Card (function instruction means), SW1 to SW4...Function selection switch

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  電子機器本体と、特定の機能を指示す
るデータが複数所定の位置に記録された外部記憶手段で
ある機能指示手段と、該機能指示手段を着脱自在に前記
電子機器本体に装着可能な装着手段と、該装着手段に前
記機能指示手段が装着されると、該機能指示手段に記録
された前記複数の指示データのうち、前記機能指示手段
の装着方向に応じた1つの指示データを読取る読取り手
段と、前記読み取った指示データに基づいて該指示デー
タに対応する機能を前記電子機器本体で実行可能なよう
に制御する制御手段とを具備し、前記機能指示手段と前
記装着手段とは前記機能指示手段を少なくとも2種の向
きで前記装着手段に装着可能な形状を有することを特徴
とする電子機器。
1. An electronic device main body, a function instruction means which is an external storage means in which a plurality of data instructing specific functions are recorded at predetermined positions, and the function instruction means is detachably attached to the electronic device main body. possible attachment means, and when the function instruction means is attached to the attachment means, one instruction data corresponding to the attachment direction of the function instruction means among the plurality of instruction data recorded in the function instruction means; and a control means for controlling the electronic device main body to execute a function corresponding to the instruction data based on the read instruction data, and the function instruction means and the mounting means are provided. An electronic device having a shape that allows the function indicating means to be mounted on the mounting means in at least two different orientations.
【請求項2】  自動演奏データを記憶する記憶手段と
、所定のタイミングに従って前記自動演奏データを読み
出す読み出し手段と、前記読み出された自動演奏データ
の発音および消音タイミングに従って外部から入力され
る外部信号の発音および消音タイミングの双方またはい
ずれか一方を生成するタイミング発生手段と、前記自動
演奏データの発音および消音タイミングの双方またはい
ずれか一方の前後に所定期間のウィンドウを設定するウ
ィンドウ発生手段と、前記ウィンドウ内においてのみ、
前記自動演奏データの発音および消音タイミングの双方
またはいずれか一方と、前記外部信号の発音および消音
タイミングの双方またはいずれか一方とのずれの程度を
比較する比較手段と、該比較手段の比較結果に応じて採
点する採点手段とを具備することを特徴とする電子楽器
2. A storage means for storing automatic performance data, a reading means for reading out the automatic performance data according to a predetermined timing, and an external signal inputted from the outside according to sound generation and muting timings of the read automatic performance data. a window generating means for setting a window of a predetermined period before and after both or either of the sound generation and mute timings of the automatic performance data; Only within the window
Comparing means for comparing the degree of deviation between the sound generation and/or mute timing of the automatic performance data and the sound generation and/or mute timing of the external signal; and a comparison result of the comparison means. An electronic musical instrument characterized by comprising a scoring means for scoring accordingly.
JP3012741A 1990-12-28 1991-01-09 Electronic musical instrument Expired - Fee Related JP2745831B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP3012741A JP2745831B2 (en) 1991-01-09 1991-01-09 Electronic musical instrument
US07/811,025 US5300723A (en) 1990-12-28 1991-12-20 Electronic musical instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3012741A JP2745831B2 (en) 1991-01-09 1991-01-09 Electronic musical instrument

Publications (2)

Publication Number Publication Date
JPH04251295A true JPH04251295A (en) 1992-09-07
JP2745831B2 JP2745831B2 (en) 1998-04-28

Family

ID=11813852

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3012741A Expired - Fee Related JP2745831B2 (en) 1990-12-28 1991-01-09 Electronic musical instrument

Country Status (1)

Country Link
JP (1) JP2745831B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59102290A (en) * 1982-12-06 1984-06-13 日本ビクター株式会社 Electronic keyed instrument
JPS60150626U (en) * 1984-03-16 1985-10-07 株式会社田村電機製作所 information card
JPS6263795U (en) * 1985-10-09 1987-04-20
JPH01126677A (en) * 1987-11-11 1989-05-18 Yamaha Corp Electronic musical instrument for instruction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59102290A (en) * 1982-12-06 1984-06-13 日本ビクター株式会社 Electronic keyed instrument
JPS60150626U (en) * 1984-03-16 1985-10-07 株式会社田村電機製作所 information card
JPS6263795U (en) * 1985-10-09 1987-04-20
JPH01126677A (en) * 1987-11-11 1989-05-18 Yamaha Corp Electronic musical instrument for instruction

Also Published As

Publication number Publication date
JP2745831B2 (en) 1998-04-28

Similar Documents

Publication Publication Date Title
US5300723A (en) Electronic musical instrument
JP2800465B2 (en) Electronic musical instrument
JPH0934456A (en) Electronic musical instrument and electronic phonation device
US5262583A (en) Keyboard instrument with key on phrase tone generator
JP3684774B2 (en) Performance instruction device and medium recording program
JPH04251295A (en) Electronic equipment and electronic musical instrument
JPH10301567A (en) Voice controller of electronic musical instrument
US5449857A (en) Electronic musical instrument capable of free edit and trial of data hierarchy
JP2638309B2 (en) Electronics
JP2002073030A (en) Cord detector for electronic musical instrument, cord detecting method and recording medium
JP3743993B2 (en) Code determination apparatus, code determination method, and medium recording code determination method
JP2526439B2 (en) Electronic musical instrument
JP2001184063A (en) Electronic musical instrument
JP2722880B2 (en) Electronic musical instrument
JP3005911B2 (en) Performance control device
JP2694788B2 (en) Electronic musical instrument
JPH05204297A (en) Syllable name generator
JP3543159B2 (en) Automatic accompaniment device
JP3744667B2 (en) Automatic accompaniment device and automatic accompaniment method
JPH06342288A (en) Musical sound generating device
JP3533764B2 (en) Automatic accompaniment device
JP2596303B2 (en) Electronic musical instrument
JP2738217B2 (en) Electronic musical instrument
JPH07152372A (en) Playing device
JPH08146959A (en) Automatic accompaniment 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: 19980113

LAPS Cancellation because of no payment of annual fees