Fóruns: MIDITrail 掲示板 (Thread #42411)

テンポチェンジイベントについて (2020-05-26 13:59 by pm #85063)

midiファイルにテンポチェンジがあると

Invalid data found.
FUNC: SMIDILib::SMFileReader::_ReadEvent
LINE: 467
INFO: 00000000 00000000

というエラーが発生します。

テンポチェンジのあるmidiファイルの再生はできないのでしょうか?
もし、やり方があれば、どうぞよろしくお願いします。

Windows 10, Midi Trail 1.3.1 64 bit

Responder a #85063×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: テンポチェンジイベントについて (2020-05-27 00:28 by yknk #85067)

MIDIファイル読み取り中に、不正なイベントデータが見つかったため、エラーが発生しています。
差し支えなければ、問題の発生するMIDIファイルを教えてください。
なおMIDITrailは、テンポ設定(FF 51 03 tt tt tt)の読み取りに対応しています。

Responder a #85063

Responder a #85067×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: テンポチェンジイベントについて (2020-05-27 16:12 by pm #85069)

お返事ありがとうございます。

問題のmidiファイルはRetro Music Editorというシーケンサーソフトから出力したデータです。
これまでテンポチェンジがなければ、正常に読み込めました。

以前のバグ修正(https://ja.osdn.net/projects/miditrail/ticket/22652)を参考に、
一旦dominoで読み込んで、書き出しし直したところ、
無事にMidiTrailでもテンポチェンジがありで再生できました。

さしあたり、Dominoで変換するという手順を入れて対応しようと思います。

一応、問題の発生したmidiデータはこちらで共有しました。
https://drive.google.com/open?id=1IiZfLit_blClcxR70CTUIQjOlkgvYcbR

ご参考になれば。
お手数をおかけいたしました。
Responder a #85067

Responder a #85069×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: テンポチェンジイベントについて (2020-05-27 23:09 by yknk #85071)

回答ありがとうございます。

共有していただいたMIDIデータを確認したところ、データの一部が(私の理解では)MIDI規格書に沿っていない部分がありました。
このデータが存在することが原因で、読み取りエラーが発生しています。

以下、技術的な解説になります。
デルタタイムと呼ばれるデータが、最大4byteであるべきところ、5byteになっている部分がありました。
現状のMIDITrailの実装では、最大4byteで区切って次のデータの読み取りに進むため、
データが1byteずれてしまうことになり、次のデータの読み取りでエラーが発生します。

Dominoは、5byteのデルタタイムを許容して読み込んでいるのではないかと思われます。
TMIDI Playerでこのファイルを読み込ませたところ、ハングしました。
Responder a #85069

Responder a #85071×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: テンポチェンジイベントについて (2020-05-28 10:05 by pm #85078)

5バイトのデルタタイムデータを正しく変換できればよい、ということですね。
元データをデータ変換して対応してみます。
ヒントをありがとうございます。
Responder a #85071

Responder a #85078×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login