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
    
  • 相关阅读:
    常用linux命令
    console页面进去太慢优化
    CentOS7 查看最大线程连接数
    外部ssh连接Ubuntu系统
    Ubantu 防火墙管理
    oracle 闪回
    oracle用户密码过期
    base64编码原理
    Linux 备份数据库mysql
    python静态方法-类方法
  • 原文地址:https://www.cnblogs.com/fwindpeak/p/10304804.html
Copyright © 2011-2022 走看看