zoukankan      html  css  js  c++  java
  • 提取nds游戏的音乐

    nds游戏绝对是游戏界的瑰宝,尤其是有些游戏的音乐还很好听,所以想把它们提取出来。网上搜了下教程,这里整理一下,全程在archlinux下操作。

    首先用到的工具是(vgmtrans)[https://github.com/vgmtrans/vgmtrans)

    按照github上的wiki,首先要安装Qt5FluidSynth,然后编译:

    1. Run git clone https://github.com/vgmtrans/vgmtrans
    2. Navigate into the vgmtrans folder, then run git checkout qt-port
    3. Run mkdir build && cd build
    4. Run cmake ..
    5. Run make -j$(nproc)

    编译完成后执行./vgmtrans

    .nds文件拖到窗口。然后在下面的Detected collections窗口中选择一个音乐,工具栏可以点播放按钮试听,右键导出Save as MIDI and SoundFont 2。也可以在空白处右键导出所有文件。

    导出后的mid和音色文件可以用上面安装的FluidSynth组合成wav文件:

    fluidsynth -ni sound_font.sf2 input.mid -F output.wav -r 44100
    

    或者是这样批量操作

    #!/bin/bash
    
    find -name "*.mid"|while read line
    do
        input_name=$line
        bn=${line//.mid/}
        fluidsynth -ni ${bn}.sf2 ${bn}.mid -F ${bn}.wav -r 44100
        
    done
    

    为了方便分享,可以用lame转成mp3:

    find -name "*.wav"|cut -c 3-|while read line; do lame --preset insane $line; done
    
  • 相关阅读:
    SGU 275. To xor or not to xor
    4364: [IOI2014]wall砖墙
    3211: 花神游历各国
    5248: [2018多省省队联测]一双木棋
    3106: [cqoi2013]棋盘游戏
    POJ 1568 Find the Winning Move
    P3527 [POI2011]MET-Meteors
    P2617 Dynamic Rankings
    3262: 陌上花开
    1176: [Balkan2007]Mokia
  • 原文地址:https://www.cnblogs.com/fwindpeak/p/10304804.html
Copyright © 2011-2022 走看看