{"id":316024,"date":"2021-01-06T15:00:36","date_gmt":"2021-01-06T15:00:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=316024"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=316024","title":{"rendered":"\u0421\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440 \u043c\u0435\u043b\u043e\u0434\u0438\u0439 Nokia Composer \u0432 512 \u0431\u0430\u0439\u0442\u0430\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<blockquote><p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0441\u0442\u0430\u043b\u044c\u0433\u0438\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043d\u043e\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u2014 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c Nokia Composer \u0438 \u0441\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u043b\u043e\u0434\u0438\u044e.<\/p><\/blockquote>\n<p>  \u041a\u0442\u043e-\u0442\u043e \u0438\u0437 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0441\u0442\u0430\u0440\u0435\u043d\u044c\u043a\u0438\u043c Nokia, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 3310 \u0438\u043b\u0438 3210? \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0440\u0438\u043d\u0433\u0442\u043e\u043d\u044b \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430. \u0420\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0442\u044b \u0438 \u043f\u0430\u0443\u0437\u044b \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0443\u044e \u043c\u0435\u043b\u043e\u0434\u0438\u044e \u0438\u0437 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438! \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0442\u0443 \u044d\u043f\u043e\u0445\u0443, \u0432\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e:<br \/>  <a name=\"habracut\"><\/a><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jc\/zn\/cy\/jczncy_ao_oql11zeultizculoe.png\"><\/p>\n<p>  \u041d\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0438\u043b\u043e? \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043c\u043d\u0435, \u0442\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0440\u0443\u0442\u044b\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0443\u0432\u043b\u0435\u043a\u0430\u043b\u0441\u044f \u043c\u0443\u0437\u044b\u043a\u043e\u0439.<\/p>\n<p>  \u041c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f (\u043d\u043e\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c) \u0438 \u0444\u043e\u0440\u043c\u0430\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 Nokia Composer, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043a\u0430\u043a RTTTL (Ring Tone Text Transfer Language). RTTL \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f\u043c\u0438 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u043d\u043e\u0444\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u043b\u043e\u0434\u0438\u0439 \u043d\u0430 Arduino \u0438 \u0434\u0440.<\/p>\n<p>  RTTTL \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0443\u0437\u044b\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u0430, \u043d\u043e\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0433\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u0435\u0437 \u0430\u043a\u043a\u043e\u0440\u0434\u043e\u0432 \u0438 \u043f\u043e\u043b\u0438\u0444\u043e\u043d\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0443\u0431\u043e\u0439\u043d\u043e\u0439 \u0444\u0438\u0447\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0447\u0438\u0442\u0430\u0442\u044c, \u043b\u0435\u0433\u043a\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c RTTTL-\u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 JavaScript, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434-\u0433\u043e\u043b\u044c\u0444\u0438\u043d\u0433\u0430 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u0435\u043c\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0434 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u0440\u043e\u0447\u0435.<\/p>\n<h3>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 RTTTL<\/h3>\n<p>  \u0414\u043b\u044f RTTTL \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0430. RTTL-\u0444\u043e\u0440\u043c\u0430\u0442 \u2014 \u0441\u0442\u0440\u043e\u043a\u0430, \u200b\u200b\u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u0442\u0440\u0435\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u043b\u043e\u0434\u0438\u0438, \u0435\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0442\u0435\u043c\u043f (BPM \u2014 beats per minute, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0435\u0439 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443), \u043e\u043a\u0442\u0430\u0432\u0430 \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0430\u043c \u043a\u043e\u0434 \u043c\u0435\u043b\u043e\u0434\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e Nokia Composer, \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u043b\u043e\u0434\u0438\u0438 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043c\u043f BPM \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u043b\u043e\u0434\u0438\u0438 \u0438 \u0435\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0437\u0430 \u0440\u0430\u043c\u043a\u0430\u043c\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u041c\u0435\u043b\u043e\u0434\u0438\u044f \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0442 \/ \u043f\u0430\u0443\u0437, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (2 \/ 4 \/ 8 \/ 16 \/ 32 \/ 64), \u0432\u044b\u0441\u043e\u0442\u044b (c \/ d \/ e \/ f \/ g \/ a \/ b), \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u043a\u0430 \u00ab\u0434\u0438\u0435\u0437\u00bb (#) \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u043a\u0442\u0430\u0432 (\u043e\u0442 1 \u0434\u043e 3, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0438 \u043e\u043a\u0442\u0430\u0432\u044b).<\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/xkcd.com\/208\/\">\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/a>. \u041d\u043e\u0432\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <b>matchAll<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<pre><code class=\"bash\">const play = s =&gt; {   for (m of s.matchAll(\/(\\d*)?(\\.?)(#?)([a-g-])(\\d*)\/g)) {     \/\/ m[1] is optional note duration     \/\/ m[2] is optional dot in note duration     \/\/ m[3] is optional sharp sign, yes, it goes before the note     \/\/ m[4] is note itself     \/\/ m[5] is optional octave number   } };<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0442\u0435 \u2014 \u043a\u0430\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0432 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0437\u0432\u0443\u043a\u043e\u0432\u044b\u0445 \u0432\u043e\u043b\u043d. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c HashMap \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u043c\u0438 \u0431\u0443\u043a\u0432, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0445 \u043d\u043e\u0442\u044b. \u041d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u0438 \u0431\u0443\u043a\u0432\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u0445 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0443\u043a\u0432\u044b-\u043d\u043e\u0442\u044b \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043a\u043e\u0434 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 (\u043a\u043e\u0434 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/ASCII\">ASCII<\/a>). \u0414\u043b\u044f \u00abA\u00bb \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 0x41, \u0430 \u0434\u043b\u044f \u00aba\u00bb \u2014 0x61. \u0414\u043b\u044f \u00abB \/ b\u00bb \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 0x42 \/ 0x62, \u0434\u043b\u044f \u00abC \/ c\u00bb \u2014 0x43 \/ 0x63 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435:<\/p>\n<pre><code class=\"bash\">\/\/ 'k' is an ASCII code of the note: \/\/ A..G = 0x41..0x47 \/\/ a..g = 0x61..0x67 let k = m[4].charCodeAt();<\/code><\/pre>\n<p>  \u041d\u0430\u043c, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u0431\u0438\u0442\u044b, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <b>k&amp;7<\/b> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u043e\u0442\u044b (a=1, c=2,\u2026, g=7). \u0410 \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435? \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u0442\u0430\u043f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u043c\u0443\u0437\u044b\u043a\u0438. \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435\u0433\u043e 7 \u043d\u043e\u0442, \u0442\u043e \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0445 \u043a\u0430\u043a \u0432\u0441\u0435 12. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0434\u0438\u0435\u0437 \/ \u0431\u0435\u043c\u043e\u043b\u044c \u043d\u043e\u0442\u044b \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043d\u043e\u0442\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">         A#        C#    D#       F#    G#    A#         &lt;- black keys       A     B | C     D     E  F     G     A     B | C   &lt;- white keys       --------+------------------------------------+--- k&amp;7:  1     2 | 3     4     5  6     7     1     2 | 3       --------+------------------------------------+--- note: 9 10 11 | 0  1  2  3  4  5  6  7  8  9 10 11 | 0<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u043e\u0442\u044b \u0432 \u043e\u043a\u0442\u0430\u0432\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043a\u043e\u0434 \u043d\u043e\u0442\u044b (k&amp;7). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e: \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 E \u0438 F \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 B \u0438 C \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 1 \u043f\u043e\u043b\u0443\u0442\u043e\u043d, \u0430 \u043d\u0435 2, \u043a\u0430\u043a \u043c\u0435\u0436\u0434\u0443 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u043e\u0442\u0430\u043c\u0438.<\/p>\n<p>  \u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c (k&amp;7) \u043d\u0430 12\/7 (12 \u043f\u043e\u043b\u0443\u0442\u043e\u043d\u043e\u0432 \u0438 7 \u043d\u043e\u0442):<\/p>\n<pre><code class=\"bash\">note:          a     b     c     d     e      f     g (k&amp;7)*12\/7: 1.71  3.42  5.14  6.85  8.57  10.28  12.0<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u0431\u0435\u0437 \u0446\u0438\u0444\u0440 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b, \u043a\u0430\u043a \u043c\u044b \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u0438:<\/p>\n<pre><code class=\"bash\">note:                 a     b     c     d     e      f     g (k&amp;7)*12\/7:        1.71  3.42  5.14  6.85  8.57  10.28  12.0 floor((k&amp;7)*12\/7):    1     3     5     6     8     10    12                                   -------<\/code><\/pre>\n<p>  \u041d\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c\u2026 \u00ab\u041f\u043e\u043b\u0443\u0442\u043e\u043d\u043e\u0432\u043e\u0435\u00bb \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043c\u0435\u0436\u0434\u0443 B \/ C \u0438 E \/ F, \u0430 \u043d\u0435 \u043c\u0435\u0436\u0434\u0443 C \/ D. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b (\u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u043e\u043b\u0443\u0442\u043e\u043d\u044b):<\/p>\n<pre><code class=\"bash\">note:              a     b     c     d     e      f     g floor((k&amp;7)*1.8):  1     3     5     7     9     10    12                                            --------  floor((k&amp;7)*1.7):  1     3     5     6     8     10    11                                -------           --------  floor((k&amp;7)*1.6):  1     3     4     6     8      9    11                          -------           --------  floor((k&amp;7)*1.5):  1     3     4     6     7      9    10                          -------     -------      -------<\/code><\/pre>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1.8 \u0438 1.5 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442: \u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u0443\u0442\u043e\u043d, \u0430 \u0443 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u2014 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e. \u0414\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445, 1.6 \u0438 1.7, \u043f\u043e\u0445\u043e\u0436\u0435, \u043d\u0430\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442: 1.7 \u0434\u0430\u0435\u0442 \u043c\u0430\u0436\u043e\u0440\u043d\u0443\u044e \u0433\u0430\u043c\u043c\u0443 G-A-BC-D-EF, \u0430 1.6 \u0434\u0430\u0435\u0442 \u043c\u0430\u0436\u043e\u0440\u043d\u0443\u044e \u0433\u0430\u043c\u043c\u0443 A-B-CD-E-F-G. \u041a\u0430\u043a \u0440\u0430\u0437 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e!<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b C \u0431\u044b\u043b\u043e \u0440\u0430\u0432\u043d\u043e 0, D \u0431\u044b\u043b\u043e 2, E \u0431\u044b\u043b\u043e 4, F \u0431\u044b\u043b\u043e 5 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 4 \u043f\u043e\u043b\u0443\u0442\u043e\u043d\u0430, \u043d\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 4 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u043e\u0442\u0443 A \u043d\u0438\u0436\u0435 \u043d\u043e\u0442\u044b C, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c 8 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 12, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043e\u043a\u0442\u0430\u0432\u0443:<\/p>\n<pre><code class=\"bash\">let n = (((k&amp;7) * 1.6) + 8) % 12; \/\/ A  B C D E F G A  B C ... \/\/ 9 11 0 2 4 5 7 9 11 0 ...<\/code><\/pre>\n<p>  \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u043a \u00ab\u0434\u0438\u0435\u0437\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u043e\u0432\u0438\u0442\u0441\u044f \u0433\u0440\u0443\u043f\u043f\u043e\u0439 m[3] \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043e\u043d \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0442\u044b \u043d\u0430 1 \u043f\u043e\u043b\u0443\u0442\u043e\u043d:<\/p>\n<pre><code class=\"bash\">\/\/ we use !!m[3], if m[3] is '#' - that would evaluate to `true` \/\/ and gets converted to `1` because of the `+` sign. \/\/ If m[3] is undefined - it turns into `false` and, thus, into `0`: let n = (((k&amp;7) * 1.6) + 8)%12 + !!m[3]; <\/code><\/pre>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u043e\u043a\u0442\u0430\u0432\u0443. \u041e\u043a\u0442\u0430\u0432\u044b \u0443\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0447\u0438\u0441\u0435\u043b \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 m[5]. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u043c\u0443\u0437\u044b\u043a\u0438, \u043a\u0430\u0436\u0434\u0430\u044f \u043e\u043a\u0442\u0430\u0432\u0430 \u2014 \u044d\u0442\u043e 12 \u0441\u0435\u043c\u0438\u043d\u043e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043e\u043a\u0442\u0430\u0432\u044b \u043d\u0430 12 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043d\u043e\u0442\u044b:<\/p>\n<pre><code class=\"bash\">\/\/ n is a note index 0..35 where 0 is C of the lowest octave, \/\/ 12 is C of the middle octave and 35 is B of the highest octave. let n =   (((k&amp;7) * 1.6) + 8)%12 + \/\/ note index 0..11   !!m[3] +                 \/\/ semitote 0\/1   m[5] * 12;               \/\/ octave number<\/code><\/pre>\n<p>  <\/p>\n<h3>Clamping<\/h3>\n<p>  \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0443\u043a\u0430\u0436\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043a\u0442\u0430\u0432 \u043a\u0430\u043a 10 \u0438\u043b\u0438 1000? \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0443\u043b\u044c\u0442\u0440\u0430\u0437\u0432\u0443\u043a\u0443! \u041d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00abclamping\u00bb. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c JS \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <b>Math.clamp(x, low, high)<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u043a\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432. \u0421\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"bash\">clamp = (x, a, b) =&gt; Math.max(Math.min(x, b), a);<\/code><\/pre>\n<p>  \u041d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043d\u043e\u0432\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043a\u043e\u043b\u0435\u0441\u043e \u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <b>x=0<\/b>, \u0447\u0442\u043e\u0431\u044b clamping \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u0441 <b>undefined<\/b>-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"bash\">clamp = (x=0, a, b) =&gt; (x &lt; a &amp;&amp; (x = a), x &gt; b ? b : x);  clamp(0, 1, 3) \/\/ =&gt; 1 clamp(2, 1, 3) \/\/ =&gt; 2 clamp(8, 1, 3) \/\/ =&gt; 3 clamp(undefined, 1, 3) \/\/ =&gt; 1<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0422\u0435\u043c\u043f \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0442\u044b<\/h3>\n<p>  \u041c\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e BPM \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <b>out play()<\/b>. \u041d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"bash\">bpm = clamp(bpm, 40, 400);<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u0446\u0435\u043b\u0430\u044f \/ \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u043d\u0430\u044f \/ \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043d\u0430\u044f \/\u2026), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f m[1]. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443:<\/p>\n<pre><code class=\"bash\">note_duration = m[1]; \/\/ can be 1,2,4,8,16,32,64 \/\/ since BPM is &quot;beats per minute&quot;, or usually &quot;quarter note beats per minute&quot;, \/\/ BPM\/4 would be &quot;whole notes per minute&quot; and BPM\/60\/4 would be &quot;whole \/\/ notes per second&quot;: whole_notes_per_second = bpm \/ 240; duration = 1 \/ (whole_notes_per_second * note_duration);<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u044d\u0442\u0438 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0432 \u043e\u0434\u043d\u0443 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u0442\u044b, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<pre><code class=\"bash\">\/\/ Assuming that default note duration is 4: duration = 240 \/ bpm \/ clamp(m[1] || 4, 1, 64);<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u043e\u0442 \u0441 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043d\u043e\u0442\u044b \u043d\u0430 50%. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0430 m[2], \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043a\u0430 <b>.<\/b> \u0438\u043b\u0438 <b>undefined<\/b>. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0434\u043b\u044f \u0437\u043d\u0430\u043a\u0430 \u00ab\u0434\u0438\u0435\u0437\u00bb, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\">\/\/ !!m[2] would be 1 if it's a dot, 0 otherwise \/\/ 1+!![m2]\/2 would be 1 for normal notes and 1.5 for dotted notes duration = 240 \/ bpm \/ clamp(m[1] || 4, 1, 64) * (1+!!m[2]\/2);<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0442\u044b. \u041f\u043e\u0440\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Audio_API\">API WebAudio<\/a>, \u0447\u0442\u043e\u0431\u044b \u0441\u044b\u0433\u0440\u0430\u0442\u044c \u043c\u0435\u043b\u043e\u0434\u0438\u044e.<\/p>\n<h3>WEBAUDIO<\/h3>\n<p>  \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e 3 \u0447\u0430\u0441\u0442\u0438 \u0438\u0437 \u0432\u0441\u0435\u0433\u043e <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Audio_API\">API WebAudio<\/a>: \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u043e\u0441\u0446\u0438\u043b\u043b\u044f\u0442\u043e\u0440 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0432\u043e\u043b\u043d\u044b \u0438 <b>gain-\u043d\u043e\u0434\u0430<\/b> \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \/ \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u043e\u0441\u0446\u0438\u043b\u043b\u044f\u0442\u043e\u0440, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043b\u043e\u0434\u0438\u044f \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0430 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0443\u0436\u0430\u0441\u043d\u044b\u0439 \u0437\u0432\u043e\u043d\u043e\u043a \u0441\u0442\u0430\u0440\u044b\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432:<\/p>\n<pre><code class=\"bash\">\/\/ Osc -&gt; Gain -&gt; AudioContext let audio = new (AudioContext() || webkitAudioContext); let gain = audio.createGain(); let osc = audio.createOscillator(); osc.type = 'square'; osc.connect(gain); gain.connect(audio.destination); osc.start();<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0435\u0449\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043c\u0443\u0437\u044b\u043a\u0443, \u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u043b\u0438 \u043d\u0430\u0448\u0443 RTTTL-\u043c\u0435\u043b\u043e\u0434\u0438\u044e, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c WebAudio, \u043a\u0430\u043a\u0443\u044e \u043d\u043e\u0442\u0443 \u0438\u0433\u0440\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430, \u0441 \u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0438 \u043a\u0430\u043a \u0434\u043e\u043b\u0433\u043e.<\/p>\n<p>  \u0412\u0441\u0435 \u043d\u043e\u0434\u044b WebAudio \u0438\u043c\u0435\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <b>setValueAtTime<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0438\u043b\u0438 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u0430).<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0440\u0430\u043d\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b \u043a\u043e\u0434 ASCII \u0434\u043b\u044f \u043d\u043e\u0442\u044b, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u043a k, \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u043e\u0442\u044b \u043a\u0430\u043a n, \u0438 \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u0430 <b>duration<\/b> (\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c) \u043d\u043e\u0442\u044b \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0442\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">t = 0; \/\/ current time counter, in seconds for (m of ......) {   \/\/ ....we parse notes here...    \/\/ Note frequency is calculated as (F*2^(n\/12)),   \/\/ Where n is note index, and F is the frequency of n=0   \/\/ We can use C2=65.41, or C3=130.81. C2 is a bit shorter.   osc.frequency.setValueAtTime(65.4 * 2 ** (n \/ 12), t);   \/\/ Turn on gain to 100%. Besides notes [a-g], `k` can also be a `-`,   \/\/ which is a rest sign. `-` is 0x2d in ASCII. So, unlike other note letters,   \/\/ (k&amp;8) would be 0 for notes and 8 for rest. If we invert `k`, then   \/\/ (~k&amp;8) would be 8 for notes and 0 for rest. Shifing it by 3 would be   \/\/ ((~k&amp;8)&gt;&gt;3) = 1 for notes and 0 for rests.   gain.gain.setValueAtTime((~k &amp; 8) &gt;&gt; 3, t);   \/\/ Increate the time marker by note duration   t = t + duration;   \/\/ Turn off the note   gain.gain.setValueAtTime(0, t); }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0432\u0441\u0451. \u041d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 play() \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u043c\u0435\u043b\u043e\u0434\u0438\u0438, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 RTTTL. \u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <b>v<\/b> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044f\u0440\u043b\u044b\u043a\u0430 \u0434\u043b\u044f <b>setValueAtTime<\/b> \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (C=\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, z=\u043e\u0441\u0446\u0438\u043b\u043b\u044f\u0442\u043e\u0440, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0437\u0432\u0443\u043a, g=\u0443\u0441\u0438\u043b\u0435\u043d\u0438\u0435, q=bpm, c=clamp):<\/p>\n<pre><code class=\"bash\">c = (x=0,a,b) =&gt; (x&lt;a&amp;&amp;(x=a),x&gt;b?b:x); \/\/ clamping function (a&lt;=x&lt;=b) play = (s, bpm) =&gt; {   C = new AudioContext;   (z = C.createOscillator()).connect(g = C.createGain()).connect(C.destination);   z.type = 'square';   z.start();   t = 0;   v = (x,v) =&gt; x.setValueAtTime(v, t); \/\/ setValueAtTime shorter alias   for (m of s.matchAll(\/(\\d*)?(\\.?)([a-g-])(#?)(\\d*)\/g)) {     k = m[4].charCodeAt(); \/\/ note ASCII [0x41..0x47] or [0x61..0x67]     n = 0|(((k&amp;7) * 1.6)+8)%12+!!m[3]+12*c(m[5],1,3); \/\/ note index [0..35]     v(z.frequency, 65.4 * 2 ** (n \/ 12));     v(g.gain, (~k &amp; 8) \/ 8);     t = t + 240 \/ bpm \/ (c(m[1] || 4, 1, 64))*(1+!!m[2]\/2);     v(g.gain, 0);   } };  \/\/ Usage: play('8c 8d 8e 8f 8g 8a 8b 8c2', 120);<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u043c\u0438\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <b>terser<\/b> \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 417 \u0431\u0430\u0439\u0442. \u042d\u0442\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 \u0432 512 \u0431\u0430\u0439\u0442. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0430\u043c \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b>stop()<\/b> \u0434\u043b\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">C=0; \/\/ initialize audio conteext C at the beginning with zero stop = _ =&gt; C &amp;&amp; C.close(C=0); \/\/ using `_` instead of `()` for zero-arg function saves us one byte :)<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0435\u0449\u0435 \u043e\u043a\u043e\u043b\u043e 445 \u0431\u0430\u0439\u0442. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 RTTTL \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0432\u044b\u0437\u0432\u0430\u0432 JS \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <b>play()<\/b> \u0438 <b>stop()<\/b>.<\/p>\n<h3>UI<\/h3>\n<p>  \u042f \u0434\u0443\u043c\u0430\u044e, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e UI \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0443\u0437\u044b\u043a\u0438 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c. \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044f \u0431\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u043a\u043e\u0434-\u0433\u043e\u043b\u044c\u0444\u0438\u043d\u0433\u0435. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0440\u043e\u0448\u0435\u0447\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f RTTTL-\u043c\u0435\u043b\u043e\u0434\u0438\u0439 \u0431\u0435\u0437 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0439\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0439 HTML \u0438 CSS \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043c\u0438\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u043a\u043e\u0434, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0447\u043d\u043e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e \u043d\u0430 <a href=\"https:\/\/github.com\/zserge\/nokia-composer\">github<\/a>. \u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043c\u043e-\u0432\u0435\u0440\u0441\u0438\u044e \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/zserge.com\/nokia-composer\/\">https:\/\/zserge.com\/nokia-composer\/<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_f\/ld\/jy\/_fldjywww7icqrdze81owljra0u.png\"><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u0443\u0437\u0430 \u043f\u043e\u043a\u0438\u043d\u0443\u043b\u0430 \u0432\u0430\u0441 \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0443\u0437\u044b\u043a\u0443 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0435\u0441\u0435\u043d \u0438 \u043d\u0430\u0441\u043b\u0430\u0434\u0438\u0442\u0435\u0441\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u043c \u0437\u0432\u0443\u043a\u043e\u043c:<\/p>\n<ul>\n<li><a href=\"http:\/\/zserge.com\/nokia-composer\/#eyJicG0iOiIxMjAiLCJzb25nIjoiMTZlMiAxNmQyIDgjZiA4I2cgMTYjYzIgMTZiIDhkIDhlIDE2YiAxNmEgOCNjIDhlIDJhIDItIn0=\">\u0440\u0438\u043d\u0433\u0442\u043e\u043d Nokia<\/a><\/li>\n<li><a href=\"http:\/\/zserge.com\/nokia-composer\/#eyJicG0iOiIxMjAiLCJzb25nIjoiMTZjMiAxNiNhIDhnIDhjMiA4ZiA4YzIgOCNhIDhjMiA4ZiA0Li0gOGcgOC0gOGcgOCNhIDE2LmMyIDMyLSAxNmMyIDE2I2EgOGcgOGMyIDhmIDhjMiA4I2EgOGMyIDhmIDQuLSA4ZyA4LSA4ZyA4I2EgMTYuYzIgMzItIDE2YzIgMTYjYSA4ZyA4YzIgOGYgOGMyIDgjYSA4YzIgOGYgNC4tIDhnIDgtIDhnIDgjYSAxNi5jMiAzMi0gMTZjMiAxNiNhIDhnIDhjMiA4ZiA4YzIgOCNhIDhjMiA4ZiJ9\">\u0440\u0438\u043d\u0433\u0442\u043e\u043d iPhone<\/a>, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0443\u0437\u044b\u043a\u0430<\/li>\n<li><a href=\"http:\/\/zserge.com\/nokia-composer\/#eyJicG0iOiIxMjAiLCJzb25nIjoiOGIyIDE2ZzIgMTZhMiA4YjIgOGQzIDhjMyA4YjIgOGEyIDhnMiA4YTIgMTZmMiAxNmEyIDhjMyA4ZjMgMTZkMyAxNmMzIDE2I2EyIDE2ZzIgOCNnMiA4ZzIgOCNnMiAxNmcyIDE2YTIgOGIyIDgjYzMgMTZiMiAxNmEyIDE2ZzIgMTZmMiA4ZTIgOGYyIDFhMiA0YTIifQ==\">Light My Fire<\/a><\/li>\n<li><a href=\"http:\/\/zserge.com\/nokia-composer\/#eyJicG0iOiIyNTAiLCJzb25nIjoiNGEyIDgtIDhkMSA0LSA4ZDEgNC0gOGQxIDQtIDhkMSA0LSA4ZDEgNC0gOGQxIDQtIDhkMSA0LSA0ZjIgOC0gOGQxIDQtIDhkMSA0LSA4ZDEgNC0gNGcyIDgtIDhkMSA0LSA0YzMgOCNhMiA0YTIgOGcyIDRhMiA4LSA4ZDEgNC0gOGQxIDQtIDhkMSA0LSA4ZDEgNC0gOGQxIDQtIDhkMSA0LSA4ZDEgNC0gNGYyIDgtIDhkMSA0LSA4ZDEgNC0gOGQxIDQtIDRnMiA4LSA4ZDEgNC0gNGMzIDgjYTIgNGEyIDhnMiA0YTIifQ==\">Lose Yourself<\/a><\/li>\n<li><a href=\"http:\/\/zserge.com\/nokia-composer\/#eyJicG0iOiI2MyIsInNvbmciOiIzMmMyIDMyZjIgMzJjMiAzMmYyIDRjMiA4I2cxIDgjYTEgNGYxIDgtXG4zMmMyIDMyZjIgMzJjMiAzMmYyIDRjMiA4I2cxIDgjYTEgNCNkMiA4LVxuMTZjMiAxNiNkMiA0ZjIgOCNnMiAxNmcyIDE2ZjIgNCNkMiA4LVxuMzJjMiAzMmYyIDMyYzIgMzJmMiA0YzIgOCNhMSA0ZjEifQ==\">The Good, The Bad, and The Ugly<\/a><\/li>\n<li><a href=\"http:\/\/zserge.com\/nokia-composer\/#eyJicG0iOiIxODAiLCJzb25nIjoiMTYjZjEgMTZlMSAxNiNkMSAxNmUxIDRnMSAxNmExIDE2ZzEgMTYjZjEgMTZnMSA0YjEgMTZjMiAxNmIxIDE2I2ExIDE2YjEgMTYjZjIgMTZlMiAxNiNkMiAxNmUyIDE2I2YyIDE2ZTIgMTYjZDIgMTZlMiA0ZzIgOGUyIDhnMiAzMmQyIDMyZTIgMTYjZjIgOGUyIDhkMiA4ZTIgMzJkMiAzMmUyIDE2I2YyIDhlMiA4ZDIgOGUyIDMyZDIgMzJlMiAxNiNmMiA4ZTIgOGQyIDgjYzIgNGIxIn0=\">Rondo Alla Turca (Mozart)<\/a><\/li>\n<\/ul>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0441\u043e\u0447\u0438\u043d\u0438\u043b\u0438, \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c URL-\u0430\u0434\u0440\u0435\u0441\u043e\u043c (\u0432\u0441\u044f \u043f\u0435\u0441\u043d\u044f \u0438 BPM \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0445\u0435\u0448-\u0447\u0430\u0441\u0442\u0438 URL-\u0430\u0434\u0440\u0435\u0441\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \/ \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0435\u0441\u043d\u044f\u043c\u0438 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u043a\u0430\u043a \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u043c\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/zserge\">Github<\/a>, \u0432 <a href=\"https:\/\/twitter.com\/zsergo\">Twitter<\/a> \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/zserge.com\/rss.xml\">rss<\/a>.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/timeweb\/blog\/536284\/\"> https:\/\/habr.com\/ru\/company\/timeweb\/blog\/536284\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<blockquote><p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0441\u0442\u0430\u043b\u044c\u0433\u0438\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043d\u043e\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u2014 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c Nokia Composer \u0438 \u0441\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u043b\u043e\u0434\u0438\u044e.<\/p><\/blockquote>\n<p>  \u041a\u0442\u043e-\u0442\u043e \u0438\u0437 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0441\u0442\u0430\u0440\u0435\u043d\u044c\u043a\u0438\u043c Nokia, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 3310 \u0438\u043b\u0438 3210? \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0440\u0438\u043d\u0433\u0442\u043e\u043d\u044b \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430. \u0420\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0442\u044b \u0438 \u043f\u0430\u0443\u0437\u044b \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0443\u044e \u043c\u0435\u043b\u043e\u0434\u0438\u044e \u0438\u0437 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438! \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0442\u0443 \u044d\u043f\u043e\u0445\u0443, \u0432\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e:  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-316024","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316024"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316024\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}