diff --git a/gradint-build/Makefile b/gradint-build/Makefile
index 97690c1b6f844e9f6aa3607e9720ea77d0ac38eb..ee9f6f3f29e9b57c513a7e7578058e4952bf3c5b 100644
--- a/gradint-build/Makefile
+++ b/gradint-build/Makefile
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/booktime.py b/gradint-build/src/booktime.py
index bc5fabd42a657087ce4913bb18d2642d498b725b..6c74fa012af1791f76feb4d1a86a64e7d70d9af7 100644
--- a/gradint-build/src/booktime.py
+++ b/gradint-build/src/booktime.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/filescan.py b/gradint-build/src/filescan.py
index e65b76bbc85fce5c05146c5487695ed13e552d90..eaf1f0de7dcc920b1ef521f9613d88fdf2383989 100644
--- a/gradint-build/src/filescan.py
+++ b/gradint-build/src/filescan.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/frontend.py b/gradint-build/src/frontend.py
index 15b55e000f75e446a93ec003dda1ec6329a767f6..68a8d44c4e53c42055be60f81567e2fde680bef3 100644
--- a/gradint-build/src/frontend.py
+++ b/gradint-build/src/frontend.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/lessonplan.py b/gradint-build/src/lessonplan.py
index 57c60aa0d27b8cd8b4b902eb6cceccc7b4604262..9ddc2fef09f65a0d74f886004200640e4d3863d3 100644
--- a/gradint-build/src/lessonplan.py
+++ b/gradint-build/src/lessonplan.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/loop.py b/gradint-build/src/loop.py
index c82c9f8e6d47140aac3e270601c3e4a1d65b8ac9..f428e13da6529d8238ddc50e7de36b3002a8e2b0 100644
--- a/gradint-build/src/loop.py
+++ b/gradint-build/src/loop.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/makeevent.py b/gradint-build/src/makeevent.py
index b0a050dea3944f0570101a3c8d22df531b959db8..757a1dc1b3bdf9a120465a055743c1c3e6eb27a9 100644
--- a/gradint-build/src/makeevent.py
+++ b/gradint-build/src/makeevent.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/play.py b/gradint-build/src/play.py
index 78000d10b4f595bfa7cb5fc0aeb4ec66b1eab5ec..2ece0c6dc292442bbef08bf5119e33786cc45a45 100644
--- a/gradint-build/src/play.py
+++ b/gradint-build/src/play.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
@@ -131,11 +131,10 @@ if unix:
     else: sox_ignoreLen = "|sox --ignore-length -t wav - -t wav - 2>/dev/null"
     if soxMaj==14 and sf2[13]<'4': sox_8bit, sox_16bit = "-1", "-2" # see comment above
     else: sox_8bit, sox_16bit, sox_signed = "-b 8", "-b 16", "-e signed-integer" # TODO: check if 14.3 accepts these also (at least 14.4 complains -2 etc is deprecated)
-   if sf2.find("wav")>=0: return 1
-   else: return 0
-  gotSox = sox_check()
+   return sf2.find("wav")>=0, sf2.find("mp3")>=0
+  gotSox,soxMp3 = sox_check()
   if macsound:
-      if not gotSox and not os.system("mv sox-14.4.2 sox && rm sox.README"): gotSox = sox_check() # see if that one works instead (NB must use os.system here: our system() has not yet been defined)
+      if not gotSox and not os.system("mv sox-14.4.2 sox && rm sox.README"): gotSox,soxMp3 = sox_check() # see if that one works instead (NB must use os.system here: our system() has not yet been defined)
   if not gotSox and got_program("sox"):
       if macsound: xtra=". (If you're on 10.8 Mountain Lion, try downloading a more recent sox binary from sox.sourceforge.net and putting it inside Gradint.app, but that will break compatibility with older PowerPC Macs.)" # TODO: ship TWO binaries? but we don't want the default gradint to get too big. See sox.README for more notes.
       elif cygwin: xtra=""
@@ -328,7 +327,7 @@ class SampleEvent(Event):
             if wavPlayer.find("start")>=0: time.sleep(max(0,self.length-(time.time()-t))) # better do this - don't want events overtaking each other if there are delays.  exactLen not always enough.  (but do subtract the time already taken, in case command extensions have been disabled and "start" is synchronous.)
             os.chdir(oldDir)
         elif fileType=="mp3" and mp3Player and not sox_effect and not (wavPlayer=="aplay" and mp3Player==madplay_path): return system(mp3Player+' "'+self.file+'"')
-        elif wavPlayer=="sox":
+        elif wavPlayer=="sox" and (soxMp3 or not fileType=="mp3"):
             # To make it more difficult:
             # sox v12.x (c. 2001) - bug when filenames contain 2 spaces together, and needs input from re-direction in this case
             # sox 14.0 on Cygwin - bug when input is from redirection, unless using cat | ..
@@ -647,6 +646,7 @@ def warn_sox_decode():
         if r: show_warning('; '.join(r))
         warned_about_sox_decode = 1
 def decode_mp3(file): # Returns WAV data including header.  TODO: this assumes it's always small enough to read the whole thing into RAM (should be true if it's 1 word though, and decode_mp3 isn't usually used unless we're making a lesson file rather than running something in justSynthesize)
+    file = S(file)
     if riscos_sound:
         warn_sox_decode()
         os.system("sox -t mp3 \""+file+"\" -t wav"+cond(compress_SH," "+sox_8bit,"")+" tmp0")
@@ -670,11 +670,11 @@ def decode_mp3(file): # Returns WAV data including header.  TODO: this assumes i
         else: dat = open(tfil).read()
         os.unlink(tfil) ; return dat
     elif unix:
-        if gotSox:
+        if soxMp3:
             warn_sox_decode()
             return readB(os.popen("cat \""+file+"\" | sox -t mp3 - -t wav"+cond(compress_SH," "+sox_8bit,"")+" - ",popenRB))
         else:
-            show_warning("Don't know how to decode "+file+" on this system")
+            show_warning("Don't know how to decode "+file+" on this system.  Try installing madplay or mpg123.")
             return ""
     else: raise Exception("decode_mp3 called on a setup that's not Unix and doesn't have MADplay.  Need to implement non-cat sox redirect.")
 
diff --git a/gradint-build/src/recording.py b/gradint-build/src/recording.py
index 22d321b829b6d443b5106a2acd733f6cf157bfba..919a5b07eb4cc51ced5f8af43ac4af500a053ab3 100644
--- a/gradint-build/src/recording.py
+++ b/gradint-build/src/recording.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/sequence.py b/gradint-build/src/sequence.py
index a51c2f8b88afd15a3821400b2fb809f72a99cc91..cb3de147ee3cf83624f5dbc5978ccf286324fac2 100644
--- a/gradint-build/src/sequence.py
+++ b/gradint-build/src/sequence.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/synth.py b/gradint-build/src/synth.py
index cc7a0cd003f480ab7958fb9c5558419d6d1a1f77..7feb0f4e7c94891061d0eb8d94e8806414341097 100644
--- a/gradint-build/src/synth.py
+++ b/gradint-build/src/synth.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/system.py b/gradint-build/src/system.py
index 63667a4700b09f57c91ef1f619889f3bb266ca9a..700c9e30666439aecf3f727f51e83ca119f905a6 100644
--- a/gradint-build/src/system.py
+++ b/gradint-build/src/system.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/src/top.py b/gradint-build/src/top.py
index 2f83d3bb0a93e3862ca6371499cc59ad0f8fa286..2b9ae5f701fd24e34c09719b5e9c5fbcd00ce138 100644
--- a/gradint-build/src/top.py
+++ b/gradint-build/src/top.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 #   (Python 2 or Python 3, but more fully tested on 2)
 
-program_name = "gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+."
+program_name = "gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+."
 
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -31,20 +31,21 @@ if sys.version_info[0]>2:
     raw_input,unichr,xrange = input,chr,range
     def chr(x): return unichr(x).encode('latin1')
     from subprocess import getoutput
-    def readB(f,m=None): return f.buffer.read(m)
     popenRB,popenWB = "r","w"
-    def writeB(f,b): f.buffer.write(b)
     def unicode(b,enc): return b.decode(enc)
 else: # Python 2
     def sort(l,c): l.sort(c)
-    def readB(f,m=None):
-        if m: return f.read(m)
-        else: return f.read() # no "None" in Python 2
     popenRB,popenWB = "rb","wb"
-    def writeB(f,b): f.write(b)
     bytes = str
     try: from commands import getoutput
     except ImportError: pass
+def readB(f,m=None):
+    if hasattr(f,"buffer"): f=f.buffer # Python 3 non-"b" file
+    if m: return f.read(m)
+    else: return f.read() # no "None" in Python 2
+def writeB(f,b):
+    if hasattr(f,"buffer"): f=f.buffer # Python 3 non-"b" file
+    f.write(b)
 def B(x):
     if type(x)==bytes: return x
     try: return x.encode('utf-8')
diff --git a/gradint-build/src/users.py b/gradint-build/src/users.py
index e8550221d5d227ff9aa63cb24d19aa7c1113c40e..b632d78424b61e1cb9ad8e58c629161049360d40 100644
--- a/gradint-build/src/users.py
+++ b/gradint-build/src/users.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or
diff --git a/gradint-build/thindown.py b/gradint-build/thindown.py
index 6054ebdcb8e571a79146769a3fd316cdd6400a41..572db8746c997886e7d3c35d896592115478de53 100644
--- a/gradint-build/thindown.py
+++ b/gradint-build/thindown.py
@@ -1,5 +1,5 @@
 # This file is part of the source code of
-# gradint v3.01 (c) 2002-20 Silas S. Brown. GPL v3+.
+# gradint v3.02 (c) 2002-20 Silas S. Brown. GPL v3+.
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 3 of the License, or