MIDI ファイルを取得して読み取り、そのデータを何らかのデータ構造に保存したいと考えています。このサイトを使用して、ファイルを読む簡単な方法を見つけました。これは魅力的です。
次に、その出力を取得して保存する方法を見つける必要があります。キーは一意である必要があり、Object 型の List はあまり適していないため、Hash Map は理想的ではないようです。私の最良の選択肢が何であるかについてのアイデア。私はそれをテキストまたはcsvに出力するかもしれないと思います...考え?
更新:私がすでに持っているものについてもう少し詳しく。
これが私が得ている出力です(System.out.printlnを介して):
@0 Channel: 1 Note on, E5 key=76 velocity: 127
@192 Channel: 1 Note off, E5 key=76 velocity: 64
@192 Channel: 1 Note on, D#5 key=75 velocity: 127
@384 Channel: 1 Note off, D#5 key=75 velocity: 64
@384 Channel: 1 Note on, E5 key=76 velocity: 127
あとは、この情報を保存する最適な方法を見つける必要があります。私はおそらく、「なぜ」これをやろうとしているのかについてもはっきりしているはずです。私は、このデータを取得し、Batik (私は何も知らない) を使用して画面に表示しようとしている別の開発者と協力しています。
すべての回答に感謝します...今夜、それぞれを詳しく見ていきます...