Skip to content

Instantly share code, notes, and snippets.

@autch
Created February 28, 2018 06:26
Show Gist options
  • Save autch/9b929e9fc0dfdf6ffa373977169e7a73 to your computer and use it in GitHub Desktop.
Save autch/9b929e9fc0dfdf6ffa373977169e7a73 to your computer and use it in GitHub Desktop.
Ys I/II Complete のループ wav を KbMedia Player でループ再生させるためにタグ情報を生成する
ARGV.each do |filename|
File.open(filename, 'rb') do |f|
musname = File.basename(filename, '.POS') + '.m4a'
start, end_pos = f.read(8).unpack('VV')
printf("[%s]\n", musname)
printf("LOOPSTART=%d\n", start)
printf("LOOPLENGTH=%d\n", end_pos - start)
puts
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment