JPH10190636A - Data transfer method, data receiving device, and data transmitting device - Google Patents
Data transfer method, data receiving device, and data transmitting deviceInfo
- Publication number
- JPH10190636A JPH10190636A JP8359121A JP35912196A JPH10190636A JP H10190636 A JPH10190636 A JP H10190636A JP 8359121 A JP8359121 A JP 8359121A JP 35912196 A JP35912196 A JP 35912196A JP H10190636 A JPH10190636 A JP H10190636A
- Authority
- JP
- Japan
- Prior art keywords
- data
- word
- transfer
- variable
- word data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012546 transfer Methods 0.000 title claims abstract description 131
- 238000000034 method Methods 0.000 title claims description 92
- 230000004044 response Effects 0.000 claims abstract description 9
- 238000012545 processing Methods 0.000 claims description 102
- 230000008859 change Effects 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 8
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 238000012544 monitoring process Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 description 81
- 230000005540 biological transmission Effects 0.000 description 20
- 238000013500 data storage Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000001514 detection method Methods 0.000 description 4
- 239000003550 marker Substances 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 230000003213 activating effect Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- KNMAVSAGTYIFJF-UHFFFAOYSA-N 1-[2-[(2-hydroxy-3-phenoxypropyl)amino]ethylamino]-3-phenoxypropan-2-ol;dihydrochloride Chemical compound Cl.Cl.C=1C=CC=CC=1OCC(O)CNCCNCC(O)COC1=CC=CC=C1 KNMAVSAGTYIFJF-UHFFFAOYSA-N 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000006866 deterioration Effects 0.000 description 1
- 239000011295 pitch Substances 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Landscapes
- Communication Control (AREA)
- Computer And Data Communications (AREA)
- Electrophonic Musical Instruments (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
Abstract
(57)【要約】
【課題】 データ転送に発生したエラーの影響を低減
する。
【解決手段】 電子楽器101とパソコン103は、ケ
ーブル104によって接続されている。そのパソコン1
03は、電子楽器101からの音声データの転送要求に
応じて音声データを送信する。電子楽器101は、音声
データを、ヘッダ部、ストレート部、及びループ部に分
け、各部分毎に転送(受信)にエラーが発生したか否か
を監視し、エラーが発生すれば、そのエラーが発生した
部分の再転送をパソコン103に要求する。その要求を
受け取ったパソコン103は、要求された部分のデータ
を直ちに再転送する。
(57) [Summary] [PROBLEMS] To reduce the influence of an error occurring in data transfer. An electronic musical instrument and a personal computer are connected by a cable. The PC 1
03 transmits voice data in response to a voice data transfer request from the electronic musical instrument 101. The electronic musical instrument 101 divides the audio data into a header portion, a straight portion, and a loop portion, monitors whether an error has occurred in transfer (reception) for each portion, and if an error occurs, the error is detected. A request is made to the personal computer 103 to re-transfer the generated portion. Upon receiving the request, the personal computer 103 immediately retransmits the requested portion of the data.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、通信手段を介して
接続された2つの装置間でデータを転送する技術に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for transferring data between two devices connected via communication means.
【0002】[0002]
【従来の技術】音声発音機能を備えた装置、例えば電子
楽器では、その音声発音機能によって発音できる音声
(楽音)の選択肢を広げるために、音声(楽音)を発音
するための音声データを他の装置(ここでは、転送側装
置と呼ぶことにする)から必要に応じて供給するような
ことも行われている。転送側装置から音声データを必要
に応じて供給するようにした場合には、電子楽器(音声
発音側の装置)は様々な音色で楽音を発音させることが
できるという利点に加えて、データを格納するためのメ
モリ容量が小さくて済むことから、コストを低減するこ
とができるという利点も得ることができる。2. Description of the Related Art In a device having a voice pronunciation function, for example, an electronic musical instrument, in order to expand the choices of voices (tones) that can be pronounced by the voice pronunciation function, voice data for generating a voice (musical tone) is converted into other data. A device (herein, referred to as a transfer side device) supplies the data as needed. When audio data is supplied from the transfer-side device as necessary, the electronic musical instrument (the device on the sound-producing side) has the advantage that it can generate musical tones in various timbres, and also stores data. Since a small memory capacity is required, the advantage that the cost can be reduced can also be obtained.
【0003】[0003]
【発明が解決しようとする課題】上記のように、2つの
装置間で音声データの転送を行った場合、その音声デー
タによって発音される音声に不具合が生じないように、
受信側である電子楽器はそれを正常に受信したか否かの
チェックを行っている。そのチェックを行った結果、音
声データの転送(受信)に異常(エラー)が発生してい
た場合、電子楽器は音声データの転送を転送側装置に再
度要求して、それの受信を再度行っていた。As described above, when voice data is transferred between two devices, the voice generated by the voice data does not have a problem.
The electronic musical instrument on the receiving side checks whether it has been received normally. As a result of the check, if an error (error) has occurred in the transfer (reception) of the audio data, the electronic musical instrument requests the transfer-side device again for the transfer of the audio data, and performs the reception again. Was.
【0004】しかし、このような音声データの従来の転
送方法では、エラーの発生時におけるデータ転送に要す
る時間はそうでないときの2倍以上かかり、非常に長く
なる。このため、例えば曲の演奏途中に行った音色の切
り替え時にエラーが発生すると、発音させるべき楽音の
発音タイミングが遅れたり、或いは発音できないことが
あるという問題があった。However, in such a conventional transfer method of voice data, the time required for data transfer when an error occurs is more than twice as long as otherwise, and is extremely long. For this reason, for example, if an error occurs during the switching of the timbre performed during the performance of the music, there is a problem that the sounding timing of the musical sound to be produced may be delayed or may not be produced.
【0005】周知のように、人間は発音タイミングの僅
かなズレを認識することができる。発音タイミングの僅
かなズレによって、人が受ける音楽的な(聴感上の)印
象が大きく変わることも多い。これらのことからも明ら
かなように、発音タイミングのズレが音楽上で与える影
響は非常に大きい。このことから、たとえデータの転送
エラーの発生頻度が小さくとも、例えばエラー発生時の
データ転送にかかる時間を短縮するといったように、そ
のエラーの発生によって生じる影響を低減(或いは回
避)することが強く望まれていた。[0005] As is well known, a human can recognize a slight deviation in sounding timing. A slight shift in the sounding timing often greatly changes the musical (audible) impression received by a person. As is evident from these facts, the deviation of the sounding timing has a great influence on the music. For this reason, even if the frequency of occurrence of a data transfer error is low, it is strongly necessary to reduce (or avoid) the effect caused by the occurrence of the error, for example, to shorten the time required for data transfer when the error occurs. Was desired.
【0006】本発明の課題は、データ転送に発生したエ
ラーの影響を低減することにある。An object of the present invention is to reduce the influence of an error occurring in data transfer.
【0007】[0007]
【課題を解決するための手段】本発明のデータ転送方法
は、所定の通信手段を介して接続された第1の装置と第
2の装置の間で処理単位のデータを転送することを前提
とし、データを構成するワードデータを、処理内容に基
づいて複数のワードデータ群に分け、第1の装置は、第
2の装置にデータの転送を要求するとともに、第2の装
置から転送されたデータをワードデータ群単位で監視し
て、データのなかで正常に受信できなかったワードデー
タ群を検出した場合に、該ワードデータ群の再転送を第
2の装置に要求し、第2の装置は、第1の装置のデータ
の転送要求に従ってデータを転送するとともに、第1の
装置からの再転送要求に応じて、データ中から再転送要
求されたワードデータ群を抽出して再度転送する。A data transfer method according to the present invention is based on the premise that data of a processing unit is transferred between a first device and a second device connected via predetermined communication means. , The word data constituting the data is divided into a plurality of word data groups based on the processing content, and the first device requests the second device to transfer the data, and the data transferred from the second device. Is monitored in units of word data groups, and when a word data group that cannot be normally received is detected from the data, a request is made to the second device for retransfer of the word data group. In accordance with the data transfer request of the first device, the data is transferred, and in response to the retransfer request from the first device, a word data group requested to be retransmitted is extracted from the data and transferred again.
【0008】本発明の第1の態様によるデータ受信装置
は、所定の通信手段を介して接続された外部装置から転
送される処理単位のデータを受信することを前提とし、
外部装置に対し、データの転送を要求する要求手段と、
外部装置から転送されたデータを受信する受信手段と、
データを構成するワードデータを処理内容に基づいて複
数のワードデータ群に分類して、受信手段がデータを正
常に受信したか否かをワードデータ群単位で判定する判
定手段と、判定手段が正常でないと判定したワードデー
タ群の再転送を外部装置に要求する再転送要求手段と、
を具備する。[0008] The data receiving apparatus according to the first aspect of the present invention is premised on receiving data of a processing unit transferred from an external apparatus connected via predetermined communication means,
Request means for requesting data transfer to an external device;
Receiving means for receiving data transferred from the external device;
Word data constituting data is classified into a plurality of word data groups based on the processing content, and a judgment means for judging whether or not the reception means has normally received the data in word data group units, Retransfer request means for requesting the external device to retransmit the word data group determined not to be,
Is provided.
【0009】なお、上記の構成に加えて、判定手段が正
常でないと判定したワードデータ群の再転送を、外部装
置に要求するか否か決定する決定手段を更に具備し、再
転送要求手段は、決定手段の決定に従って、外部装置に
ワードデータ群の再転送を要求する、ことが望ましい。[0009] In addition to the above configuration, the apparatus further comprises determining means for determining whether or not to request the external device to retransmit the word data group determined to be abnormal by the determining means. It is desirable to request the external device to retransmit the word data group in accordance with the determination of the determination means.
【0010】本発明の第2の態様によるデータ受信装置
は、所定の通信手段を介して接続された外部装置から転
送される処理単位のデータを受信することを前提とし、
外部装置に対し、データの転送を要求する要求手段と、
外部装置から転送されたデータを受信する受信手段と、
データを構成するワードデータを処理内容に基づいて複
数のワードデータ群に分類して、受信手段がデータを正
常に受信したか否かをワードデータ群単位で判定する判
定手段と、判定手段が正常でないと判定したワードデー
タ群が存在していた場合に、受信手段の受信状態に応じ
て、該ワードデータ群、或いは他のワードデータ群を変
更する変更手段と、を具備する。[0010] The data receiving apparatus according to the second aspect of the present invention is premised on receiving processing unit data transferred from an external apparatus connected via a predetermined communication means,
Request means for requesting data transfer to an external device;
Receiving means for receiving data transferred from the external device;
Word data constituting data is classified into a plurality of word data groups based on the processing content, and a judgment means for judging whether or not the reception means has normally received the data in word data group units, And changing means for changing the word data group or another word data group in accordance with the reception state of the receiving means when there is a word data group determined not to be present.
【0011】なお、上記の構成に加えて、判定手段が正
常でないと判定したワードデータ群の再転送を要求する
か否か決定する決定手段と、ワードデータ群の再転送を
要求すると決定手段が決定した場合に、該ワードデータ
群の再転送を外部装置に要求する再転送要求手段と、を
更に具備し、変更手段は、ワードデータ群の再転送を要
求しないと決定手段が決定した場合に、該ワードデータ
群、或いは他のワードデータ群を変更する、ことが望ま
しい。In addition to the above configuration, the determining means determines whether or not to request retransfer of the word data group determined to be abnormal by the determining means, and the determining means to request retransfer of the word data group. Re-transfer request means for requesting the external device to re-transfer the word data group when the decision is made, further comprising: changing means when the decision means decides not to request re-transfer of the word data group. It is desirable to change the word data group or another word data group.
【0012】本発明のデータ送信装置は、上記データ受
信装置にデータを送信することを前提とし、データ受信
装置からのデータの転送要求、及びワードデータ群の再
転送要求を受信する受信手段と、受信手段が受信した要
求の内容に応じて、データ、或いはワードデータ群をデ
ータ受信装置に送信する送信手段と、を具備する。The data transmitting apparatus of the present invention is based on the premise that data is transmitted to the data receiving apparatus. The receiving means receives a data transfer request and a word data group re-transfer request from the data receiving apparatus. Transmitting means for transmitting data or a group of word data to the data receiving apparatus in accordance with the content of the request received by the receiving means.
【0013】本発明の第1の態様のデータ受信装置は、
処理単位でワードデータがまとめられて構成されている
データを、ワードデータに対する処理内容に基づいて複
数のワードデータ群に分割し、転送を要求することで送
信されてきたデータを、ワードデータ群単位でエラー発
生の有無を監視し、エラーが発生していた場合にワード
データ群単位で再転送を要求する。[0013] A data receiving apparatus according to a first aspect of the present invention comprises:
Data that is composed of word data grouped in processing units is divided into multiple word data groups based on the processing content of the word data, and data transmitted by requesting transfer is divided into word data group units. Monitor the occurrence of an error, and if an error has occurred, request retransfer in word data group units.
【0014】データをワードデータ群に分けてエラーの
検出、及び再転送を行うことにより、発生したエラーの
検出を迅速(より早い段階)に行えるようになるととも
に、そのエラーが発生した部分を小さな範囲内で特定す
ることが可能となり、更には、再転送を短時間に行える
ようになる。これらから、発生したエラーに短時間に対
応することが可能となり、エラーによる影響が低減され
る。また、処理内容に着目してデータを複数のワードデ
ータ群に分割することにより、ワードデータの重要度に
応じてエラーに対処することが可能となる。By dividing data into word data groups and detecting and retransmitting errors, it is possible to detect a generated error quickly (in an earlier stage), and to reduce the portion where the error has occurred in a small area. It becomes possible to specify within the range, and furthermore, retransmission can be performed in a short time. From these, it is possible to respond to the generated error in a short time, and the influence of the error is reduced. Further, by dividing the data into a plurality of word data groups by focusing on the processing content, it is possible to deal with errors according to the importance of the word data.
【0015】本発明の第2の態様のデータ受信装置は、
転送を要求することで送信されてきたデータを、ワード
データ群単位でエラー発生の有無を監視し、エラーが発
生していた場合に、その受信状態に応じて、例えばワー
ドデータ群間の整合性をとるようにワードデータ群を変
更する。これにより、エラーによって生じる不具合を低
減することが可能となる。A data receiving apparatus according to a second aspect of the present invention comprises:
The data transmitted by requesting the transfer is monitored for the occurrence of an error in word data group units, and if an error has occurred, for example, consistency between the word data groups is determined according to the reception state. The word data group is changed so that As a result, it is possible to reduce problems caused by errors.
【0016】本発明のデータ送信装置は、上記データ受
信装置からのデータの転送要求、或いは再転送要求に応
じて、データ全体、或いはワードデータ群の送信を行
う。これにより、上記データ受信装置は、必要なデー
タ、或いはワードデータ群だけを、必要に応じて得るこ
とが可能となる。The data transmitting apparatus of the present invention transmits the entire data or the word data group in response to a data transfer request or a retransfer request from the data receiving apparatus. Thus, the data receiving apparatus can obtain only necessary data or a word data group as needed.
【0017】[0017]
【発明の実施の形態】以下、図面を参照しながら、本発
明の実施の形態につき詳細に説明する。 <第1の実施の形態>図1は、第1の実施の形態が適用
されたシステムの概観図である。Embodiments of the present invention will be described below in detail with reference to the drawings. <First Embodiment> FIG. 1 is a schematic view of a system to which the first embodiment is applied.
【0018】図1に示すように、上記システムは、ユー
ザに演奏操作される鍵盤102を備えた電子楽器101
と、それにケーブル104によって接続されたパーソナ
ルコンピュータ(以降、パソコンと記す)103とから
構成されている。第1の実施の形態によるデータ受信装
置は電子楽器101に、第1の実施の形態によるデータ
送信装置はパソコン103に適用されている。As shown in FIG. 1, the system includes an electronic musical instrument 101 having a keyboard 102 operated by a user.
And a personal computer (hereinafter referred to as a personal computer) 103 connected thereto by a cable 104. The data receiving device according to the first embodiment is applied to an electronic musical instrument 101, and the data transmitting device according to the first embodiment is applied to a personal computer 103.
【0019】図2は、上記電子楽器101の全体回路図
である。次に、図2を参照して、その構成、及び動作に
ついて説明する。また、パソコン102の動作について
も合わせて説明する。FIG. 2 is an overall circuit diagram of the electronic musical instrument 101. Next, the configuration and operation will be described with reference to FIG. The operation of the personal computer 102 will also be described.
【0020】図2に示すように、電子楽器101は、楽
器全体の制御を実行するCPU201と、プログラムや
制御データ、自動演奏データ等を格納したROM202
と、CPU201がワーク用に使用するRAM203
と、不図示のコネクタを介してパソコン103を含む他
の装置とのデータの送受信を行うインターフェイス(I
/F)204と、鍵盤102のスキャンを行うキーマト
リクス回路205と、そのキーマトリクス回路205に
よってスキャンされるスイッチ群206と、CPU20
1の指示に従って楽音を発音するサウンドシステム20
7とを備えて構成されている。As shown in FIG. 2, an electronic musical instrument 101 includes a CPU 201 for controlling the entire musical instrument, and a ROM 202 for storing programs, control data, automatic performance data, and the like.
And a RAM 203 used by the CPU 201 for work.
And an interface (I / O) for transmitting / receiving data to / from another device including the personal computer 103 via a connector (not shown).
/ F) 204, a key matrix circuit 205 for scanning the keyboard 102, a switch group 206 scanned by the key matrix circuit 205, and the CPU 20
Sound system 20 for producing musical tones according to the instructions of 1.
7 are provided.
【0021】以上の構成において、その概略動作を説明
する。楽器101の電源がオンされると、CPU201
は、ROM202からプログラムを読み出してそれを実
行することにより、楽器101の制御を開始する。その
制御は、鍵盤102やスイッチ群206に対してユーザ
が行った操作、更にはインターフェイス204を介して
他の装置から送信されたデータに応じて行われる。な
お、他の装置については、混乱を避けるために、パソコ
ン103に特定して以降の説明を行うことにする。The schematic operation of the above configuration will be described. When the power of the musical instrument 101 is turned on, the CPU 201
Starts the control of the musical instrument 101 by reading the program from the ROM 202 and executing it. The control is performed in accordance with an operation performed by the user on the keyboard 102 and the switch group 206, and further on data transmitted from another device via the interface 204. Note that other devices will be described below with reference to the personal computer 103 in order to avoid confusion.
【0022】上記スイッチ群206は、自動演奏モード
の設定用の自動演奏モードスイッチ、自動演奏のスター
トやストップを指示するためのスタート/ストップスイ
ッチ、音色の変更を指示するためのトーンボタン、音色
や自動演奏させる曲などを番号で指定するための0〜9
ボタン等の各種スイッチをまとめて表したものである。
CPU201は、キーマトリクス回路205に鍵盤10
2やスイッチ群206のスキャンを行わせ、そのスキャ
ン後の信号を解析することにより、それらの操作状態
や、行われた操作を検出して、その検出結果に従って楽
器101全体の制御を実行する。The switch group 206 includes an automatic performance mode switch for setting an automatic performance mode, a start / stop switch for instructing start and stop of the automatic performance, a tone button for instructing a change in timbre, a timbre and the like. 0-9 to specify the song to be played automatically by number
It shows various switches such as buttons collectively.
The CPU 201 causes the key matrix circuit 205 to
2 and the switch group 206 are scanned, and the signals after the scanning are analyzed to detect the operation state and the performed operation, and control the entire musical instrument 101 according to the detection result.
【0023】ユーザが鍵盤102の操作を行った場合、
CPU201は、ユーザが操作した鍵、及びその操作内
容を特定し、それら特定した内容に応じて制御コマンド
を生成してサウンドシステム207に出力する。それに
より、サウンドシステム207は、ユーザが鍵盤102
に行った操作に応じて楽音の発音を開始したり、発音中
の楽音を消音させる。When the user operates the keyboard 102,
The CPU 201 specifies the key operated by the user and the contents of the operation, generates a control command according to the specified contents, and outputs the control command to the sound system 207. Accordingly, the sound system 207 allows the user to input the keyboard 102
In accordance with the operation performed in step (1), the tone generation is started or the tone being generated is muted.
【0024】上記サウンドシステム207は、例えば音
源LSI、D/Aコンバータ、アンプ、及びスピーカか
ら構成されている。音源LSIは、例えばPCM方式で
符号化された波形データを内部のメモリに格納し、その
波形データを読み出す速さを変えることにより、様々な
音高の波形データを生成し、必要に応じて、生成した波
形データに音響効果を付加する処理を施してD/Aコン
バータに出力する。D/Aコンバータは、波形データを
アナログのオーディオ信号に変換してアンプに出力し、
アンプはそれの増幅を行ってスピーカに出力する。アン
プからスピーカにオーディオ信号が出力されることによ
り、楽音が発音される。The sound system 207 includes, for example, a sound source LSI, a D / A converter, an amplifier, and a speaker. The sound source LSI stores waveform data encoded by, for example, the PCM method in an internal memory and generates waveform data of various pitches by changing the speed at which the waveform data is read out. The generated waveform data is subjected to a process of adding an acoustic effect, and output to a D / A converter. The D / A converter converts the waveform data into an analog audio signal and outputs the signal to an amplifier.
The amplifier amplifies it and outputs it to the speaker. When an audio signal is output from the amplifier to the speaker, a musical tone is generated.
【0025】上記音源LSI内のメモリに格納させる波
形データは、例えばROM202に、その構成を表す情
報と合わせてファイル形式で格納されている。CPU2
01は、ユーザがスイッチ群206を介して指定した音
色に応じて、ROM202から波形データを読み出して
音源LSIに送出することにより、音色の切り換えを行
う。なお、そのファイル形式で格納されたデータ一式に
ついては、波形データと区別するために、音声データと
呼ぶことにする。The waveform data to be stored in the memory of the sound source LSI is stored in, for example, the ROM 202 in a file format together with information indicating the configuration. CPU2
In step 01, the timbre is switched by reading the waveform data from the ROM 202 and sending it to the tone generator LSI in accordance with the timbre specified by the user via the switch group 206. The set of data stored in the file format is called audio data to distinguish it from waveform data.
【0026】ROM202に格納されていない音声デー
タは、音声データを供給するアプリケーションプログラ
ムをパソコン103上で起動させることで取得すること
ができる。このアプリケーションプログラムは、例えば
パソコン103のハードディスク上にインストールさせ
て使用するようにしたものであっても良いが、CD−R
OMといった記憶媒体に格納して配布し、その記憶媒体
から必要に応じて主記憶装置上にロードさせて(例えば
ドライブに装着時)使用するようにしたものであっても
良い。第1の実施の形態では、様々な音声データを用意
しなければならないことから後者を採用し、アプリケー
ションプログラムを音声データ等とともに記憶媒体に格
納させて配布している。The audio data not stored in the ROM 202 can be obtained by activating an application program for supplying the audio data on the personal computer 103. This application program may be installed on the hard disk of the personal computer 103 and used.
It may be stored and distributed in a storage medium such as an OM, and loaded from the storage medium to a main storage device as needed (for example, when mounted on a drive) for use. In the first embodiment, the latter is adopted because various audio data must be prepared, and the application program is stored in a storage medium together with the audio data and distributed.
【0027】ユーザがROM202に格納されていない
音声データの音色を選択した場合、CPU201は、パ
ソコン103に対し、インターフェイス204を介し
て、ユーザが選択した音色に対応する音声データの転送
を要求する音声データ転送要求コマンドを送る。他方の
パソコン103は、その要求コマンドを受け取ると、そ
の内容に従って記憶媒体(例えばCD−ROM)から該
当する音声データを含むファイルを検索し、電子楽器1
01に検索した音声データを転送する。When the user selects a timbre of audio data that is not stored in the ROM 202, the CPU 201 requests the personal computer 103 via the interface 204 to transfer audio data corresponding to the timbre selected by the user. Send a data transfer request command. Upon receiving the request command, the other personal computer 103 searches the storage medium (for example, a CD-ROM) for a file containing the corresponding audio data in accordance with the content of the request command.
The searched voice data is transferred to 01.
【0028】図3は、上記音声データの構成図である。
図3に示すように、音声データはヘッダ部とPCMデー
タ部とから構成され、そのPCMデータ部はストレート
部とループ部とから構成されている。FIG. 3 is a configuration diagram of the audio data.
As shown in FIG. 3, the audio data is composed of a header part and a PCM data part, and the PCM data part is composed of a straight part and a loop part.
【0029】上記ヘッダ部は、PCMデータ部を適切に
制御するために必要なワードデータ群であり、そのデー
タ転送や発音処理は、ヘッダ部に格納された情報に基づ
いて行われる。そのヘッダ部には、第1及び第2バイト
目にはストレート部のデータ数、第3バイト目にはその
ストレート部のチェックサム値、第4及び第5バイト目
にはループ部のデータ数、第6バイト目にはループ部の
チェックサム値が格納されている。The header section is a group of word data necessary for appropriately controlling the PCM data section, and the data transfer and sound generation processing are performed based on the information stored in the header section. In the header part, the number of data of the straight part is in the first and second bytes, the checksum value of the straight part is in the third byte, the number of data of the loop part is in the fourth and fifth bytes, The sixth byte stores the checksum value of the loop section.
【0030】PCMデータ部は、実際の音声のアナログ
信号をサンプリングしてデジタルデータに変換した1ワ
ードが8ビットのデータ群である。それを構成するスト
レート部には、楽音の発音において1回だけ処理される
データが格納され、ループ部には、ストレート部の処理
に引き続いて繰り返し処理されるデータが格納されてい
る。The PCM data section is a data group in which one word obtained by sampling an actual audio analog signal and converting it into digital data is 8 bits. The straight portion constituting the straight portion stores data to be processed only once in tone generation, and the loop portion stores data to be repeatedly processed following the straight portion processing.
【0031】なお、音声データが声のデータであった場
合には、上記ストレート部は発音の頭の子音部分に相当
するワードデータ群であり、他方のループ部は発音の後
ろのほうの母音部分に相当するワードデータ群である。When the voice data is voice data, the straight part is a word data group corresponding to a consonant part at the beginning of the pronunciation, and the other loop part is a vowel part at the end of the pronunciation. Is a word data group corresponding to.
【0032】図4は、上記音声データ要求コマンドの構
成図である。図4に示すように、3バイトのデータとし
て構成されている。第1バイト目に格納されるコマンド
IDは、パソコン103に要求する内容を表すコマンド
のコードである。第2バイト目の音声データ番号は、転
送を要求する音声データを指定するデータである。第3
バイト目のデータ転送形式は、音声データのなかで転送
を要求する部分を指定するコードである。FIG. 4 is a configuration diagram of the voice data request command. As shown in FIG. 4, it is configured as 3-byte data. The command ID stored in the first byte is a command code representing the content requested of the personal computer 103. The audio data number in the second byte is data for specifying audio data requested to be transferred. Third
The data transfer format of the byte is a code for designating a portion of the audio data that requires transfer.
【0033】第1の実施の形態では、データ転送形式と
して、3種類の値を用意、換言すれば音声データを転送
する形式を3種類に分けている。ここでは、上記3種類
の値を、DATA HEADER 、DATA STRAIGHT 、DATA LOOP と
する。DATA HEADER は、音声データの全ての転送を要求
していることを表し、DATA STRAIGHT はPCMデータ部
全ての転送を、DATA LOOP はPCMデータ部中のループ
部のみの転送を要求していることをそれぞれ表してい
る。In the first embodiment, three types of values are prepared as the data transfer format, in other words, the format for transferring audio data is divided into three types. Here, the above three values are DATA HEADER, DATA STRAIGHT, and DATA LOOP. DATA HEADER indicates that all transfer of audio data is requested, DATA STRAIGHT indicates transfer of all PCM data parts, and DATA LOOP indicates that only loop part of PCM data part is transferred. Each is represented.
【0034】電子楽器101側のCPU201は、ユー
ザが音色の指定を行うと、コマンドIDには音声データ
転送要求コマンドである旨を示すコードの値、音声デー
タ番号にはユーザが音色の指定に入力した番号、データ
転送形式にはDATA HEADER をそれぞれ格納したコマンド
を生成してインターフェイス204に出力し、インター
フェイス204を介してパソコン103にコマンドを送
る。When the user designates a tone color, the CPU 201 of the electronic musical instrument 101 inputs a code value indicating that the command is a voice data transfer request command into the command ID, and the user inputs a tone data number into the voice data number. A command storing DATA HEADER as the number and data transfer format is generated and output to the interface 204, and the command is sent to the personal computer 103 via the interface 204.
【0035】データ転送には、何らかの理由からエラー
が発生することがある。このため、CPU201は、上
記コマンドを送った後に開始されるパソコン103のデ
ータ転送が正常に行われているか否かの監視を、音声デ
ータの各部毎に行う。その監視を行った結果、正常に転
送されていない部分を検出すると、その部分のデータの
転送を要求する音声データ転送要求コマンドを生成して
それをパソコン103に送る。An error may occur in data transfer for some reason. For this reason, the CPU 201 monitors whether or not the data transfer of the personal computer 103, which is started after the transmission of the command, is performed normally, for each unit of the audio data. As a result of the monitoring, when a part that is not normally transferred is detected, an audio data transfer request command for requesting data transfer of the part is generated and sent to the personal computer 103.
【0036】他方のパソコン103は、電子楽器101
からコマンドを受け取ると、コマンドIDからそのコマ
ンドの種別を特定し、電子楽器101の要求に応じてデ
ータを転送するといった処理を行う。そのコマンドが音
声データ転送要求コマンドであった場合には、音声デー
タ番号で指定された音声データをCD−ROM等の記憶
媒体から取得し、その取得した音声データから、データ
転送形式で指定された部分を抽出して電子楽器101に
転送する。これにより、電子楽器101側の要求に応じ
て、音声データの全て、或いはその一部分がパソコン1
03から電子楽器101に転送される。The other personal computer 103 is an electronic musical instrument 101
When a command is received from the electronic musical instrument 101, the type of the command is specified from the command ID, and data is transferred according to a request from the electronic musical instrument 101. If the command is a voice data transfer request command, the voice data specified by the voice data number is obtained from a storage medium such as a CD-ROM, and the voice data specified by the data transfer format is obtained from the obtained voice data. The part is extracted and transferred to the electronic musical instrument 101. As a result, according to the request of the electronic musical instrument 101, all or a part of the audio data
03 to the electronic musical instrument 101.
【0037】電子楽器101のCPU201は、パソコ
ン103から転送されたデータを、インターフェイス2
04を介して受け取り、RAM203に格納する。その
データ転送が正常に完了すると、その音声データをサウ
ンドシステム207に送出する。それにより、パソコン
103から転送された音声データで楽音を発音させるこ
とができる。The CPU 201 of the electronic musical instrument 101 transmits the data transferred from the personal computer 103 to the interface 2.
04 and stored in the RAM 203. When the data transfer is completed normally, the audio data is sent to the sound system 207. As a result, a musical tone can be generated by the audio data transferred from the personal computer 103.
【0038】第1の実施の形態では、上述したように、
音声データを処理内容に基づいて複数の部分に分割し、
各部分毎に独立してデータ転送を行えるようにしてい
る。このため、エラーが発生しても、そのエラーが発生
した部分だけの再転送を行うだけで良く、転送が正常に
行われた部分の再転送を回避することができる。それに
より、エラー発生時でのデータ転送にかかる時間を短縮
することができ、発音タイミングの遅れ等を回避、或い
はその遅れ等を小さくすることができる。In the first embodiment, as described above,
Divide the audio data into multiple parts based on the processing content,
Data transfer can be performed independently for each part. For this reason, even if an error occurs, it is only necessary to re-transfer only the portion where the error has occurred, and it is possible to avoid re-transfer of the portion where the transfer was normally performed. As a result, the time required for data transfer when an error occurs can be shortened, and a delay in sounding timing can be avoided or the delay can be reduced.
【0039】以上が、電子楽器101、及びパソコン1
03の動作の概略である。次に、図5〜図7を参照して
電子楽器101の動作を、また、図8を参照してパソコ
ン103の動作を詳細に説明する。The above is the description of the electronic musical instrument 101 and the personal computer 1.
03 is an outline of the operation. Next, the operation of the electronic musical instrument 101 will be described in detail with reference to FIGS. 5 to 7, and the operation of the personal computer 103 will be described in detail with reference to FIG.
【0040】図5は、電子楽器101で実行される全体
処理の動作フローチャートである。始めに、図5を参照
して、全体処理について詳細に説明する。なお、全体処
理は、CPU201が、ROM202に格納されている
プログラムを読み出して実行することにより実現される
処理である。FIG. 5 is an operation flowchart of the overall processing executed by the electronic musical instrument 101. First, the overall processing will be described in detail with reference to FIG. Note that the entire process is a process realized by the CPU 201 reading and executing a program stored in the ROM 202.
【0041】楽器101の電源がオンされると、CPU
201は、ROM202からプログラムを読み出してそ
の制御を開始する。その制御の開始時には、ステップ5
01が実行される。When the power of the musical instrument 101 is turned on, the CPU
201 reads out a program from the ROM 202 and starts its control. At the start of the control, step 5
01 is executed.
【0042】そのステップ501では、楽器101を予
め定められた状態に初期設定するイニシャル処理を実行
する。このイニシャル処理を実行することにより、RA
M203、或いはCPU201内のレジスタに保持され
る各種制御用の変数には、それぞれ、予め定められた初
期値が代入される。例えば音声データの転送に関わる変
数byDataReceivingStatus 、wDataCounter、wLoopNum、
byCheckSumには、それぞれ、DATA HEADER 、0、6、0
が代入される。このようなイニシャル処理が終了した
後、ステップ502に移行する。In step 501, an initial process for initializing the musical instrument 101 to a predetermined state is executed. By performing this initial processing, RA
Predetermined initial values are assigned to M203 or various control variables held in registers in the CPU 201, respectively. For example, variables related to audio data transfer byDataReceivingStatus, wDataCounter, wLoopNum,
byCheckSum contains DATA HEADER, 0, 6, 0, respectively
Is substituted. After the completion of the initial processing, the process proceeds to step 502.
【0043】なお、上記変数byDataReceivingStatus
は、パソコン103が音声データのどの部分を転送して
いるかを管理するための変数である。他の変数について
は、変数wDataCounterは音声データの各部分で受信した
データ(ワード)数をカウントするための変数、変数wL
oopNumは各部分で受信すべきデータ(ワード)数が代入
される変数であり、ヘッダ部のデータ数は6であること
から、上記イニシャル処理では6が代入される。最後の
変数byCheckSumは、各部(ここでは、ストレート部とル
ープ部)でデータを正確に受信できたか否かを判定する
ために使用される。具体的には、各部においてそれまで
に受信したデータのチェックサムの計算結果(例えば排
他的論理和)が代入される。The above variable byDataReceivingStatus
Is a variable for managing which part of the audio data the personal computer 103 is transferring. As for other variables, a variable wDataCounter is a variable for counting the number of data (words) received in each part of the audio data, and a variable wL is used.
oopNum is a variable to which the number of data (words) to be received in each part is substituted. Since the number of data in the header part is 6, 6 is substituted in the initial processing. The last variable byCheckSum is used to determine whether or not each part (here, the straight part and the loop part) has correctly received data. Specifically, the calculation result (for example, exclusive OR) of the checksum of the data received so far is substituted in each unit.
【0044】ステップ502では、スイッチ群206の
操作状態、及び各種のスイッチに対して行われた操作を
検出し、その検出結果に基づいて各種の設定等を行うス
イッチ処理を実行する。このスイッチ処理の実行によ
り、ユーザはスイッチ群206に対する操作を介して各
種モードや音色、テンポ、自動演奏させる曲等を設定す
ることができる。In step 502, an operation state of the switch group 206 and operations performed on various switches are detected, and a switch process for performing various settings and the like is performed based on the detection results. By executing the switch processing, the user can set various modes, timbres, tempos, songs to be automatically played, and the like through operations on the switch group 206.
【0045】ステップ502に続くステップ503で
は、鍵盤102に対して行われた操作を検出し、その検
出結果に基づいて楽音を発音させる鍵盤処理503を実
行する。この鍵盤処理503の実行により、ユーザは鍵
盤102への操作を介して所望の楽音を随時発音させる
ことができる。In step 503 following step 502, an operation performed on the keyboard 102 is detected, and a keyboard process 503 for generating a musical tone is executed based on the detected result. By executing the keyboard processing 503, the user can generate a desired musical tone at any time through an operation on the keyboard 102.
【0046】鍵盤処理が終了すると、ステップ504に
移行する。そのステップ504では、自動演奏データに
従って曲を再生する曲再生処理を実行する。その曲再生
処理を終了した後、ステップ505に移行する。Upon completion of the keyboard processing, the flow shifts to step 504. In step 504, music reproduction processing for reproducing music according to the automatic performance data is executed. After the music reproduction processing is completed, the process proceeds to step 505.
【0047】なお、上記自動演奏データは、例えばスタ
ンダードMIDIファイル(SMF)の形式で用意され
たデータである。SMFは、MIDIのイベントデータ
に時間情報を付加して構成されたデータストリームであ
る。このため、自動演奏データに従った曲の再生は、そ
の時間情報に従って順次MIDIイベントを処理してい
くことで行われる。The automatic performance data is, for example, data prepared in a standard MIDI file (SMF) format. The SMF is a data stream configured by adding time information to MIDI event data. For this reason, the reproduction of music according to the automatic performance data is performed by sequentially processing MIDI events according to the time information.
【0048】ステップ505では、データ受信処理を実
行する。実際のデータの受信は、後述するインタラプト
処理で行っている。ここで行われるのは、その受信した
データに対する処理であり、受信した音声データのサウ
ンドシステムへの送出は、ここで行われる。At step 505, a data receiving process is executed. Actual data reception is performed by an interrupt process described later. What is performed here is processing for the received data, and the transmission of the received audio data to the sound system is performed here.
【0049】ステップ505に続くステップ506で
は、パソコン103に、音声データの転送を要求する音
声データ要求処理を実行する。ここで要求される音声デ
ータは、ステップ502のスイッチ処理、ステップ50
3の鍵盤処理、或いはステップ504の曲再生処理を実
行することで特定したものである。その音声データ要求
処理を終了すると、ステップ502に戻る。In a step 506 following the step 505, an audio data request process for requesting the personal computer 103 to transfer audio data is executed. The voice data requested here is determined by the switch processing in step 502 and step 50.
3 is specified by executing the keyboard processing of Step 3 or the music reproduction processing of Step 504. When the audio data request processing ends, the process returns to step 502.
【0050】このように、ステップ502〜506で形
成される処理ループが繰り返し実行される。これによ
り、ユーザが指定した曲の自動演奏や、所望する楽音が
所望の音色で発音されることになる。As described above, the processing loop formed in steps 502 to 506 is repeatedly executed. As a result, the automatic performance of the music specified by the user and the desired musical tone are produced in a desired tone.
【0051】図6は、上記全体処理内でステップ506
として実行される音声データ要求処理の動作フローチャ
ートである。次に、図6を参照して、そのサブルーチン
処理について詳細に説明する。FIG. 6 shows a step 506 in the whole processing.
9 is an operation flowchart of a voice data request process executed as (1). Next, the subroutine processing will be described in detail with reference to FIG.
【0052】なお、音声データの転送の要求は、ユーザ
がスイッチ群206を操作して指定した音色や、自動演
奏データ中のプログラムチェンジが指定する音色が電子
楽器101(ROM202)に用意されていないときに
生じる。また、設定方法等についての説明は省略する
が、鍵盤102の各鍵毎、或いは1つ以上の鍵で構成さ
せた各グループ毎に、異なる音色、或いは楽音を割り当
てた場合には、鍵盤102をユーザが操作する度に音色
データの転送を要求する必要が生じる。音色データ要求
処理では、これらのようなことから必要になった音声デ
ータの転送をパソコン103に要求することが行われ
る。It is to be noted that, in the request for the transfer of the audio data, the tone specified by the user by operating the switch group 206 and the tone specified by the program change in the automatic performance data are not prepared in the electronic musical instrument 101 (ROM 202). Occurs sometimes. Although description of the setting method and the like is omitted, if different tones or musical tones are assigned to each key of the keyboard 102 or to each group of one or more keys, the keyboard 102 is Each time the user operates, it is necessary to request the transfer of the timbre data. In the timbre data request processing, a request is made to the personal computer 103 for the transfer of voice data required for these reasons.
【0053】先ず、ステップ601では、ステップ50
2のステップ処理、ステップ503の鍵盤処理、或いは
ステップ504の曲再生処理を実行することによって必
要と認識した音声データの転送を要求する音声データ転
送要求コマンドを作成する。このとき、第3バイト目の
データ転送形式には、音声データの全てが必要であるこ
とから、DATA HEADER が格納される。First, in step 601, step 50 is executed.
A voice data transfer request command for requesting the transfer of voice data recognized as necessary by executing the step processing of step 2, the keyboard processing of step 503, or the music reproduction processing of step 504 is created. At this time, DATA HEADER is stored in the data transfer format of the third byte because all of the audio data is required.
【0054】ステップ601に続くステップ602で
は、上記作成した音声データ転送要求コマンドを送信デ
ータバッファに書き込む。その書き込みが終了した後、
一連の処理を終了する。In step 602 following step 601, the created voice data transfer request command is written in the transmission data buffer. After the writing is finished,
A series of processing ends.
【0055】上記送信データバッファは、インターフェ
イス204内のバッファに設けられた送信用の記憶領域
である。このため、ステップ602の処理は、CPU2
01が、インターフェイス204に作成した音声データ
転送要求コマンドを出力し、そのコマンドを、内部に備
えたバッファ内の送信データバッファ(記憶領域)に書
き込ませることで実現される。The transmission data buffer is a storage area for transmission provided in a buffer in the interface 204. Therefore, the process of step 602 is performed by the CPU 2
01 outputs the created voice data transfer request command to the interface 204 and writes the command to a transmission data buffer (storage area) in a buffer provided therein.
【0056】パソコン103は、ケーブル104を介し
て、インターフェイス204のバッファにアクセスす
る。このため、インターフェイス204内のバッファに
音声データ転送要求コマンドを書き込むことにより、そ
のコマンドがパソコン103に送られることになる。The personal computer 103 accesses the buffer of the interface 204 via the cable 104. Therefore, by writing an audio data transfer request command to the buffer in the interface 204, the command is sent to the personal computer 103.
【0057】なお、上述した音声データ要求処理の処理
動作は、パソコン103に音声データの転送を要求する
場合のものである。音声データの転送を要求する必要が
ない場合には、ステップ601及び602の処理を実行
せずに一連の処理が終了することになる。The processing operation of the audio data request processing described above is for the case of requesting the personal computer 103 to transfer audio data. If it is not necessary to request the transfer of the audio data, a series of processing ends without executing the processing of steps 601 and 602.
【0058】図7は、データ受信インタラプト処理の動
作フローチャートである。次に、図7を参照して、この
インタラプト処理について詳細に説明する。音声データ
転送要求コマンドを受け取ったパソコン103は、その
コマンドが指定する音声データを1バイト(ワード)ず
つ転送する。インターフェイス204は、パソコン10
3からデータを内部のバッファに格納するとともに、C
PU201に対して割り込みを発生させる。データ受信
インタラプト処理は、その割り込みの発生により実行さ
れる処理である。FIG. 7 is an operation flowchart of the data reception interrupt processing. Next, this interrupt processing will be described in detail with reference to FIG. Upon receiving the voice data transfer request command, the personal computer 103 transfers the voice data specified by the command one byte (word) at a time. The interface 204 is connected to the personal computer 10
3 and store the data in an internal buffer.
An interrupt is generated for the PU 201. The data reception interrupt process is a process executed when the interrupt occurs.
【0059】CPU201は、音声データの転送をパソ
コン103に要求した場合、音声データを格納する領域
を各部分毎にRAM203内に用意し、パソコン103
から転送される音声データをその領域に一旦格納する。
データ受信インタラプト処理では、インターフェイス2
04が受信したデータが音声データ中のどの部分のもの
であるか、また、各部分のデータが正常に転送されてい
るかを判定しながら、音声データをRAM203に格納
することが行われる。When the CPU 201 requests the personal computer 103 to transfer the audio data, the CPU 201 prepares an area for storing the audio data in the RAM 203 for each part.
Is temporarily stored in the area.
In data reception interrupt processing, interface 2
The audio data is stored in the RAM 203 while determining which part of the audio data the data received by the audio data 04 is and the data of each part is normally transferred.
【0060】先ず、ステップ701では、変数byDataRe
ceivingStatus に代入されている値を判定する。上記し
たように、変数byDataReceivingStatus は、現在受信中
のデータが音声データのどの部分かを把握するための変
数であり、DATA HEADER 、DATA STRAIGHT 、及びDATA L
OOP の3種類の値のうちの一つが代入される。DATA HEA
DER はヘッダ部のデータを受信中であることを表し、DA
TA STRAIGHT はストレート部、DATA LOOP はループ部の
データを受信中であることをそれぞれ表している。First, in step 701, the variable byDataRe
Determine the value assigned to ceivingStatus. As described above, the variable byDataReceivingStatus is a variable for ascertaining which part of the audio data the data currently being received is, and includes DATA HEADER, DATA STRAIGHT, and DATA L.
One of the three values of OOP is substituted. DATA HEA
DER indicates that the header data is being received.
TA STRAIGHT indicates that data in the straight section is being received, and DATA LOOP indicates that data in the loop section is being received.
【0061】変数byDataReceivingStatus にDATA HEADE
R が代入されていた場合、ステップ702に移行する。
そのステップ702では、受信データを、RAM203
内のヘッダ部用のデータ格納領域に格納する。その格納
が終了すると、ステップ707に移行する。DATA HEADE in the variable byDataReceivingStatus
If R has been substituted, the process proceeds to step 702.
In step 702, the received data is stored in the RAM 203
It is stored in the data storage area for the header part in. When the storage is completed, the process proceeds to step 707.
【0062】変数byDataReceivingStatus にDATA STRAI
GHT が代入されていた場合には、ステップ703に移行
する。そのステップ703では、受信データを、RAM
203内のPCMデータ部用のデータ格納領域に格納
し、続くステップ704では、チェックサム値の計算を
行い、その計算結果を変数byCheckSumに代入する。それ
が終了すると、ステップ707に移行する。[0062] DATA STRAI is set in the variable byDataReceivingStatus.
If GHT has been assigned, the process moves to step 703. In step 703, the received data is stored in RAM
The data is stored in the data storage area for the PCM data part in the storage unit 203, and in the subsequent step 704, the checksum value is calculated, and the calculation result is substituted for the variable byCheckSum. When this is completed, the process moves to step 707.
【0063】チェックサム値としては、図3に示すよう
に、PCMデータ部を構成するストレート部、ループ部
の2つの値をヘッダ部に格納させている。チェックサム
の計算はストレート部とループ部とで別々に行うように
している。これにより、受信を正常に行えたか否かを部
分毎に判定することができるようになっている。なお、
チェックサム値の計算は、例えば、それまでに受信した
データの排他的論理和を算出、即ち変数byCheckSumと受
信データの排他的論理和を算出することで行われる。As the checksum value, as shown in FIG. 3, two values of a straight portion and a loop portion constituting the PCM data portion are stored in the header portion. The checksum is calculated separately for the straight part and the loop part. As a result, it is possible to determine for each part whether or not the reception has been performed normally. In addition,
The calculation of the checksum value is performed, for example, by calculating the exclusive OR of the data received so far, that is, by calculating the exclusive OR of the variable byCheckSum and the received data.
【0064】変数byDataReceivingStatus にDATA STRAI
GHT が代入されていた場合には、ステップ705に移行
する。そのステップ705では、受信データを、RAM
203内のPCMデータ部用のデータ格納領域に格納
し、続くステップ706では、チェックサム値の計算を
行い、その計算結果を変数byCheckSumに代入する。それ
が終了すると、ステップ707に移行する。DATA STRAI in the variable byDataReceivingStatus
If GHT has been assigned, the process proceeds to step 705. In step 705, the received data is stored in RAM
The data is stored in the data storage area for the PCM data part in 203, and in the following step 706, the checksum value is calculated, and the calculation result is substituted for the variable byCheckSum. When this is completed, the process moves to step 707.
【0065】このように、ステップ701〜706で
は、受信データが音声データのどの部分に属しているか
に応じてRAM203に格納することが行われる。上記
ステップ707では、音声データとして1バイト(ワー
ドデータ)を受信したことから、変数wDataCounterの値
のインクリメントを行う。その後、ステップ708に移
行する。As described above, in steps 701 to 706, the received data is stored in the RAM 203 according to which part of the audio data belongs. In step 707, the value of the variable wDataCounter is incremented because one byte (word data) has been received as audio data. Thereafter, the process proceeds to step 708.
【0066】ステップ708では、変数wDataCounterの
値が変数wLoopNumの値と等しいか否か判定する。変数wL
oopNumは、ヘッダ部、ストレート部、或いはループ部の
各部分を構成しているデータ(ワード)の総数が代入さ
れる変数であり、ヘッダ部のデータを受信している場合
には6、ストレート部のデータを受信している場合には
ヘッダ部の第1及び第2バイト目のデータ、ループ部の
データを受信している場合にはヘッダ部の第4及び第5
バイト目のデータがそれぞれ代入される。このため、現
在受信中の部分のデータを全て受信した場合、その判定
はYESとなってステップ709に移行する。そうでな
い場合には、その判定はNOとなって一連の処理を終了
する。In step 708, it is determined whether the value of the variable wDataCounter is equal to the value of the variable wLoopNum. Variable wL
oopNum is a variable to which the total number of data (words) constituting each part of the header part, the straight part, or the loop part is substituted, and 6 when the data of the header part is received, When the data of the header portion is received, the data of the first and second bytes of the header portion is received, and when the data of the loop portion is received, the fourth and fifth bytes of the header portion are received.
The data of the byte is substituted. For this reason, when all data of the part currently being received has been received, the determination is YES and the process proceeds to step 709. Otherwise, the determination is NO and the series of processing ends.
【0067】ステップ709以降では、音声データを構
成する1部分のデータの受信が完了したと判断して、そ
れに伴う処理が行われる。その部分のデータの受信が正
常に行えたか否か判定、即ちエラーの発生の有無を判定
し、その判定結果に応じた処理はここで行われる。After step 709, it is determined that the reception of one part of the data constituting the audio data has been completed, and the accompanying processing is performed. It is determined whether or not the data of that part has been received normally, that is, whether or not an error has occurred, and processing according to the determination result is performed here.
【0068】先ず、ステップ709では、変数wDataCou
nterの値をクリア、即ちそれに0を代入する。続くステ
ップ710では、変数byDataReceivingStatus に代入さ
れている値を判定する。変数byDataReceivingStatus に
DATA HEADER が代入されていた場合、ステップ711に
移行して、変数byDataReceivingStatus とwLoopNumの更
新を行う。具体的には、ヘッダ部の受信が完了したこと
から、変数byDataReceivingStatus にDATA STRAIGHT を
代入し、他方の変数wLoopNumには、受信が完了したヘッ
ダ部の第1及び第2バイト目のデータで構成される16
ビットの値(第1バイト目が上位8ビット、第2バイト
目が下位8ビットである)を代入する。それが終了した
後に一連の処理を終了する。First, in step 709, the variable wDataCou
Clear the value of nter, that is, substitute 0 for it. In the following step 710, the value assigned to the variable byDataReceivingStatus is determined. In the variable byDataReceivingStatus
If DATA HEADER has been substituted, the process proceeds to step 711 to update the variables byDataReceivingStatus and wLoopNum. Specifically, since the reception of the header portion has been completed, DATA STRAIGHT is substituted for the variable byDataReceivingStatus, and the other variable wLoopNum is composed of the data of the first and second bytes of the header portion for which reception has been completed. 16
A bit value (the first byte is the upper 8 bits and the second byte is the lower 8 bits) is substituted. After that, a series of processing ends.
【0069】変数byDataReceivingStatus にDATA STRAI
GHT が代入されていた場合には、ステップ712に移行
する。そのステップ712では、変数byCheckSumに代入
されているチェックサム値が、受信したヘッダ部の第3
バイト目のチェックサム値と一致するか否か判定する。
ストレート部の受信が正常に行われた場合、それらチェ
ックサム値は一致することから判定はYESとなり、ス
テップ713に移行する。そうでない場合には、即ちエ
ラーが発生している場合には、その判定はNOとなって
ステップ714に移行する。DATA STRAI in the variable byDataReceivingStatus
If GHT has been substituted, the process moves to step 712. In step 712, the checksum value assigned to the variable byCheckSum is set to the third value of the received header.
It is determined whether or not the value matches the checksum value of the byte.
If the reception of the straight portion is normally performed, the checksum values match, so that the determination is YES, and the flow shifts to step 713. If not, that is, if an error has occurred, the determination is no and the process moves to step 714.
【0070】ステップ713では、変数byDataReceivin
gStatus 、wLoopNum、及びbyCheckSumの更新を行う。具
体的には、ストレート部の受信を正常に完了したことか
ら、変数byDataReceivingStatus にDATA LOOP を代入
し、変数wLoopNumには、受信が完了したヘッダ部の第4
及び第5バイト目のデータで構成される16ビットの値
(第4バイト目が上位8ビット、第5バイト目が下位8
ビットである)を代入し、変数byCheckSumには0を代入
する。それが終了した後に一連の処理を終了する。In step 713, the variable byDataReceivin
Updates gStatus, wLoopNum, and byCheckSum. Specifically, since the reception of the straight portion has been completed normally, DATA LOOP is substituted for the variable byDataReceivingStatus, and the variable wLoopNum is the fourth of the header portion for which reception has been completed.
And a 16-bit value composed of the data of the fifth byte (the fourth byte is the upper 8 bits and the fifth byte is the lower 8 bits).
Bit) and 0 to the variable byCheckSum. After that, a series of processing ends.
【0071】他方のステップ714では、ストレート部
の受信にエラーが発生したことから、このストレート部
の転送を要求する音声データ転送要求コマンド(第3バ
イト目のデータ転送形式をDATA STRAIGHT としたコマン
ドである)を生成し、続くステップ715でそのコマン
ドをインターフェイス204の送信データバッファに書
き込む。その後、一連の処理を終了する。In step 714, since an error has occurred in the reception of the straight part, an audio data transfer request command (a command in which the data transfer format of the third byte is DATA STRAIGHT) requesting the transfer of the straight part is made. ), And in a subsequent step 715, the command is written to the transmission data buffer of the interface 204. Thereafter, a series of processing ends.
【0072】上記再作成した音声データ転送要求コマン
ドを送信データバッファに書き込むことにより、パソコ
ン103からストレート部のデータが再転送される。エ
ラーが発生した場合、変数byDataReceivingStatus の更
新を行っていないので、上記コマンドを送出後にパソコ
ン103から転送されるデータはストレート部のデータ
として受信される。By writing the re-created voice data transfer request command into the transmission data buffer, the data in the straight section is transferred again from the personal computer 103. When an error occurs, the variable byDataReceivingStatus is not updated, so that the data transferred from the personal computer 103 after sending the above command is received as straight section data.
【0073】一方、変数byDataReceivingStatus にDATA
STRAIGHT が代入されていた場合には、ステップ710
からステップ716に移行する。そのステップ716で
は、変数byCheckSumに代入されているチェックサム値
が、受信したヘッダ部の第6バイト目のチェックサム値
と一致するか否か判定する。ループ部の受信が正常に行
われた場合、それらチェックサム値は一致することから
判定はYESとなり、ステップ717に移行する。そう
でない場合には、即ちエラーが発生している場合には、
その判定はNOとなってステップ718に移行する。On the other hand, the variable byDataReceivingStatus contains DATA
If STRAIGHT has been assigned, step 710
Then, control goes to step 716. In step 716, it is determined whether the checksum value assigned to the variable byCheckSum matches the checksum value of the sixth byte of the received header. If the reception of the loop portion is normally performed, the checksum values match, so the determination is YES, and the flow shifts to step 717. Otherwise, that is, if an error has occurred,
The determination is no and the process moves to step 718.
【0074】ステップ717では、変数byDataReceivin
gStatus 、wLoopNum、及びbyCheckSumの更新を行う。
具体的には、ループ部の受信を正常に完了、即ち音声デ
ータの受信を全て正常に完了したことから、変数byData
ReceivingStatus にDATA HEADER を代入し、変数wLoopN
umにはヘッダ部の全データ(ワード)数である6を代入
し、変数byCheckSumには0を代入する。それが終了した
後に一連の処理を終了する。At step 717, the variable byDataReceivin
Update gStatus, wLoopNum, and byCheckSum.
Specifically, since the reception of the loop portion has been completed normally, that is, the reception of all audio data has been completed normally, the variable byData
Assign DATA HEADER to ReceivingStatus and set the variable wLoopN
Substitute 6 which is the total number of data (words) in the header part into um, and substitute 0 into the variable byCheckSum. After that, a series of processing ends.
【0075】他方のステップ718では、ループ部の受
信にエラーが発生したことから、このループ部の転送を
要求する音声データ転送要求コマンド(第3バイト目の
データ転送形式をDATA LOOP としたコマンドである)を
生成し、続くステップ719でそのコマンドをインター
フェイス204の送信データバッファに書き込む。その
後、一連の処理を終了する。In step 718, since an error has occurred in the reception of the loop part, an audio data transfer request command requesting the transfer of the loop part (a command in which the data transfer format of the third byte is DATA LOOP) ), And in a subsequent step 719, the command is written to the transmission data buffer of the interface 204. Thereafter, a series of processing ends.
【0076】このように、第1の実施の形態では、ヘッ
ダ部を除く各部分毎にデータ転送にエラーが発生したか
否か判定し、エラーが発生していると判定すれば、そこ
でデータ転送を中断させて、エラーが発生した部分から
データ転送を再開するようにしている。As described above, in the first embodiment, it is determined whether or not an error has occurred in the data transfer for each part except the header part, and if it is determined that the error has occurred, the data transfer is performed there. Is interrupted, and data transfer is resumed from the part where the error occurred.
【0077】各部分毎に独立にエラーを検出するように
したことで、音声データ全体の転送が終了する前の段階
で、即ち発生したエラーを迅速に検出することができ
る。エラーが発生した部分に限定してデータの再転送を
行えるようにしたことで、実際に必要としているデータ
の転送にかかる時間を短縮することができる。エラーが
発生した部分でデータの転送を中断させることにより、
エラーの発生によって廃棄されるデータの転送にかかる
時間を短縮することができる。これらにより、エラー発
生時におけるデータ転送をより短時間で行うことがで
き、エラー発生時の影響を低減することができる。By detecting an error independently for each part, it is possible to detect the error immediately before the transfer of the entire audio data is completed, that is, the error that has occurred. Since the data can be re-transferred only to the part where the error has occurred, the time required to actually transfer the required data can be reduced. By interrupting the data transfer at the point where the error occurred,
The time required to transfer data discarded due to the occurrence of an error can be reduced. As a result, data transfer at the time of error occurrence can be performed in a shorter time, and the influence at the time of error occurrence can be reduced.
【0078】以上が電子楽器101側が実行する主要な
処理である。次に、図8を参照して、パソコン103側
が実行する動作について詳細に説明する。図8は、パソ
コン103が実行する全体処理の動作フローチャートで
ある。The main processing executed by the electronic musical instrument 101 has been described above. Next, an operation performed by the personal computer 103 will be described in detail with reference to FIG. FIG. 8 is an operation flowchart of the entire process executed by the personal computer 103.
【0079】なお、第1の実施の形態では、パソコン1
03から音声データを供給するアプリケーションプログ
ラムをその音声データ等とともにCD−ROMで配布し
ている。このことから、図8に示す全体処理は、そのC
D−ROMに格納されているアプリケーションプログラ
ムを起動、即ちそのアプリケーションプログラムを主記
憶装置上にロードし、それにパソコン103のCPUの
制御を割り当てることで実現される。In the first embodiment, the personal computer 1
An application program for supplying audio data from 03 is distributed on a CD-ROM together with the audio data. From this, the overall processing shown in FIG.
This is realized by activating the application program stored in the D-ROM, that is, loading the application program onto the main storage device and assigning control of the CPU of the personal computer 103 to the application program.
【0080】また、図8に示す動作フローチャートは、
上記アプリケーションプログラムをパソコン103のC
PU103が実行した際の処理動作のなかから、本発明
に特に関わる部分を抜粋して示したものである。The operation flowchart shown in FIG.
Copy the above application program to C
The figure particularly shows a portion related to the present invention from the processing operations executed by the PU 103.
【0081】先ず、ステップ801では、コマンドを受
信したか否か判定する。上記したように、パソコン10
3は、電子楽器101のインターフェイス204内のバ
ッファにアクセスする。より具体的には、パソコン10
3のCPUは、パソコン103側のインターフェイス、
ケーブル104を介して電子楽器101のインターフェ
イス204内のバッファにアクセスする。例えば上記イ
ンターフェイスは、インターフェイス204内に割り当
てられた送信データバッファに何らかのコマンドが書き
込まれていた場合に割り込み信号を出力し、その旨をC
PUに通知するようになっている。このため、その送信
データバッファ内に何らかのコマンドが書き込まれてい
た場合、その判定はYESとなってステップ802に移
行する。そうでない場合には、その判定はNOとなって
一連の処理を終了する。First, in step 801, it is determined whether a command has been received. As described above, the personal computer 10
3 accesses a buffer in the interface 204 of the electronic musical instrument 101. More specifically, the personal computer 10
3 is an interface on the personal computer 103 side,
The buffer in the interface 204 of the electronic musical instrument 101 is accessed via the cable 104. For example, the interface outputs an interrupt signal when any command has been written to the transmission data buffer allocated in the interface 204, and indicates that the command is
The PU is notified. Therefore, if any command has been written in the transmission data buffer, the determination is YES and the process moves to step 802. Otherwise, the determination is NO and the series of processing ends.
【0082】ステップ802では、上記送信データバッ
ファに書き込まれていたコマンドを読み出して(受信し
て)解析を行う。それに続くステップ803では、コマ
ンドを解析した結果、そのコマンドが音声データ転送要
求コマンドか否か判定する。電子楽器101のインター
フェイス204の転送データバッファ内に音量データ転
送要求コマンドが書き込まれていた場合、その判定はY
ESとなってステップ805に移行する。そうでない場
合には、その判定はNOとなってステップ804に移行
する。At step 802, the command written in the transmission data buffer is read (received) and analyzed. In the subsequent step 803, as a result of analyzing the command, it is determined whether or not the command is a voice data transfer request command. If a volume data transfer request command has been written in the transfer data buffer of the interface 204 of the electronic musical instrument 101, the determination is Y.
It becomes ES and moves to step 805. Otherwise, the determination is no and the process moves to step 804.
【0083】ステップ804では、音量データ転送要求
コマンド以外のコマンドに応じた処理を実行する。この
コマンドに応じた処理では、一例を挙げればCDーRO
Mに格納されている自動演奏データを電子楽器101に
転送するといったことが行われる。それが終了した後、
ステップ801に戻る。At step 804, processing corresponding to a command other than the volume data transfer request command is executed. In the processing corresponding to this command, for example, CD-RO
The automatic performance data stored in M is transferred to the electronic musical instrument 101. After that is finished
Return to step 801.
【0084】他方のステップ805では、音声データ転
送要求コマンドの第2バイト目に格納されている音楽デ
ータ番号に該当するファイルをCD−ROMから検索す
る。その検索が終了した後、ステップ806に移行し、
検索したファイルから、上記コマンドの第3バイト目で
あるデータ転送形式で要求された部分のデータを抽出し
てその送信を行う。それが終了した後、ステップ801
に戻る。In step 805, a file corresponding to the music data number stored in the second byte of the audio data transfer request command is searched from the CD-ROM. After the search is completed, the process proceeds to step 806,
From the retrieved file, the data of the requested portion in the data transfer format, which is the third byte of the command, is extracted and transmitted. After that, step 801
Return to
【0085】上記したように、音声データは、8ビット
(1ワード)毎に、電子楽器101側の受信に合わせて
順次転送するようにしている。このため、実際のデータ
転送は、インタラプト処理で行っている。As described above, the audio data is sequentially transferred every 8 bits (1 word) in accordance with the reception on the electronic musical instrument 101 side. Therefore, the actual data transfer is performed by an interrupt process.
【0086】そのインタラプト処理は、例えばパソコン
103が備えたケーブル104に接続されているインタ
ーフェース(図示せず)が出力した割り込み信号(入出
力割り込み)によって実行される処理である。それを実
行することにより、1バイトのデータを電子楽器101
側の動作に合わせて出力する。このようなことから、ス
テップ806でのデータの送信は、例えばその送信を開
始することを電子楽器101に通知するといったことだ
けが行われる。The interrupt process is a process executed by an interrupt signal (input / output interrupt) output from an interface (not shown) connected to the cable 104 provided in the personal computer 103, for example. By executing this, 1-byte data is stored in the electronic musical instrument 101.
Output according to the operation of the side. For this reason, the transmission of the data in step 806 is performed only by, for example, notifying the electronic musical instrument 101 of the start of the transmission.
【0087】なお、音声データを構成する各部分は、電
子楽器101側に合わせて、ヘッダ部、ストレート部、
ループ部の順序で転送される。また、音声データ転送要
求コマンドのデータ転送形式の内容に応じて転送する部
分についても、電子楽器101側の動作に合わせて設定
される。即ち例えばデータ転送形式がDATA STRAIGHTで
あった場合には、PCMデータ部を構成するストレート
部とループ部が共に転送される。Each part of the audio data is composed of a header section, a straight section,
The data is transferred in the order of the loop part. Also, the part to be transferred according to the content of the data transfer format of the voice data transfer request command is set in accordance with the operation of the electronic musical instrument 101. That is, for example, when the data transfer format is DATA STRAIGHT, both the straight part and the loop part constituting the PCM data part are transferred.
【0088】上記のような処理動作が、上記アプリケー
ションプログラムの実行時にパソコン103上で行われ
る。これにより、電子楽器101からのデータ転送の要
求、即ち音声データ転送要求コマンドに応じて、パソコ
ン103から電子楽器101に音声データが1バイトず
つ転送される。The above-described processing operation is performed on the personal computer 103 when the application program is executed. As a result, the sound data is transferred from the personal computer 103 to the electronic musical instrument 101 one byte at a time in response to a data transfer request from the electronic musical instrument 101, that is, a sound data transfer request command.
【0089】なお、第1の実施の形態では、音声データ
をヘッダ部、ストレート部、及びループ部の3つの部分
に分割してデータ転送を行っているが、例えば各部のデ
ータ量に応じてより細かく分割するようにしても良い。
具体的には、例えばストレート部のデータ量が他の部分
と比較して大きいような場合、そのストレート部を複数
の部分に更に分割するようにしても良い。 <第2の実施の形態>上記第1の実施の形態では、音声
データをヘッダ部、ストレート部、及びループ部に分割
して、それら各部のデータが正常に転送されたか否かを
チェックし、エラーの発生を検出した時点でそのエラー
が発生した部分のデータを無条件で再送するようにして
いる。これに対し、第2の実施の形態は、エラーの発生
を検出したときのデータの再送を行うか否か選択できる
ようにしたものである。In the first embodiment, audio data is divided into three parts, a header part, a straight part, and a loop part, and data transfer is performed. For example, the audio data is divided according to the data amount of each part. It may be finely divided.
Specifically, for example, when the data amount of the straight portion is larger than other portions, the straight portion may be further divided into a plurality of portions. <Second Embodiment> In the first embodiment, audio data is divided into a header section, a straight section, and a loop section, and it is checked whether or not the data of each section has been normally transferred. When the occurrence of an error is detected, the data of the part where the error has occurred is unconditionally retransmitted. On the other hand, in the second embodiment, it is possible to select whether to retransmit data when an error is detected.
【0090】データの転送にエラーが発生した場合、転
送されたデータで楽音を発音させると、エラーの内容に
よって程度は異なるが、聴感上、何らかの不具合を人に
与える。しかし、例えば自動演奏中におけるプログラム
チェンジ(音色変更)のように(このときには、ユーザ
の鍵盤102に対する押鍵に応じて楽音を発音させる必
要もある)、迅速な発音のための処理を行わなければな
らない状況では、データの再送によって発音タイミング
の遅れが発生することもありえるため、エラーの発生時
にデータの再送を行うことは必ずしも得策とは限らな
い。このようなことから、第2の実施の形態は、データ
の再送を行うか否かを選択することで、ユーザがより快
適な状態で楽音を発音させられることを実現できるよう
にさせたものである。When an error occurs in the data transfer, if a tone is generated by the transferred data, a certain problem is caused to a person in terms of hearing, though the degree depends on the content of the error. However, for example, like a program change (tone change) during an automatic performance (in this case, it is necessary to generate a musical tone in response to a key depression of the user's keyboard 102), a process for rapid sound generation must be performed. In such a situation, retransmission of data may cause a delay in sounding timing, so that retransmission of data when an error occurs is not always a good idea. For this reason, in the second embodiment, it is possible to realize that the user can generate a musical tone in a more comfortable state by selecting whether or not to retransmit data. is there.
【0091】第2の実施の形態による電子楽器は、第1
の実施の形態によるそれと構成は基本的に同じであり、
また、処理動作も基本的に同じである。パソコンについ
ては、第1の実施の形態から構成、及び処理動作が変わ
っていない。このため、第1の実施の形態で使用した符
号をそのまま使用して、第2の実施の形態による電子楽
器101が第1の実施の形態によるそれから異なってい
る部分のみ説明することにする。The electronic musical instrument according to the second embodiment has the first
The configuration according to the embodiment of the present invention is basically the same,
The processing operation is basically the same. The configuration and processing operation of the personal computer are not different from those of the first embodiment. Therefore, only the parts of the electronic musical instrument 101 according to the second embodiment that differ from those according to the first embodiment will be described using the reference numerals used in the first embodiment as they are.
【0092】第2の実施の形態では、エラー発生時にデ
ータの再送を行うか否かを、ユーザが選択できるように
している。その選択用として、図1に示すように、スイ
ッチ群206を構成するスイッチの一つとして再送スイ
ッチ206aを備えている。データの再送を行うか否か
を示す変数(フラグ)として、bReTransferFlag を用意
している。CPU201は、ユーザが上記再送スイッチ
206aを操作する毎に、その変数bReTransferFlag に
代入する値の変更を行う。In the second embodiment, the user can select whether or not to retransmit data when an error occurs. For the selection, as shown in FIG. 1, a retransmission switch 206a is provided as one of the switches constituting the switch group 206. BReTransferFlag is prepared as a variable (flag) indicating whether to retransmit data. Each time the user operates the retransmission switch 206a, the CPU 201 changes the value assigned to the variable bReTransferFlag.
【0093】なお、変数bReTransferFlag に代入される
値は、データを再送するか否かの2種類であるが、それ
に代入されている値の意味を明確にするために、データ
を再送する場合(再送モード時)の値をTRUEと記載
することにする。CPU201は、変数bReTransferFla
g にTRUEを代入した場合には、例えば不図示のLE
Dを点灯させてその旨をユーザに通知することを合わせ
て行う。There are two types of values to be assigned to the variable bReTransferFlag, ie, whether to resend data. In order to clarify the meaning of the value assigned to the value, the data is resent (retransmission). Mode) is described as TRUE. The CPU 201 sets the variable bReTransferFla
When TRUE is substituted for g, for example, LE (not shown)
D is turned on to notify the user of this.
【0094】また、第2の実施の形態では、データ転送
中に発生するデータの欠落を検出するために、それ用の
1ワードのデータをPCMデータ部に挿入させている。
図9は、第2の実施の形態で用いられる音声データの構
成図である。ループ部の先頭には、図9に示すように、
1バイトの標識データを追加している。その標識データ
は、最上位ビットの値は1とし、PCMデータ部の他の
データは7ビットのデータ(最上位ビット(MSB)の
値は0)としている。これにより、標識データを他のデ
ータと区別することができるようにしている。In the second embodiment, one word of data is inserted into the PCM data section in order to detect data loss occurring during data transfer.
FIG. 9 is a configuration diagram of audio data used in the second embodiment. At the beginning of the loop, as shown in FIG.
One byte of indicator data is added. In the indicator data, the value of the most significant bit is 1, and the other data of the PCM data portion is 7-bit data (the value of the most significant bit (MSB) is 0). As a result, the marker data can be distinguished from other data.
【0095】図9に示すような音声データを転送した場
合、上記標識データを受信したタイミングにより、デー
タの欠落が発生したか否かを判定することができる。例
えばヘッダ部の第1及び第2バイト目に格納されている
データ数だけデータを受信する前に標識データを受信し
た場合には、ヘッダ部、或いはストレート部でデータの
欠落が発生したことになる。When voice data as shown in FIG. 9 is transferred, it is possible to determine whether or not data loss has occurred based on the timing at which the above-mentioned marker data is received. For example, when the indicator data is received before the data is received by the number of data stored in the first and second bytes of the header portion, data loss has occurred in the header portion or the straight portion. .
【0096】データの欠落は、データ全体の用法に影響
することが多く、データを正確に受信できなかったとき
よりも聴感上の不具合が大きくなるのが普通である。第
2の実施の形態では、エラーの内容によって影響の大き
さが異なることから、影響の大きさを基にエラーを2種
類に分類し、不具合が比較的に大きいエラーの発生時に
はデータの再送を無条件で行い、それが比較的に小さい
ときにはユーザの指定(再送モードが設定されているか
否か)に応じてデータの再送を行っている。Missing data often affects the usage of the entire data, and usually causes a greater audibility problem than when data could not be received correctly. In the second embodiment, since the magnitude of the influence differs depending on the content of the error, the error is classified into two types based on the magnitude of the influence, and when an error with a relatively large defect occurs, data retransmission is performed. It is performed unconditionally, and when it is relatively small, data is retransmitted according to the user's specification (whether or not the retransmission mode is set).
【0097】以上が、第2の実施の形態の概要である。
次に、上記エラー発生時におけるデータの再送を実現す
るための第2の実施の形態におけるCPU201の動作
について詳細に説明する。The above is the outline of the second embodiment.
Next, the operation of the CPU 201 in the second embodiment for realizing data retransmission at the time of occurrence of the error will be described in detail.
【0098】第2の実施の形態における処理動作の流れ
は、第1の実施の形態のそれと同じである。その処理内
容としては、データ受信インタラプト処理が第1の実施
の形態から最も異なっている。他の処理においては、相
違点が無いか、相違点が有ったとしても僅かである。こ
のため、図10に示すその動作フローチャートを参照し
て、データ受信インタラプト処理のみ説明する。The flow of the processing operation in the second embodiment is the same as that in the first embodiment. As the processing contents, the data reception interrupt processing is the most different from the first embodiment. In other processes, there is no difference, or there is little difference, if any. Therefore, only the data reception interrupt processing will be described with reference to the operation flowchart shown in FIG.
【0099】先ず、ステップ1001では、変数byData
ReceivingStatus に代入されている値を判定する。上記
したように、変数byDataReceivingStatus は、現在受信
中のデータが音声データのどの部分かを把握するための
変数であり、DATA HEADER 、DATA STRAIGHT 、及びDATA
LOOP の3種類の値のうちの一つが代入される。First, in step 1001, the variable byData
Determine the value assigned to ReceivingStatus. As described above, the variable byDataReceivingStatus is a variable for grasping which part of the audio data the data currently being received is, and includes DATA HEADER, DATA STRAIGHT, and DATA
One of the three values of LOOP is substituted.
【0100】変数byDataReceivingStatus にDATA HEADE
R が代入されていた場合、ステップ1002に移行す
る。そのステップ1002では、受信データを、RAM
203内のヘッダ部用のデータ格納領域に格納する。そ
の格納が終了すると、ステップ1012に移行する。[0100] DATA HEADE is set in the variable byDataReceivingStatus.
If R has been substituted, the process proceeds to step 1002. In step 1002, the received data is stored in RAM
The data is stored in the data storage area for the header part in the data 203. When the storage is completed, the process proceeds to step 1012.
【0101】変数byDataReceivingStatus にDATA STRAI
GHT が代入されていた場合には、ステップ1003に移
行する。そのステップ1003では、受信データが標識
データか否か判定する。その受信データの最上位ビット
の値が1であった場合、標識データを受信したとして判
定はYESとなり、ステップ1006に移行する。そう
でない場合には、その判定はNOとなってステップ10
04に移行する。DATA STRAI in the variable byDataReceivingStatus
If GHT has been assigned, the process moves to step 1003. In step 1003, it is determined whether or not the received data is the tag data. When the value of the most significant bit of the received data is 1, it is determined that the indicator data has been received, the determination is YES, and the process proceeds to step 1006. Otherwise, the determination is no and step 10
Move to 04.
【0102】ステップ1004では、受信データを、R
AM203内のPCMデータ部用のデータ格納領域に格
納し、続くステップ1005では、チェックサム値の計
算を行い、その計算結果を変数byCheckSumに代入する。
それが終了すると、ステップ1012に移行する。At step 1004, the received data is
The data is stored in the data storage area for the PCM data part in the AM 203, and in the following step 1005, the checksum value is calculated, and the calculation result is substituted for the variable byCheckSum.
Upon completion, the process moves to step 1012.
【0103】ステップ1006に移行時には、ヘッダ部
の第1及び第2バイト目に格納されているデータ数のデ
ータの受信を行う前にストレート部の転送が終了したこ
とになる。即ちデータの欠落が発生したことになる。こ
のため、ステップ1006〜1008では、それに応じ
た処理を行う。具体的には、ステップ1006では、変
数byDataReceivingStatus にDATA HEADER を、変数wLoo
pNumには6を、変数wDataCounterには0をそれぞれ代入
し、ステップ1007ではデータ転送形式にDATA HEADE
R を格納した音声データ転送要求コマンドを再作成し、
ステップ1008では、その再作成したコマンドをイン
ターフェイス204の送信データバッファに格納する。
それらが終了した後、上記ステップ1012に移行す
る。When the process proceeds to step 1006, the transfer in the straight section is completed before the data of the number of data stored in the first and second bytes of the header section is received. That is, data loss has occurred. Therefore, in steps 1006 to 1008, processing corresponding to the processing is performed. Specifically, in step 1006, the variable byDataReceivingStatus is set to DATA HEADER, and the variable wLoo
Substitute 6 for pNum and 0 for the variable wDataCounter. In step 1007, set the data transfer format to DATA HEADE
Re-create the voice data transfer request command storing R,
In step 1008, the recreated command is stored in the transmission data buffer of the interface 204.
After the processing is completed, the process proceeds to step 1012.
【0104】変数byDataReceivingStatus にDATA LOOP
が代入されていた場合には、ステップ1001からステ
ップ1009に移行する。そのステップ1009では、
受信データが標識データか否か判定する。その受信デー
タの最上位ビットの値が1であった場合、それは標識デ
ータであることから、その判定はYESとなって一連の
処理を終了する。そうでない場合には、その判定はNO
となってステップ1010に移行する。[0104] DATA LOOP is set in the variable byDataReceivingStatus.
Has been substituted, the process moves from step 1001 to step 1009. In that step 1009,
It is determined whether the received data is sign data. If the value of the most significant bit of the received data is 1, it is the tag data, so the determination is YES and the series of processing ends. Otherwise, the determination is no
And the process moves to step 1010.
【0105】上記したように、ループ部の転送が開始す
る前にデータの欠落が発生すると、音声データ全体の再
送を行っている。このため、ループ部の受信の開始時に
は、その先頭に追加した標識データを受信することにな
る。その標識データは楽音の再生には使用しないデータ
である。このため、電子楽器101側ではそれを廃棄し
ている。As described above, if data loss occurs before the transfer of the loop section starts, the entire voice data is retransmitted. For this reason, at the start of the reception of the loop part, the tag data added to the head thereof is received. The sign data is data that is not used for reproducing a musical sound. Therefore, the electronic musical instrument 101 discards it.
【0106】他方のステップ1010では、受信データ
を、RAM203内のPCMデータ部用のデータ格納領
域に格納し、続くステップ1011では、チェックサム
値の計算を行い、その計算結果を変数byCheckSumに代入
する。それが終了すると、ステップ1012に移行す
る。In the other step 1010, the received data is stored in the data storage area for the PCM data section in the RAM 203, and in the following step 1011 the checksum value is calculated, and the calculation result is substituted for the variable byCheckSum. . Upon completion, the process moves to step 1012.
【0107】このように、ステップ1001〜1011
では、受信データが音声データのどの部分に属している
かに応じてRAM203に格納するとともに、データの
欠落が発生したか否かに応じて音声データの再送が行わ
れる。As described above, steps 1001 to 1011
Then, the received data is stored in the RAM 203 in accordance with which part of the audio data belongs, and the audio data is retransmitted in accordance with whether or not data loss has occurred.
【0108】上記ステップ1012では、音声データと
して1バイト(1ワード)を受信したことから、変数wD
ataCounterの値のインクリメントを行う。その後、ステ
ップ1013に移行する。In step 1012, since one byte (one word) has been received as audio data, the variable wD
Increment the value of ataCounter. Thereafter, the process proceeds to step 1013.
【0109】ステップ1013では、変数wDataCounter
の値が変数wLoopNumの値と等しいか否か判定する。変数
wLoopNumは、ヘッダ部、ストレート部、或いはループ部
の各部分を構成しているワードの総数が代入される変数
であり、ヘッダ部のデータを受信している場合には6、
ストレート部のデータを受信している場合にはヘッダ部
の第1及び第2バイト目のデータ、ループ部のデータを
受信している場合にはヘッダ部の第4及び第5バイト目
のデータがそれぞれ代入される。このため、現在受信中
の部分のデータを全て受信した場合、その判定はYES
となってステップ1014に移行する。そうでない場合
には、その判定はNOとなって一連の処理を終了する。In step 1013, the variable wDataCounter
Is determined whether the value of is equal to the value of the variable wLoopNum. variable
wLoopNum is a variable to which the total number of words constituting each part of the header part, the straight part, or the loop part is substituted, and 6, when the data of the header part is received,
When the data of the straight part is received, the data of the first and second bytes of the header part is received, and when the data of the loop part is received, the data of the fourth and fifth bytes of the header part are transmitted. Substituted respectively. Therefore, if all the data of the part currently being received has been received, the determination is YES.
And the process moves to step 1014. Otherwise, the determination is NO and the series of processing ends.
【0110】ステップ1014以降では、音声データを
構成する1部分のデータの受信が完了したと判断して、
それに伴う処理が行われる。その部分のデータの受信が
正常に行えたか否か判定、即ちエラーの発生の有無を判
定して、その判定結果に応じた対処が行われる。At step 1014 and thereafter, it is determined that the reception of one part of the data constituting the audio data has been completed.
The accompanying processing is performed. It is determined whether or not the data of that part has been received normally, that is, whether or not an error has occurred is determined, and a measure is taken in accordance with the determination result.
【0111】先ず、ステップ1014では、変数wDataC
ounterの値をクリア、即ちそれに0を代入する。続くス
テップ1015では、変数byDataReceivingStatus に代
入されている値を判定する。変数byDataReceivingStatu
s にDATA HEADER が代入されていた場合、ステップ10
16に移行して、変数byDataReceivingStatus とwLoopN
umの更新を行う。具体的には、ヘッダ部の受信が完了し
たことから、変数byDataReceivingStatus にDATA STRAI
GHT を代入し、他方の変数wLoopNumには、受信が完了し
たヘッダ部の第1及び第2バイト目のデータで構成され
る16ビットの値(第1バイト目が上位8ビット、第2
バイト目が下位8ビットである)を代入する。それが終
了した後に一連の処理を終了する。First, in step 1014, the variable wDataC
Clear the value of ounter, that is, substitute 0 for it. In the following step 1015, the value assigned to the variable byDataReceivingStatus is determined. Variable byDataReceivingStatu
If DATA HEADER has been substituted for s, step 10
Move to 16 and change the variables byDataReceivingStatus and wLoopN
Update um. Specifically, since the reception of the header part has been completed, the variable byDataReceivingStatus contains DATA STRAI.
GHT is substituted, and the other variable wLoopNum is a 16-bit value composed of the data of the first and second bytes of the header part that has been received (the first byte is the upper 8 bits, the second
(The byte is the lower 8 bits). After that, a series of processing ends.
【0112】変数byDataReceivingStatus にDATA STRAI
GHT が代入されていた場合には、ステップ1017に移
行する。そのステップ1017では、変数byCheckSumに
代入されているチェックサム値が、受信したヘッダ部の
第3バイト目のチェックサム値と一致するか否か判定す
る。ストレート部の受信が正常に行われた場合、それら
チェックサム値は一致することから判定はYESとな
り、ステップ1018に移行する。そうでない場合に
は、即ちエラーが発生している場合には、その判定はN
Oとなってステップ1019に移行する。Data STRAI is set in the variable byDataReceivingStatus.
If GHT has been assigned, the process moves to step 1017. In step 1017, it is determined whether or not the checksum value assigned to the variable byCheckSum matches the checksum value of the third byte of the received header. If the reception of the straight portion is normally performed, the checksum values match, so that the determination is YES, and the process proceeds to step 1018. Otherwise, that is, if an error has occurred, the determination is N
It becomes O and moves to step 1019.
【0113】ステップ1018では、変数byDataReceiv
ingStatus 、wLoopNum、及びbyCheckSumの更新を行う。
具体的には、ストレート部の受信を正常に完了したこと
から、変数byDataReceivingStatus にDATA LOOP を代入
し、変数wLoopNumには、受信が完了したヘッダ部の第4
及び第5バイト目のデータで構成される16ビットの値
(第4バイト目が上位8ビット、第5バイト目が下位8
ビットである)を代入し、変数byCheckSumには0を代入
する。それらが終了した後に一連の処理を終了する。In Step 1018, the variable byDataReceiv
Update ingStatus, wLoopNum, and byCheckSum.
Specifically, since the reception of the straight portion has been completed normally, DATA LOOP is substituted for the variable byDataReceivingStatus, and the variable wLoopNum is the fourth of the header portion for which reception has been completed.
And a 16-bit value composed of the data of the fifth byte (the fourth byte is the upper eight bits, and the fifth byte is the lower eight bits).
Bit) and 0 to the variable byCheckSum. A series of processes is terminated after the process is completed.
【0114】他方のステップ1019では、変数bReTra
nsferFlag にTRUEが代入されているか否か判定す
る。ユーザが再送スイッチ206aを操作してエラー発
生時のデータの再送を指定、即ち再送モードを設定して
いた場合、その判定はYESとなってステップ1020
に移行する。そうでない場合には、即ちエラー発生時に
もデータの転送の続行をユーザが指定していた場合に
は、その判定はNOとなって上述のステップ1018に
移行する。In the other step 1019, the variable bReTra
It is determined whether TRUE is substituted in nsferFlag. If the user operates the retransmission switch 206a to specify retransmission of data when an error occurs, that is, if the retransmission mode has been set, the determination is YES and step 1020
Move to Otherwise, that is, if the user has designated continuation of data transfer even when an error occurs, the determination is no and the process moves to step 1018 described above.
【0115】ステップ1020では、データ転送形式に
DATA STRAIGHT を格納した音声データ転送要求コマンド
を再作成する。続くステップ1021では、その再作成
したコマンドをインターフェイス204の送信データバ
ッファに格納する。その後、一連の処理を終了する。In step 1020, the data transfer format
Re-create the voice data transfer request command storing DATA STRAIGHT. In the following step 1021, the re-created command is stored in the transmission data buffer of the interface 204. Thereafter, a series of processing ends.
【0116】このように、変数bReTransferFlag に代入
されている値に応じて、エラー発生時にデータの再送が
行われる。変数bReTransferFlag に代入されている値
は、再送スイッチ206aに対する操作によって変化さ
せることができる。このため、ユーザは、楽音の発音状
態を制御することができ、より快適に電子楽器101を
使用することができる。即ち再送モードを設定しない場
合には発音タイミングの遅れを回避、或いはその遅れを
最小限に抑えさせることができ、それを設定した場合に
は、発音される楽音の音質の低下を回避させることがで
きる。As described above, data is retransmitted when an error occurs according to the value assigned to the variable bReTransferFlag. The value assigned to the variable bReTransferFlag can be changed by operating the retransmission switch 206a. Therefore, the user can control the tone generation state of the musical tone, and can use the electronic musical instrument 101 more comfortably. That is, when the retransmission mode is not set, it is possible to avoid delay of the sounding timing or to minimize the delay, and when it is set, it is possible to avoid deterioration of the sound quality of the musical sound to be sounded. it can.
【0117】一方、変数byDataReceivingStatus にDATA
LOOP が代入されていた場合には、ステップ1015か
らステップ1022に移行する。そのステップ1022
では、変数byCheckSumに代入されているチェックサム値
が、受信したヘッダ部の第6バイト目のチェックサム値
と一致するか否か判定する。ループ部の受信が正常に行
われた場合、それらチェックサム値は一致することから
判定はYESとなり、ステップ1023に移行する。そ
うでない場合には、即ちエラーが発生している場合に
は、その判定はNOとなってステップ1024に移行す
る。On the other hand, the variable byDataReceivingStatus contains DATA
If LOOP has been assigned, the process moves from step 1015 to step 1022. Step 1022
Then, it is determined whether or not the checksum value assigned to the variable byCheckSum matches the checksum value of the sixth byte of the received header portion. When the reception of the loop portion is normally performed, the checksum values match, so the determination is YES, and the flow shifts to step 1023. Otherwise, that is, if an error has occurred, the determination is no and the process moves to step 1024.
【0118】ステップ1023では、変数byDataReceiv
ingStatus 、wLoopNum、及びbyCheckSumの更新を行う。
具体的には、ループ部の受信を正常に完了、即ち音声デ
ータの受信を全て正常に完了したことから、変数byData
ReceivingStatus にDATA HEADER を代入し、変数wLoopN
umにはヘッダ部の全データ(ワード)数である6を代入
し、変数byCheckSumには0を代入する。それらの終了
後、一連の処理を終了する。In step 1023, the variable byDataReceiv
Update ingStatus, wLoopNum, and byCheckSum.
Specifically, since the reception of the loop portion has been completed normally, that is, the reception of all audio data has been completed normally, the variable byData
Assign DATA HEADER to ReceivingStatus and set the variable wLoopN
Substitute 6 which is the total number of data (words) in the header part into um, and substitute 0 into the variable byCheckSum. After these operations, a series of processing ends.
【0119】他方のステップ1024では、ループ部の
受信にエラーが発生したことから、このループ部の転送
を要求する音声データ転送要求コマンド(第3バイト目
のデータ転送形式をDATA LOOP としたコマンドである)
を生成し、続くステップ1025でそのコマンドをイン
ターフェイス204の送信データバッファに書き込む。
その後、一連の処理を終了する。In step 1024, since an error has occurred in the reception of the loop portion, an audio data transfer request command (a command in which the data transfer format of the third byte is DATA LOOP) requesting the transfer of the loop portion is made. is there)
Is generated, and the command is written to the transmission data buffer of the interface 204 in the following step 1025.
Thereafter, a series of processing ends.
【0120】このように、第2の実施の形態では、スト
レート部の受信でエラーが発生すると、再送モードが設
定されているか否かに応じてデータの再送を要求する
が、ループ部の受信でエラーが発生すると無条件でデー
タの再送を要求している。これは、ストレート部は発音
において1回だけ処理される部分であることから、繰り
返し処理されるループ部よりもエラーの影響が比較的に
小さいためである。As described above, in the second embodiment, when an error occurs in the reception of the straight part, a request for data retransmission is made according to whether or not the retransmission mode is set. When an error occurs, data retransmission is unconditionally requested. This is because the straight portion is a portion that is processed only once in sound generation, and thus is less affected by an error than a loop portion that is repeatedly processed.
【0121】このことから判るように、音声データをヘ
ッダ部、ストレート部、及びループ部とに分ける分割方
法は、各部分の重要度に着目した分割方法でもある。各
部分のデータの処理内容に応じてデータを分割すること
により、重要度に着目した分割を行うことができる。こ
のため、上記のように、重要度に応じたデータの再送を
行うことができるようになる。換言すれば、エラー発生
時には階層的に対処することができ、ユーザの様々な要
求に柔軟に対応できる。As can be seen from the above, the division method for dividing audio data into a header part, a straight part, and a loop part is also a division method focusing on the importance of each part. By dividing the data in accordance with the processing contents of the data of each part, it is possible to perform the division focusing on the importance. For this reason, as described above, it becomes possible to retransmit data according to the importance. In other words, when an error occurs, the error can be dealt with hierarchically, and it is possible to flexibly respond to various requests of the user.
【0122】なお、第2の実施の形態では、データ欠落
検出用の標識データを一つだけ音声データ中に挿入して
いるが、例えばストレート部の先頭、更にはループ部の
最後といったように、それを複数挿入して、各部毎にデ
ータの欠落を検出できるようにしても良い。このように
した場合、データの欠落の検出時には、各部毎にデータ
の再送を要求すれば良い。その再送の要求は、エラーを
検出して直ちに行っても良いが、音声データ全体の転送
が終了した後に行うようにしても良い。In the second embodiment, only one piece of marker data for data loss detection is inserted in the audio data. However, for example, the head of a straight portion and the end of a loop portion may be inserted. A plurality of such data may be inserted so that data loss can be detected for each unit. In such a case, when a data loss is detected, retransmission of data may be requested for each unit. The retransmission request may be made immediately after the error is detected, or may be made after the transfer of the entire audio data is completed.
【0123】また、第2の実施の形態では、エラー発生
時にデータの再送を行うか否かをユーザに選択させてい
るが、その選択を自動的に行うようにしても良い。例え
ば、自動演奏モードによる曲の演奏中か否かといった設
定状態に基づいて、データの再送を行うか否か決定する
ようにしても良い。 <第3の実施の形態>上記第2の実施の形態では、上述
したように、データの欠落を検出した場合、直ちに音声
データの再送を要求するようにしている。これに対し、
第3の実施の形態は、データの欠落を検出した場合にお
いて、データを再送させるか否かの選択を更に行えるよ
うにしたものである。Further, in the second embodiment, the user is made to select whether or not to retransmit data when an error occurs, but the selection may be made automatically. For example, whether to retransmit data may be determined based on a setting state such as whether or not a music piece is being played in the automatic performance mode. <Third Embodiment> In the second embodiment, as described above, when data loss is detected, retransmission of audio data is immediately requested. In contrast,
In the third embodiment, when data loss is detected, it is possible to further select whether or not to retransmit data.
【0124】第3の実施の形態による電子楽器は、第2
の実施の形態によるそれと構成は基本的に同じであり、
また、処理動作も基本的に同じである。パソコンについ
ては、第1の実施の形態から構成、及び処理動作が変わ
っていない。このため、第1の実施の形態で使用した符
号をそのまま使用して、第3の実施の形態による電子楽
器101が第2の実施の形態によるそれから異なってい
る部分のみ説明することにする。The electronic musical instrument according to the third embodiment is similar to the electronic musical instrument according to the second embodiment.
The configuration according to the embodiment of the present invention is basically the same,
The processing operation is basically the same. The configuration and processing operation of the personal computer are not different from those of the first embodiment. Therefore, only the parts of the electronic musical instrument 101 according to the third embodiment that are different from those according to the second embodiment will be described using the reference numerals used in the first embodiment as they are.
【0125】第2の実施の形態では、エラーを、データ
の欠落と、データの不正確な受信(転送)との2種類に
分類し、前者のエラー発生時にはデータの再送、後者の
それの発生時にはユーザの指定、即ち再送モードが設定
されているか否かに応じたデータの再送を行っている。
第3の実施の形態では、再生モードが設定されているか
否かに応じて、データが欠落したエラーの発生時におけ
るデータの再送を行うようにしている。In the second embodiment, errors are classified into two types: data loss and incorrect data reception (transfer). When the former error occurs, data is retransmitted, and when At times, data retransmission is performed according to the user's specification, that is, whether the retransmission mode is set.
In the third embodiment, retransmission of data at the time of occurrence of an error in which data is lost occurs depending on whether or not the reproduction mode is set.
【0126】音声データを用いた楽音の発音は、基本的
にヘッダ部に格納されている情報を基に行われる。デー
タが欠落すると、そのヘッダ部の情報と実際のデータの
構成とが一致しなくなる。このため、第3の実施の形態
では、データの欠落の発生(検出)にデータの再送を行
わない場合、データの受信状態に応じてヘッダ部の情報
の変更を行い、整合性をとっている。The generation of musical tones using voice data is basically performed based on information stored in the header section. If the data is missing, the information in the header part does not match the actual data configuration. For this reason, in the third embodiment, when data retransmission is not performed due to occurrence (detection) of data loss, information in the header portion is changed according to the data reception state to ensure consistency. .
【0127】以上が、第3の実施の形態の概要である。
次に、上記エラー発生時におけるデータの再送を実現す
るための第3の実施の形態におけるCPU201の動作
について詳細に説明する。The above is the outline of the third embodiment.
Next, the operation of the CPU 201 in the third embodiment for realizing data retransmission at the time of occurrence of the error will be described in detail.
【0128】第3の実施の形態における処理動作の流れ
は、第1及び第2の実施の形態のそれと同じである。そ
の処理内容としては、データ受信インタラプト処理が第
2の実施の形態から最も異なっている。他の処理におい
ては、相違点が無いか、相違点が有ったとしても僅かで
ある。このため、図11に示すその動作フローチャート
を参照して、データ受信インタラプト処理のみ説明す
る。The flow of the processing operation in the third embodiment is the same as that in the first and second embodiments. As the processing contents, the data reception interrupt processing is the most different from the second embodiment. In other processes, there is no difference, or there is little difference, if any. Therefore, only the data reception interrupt processing will be described with reference to the operation flowchart shown in FIG.
【0129】先ず、ステップ1101では、変数byData
ReceivingStatus に代入されている値を判定する。上記
したように、変数byDataReceivingStatus は、現在受信
中のデータが音声データのどの部分かを把握するための
変数であり、DATA HEADER 、DATA STRAIGHT 、及びDATA
LOOP の3種類の値のうちの一つが代入される。First, in step 1101, the variable byData
Determine the value assigned to ReceivingStatus. As described above, the variable byDataReceivingStatus is a variable for grasping which part of the audio data the data currently being received is, and includes DATA HEADER, DATA STRAIGHT, and DATA
One of the three values of LOOP is substituted.
【0130】変数byDataReceivingStatus にDATA HEADE
R が代入されていた場合、ステップ1102に移行す
る。そのステップ1102では、受信データを、RAM
203内のヘッダ部用のデータ格納領域に格納する。そ
の格納が終了すると、ステップ1115に移行する。[0130] The variable byDataReceivingStatus is set to DATA HEADE.
If R has been substituted, the process moves to step 1102. In step 1102, the received data is stored in RAM
The data is stored in the data storage area for the header part in the data 203. Upon completion of the storage, the process moves to step 1115.
【0131】変数byDataReceivingStatus にDATA STRAI
GHT が代入されていた場合には、ステップ1103に移
行する。そのステップ1103では、受信データが標識
データか否か判定する。その受信データの最上位ビット
の値が1であった場合、標識データを受信したとして判
定はYESとなり、ステップ1106に移行する。そう
でない場合には、その判定はNOとなってステップ11
04に移行する。[0131] DATA STRAI is set in the variable byDataReceivingStatus.
If GHT has been assigned, the process moves to step 1103. In step 1103, it is determined whether or not the received data is sign data. If the value of the most significant bit of the received data is 1, the determination is YES that the indicator data has been received, and the process proceeds to step 1106. Otherwise, the determination is no and step 11
Move to 04.
【0132】ステップ1104では、受信データを、R
AM203内のPCMデータ部用のデータ格納領域に格
納し、続くステップ1105では、チェックサム値の計
算を行い、その計算結果を変数byCheckSumに代入する。
それが終了すると、ステップ1115に移行する。In step 1104, the received data is
The data is stored in the data storage area for the PCM data part in the AM 203, and in the following step 1105, the checksum value is calculated, and the calculation result is substituted for the variable byCheckSum.
Upon completion, the process moves to step 1115.
【0133】ステップ1106に移行時には、ヘッダ部
の第1及び第2バイト目に格納されているデータ数のデ
ータの受信を行う前にストレート部の転送が終了したこ
とになる。即ちデータの欠落が発生したことになる。こ
のため、ステップ1106〜1111では、データ欠落
時における処理が行われる。At the time of proceeding to step 1106, the transfer of the straight section has been completed before receiving the data of the number of data stored in the first and second bytes of the header section. That is, data loss has occurred. Therefore, in steps 1106 to 1111, processing at the time of data loss is performed.
【0134】先ず、ステップ1106では、変数bReTra
nsferFlag にTRUEが代入されているか否か判定す
る。ユーザが再送スイッチ206aを操作して再送モー
ドを設定していた場合、その判定はYESとなってステ
ップ1107に移行する。そうでない場合には、その判
定はNOとなってステップ1110に移行する。First, in step 1106, the variable bReTra
It is determined whether TRUE is substituted in nsferFlag. If the user operates the retransmission switch 206a to set the retransmission mode, the determination is YES and the process moves to step 1107. Otherwise, the determination is no and the process moves to step 1110.
【0135】ステップ1107〜1109では、データ
欠落のエラー発生に応じてデータの再送を要求する処理
が行われる。具体的には、ステップ1107では変数wD
ataCounterに0を代入し、ステップ1108ではデータ
転送形式にDATA STRAIGHT を格納した音声データ転送要
求コマンドを再作成し、DATA STRAIGHT 109では再作
成したコマンドをインターフェイス204内の送信デー
タバッファに書き込む。それらが終了した後、一連の処
理を終了する。In steps 1107 to 1109, processing for requesting retransmission of data is performed in response to occurrence of a data missing error. Specifically, in step 1107, the variable wD
AtaCounter is substituted with 0. At step 1108, the voice data transfer request command storing DATA STRAIGHT in the data transfer format is re-created. At DATA STRAIGHT 109, the re-created command is written to the transmission data buffer in the interface 204. After these operations are completed, a series of processing ends.
【0136】他方のステップ1110、及び1111で
は、データ欠落に応じたデータの再送を行わないことか
ら、その欠落に対処するための処理が行われる。ステッ
プ1110では、既に受信したヘッダ部のデータの書き
換えを行う。具体的には、RAM203内に割り当てた
ヘッダ部のデータ格納領域に格納されているヘッダ部の
第1及び第2バイト目のデータを、変数wDataCounterに
代入されている実際に受信したストレート部のデータ数
に書き換える。それが終了した後、ステップ1111に
移行し、変数byDataReceivingStatus にDATA LOOP 、変
数wLoopNumにヘッダ部の第4及び第5バイト目のデー
タ、変数wDataCounterに0をそれぞれ代入する。標識デ
ータは、ループ部の先頭に挿入されている。このため、
変数byDataReceivingStatus にDATA LOOP を代入するこ
とにより、標識データに続いて転送されるループ部のデ
ータを受信することができる。そのステップ1111を
終了した後、一連の処理を終了する。In the other steps 1110 and 1111, since data is not retransmitted in response to the data loss, processing for dealing with the data loss is performed. In step 1110, the data of the header part already received is rewritten. Specifically, the data of the first and second bytes of the header part stored in the data storage area of the header part allocated in the RAM 203 is replaced with the data of the actually received straight part substituted for the variable wDataCounter. Rewrite the number. After that, the process proceeds to step 1111 to substitute DATA LOOP for the variable byDataReceivingStatus, the fourth and fifth byte data of the header part for the variable wLoopNum, and 0 for the variable wDataCounter. The marker data is inserted at the beginning of the loop. For this reason,
By substituting DATA LOOP for the variable byDataReceivingStatus, it is possible to receive the data of the loop transferred following the indicator data. After ending Step 1111, a series of processes is ended.
【0137】このように、再送モードの未設定時にスト
レート部でデータの欠落が発生した場合、ストレート部
の実際の受信状態に応じたヘッダ部のデータの書き換え
を行い、ヘッダ部とストレート部の間の整合性をとって
いる。これにより、データ欠落によって生じる聴感上の
不具合を最小限に抑えることができる。As described above, when data loss occurs in the straight section when the retransmission mode is not set, the data in the header section is rewritten according to the actual reception state of the straight section, and the data between the header section and the straight section is rewritten. The consistency is taken. As a result, it is possible to minimize hearing problems caused by missing data.
【0138】一方、変数byDataReceivingStatus にDATA
LOOP が代入されていた場合には、ステップ1101か
らステップ1112に移行する。そのステップ1112
では、受信データが標識データか否か判定する。その受
信データの最上位ビットの値が1であった場合、それは
標識データであることから、その判定はYESとなって
一連の処理を終了する。そうでない場合には、その判定
はNOとなってステップ1113に移行する。On the other hand, the variable byDataReceivingStatus contains DATA
If LOOP has been assigned, the process moves from step 1101 to step 1112. Step 1112
Then, it is determined whether or not the received data is the sign data. If the value of the most significant bit of the received data is 1, it is the tag data, so the determination is YES and the series of processing ends. Otherwise, the determination is no and the process moves to step 1113.
【0139】上記したように、ループ部の転送が開始す
る前にデータの欠落が発生すると、音声データの再送、
或いはヘッダ部のデータの書き換えが行われている。こ
のため、ループ部の受信の開始時には、その先頭に追加
されている標識データ、或いはその次のデータを受信す
ることになる。その標識データは楽音の再生には使用し
ないデータである。このため、標識データを受信した場
合にはそれを廃棄している。As described above, if data loss occurs before the transfer of the loop section starts, retransmission of audio data,
Alternatively, the data in the header is rewritten. For this reason, at the start of the reception of the loop part, the tag data added to the head or the next data is received. The sign data is data that is not used for reproducing a musical sound. Therefore, when the tag data is received, it is discarded.
【0140】ステップ1113では、受信データを、R
AM203内のPCMデータ部用のデータ格納領域に格
納し、続くステップ1114では、チェックサム値の計
算を行い、その計算結果を変数byCheckSumに代入する。
それが終了すると、ステップ1115に移行する。At step 1113, the received data is
The data is stored in the data storage area for the PCM data section in the AM 203. In the following step 1114, the checksum value is calculated, and the calculation result is substituted into the variable byCheckSum.
Upon completion, the process moves to step 1115.
【0141】このように、ステップ1101〜1114
では、受信データが音声データのどの部分に属している
かに応じてRAM203に格納するとともに、データの
欠落が発生したか否か、及び再送モードが設定されてい
るか否かに応じて音声データの再送、或いはヘッダ部の
データの書き換えが行われる。As described above, steps 1101 to 1114
Then, the received data is stored in the RAM 203 according to which part of the audio data belongs, and the retransmission of the audio data is performed according to whether the data loss has occurred and whether the retransmission mode is set. Alternatively, the data in the header portion is rewritten.
【0142】上記ステップ1115では、音声データと
して1バイト(1ワード)を受信したことから、変数wD
ataCounterの値のインクリメントを行う。その後、ステ
ップ1116に移行する。In step 1115, since one byte (one word) has been received as audio data, the variable wD
Increment the value of ataCounter. Thereafter, the process proceeds to step 1116.
【0143】ステップ1116では、変数wDataCounter
の値が変数wLoopNumの値と等しいか否か判定する。変数
wLoopNumは、ヘッダ部、ストレート部、或いはループ部
の各部分を構成しているワードの総数が代入される変数
であり、ヘッダ部のデータを受信している場合には6、
ストレート部のデータを受信している場合にはヘッダ部
の第1及び第2バイト目のデータ、ループ部のデータを
受信している場合にはヘッダ部の第4及び第5バイト目
のデータがそれぞれ代入される。このため、現在受信中
の部分のデータを全て受信した場合、その判定はYES
となってステップ1117に移行する。そうでない場合
には、その判定はNOとなって一連の処理を終了する。In step 1116, the variable wDataCounter
Is determined whether the value of is equal to the value of the variable wLoopNum. variable
wLoopNum is a variable to which the total number of words constituting each part of the header part, the straight part, or the loop part is substituted, and 6, when the data of the header part is received,
When the data of the straight part is received, the data of the first and second bytes of the header part is received, and when the data of the loop part is received, the data of the fourth and fifth bytes of the header part are transmitted. Substituted respectively. Therefore, if all the data of the part currently being received has been received, the determination is YES.
Then, the process proceeds to step 1117. Otherwise, the determination is NO and the series of processing ends.
【0144】ステップ1117以降では、音声データを
構成する1部分のデータの受信が完了したと判断して、
それに伴う処理が行われる。その部分のデータの受信が
正常に行えたか否か判定、即ちエラーの発生の有無を判
定して、その判定結果に応じた対処が行われる。In step 1117 and thereafter, it is determined that the reception of one part of the data constituting the audio data has been completed.
The accompanying processing is performed. It is determined whether or not the data of that part has been received normally, that is, whether or not an error has occurred is determined, and a measure is taken in accordance with the determination result.
【0145】先ず、ステップ1117では、変数wDataC
ounterの値をクリア、即ちそれに0を代入する。続くス
テップ1118では、変数byDataReceivingStatus に代
入されている値を判定する。変数byDataReceivingStatu
s にDATA HEADER が代入されていた場合、ステップ11
19に移行して、変数byDataReceivingStatus とwLoopN
umの更新を行う。具体的には、ヘッダ部の受信が完了し
たことから、変数byDataReceivingStatus にDATA STRAI
GHT を代入し、他方の変数wLoopNumには、受信が完了し
たヘッダ部の第1及び第2バイト目のデータで構成され
る16ビットの値(第1バイト目が上位8ビット、第2
バイト目が下位8ビットである)を代入する。それが終
了した後に一連の処理を終了する。First, in step 1117, the variable wDataC
Clear the value of ounter, that is, substitute 0 for it. In the following step 1118, the value assigned to the variable byDataReceivingStatus is determined. Variable byDataReceivingStatu
If DATA HEADER has been substituted for s, step 11
Move to 19 and change the variables byDataReceivingStatus and wLoopN
Update um. Specifically, since the reception of the header part has been completed, the variable byDataReceivingStatus contains DATA STRAI.
GHT is substituted, and the other variable wLoopNum is a 16-bit value composed of the data of the first and second bytes of the header part that has been received (the first byte is the upper 8 bits, the second
(The byte is the lower 8 bits). After that, a series of processing ends.
【0146】変数byDataReceivingStatus にDATA STRAI
GHT が代入されていた場合には、ステップ1120に移
行する。そのステップ1120では、変数byCheckSumに
代入されているチェックサム値が、受信したヘッダ部の
第3バイト目のチェックサム値と一致するか否か判定す
る。ストレート部の受信が正常に行われた場合、それら
チェックサム値は一致することから判定はYESとな
り、ステップ1121に移行する。そうでない場合に
は、即ちエラーが発生している場合には、その判定はN
Oとなってステップ1122に移行する。[0146] DATA STRAI is set in the variable byDataReceivingStatus.
If GHT has been substituted, the process proceeds to step 1120. In the step 1120, it is determined whether or not the checksum value assigned to the variable byCheckSum matches the checksum value of the third byte of the received header portion. If the reception of the straight portion is normally performed, the checksum values match, so that the determination is YES, and the flow shifts to step 1121. Otherwise, that is, if an error has occurred, the determination is N
It becomes O and it transfers to step 1122.
【0147】ステップ1121では、変数byDataReceiv
ingStatus 、wLoopNum、及びbyCheckSumの更新を行う。
具体的には、ストレート部の受信を正常に完了したこと
から、変数byDataReceivingStatus にDATA LOOP を代入
し、変数wLoopNumには、受信が完了したヘッダ部の第4
及び第5バイト目のデータで構成される16ビットの値
(第4バイト目が上位8ビット、第5バイト目が下位8
ビットである)を代入し、変数byCheckSumには0を代入
する。それが終了した後に一連の処理を終了する。In the step 1121, the variable byDataReceiv
Update ingStatus, wLoopNum, and byCheckSum.
Specifically, since the reception of the straight portion has been completed normally, DATA LOOP is substituted for the variable byDataReceivingStatus, and the variable wLoopNum is the fourth of the header portion for which reception has been completed.
And a 16-bit value composed of the data of the fifth byte (the fourth byte is the upper eight bits, and the fifth byte is the lower eight bits).
Bit) and 0 to the variable byCheckSum. After that, a series of processing ends.
【0148】他方のステップ1122では、変数bReTra
nsferFlag にTRUEが代入されているか否か判定す
る。ユーザが再送スイッチ206aを操作して再送モー
ドを設定していた場合、その判定はYESとなってステ
ップ1123に移行する。そうでない場合には、即ちエ
ラー発生時にもデータの転送の続行をユーザが指定して
いた場合には、その判定はNOとなってステップ112
1に移行する。At step 1122, the variable bReTra
It is determined whether TRUE is substituted in nsferFlag. If the user operates the retransmission switch 206a to set the retransmission mode, the determination is YES and the process moves to step 1123. Otherwise, that is, if the user has designated the continuation of data transfer even when an error has occurred, the determination is NO and the
Move to 1.
【0149】ステップ1123では、データ転送形式に
DATA STRAIGHT を格納した音声データ転送要求コマンド
を再作成する。続くステップ1124では、その再作成
したコマンドをインターフェイス204の送信データバ
ッファに格納する。その後、一連の処理を終了する。In step 1123, the data transfer format
Re-create the voice data transfer request command storing DATA STRAIGHT. In the following step 1124, the recreated command is stored in the transmission data buffer of the interface 204. Thereafter, a series of processing ends.
【0150】このように、変数bReTransferFlag に代入
されている値に応じて、エラー発生時にデータの再送が
行われる。変数bReTransferFlag に代入されている値
は、再送スイッチ206aに対する操作によって変化さ
せることができる。このため、ユーザは、再送モードを
設定しない場合には発音タイミングの遅れを回避させる
ことができ、それを設定した場合には、発音される楽音
の音質の低下を回避させることができる。As described above, when an error occurs, data is retransmitted according to the value assigned to the variable bReTransferFlag. The value assigned to the variable bReTransferFlag can be changed by operating the retransmission switch 206a. Therefore, when the retransmission mode is not set, the user can avoid a delay in the tone generation timing, and when the user sets the retransmission mode, it is possible to avoid a decrease in the sound quality of the musical tone to be emitted.
【0151】一方、変数byDataReceivingStatus にDATA
LOOP が代入されていた場合には、ステップ1118か
らステップ1125に移行する。そのステップ1125
では、変数byCheckSumに代入されているチェックサム値
が、受信したヘッダ部の第6バイト目のチェックサム値
と一致するか否か判定する。ループ部の受信が正常に行
われた場合、それらチェックサム値は一致することから
判定はYESとなり、ステップ1126に移行する。そ
うでない場合には、即ちエラーが発生している場合に
は、その判定はNOとなってステップ1127に移行す
る。On the other hand, the variable byDataReceivingStatus contains DATA
If LOOP has been assigned, the process moves from step 1118 to step 1125. Step 1125
Then, it is determined whether or not the checksum value assigned to the variable byCheckSum matches the checksum value of the sixth byte of the received header portion. If the loop section has been received normally, the checksum values match, so the determination is YES, and the flow shifts to step 1126. If not, that is, if an error has occurred, the determination is no and the process moves to step 1127.
【0152】ステップ1126では、変数byDataReceiv
ingStatus 、wLoopNum、及ぶbyCheckSumの更新を行う。
具体的には、ループ部の受信を正常に完了、即ち音声デ
ータの受信を全て正常に完了したことから、変数byData
ReceivingStatus にDATA HEADER を代入し、変数wLoopN
umにはヘッダ部の全データ(ワード)数である6を代入
し、変数byCheckSumには0を代入する。それが終了した
後に一連の処理を終了する。At step 1126, the variable byDataReceiv
Update ingStatus, wLoopNum, and byCheckSum.
Specifically, since the reception of the loop portion has been completed normally, that is, the reception of all audio data has been completed normally, the variable byData
Assign DATA HEADER to ReceivingStatus and set the variable wLoopN
Substitute 6 which is the total number of data (words) in the header part into um, and substitute 0 into the variable byCheckSum. After that, a series of processing ends.
【0153】他方のステップ1127では、ループ部の
受信にエラーが発生したことから、このループ部の転送
を要求する音声データ転送要求コマンド(第3バイト目
のデータ転送形式をDATA LOOP としたコマンドである)
を生成し、続くステップ1128でそのコマンドをイン
ターフェイス204の送信データバッファに書き込む。
その後、一連の処理を終了する。In the other step 1127, since an error has occurred in the reception of the loop portion, an audio data transfer request command (a command in which the data transfer format of the third byte is DATA LOOP) requesting the transfer of the loop portion is made. is there)
Is generated, and the command is written to the transmission data buffer of the interface 204 in the following step 1128.
Thereafter, a series of processing ends.
【0154】なお、第3の実施の形態では、再送モード
の設定に応じてデータ欠落時におけるデータの再送を行
うようにしているが、エラーの大きさに応じて、例えば
データが欠落したエラーと、転送が正確に行われなかっ
たエラーとで別々に、そのエラー発生時にデータの再送
を行うか否か設定できるようにしても良い。また、上記
したように、データの再送を行うか否かを自動的に選択
させるようにしても良い。更には、データの再送を行う
部分を個別に選択できるようにしても良い。In the third embodiment, data is retransmitted at the time of data loss according to the setting of the retransmission mode. Alternatively, it may be possible to separately set whether or not to retransmit data when an error occurs, separately from the error that was not correctly transferred. As described above, whether or not to retransmit data may be automatically selected. Further, a portion for retransmitting data may be individually selected.
【0155】また、第3の実施の形態では、データの欠
落が発生した場合、その欠落状態に応じてヘッダ部のデ
ータの書き換えを行っているが、ヘッダ部のデータに合
わせて、データが欠落した部分のほうの書き換えを行う
ようにしても良い。例えば欠落したデータ数が比較的に
少ない場合には、データが欠落した部分の所定のデータ
をコピーして、その欠落分を補うようにようにしても良
い。In the third embodiment, when data is lost, the data in the header is rewritten in accordance with the state of the data loss. However, the data is lost in accordance with the data in the header. The rewritten portion may be rewritten. For example, when the number of missing data is relatively small, predetermined data of a portion where data is missing may be copied to compensate for the missing data.
【0156】また、本実施の形態(第1〜第3の実施の
形態)は、電子楽器101とパソコン103に本発明を
適用した場合のものであるが、本発明が適用されるのは
これらの装置に限定されるものではない。例えば2つの
パソコンに、それぞれ、本発明によるデータ受信装置、
及びデータ送信装置を適用させ、それらの間で双方向に
本発明に基づくデータの送受信を行えるようにすること
もできる。即ち、上述した電子楽器101、及び/或い
は、パソコン103の動作を実現するためのプログラム
を実行できる装置であれば、既存の装置であってもその
プログラムをロードさせることで本発明を搭載させるこ
とができる。このことから明らかなようにに、本発明は
柔軟に適用(搭載)させることができるものである。In the present embodiment (first to third embodiments), the present invention is applied to the electronic musical instrument 101 and the personal computer 103, but the present invention is applied to these. However, the present invention is not limited to this device. For example, two personal computers each have a data receiving device according to the present invention,
And a data transmitting device, and data can be bidirectionally transmitted and received between them according to the present invention. That is, as long as the device can execute a program for realizing the operation of the electronic musical instrument 101 and / or the personal computer 103, the present invention can be installed by loading the program even in an existing device. Can be. As is apparent from this, the present invention can be flexibly applied (mounted).
【0157】また、それらの間で送受信するデータにつ
いては、当然のことながら、音声データに限定されるも
のでもない。また、データの分割においては、本実施の
形態のように、データ(ワードデータ)の処理内容に着
目した分割の他に、例えば項目といったデータ(ワード
データ)の種類に着目した分割を行うようにしても良
い。また、それらを組み合わせた分割を行っても良い。
データの分割においても、そのデータによって様々な方
法を用いることができる。The data transmitted and received between them is, of course, not limited to audio data. In the data division, as in the present embodiment, in addition to the division focusing on the processing content of the data (word data), the division focusing on the type of data (word data) such as an item is performed. May be. In addition, division may be performed by combining them.
In dividing the data, various methods can be used depending on the data.
【0158】[0158]
【発明の効果】以上説明したように本発明の第1の態様
のデータ受信装置は、処理単位でワードデータがまとめ
られて構成されているデータを、ワードデータに対する
処理内容に基づいて複数のワードデータ群に分割し、転
送を要求することで送信されてきたデータを、ワードデ
ータ群単位でエラー発生の有無を監視し、エラーが発生
していた場合にワードデータ群単位で再転送を要求す
る。As described above, the data receiving apparatus according to the first aspect of the present invention converts data composed of word data in units of processing into a plurality of words on the basis of the processing contents of the word data. Data transmitted by requesting transfer is divided into data groups, and the presence or absence of an error is monitored for each word data group. If an error occurs, retransmission is requested for each word data group. .
【0159】データをワードデータ群に分けてエラー発
生の検出、及び再転送を行うことにより、発生したエラ
ーを迅速に検出することができるとともに、そのエラー
が発生した部分を小さな範囲内で特定することができ、
更には、再転送を短時間に行うことができる。このた
め、発生したエラーに短時間に対応することができ、エ
ラーによる影響を回避、或いは低減することができる。By dividing the data into word data groups and detecting the occurrence of errors and retransmitting the data, the errors can be detected quickly and the portion where the error has occurred can be specified within a small range. It is possible,
Further, retransmission can be performed in a short time. Therefore, it is possible to respond to the generated error in a short time, and to avoid or reduce the influence of the error.
【0160】本発明の第2の態様のデータ受信装置は、
転送を要求することで送信されてきたデータを、ワード
データ群単位でエラー発生の有無を監視し、エラーが発
生していた場合に、その受信状態に応じて、例えばワー
ドデータ群間の整合性をとるようにワードデータ群を変
更する。このため、エラーによって生じる不具合を極め
て迅速に低減することができる。The data receiving apparatus according to the second aspect of the present invention comprises:
The data transmitted by requesting the transfer is monitored for the occurrence of an error in word data group units, and if an error has occurred, for example, consistency between the word data groups is determined according to the reception state. The word data group is changed so that For this reason, the inconvenience caused by the error can be reduced very quickly.
【0161】なお、上記の各データ受信装置の機能を組
み合わせた場合には、より広くユーザの要望に対応する
ことができる。本発明のデータ送信装置は、上記データ
受信装置からのデータの転送要求、或いは再転送要求に
応じて、データ全体、或いはワードデータ群の送信を行
う。このため、上記各データ受信装置は、必要なデー
タ、或いはワードデータ群だけを、必要に応じて得るこ
とができる。When the functions of each of the above data receiving apparatuses are combined, it is possible to meet the needs of the user more widely. The data transmitting apparatus of the present invention transmits the entire data or the word data group in response to a data transfer request or a retransfer request from the data receiving apparatus. Therefore, each of the data receiving devices can obtain only necessary data or a word data group as needed.
【図1】第1の実施の形態が適用されたシステムの外観
図である。FIG. 1 is an external view of a system to which a first embodiment is applied.
【図2】電子楽器の全体回路図である。FIG. 2 is an overall circuit diagram of the electronic musical instrument.
【図3】音声データの構成図である。FIG. 3 is a configuration diagram of audio data.
【図4】音声データ転送要求コマンドの構成図である。FIG. 4 is a configuration diagram of a voice data transfer request command.
【図5】全体処理の動作フローチャートである。FIG. 5 is an operation flowchart of an entire process.
【図6】音声データ要求処理の動作フローチャートであ
る。FIG. 6 is an operation flowchart of a voice data request process.
【図7】データ受信インタラプト処理の動作フローチャ
ートである。FIG. 7 is an operation flowchart of a data reception interrupt process.
【図8】パソコンの全体処理の動作フローチャートであ
る。FIG. 8 is an operation flowchart of the entire process of the personal computer.
【図9】音声データの構成図である(第2の実施の形
態)。FIG. 9 is a configuration diagram of audio data (second embodiment).
【図10】データ受信インタラプト処理の動作フローチ
ャートである(第2の実施の形態)。FIG. 10 is an operation flowchart of a data reception interrupt process (second embodiment).
【図11】データ受信インタラプト処理の動作フローチ
ャートである(第3の実施の形態)。FIG. 11 is an operation flowchart of a data reception interrupt process (third embodiment).
101 電子楽器 103 パソコン 201 CPU 202 ROM 203 RAM 204 インターフェイス 206 スイッチ群 101 electronic musical instrument 103 personal computer 201 CPU 202 ROM 203 RAM 204 interface 206 switch group
Claims (6)
の装置と第2の装置の間で処理単位のデータを転送する
方法であって、 前記データを構成するワードデータを、処理内容に基づ
いて複数のワードデータ群に分け、 前記第1の装置は、前記第2の装置にデータの転送を要
求するとともに、前記第2の装置から転送されたデータ
を前記ワードデータ群単位で監視して、前記データのな
かで正常に受信できなかった前記ワードデータ群を検出
した場合に、該ワードデータ群の再転送を前記第2の装
置に要求し、 前記第2の装置は、前記第1の装置のデータの転送要求
に従ってデータを転送するとともに、前記第1の装置か
らの再転送要求に応じて、前記データ中から再転送要求
されたワードデータ群を抽出して再度転送する、 ことを特徴とするデータ転送方法。1. A first communication device connected via predetermined communication means.
A method of transferring data in a processing unit between the first device and the second device, wherein the word data constituting the data is divided into a plurality of word data groups based on processing contents, Requesting the second device to transfer data, monitoring the data transferred from the second device in units of the word data group, and checking the word data that could not be normally received among the data. When a group is detected, the second device requests the second device to retransmit the word data group, and the second device transfers data according to the data transfer request of the first device, and A data transfer method, wherein a word data group requested to be retransmitted is extracted from the data and transferred again in response to a retransmission request from the first device.
装置から転送される処理単位のデータを受信する装置で
あって、 前記外部装置に対し、前記データの転送を要求する要求
手段と、 前記外部装置から転送されたデータを受信する受信手段
と、 前記データを構成するワードデータを処理内容に基づい
て複数のワードデータ群に分類して、前記受信手段がデ
ータを正常に受信したか否かを前記ワードデータ群単位
で判定する判定手段と、 前記判定手段が正常でないと判定したワードデータ群の
再転送を前記外部装置に要求する再転送要求手段と、 を具備したことを特徴とするデータ受信装置。2. An apparatus for receiving data of a processing unit transferred from an external device connected via a predetermined communication means, requesting means for requesting the external device to transfer the data, Receiving means for receiving data transferred from the external device, and classifying word data constituting the data into a plurality of word data groups based on processing contents, and determining whether the receiving means has normally received data. Determination means for determining whether or not the word data group is determined to be abnormal by the word data group unit; and retransfer request means for requesting the external device to retransmit the word data group determined to be abnormal. Data receiver.
ードデータ群の再転送を、前記外部装置に要求するか否
か決定する決定手段を更に具備し、 前記再転送要求手段は、前記決定手段の決定に従って、
前記外部装置にワードデータ群の再転送を要求する、 ことを特徴とする請求項2記載のデータ受信装置。3. The apparatus according to claim 1, further comprising: a determination unit configured to determine whether to request the external device to retransmit the word data group determined by the determination unit to be abnormal. According to the decision of
The data receiving device according to claim 2, wherein the external device requests retransmission of the word data group.
装置から転送される処理単位のデータを受信する装置で
あって、 前記外部装置に対し、前記データの転送を要求する要求
手段と、 前記外部装置から転送されたデータを受信する受信手段
と、 前記データを構成するワードデータを処理内容に基づい
て複数のワードデータ群に分類して、前記受信手段がデ
ータを正常に受信したか否かを前記ワードデータ群単位
で判定する判定手段と、 前記判定手段が正常でないと判定したワードデータ群が
存在していた場合に、前記受信手段の受信状態に応じ
て、該ワードデータ群、或いは他のワードデータ群を変
更する変更手段と、 を具備したことを特徴とするデータ受信装置。4. An apparatus for receiving data of a processing unit transferred from an external device connected via a predetermined communication means, requesting means for requesting the external device to transfer the data, Receiving means for receiving data transferred from the external device, and classifying word data constituting the data into a plurality of word data groups based on processing contents, and determining whether the receiving means has normally received data. Determination means for determining whether or not the word data group unit, if there is a word data group determined that the determination means is not normal, according to the receiving state of the receiving means, the word data group, or A data receiving device, comprising: changing means for changing another word data group.
ードデータ群の再転送を要求するか否か決定する決定手
段と、 前記ワードデータ群の再転送を要求すると前記決定手段
が決定した場合に、該ワードデータ群の再転送を前記外
部装置に要求する再転送要求手段と、を更に具備し、 前記変更手段は、前記ワードデータ群の再転送を要求し
ないと前記決定手段が決定した場合に、該ワードデータ
群、或いは他のワードデータ群を変更する、 ことを特徴とする請求項4記載のデータ受信装置。5. A decision means for deciding whether or not to request retransfer of a word data group determined to be abnormal by the decision means, and Re-transfer requesting means for requesting the external device to re-transfer the word data group, wherein the change means determines that the re-transfer of the word data group is not required. 5. The data receiving apparatus according to claim 4, wherein said word data group or another word data group is changed.
タ受信装置にデータを送信する装置であって、 前記データ受信装置からのデータの転送要求、及び前記
ワードデータ群の再転送要求を受信する受信手段と、 前記受信手段が受信した要求の内容に応じて、前記デー
タ、或いは前記ワードデータ群を前記データ受信装置に
送信する送信手段と、 を具備したことを特徴とするデータ送信装置。6. An apparatus for transmitting data to the data receiving apparatus according to claim 2, 3, 4, or 5, wherein a data transfer request from the data receiving apparatus and a retransfer request for the word data group. And a transmitting means for transmitting the data or the word data group to the data receiving apparatus in accordance with the content of the request received by the receiving means. apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP35912196A JP3658661B2 (en) | 1996-12-28 | 1996-12-28 | Data receiving apparatus and data transmitting apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP35912196A JP3658661B2 (en) | 1996-12-28 | 1996-12-28 | Data receiving apparatus and data transmitting apparatus |
Publications (3)
Publication Number | Publication Date |
---|---|
JPH10190636A true JPH10190636A (en) | 1998-07-21 |
JP3658661B2 JP3658661B2 (en) | 2005-06-08 |
JPH10190636A5 JPH10190636A5 (en) | 2005-08-18 |
Family
ID=18462850
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP35912196A Expired - Fee Related JP3658661B2 (en) | 1996-12-28 | 1996-12-28 | Data receiving apparatus and data transmitting apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3658661B2 (en) |
-
1996
- 1996-12-28 JP JP35912196A patent/JP3658661B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP3658661B2 (en) | 2005-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6974901B2 (en) | Kernal-mode audio processing modules | |
US6140566A (en) | Music tone generating method by waveform synthesis with advance parameter computation | |
US7279628B2 (en) | Editing apparatus of setting information for electronic music apparatuses | |
US8373055B2 (en) | Apparatus, method and computer program for switching musical tone output | |
JPH05188947A (en) | Performance information interface | |
JP3372124B2 (en) | Electronic musical instrument | |
US6762358B2 (en) | Waveform reproduction apparatus | |
US6274799B1 (en) | Method of mapping waveforms to timbres in generation of musical forms | |
JP2001013961A (en) | Data transmitter, data receiver, and computer readable recording medium stored with program applied to each device | |
US7129406B2 (en) | Automatic performance apparatus | |
JPH06259065A (en) | Electronic musical instrument | |
JP3658661B2 (en) | Data receiving apparatus and data transmitting apparatus | |
US5380949A (en) | Key assigner for an electronic musical instrument having multiple tone channels and priority level value data | |
JPH06259064A (en) | Electronic musical instrument | |
JP3405181B2 (en) | Musical tone generation method | |
JP3671666B2 (en) | Music information reception processing method, music information reception processing device, and storage medium | |
JP3141789B2 (en) | Sound source system using computer software | |
JP2819548B2 (en) | Electronic musical instrument control information transmission device | |
JP3411384B2 (en) | Electronic musical instrument | |
JP3197620B2 (en) | Performance information communication device | |
JP2709965B2 (en) | Music transmission / reproduction system used for BGM reproduction | |
JP3410134B2 (en) | Electronic musical instrument | |
JP3687317B2 (en) | Music generator | |
JPH0199089A (en) | Electronic musical instrument with key split function | |
JPS62166394A (en) | Electronic musical apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040805 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050201 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20050215 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050228 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090325 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |