Created
April 23, 2015 13:52
-
-
Save sjktje/063592ec372c827631a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap <leader>ap :call Abc2midi()<CR> | |
function! Abc2midi() | |
let midi_file_name = shellescape(expand("%:p:r").'.mid') | |
let abc_file_name = shellescape(expand("%:p")) | |
let cmd = 'abc2midi '.abc_file_name.' -o ' . midi_file_name | |
silent call system(cmd) | |
let play_cmd = 'timidity '.midi_file_name | |
silent call system(play_cmd) | |
let rm_cmd = 'rm '.midi_file_name | |
silent call system(rm_cmd) | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment