fver,2;plugin,turtle;plugin,mm;fconsole,False;obj,tones;assign;str,CDEFGAB;nl; for;obj,t;in;obj,tones;:;nl; tab;mm_tone;(;obj,t;sep;int,100;sep;true;);nl; #,Plays selected sound file;nl; obj,p;assign;filediag;str,Choose sound file;nl; obj,f;assign;mm_ef_s;obj,p;nl; def;obj,on_space;:;nl; tab;if;mm_ef_s_status;obj,f;:;nl; tab;tab;mm_ss;obj,f;nl; tab;else;:;nl; tab;tab;mm_ps;obj,f;nl; def;obj,seek_backward;:;nl; tab;mm_ef_s_seek;(;obj,f;sep;mmax;(;mm_ef_s_pos;obj,f;-;int,1;sep;int,0;););nl; def;obj,seek_forward;:;nl; tab;mm_ef_s_seek;(;obj,f;sep;mmin;(;mm_ef_s_pos;obj,f;+;int,1;sep;mm_ef_s_dur;obj,f;););nl; mm_ps;obj,f;nl; ht;speed;int,0;nl; pu;pos;(;int,0;sep;int,-10;);pd;nl; go;int,-250;wr;str,0;nl; go;int,500;nl; nl; obj,dt;assign;newt;#,Duration turtle;nl; obj,dt;.;ht;nl; obj,dt;.;pu;nl; obj,dt;.;speed;int,0;nl; obj,ht;assign;newt;#,Help turtle;nl; obj,ht;.;speed;int,0;obj,ht;.;pu;nl; obj,ht;.;pos;(;int,-250;sep;int,50;);nl; obj,ht;.;wr;str,SPACE - Play/Pause\; Arrow Left - Seek Backward\; Arrow Right - Seek Forward;nl; obj,ht;.;pos;(;int,-250;sep;int,60;);nl; obj,ht;.;wr;(;obj,p;);nl; obj,ht;.;ht;nl; obj,tt;assign;newt;#,Current time turtle;nl; obj,tt;.;speed;int,0;nl; obj,tt;.;pu;nl; obj,tt;.;ht;nl; obj,tt;.;wr;str,0;nl; nl; ds;str,classic;nl; st;nl; def;obj,update_ui;:;nl; tab;if;mm_ef_s_dur;obj,f;>;int,0;:;nl; tab;tab;pos;(;mm_ef_s_pos;obj,f;/;mm_ef_s_dur;obj,f;*;int,500;-;int,250;sep;int,-10;);nl; tab;tab;obj,tt;.;undo;nl; tab;tab;obj,tt;.;wr;(;rnd;(;mm_ef_s_pos;obj,f;);sep;obj,align;assign;str,center;);nl; tab;tab;if;(;obj,dt;.;xcor();==;int,0;);:;nl; tab;tab;tab;obj,dt;.;pos;(;int,250;sep;int,-10;);nl; tab;tab;tab;obj,dt;.;wr;(;rnd;(;mm_ef_s_dur;obj,f;););nl; tab;tmr;(;obj,update_ui;sep;int,100;);nl; obj,update_ui;(;);nl; ekey;(;obj,on_space;sep;key,space;);nl; ekey;(;obj,seek_backward;sep;key,Left;);nl; ekey;(;obj,seek_forward;sep;key,Right;);nl; nl;