hello all,
in mingw-w64_x86_64 gcc , will not define _AMD64_ but WIN64 and __amd64__
so if timidity compile with mingw-w64 x86_x64, may need this patch,

diff --git a/timidity/sysdep.h b/timidity/sysdep.h
--- a/timidity/sysdep.h
+++ b/timidity/sysdep.h
@@ -148,7 +148,7 @@ typedef UInt64 uint64;
 #endif /* C99 */
 /*  pointer size is not long in   WIN64 */
-#if defined(WIN32)  && defined(_AMD64_)
+#if defined(WIN32)  && (defined(_AMD64_) || defined(WIN64) || defined(__amd64__))
 typedef long long  ptr_size_t;
 typedef unsigned long long  u_ptr_size_t;

if load a huge soundfont eg: http://sonimusicae.free.fr/matshelgesson-maestro-en.html (gig format,convert to sf2 with extreme Sample Converter  ), it may cause a Segmentation fault,
in playmidi.c:note_on_prescan and playmidi.c:note_on function:
int vlist[32] is not enough and cause overflow in select_play_sample()

My GPG public key : 0xB186FF6D