Alternate soundfont for midify command
This commit is contained in:
parent
e8de270df1
commit
462538d3e1
7 changed files with 31 additions and 3 deletions
1
asset/timidity/config/README.md
Normal file
1
asset/timidity/config/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
# You Will need to edit the config files to includes absolute path
|
1
asset/timidity/config/noteblock.cfg
Normal file
1
asset/timidity/config/noteblock.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
soundfont /restricted/hahayes/hahaTest/asset/timidity/sf/MCNBS_3_3_4.sf2
|
1
asset/timidity/config/voice.cfg
Normal file
1
asset/timidity/config/voice.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
soundfont /restricted/hahayes/hahaTest/asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2
|
BIN
asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2
Normal file
BIN
asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2
Normal file
Binary file not shown.
BIN
asset/timidity/sf/MCNBS_3_3_4.sf2
Normal file
BIN
asset/timidity/sf/MCNBS_3_3_4.sf2
Normal file
Binary file not shown.
6
asset/timidity/sf/README.md
Normal file
6
asset/timidity/sf/README.md
Normal file
|
@ -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…
Reference in a new issue