diff --git a/asset/timidity/config/README.md b/asset/timidity/config/README.md new file mode 100644 index 00000000..d66a5aec --- /dev/null +++ b/asset/timidity/config/README.md @@ -0,0 +1 @@ +# You Will need to edit the config files to includes absolute path \ No newline at end of file diff --git a/asset/timidity/config/noteblock.cfg b/asset/timidity/config/noteblock.cfg new file mode 100644 index 00000000..730312cf --- /dev/null +++ b/asset/timidity/config/noteblock.cfg @@ -0,0 +1 @@ +soundfont /restricted/hahayes/hahaTest/asset/timidity/sf/MCNBS_3_3_4.sf2 diff --git a/asset/timidity/config/voice.cfg b/asset/timidity/config/voice.cfg new file mode 100644 index 00000000..6eb34604 --- /dev/null +++ b/asset/timidity/config/voice.cfg @@ -0,0 +1 @@ +soundfont /restricted/hahayes/hahaTest/asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2 diff --git a/asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2 b/asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2 new file mode 100644 index 00000000..0a459f77 Binary files /dev/null and b/asset/timidity/sf/E3Kay_s_Epic_Soundfont.sf2 differ diff --git a/asset/timidity/sf/MCNBS_3_3_4.sf2 b/asset/timidity/sf/MCNBS_3_3_4.sf2 new file mode 100644 index 00000000..6d03a7fe Binary files /dev/null and b/asset/timidity/sf/MCNBS_3_3_4.sf2 differ diff --git a/asset/timidity/sf/README.md b/asset/timidity/sf/README.md new file mode 100644 index 00000000..de4688ad --- /dev/null +++ b/asset/timidity/sf/README.md @@ -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 diff --git a/commands/fun/midify.js b/commands/fun/midify.js index 8e0d8d06..548f5130 100644 --- a/commands/fun/midify.js +++ b/commands/fun/midify.js @@ -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]})