1
0
Fork 0

Alternate soundfont for midify command

akairo
loicbersier 5 years ago
parent e8de270df1
commit 462538d3e1

@ -0,0 +1 @@
# You Will need to edit the config files to includes absolute path

@ -0,0 +1 @@
soundfont /restricted/hahayes/hahaTest/asset/timidity/sf/MCNBS_3_3_4.sf2

@ -0,0 +1 @@
soundfont /restricted/hahayes/hahaTest/asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2

Binary file not shown.

@ -0,0 +1,6 @@
# Credits
MCNBS_3_3_4.sf2 - (Creative Commons Attribution 4.0 International)[https://creativecommons.org/licenses/by/4.0/deed.en] Author: Stuff by David
E3Kay's Epic Soundfont - (Creative Commons Attribution 3.0 Unported)[http://creativecommons.org/licenses/by-3/4.0/deed.en] Author: E3Kay

@ -18,11 +18,22 @@ class midifyCommand extends Command {
{
id: 'link',
type: 'string',
match: 'rest'
},
{
id: 'raw',
type: 'flag',
flag: '--raw'
match: 'flag',
flag: ['--raw']
},
{
id: 'noteblock',
match: 'flag',
flag: ['--noteblock']
},
{
id: 'voice',
match: 'flag',
flag: ['--voice']
}
],
description: {
@ -102,8 +113,16 @@ class midifyCommand extends Command {
});
}
let option;
if (args.noteblock) {
option = '-c ./asset/timidity/config/noteblock.cfg';
} else if (args.voice) {
option = '-c ./asset/timidity/config/voice.cfg';
}
// midi to mp3 so we can listen from discord
exec(`timidity ${output} -Ow -o - | ffmpeg -i - -acodec libmp3lame -ab 64k ${output2}`)
exec(`timidity ${output} ${option} -Ow -o - | ffmpeg -i - -acodec libmp3lame -ab 64k ${output2}`)
.then(() => {
loadingmsg.delete();
return message.channel.send({files: [output2]})

Loading…
Cancel
Save