initial copy from ccrma/chugins