A more efficient and slightly less "backusbot" port of the BassBOT code