{"id":279544,"date":"2016-05-04T13:05:03","date_gmt":"2016-05-04T09:05:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=279544"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=279544","title":{"rendered":"\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 WAV-\u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c PHP"},"content":{"rendered":"<p>       \u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0441\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u043c \u0430\u0443\u0434\u0438\u043e-\u0444\u0430\u0439\u043b\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u2014 wav. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c, \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u0431\u043b\u0430\u0433\u043e, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d wav-\u0444\u0430\u0439\u043b \u00ab\u0438\u0437\u043d\u0443\u0442\u0440\u0438\u00bb \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e. <\/p>\n<p>  <s>\u0418 \u0442\u0443\u0442 \u041e\u0441\u0442\u0430\u043f\u0430 \u043f\u043e\u043d\u0435\u0441\u043b\u043e<\/s> \u0418 \u0442\u0443\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u0441\u0432\u0435\u0442\u043b\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0444\u0430\u0439\u043b\u0435, \u043d\u043e \u0438 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb. \u0414\u0443\u043c\u0430\u044e, \u0432\u0441\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0432 \u0441\u0435\u0442\u0438 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u00ab\u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0438\u0430\u043d\u0438\u043d\u043e\u00bb \u0438 \u043f\u0440\u043e\u0447\u0435\u0435, \u0432\u0435\u0440\u043d\u043e? <\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430 2 \u0432\u0435\u0447\u0435\u0440\u0430 \u2014 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 WAV-\u0444\u0430\u0439\u043b\u0430, \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0432\u043e\u0433\u043e. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0435\u0440\u0435\u043c \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 wav-\u0444\u0430\u0439\u043b \u0431\u0435\u0437 \u0441\u0436\u0430\u0442\u0438\u044f.<\/p>\n<p>  \u041b\u044e\u0431\u043e\u0439 wav-\u0444\u0430\u0439\u043b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0435\u043a\u0446\u0438\u0439 (\u0447\u0430\u043d\u043a\u043e\u0432, chunks). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0441\u0435\u043a\u0446\u0438\u044f\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"http:\/\/microsin.net\/programming\/pc\/wav-format.html\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>, \u044f \u0436\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0442\u0440\u0451\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\u0441\u0435\u043a\u0446\u0438\u044f \u0442\u0438\u043f\u0430 \u2014 \u00abRIFF\u00bb<\/li>\n<li>\u0441\u0435\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u2014 \u00abfmt \u201e<\/li>\n<li>\u0441\u0435\u043a\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u201cdata\u00bb<\/li>\n<\/ul>\n<p>  \u0423 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0435\u0451 ID, \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u043a\u0446\u0438\u0438 \u0438, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0421\u0435\u043a\u0446\u0438\u044f RIFF \u043f\u0440\u043e\u0441\u0442\u0430 \u0434\u043e \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u044f: \u00abRIFF&lt;\u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u2014 8&gt;WAVE\u00bb<\/p>\n<p>  &lt;\u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u2014 8&gt; \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442 \u00ab\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0439\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0434\u0430\u043b\u0435\u0435\u00bb. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, 4 \u0431\u0430\u0439\u0442\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00ab\u0441\u043a\u043e\u043b\u044c\u043a\u043e\u00bb \u0438 \u0435\u0449\u0435 4 \u043d\u0430 \u00abRIFF\u00bb \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435.<\/p>\n<p>  \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0430\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0444\u0430\u0439\u043b\u0435: Sample Rate (\u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 44100 \u0413\u0446), \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043d\u0430\u043b\u043e\u0432 (1 = \u043c\u043e\u043d\u043e, 2 = \u0441\u0442\u0435\u0440\u0435\u043e \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435).<\/p>\n<p>  \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043b\u0435\u0436\u0430\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u0443\u0434\u0438\u043e-\u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u043e \u0441\u0443\u0442\u0438, \u043e\u043d\u0438 \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0443 \u0432\u043e\u043b\u043d\u044b \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0438 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0441\u0435\u043a\u0446\u0438\u044e \u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0430\u0440\u0441\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c wav-\u0444\u0430\u0439\u043b \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a (Header.php)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class Header {     ...     \/**      * @var string      *\/     protected $id;      \/**      * @var int      *\/     protected $size;      \/**      * @var string      *\/     protected $format;     ... <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0435\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 (FormatSection.php)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class FormatSection {     ...     \/**      * @var string      *\/     protected $id;      \/**      * @var int      *\/     protected $size;      \/**      * @var int      *\/     protected $audioFormat;      \/**      * @var int      *\/     protected $numberOfChannels;      \/**      * @var int      *\/     protected $sampleRate;      \/**      * @var int      *\/     protected $byteRate;      \/**      * @var int      *\/     protected $blockAlign;      \/**      * @var int      *\/     protected $bitsPerSample;          ... <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0435\u043a\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 (DataSection.php)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class DataSection {     ...     \/**      * @var string      *\/     protected $id;      \/**      * @var int      *\/     protected $size;      \/**      * @var int[]      *\/     protected $raw;      ... <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435 \u0443\u0431\u0440\u0430\u043d\u0430 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430, \u043d\u0430\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0430\u043c\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u043b\u044f \u0438\u0445 \u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043e\u0431\u0451\u0440\u0442\u043a\u0443-helper \u0434\u043b\u044f fread \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Helper.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class Helper {     ...     public static function readString($handle, $length)     {         return self::readUnpacked($handle, 'a*', $length);     }      public static function readLong($handle)     {         return self::readUnpacked($handle, 'V', 4);     }      public static function readWord($handle)     {         return self::readUnpacked($handle, 'v', 2);     }      protected function readUnpacked($handle, $type, $length)     {         $data = unpack($type, fread($handle, $length));          return array_pop($data);     }     ... } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c, \u0432\u0437\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 wav-\u0444\u0430\u0439\u043b\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 wav-\u0444\u0430\u0439\u043b\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class Parser {     ...     public static function fromFile($filename)     {         ...         $handle = fopen($filename, 'rb');          try {             $header         = Header::createFromArray(self::parseHeader($handle));             $formatSection  = FormatSection::createFromArray(self::parseFormatSection($handle));             $dataSection    = DataSection::createFromArray(self::parseDataSection($handle));         } finally {             fclose($handle);         }          return new AudioFile($header, $formatSection, $dataSection);     }      protected static function parseHeader($handle)     {         return [             'id'     =&gt; Helper::readString($handle, 4),             'size'   =&gt; Helper::readLong($handle),             'format' =&gt; Helper::readString($handle, 4),         ];     }      protected static function parseFormatSection($handle)     {         return [             'id'               =&gt; Helper::readString($handle, 4),             'size'             =&gt; Helper::readLong($handle),             'audioFormat'      =&gt; Helper::readWord($handle),             'numberOfChannels' =&gt; Helper::readWord($handle),             'sampleRate'       =&gt; Helper::readLong($handle),             'byteRate'         =&gt; Helper::readLong($handle),             'blockAlign'       =&gt; Helper::readWord($handle),             'bitsPerSample'    =&gt; Helper::readWord($handle),         ];     }      protected static function parseDataSection($handle)     {         $data = [             'id' =&gt; Helper::readString($handle, 4),             'size' =&gt; Helper::readLong($handle),         ];          if ($data['size'] &gt; 0) {             $data['raw'] = fread($handle, $data['size']);         }          return $data;     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b, \u043c\u044b \u0438\u0445 \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0447\u0435\u0433\u043e-\u0442\u043e \u0432 \u0434\u0443\u0445\u0435:<\/p>\n<pre><code class=\"php\">echo $audio-&gt;getSampleRate(); <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 wav-\u0444\u0430\u0439\u043b\u043e\u0432<\/h3>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u0435\u043d\u044f, \u043a\u0430\u043a \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043e\u043a\u043e\u043d\u0447\u0438\u0432\u0448\u0435\u0433\u043e \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0448\u043a\u043e\u043b\u0443 \u043a\u043e\u0433\u0434\u0430-\u0442\u043e, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u0435\u043b\u043e\u0434\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u043e\u0442. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u0435 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0440\u0430\u043c\u043e\u0442\u044b \u0438 \u0444\u0438\u0437\u0438\u043a\u0438 \u043d\u0430 \u043a\u043e\u0434.<\/p>\n<p>  \u0421\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0432 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u043e\u0442\u0443 \u0432 \u043a\u043e\u0434. \u041f\u043e \u0441\u0443\u0442\u0438, \u043b\u044e\u0431\u0430\u044f \u043d\u043e\u0442\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0437\u0432\u0443\u0447\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u043e\u0442\u0430 \u00ab\u043b\u044f\u00bb \u2014 \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0430 440 \u0413\u0446 (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043a\u0430\u043c\u0435\u0440\u0442\u043e\u043d\u0430 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432).<\/p>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0442\u0435 \u0435\u0451 \u0447\u0430\u0441\u0442\u043e\u0442\u0443. \u0412\u0441\u0435\u0433\u043e \u043d\u043e\u0442 (\u0442\u043e\u043d\u043e\u0432) \u0432 \u043e\u043a\u0442\u0430\u0432\u0435 7, \u0430 \u043f\u043e\u043b\u0443\u0442\u043e\u043d\u043e\u0432 \u2014 12. \u0418 \u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u0443\u0442\u043e\u043d\u043e\u0432 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u0444\u0430-\u0431\u0435\u043c\u043e\u043b\u044c\u00bb \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u00ab\u043c\u0438\u00bb. \u0418\u043b\u0438 \u00ab\u0441\u043e\u043b\u044c-\u0434\u0438\u0435\u0437\u00bb \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u00ab\u043b\u044f-\u0431\u0435\u043c\u043e\u043b\u044c\u00bb.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u044d\u0442\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0432 \u043a\u043e\u0434:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0447\u0430\u0441\u0442\u043e\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043d\u043e\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class Note {     const C = 261.63;     const C_SHARP = 277.18;     const D = 293.66;     const D_FLAT = self::C_SHARP;     const D_SHARP = 311.13;     const E = 329.63;     const E_FLAT = self::D_SHARP;     const E_SHARP = self::F;     const F = 346.23;     const F_FLAT = self::E;     const F_SHARP = 369.99;     const G = 392.00;     const G_FLAT = self::F_SHARP;     const G_SHARP = 415.30;     const A = 440.00;     const A_FLAT = self::G_SHARP;     const A_SHARP = 466.16;     const H = 493.88;     const H_FLAT = self::A_SHARP;      public static function get($note)     {         switch ($note) {             case 'C':                 return self::C;             case 'C#':                 return self::C_SHARP;             case 'D':                 return self::D;             case 'D#':                 return self::D_SHARP;             case 'E':                 return self::E;             case 'E#':                 return self::E_SHARP;             case 'F':                 return self::F;             case 'F#':                 return self::F_SHARP;             case 'G':                 return self::G;             case 'G#':                 return self::G_SHARP;             case 'A':                 return self::A;             case 'A#':                 return self::A_SHARP;             case 'B':                 return self::H_FLAT;             case 'H':                 return self::H;         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u043e\u0431\u0449\u0435, \u043c\u0443\u0437\u044b\u043a\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u0447\u043d\u0430\u044f \u043d\u0430\u0443\u043a\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044d\u0442\u043e, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u0432\u0443\u0447\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0444\u0438\u0437\u0438\u043a\u0430\u043c\u0438 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430\u043c\u0438, \u0447\u0442\u043e, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0437\u0432\u0443\u043a\u043e\u0432\u044b\u0445 \u0432\u043e\u043b\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"http:\/\/www.acoustics.salford.ac.uk\/acoustics_info\/sound_synthesis\/\">\u0437\u0434\u0435\u0441\u044c<\/a>. <\/p>\n<p>  \u041d\u0443 \u0430 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0435\u0449\u0435 \u0438 \u043b\u0435\u043d\u0438\u0432\u044b\u0439, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0435 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0441\u044f \u044f\u0440\u043e\u0441\u0442\u043d\u043e \u0433\u0443\u0433\u043b\u0438\u0442\u044c. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0437\u0432\u0443\u043a\u043e\u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0440\u043e\u0432\u043d\u044b\u043c \u0441\u0447\u0435\u0442\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e (\u043c\u043e\u0436\u0435\u0442, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u044f \u043f\u043b\u043e\u0445\u043e \u0438\u0441\u043a\u0430\u043b, \u043d\u043e \u043d\u0435 \u0441\u0443\u0442\u044c). \u041d\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0430\u0443\u0434\u0438\u043e-\u0441\u0438\u043d\u0442\u0435\u0437\u0430\u0442\u043e\u0440, \u043f\u0440\u0430\u0432\u0434\u0430, \u043d\u0430 JavaScript (<a href=\"https:\/\/github.com\/keithwhor\/audiosynth\">GitHub<\/a>). \u0412 \u0446\u0435\u043b\u043e\u043c, \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c JS-\u043a\u043e\u0434 \u0432 PHP, \u0447\u0435\u043c \u044f \u0438 \u0437\u0430\u043d\u044f\u043b\u0441\u044f.<\/p>\n<p>  \u041f\u043e \u0438\u0442\u043e\u0433\u0443, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c SampleBuilder, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u044d\u043c\u043f\u043b\u044b (\u043a\u0443\u0441\u043a\u0438 wav-\u0434\u0430\u043d\u043d\u044b\u0445) \u0437\u0430\u0434\u0430\u0432\u0430\u044f \u043d\u043e\u0442\u0443, \u043e\u043a\u0442\u0430\u0432\u0443 \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0432\u0443\u0447\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u041a\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u2014 \u043f\u043e \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">SampleBuilder<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0437\u0432\u0443\u0447\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u0442\u0435\u043f\u0438\u0430\u043d\u043e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class Piano extends Generator {     ...     public function getDampen($sampleRate = null, $frequency = null, $volume = null)     {         return pow(0.5 * log(($frequency * $volume) \/ $sampleRate), 2);     }     ...     public function getWave($sampleRate, $frequency, $volume, $i)     {         $base = $this-&gt;getModulations()[0];          return call_user_func_array($base, [             $i,             $sampleRate,             $frequency,             pow(call_user_func_array($base, [$i, $sampleRate, $frequency, 0]), 2) +             0.75 * call_user_func_array($base, [$i, $sampleRate, $frequency, 0.25]) +             0.1 * call_user_func_array($base, [$i, $sampleRate, $frequency, 0.5])         ]);     }     ...     protected function getModulations()     {         return [             function($i, $sampleRate, $frequency, $x) {                 return 1 * sin(2 * M_PI * (($i \/ $sampleRate) * $frequency) + $x);             },             ...         ];     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">SampleBuilder<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class SampleBuilder {     \/**      * @var Generator      *\/     protected $generator;      ...     public function note($note, $octave, $duration)     {         $result = new \\SplFixedArray((int) ceil($this-&gt;getSampleRate() * $duration * 2));          $octave = min(8, max(1, $octave));          $frequency = Note::get($note) * pow(2, $octave - 4);          $attack = $this-&gt;generator-&gt;getAttack($this-&gt;getSampleRate(), $frequency, $this-&gt;getVolume());         $dampen = $this-&gt;generator-&gt;getDampen($this-&gt;getSampleRate(), $frequency, $this-&gt;getVolume());          $attackLength = (int) ($this-&gt;getSampleRate() * $attack);         $decayLength  = (int) ($this-&gt;getSampleRate() * $duration);          for ($i = 0; $i &lt; $attackLength; $i++) {             $value = $this-&gt;getVolume()                 * ($i \/ ($this-&gt;getSampleRate() * $attack))                 * $this-&gt;getGenerator()-&gt;getWave(                         $this-&gt;getSampleRate(),                         $frequency,                         $this-&gt;getVolume(),                         $i                 );              $result[$i &lt;&lt; 1]       = Helper::packChar($value);             $result[($i &lt;&lt; 1) + 1] = Helper::packChar($value &gt;&gt; 8);         }          for (; $i &lt; $decayLength; $i++) {             $value = $this-&gt;getVolume()                 * pow((1 - (($i - ($this-&gt;getSampleRate() * $attack)) \/ ($this-&gt;getSampleRate() * ($duration - $attack)))), $dampen)                 * $this-&gt;getGenerator()-&gt;getWave(                         $this-&gt;getSampleRate(),                         $frequency,                         $this-&gt;getVolume(),                         $i                 );              $result[$i &lt;&lt; 1]       = Helper::packChar($value);             $result[($i &lt;&lt; 1) + 1] = Helper::packChar($value &gt;&gt; 8);         }          return new Sample($result-&gt;getSize(), implode('', $result-&gt;toArray()));     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0443 \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u043e \u0432\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u00ab\u041a \u042d\u043b\u0438\u0437\u0435\u00bb \u041b. \u0411\u0435\u0442\u0445\u043e\u0432\u0435\u043d\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a \u042d\u043b\u0438\u0437\u0435 \u043d\u0430 PHP<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">$sampleBuilder = new \\Wav\\SampleBuilder(\\Wav\\Generator\\Piano::NAME);  $samples = [     $sampleBuilder-&gt;note('E', 5, 0.3),     $sampleBuilder-&gt;note('D#', 5, 0.3),     $sampleBuilder-&gt;note('E', 5, 0.3),     $sampleBuilder-&gt;note('D#', 5, 0.3),     $sampleBuilder-&gt;note('E', 5, 0.3),     $sampleBuilder-&gt;note('H', 4, 0.3),     $sampleBuilder-&gt;note('D', 5, 0.3),     $sampleBuilder-&gt;note('C', 5, 0.3),     $sampleBuilder-&gt;note('A', 4, 1), ];  $builder = (new Wav\\Builder())     -&gt;setAudioFormat(\\Wav\\WaveFormat::PCM)     -&gt;setNumberOfChannels(1)     -&gt;setSampleRate(\\Wav\\Builder::DEFAULT_SAMPLE_RATE)     -&gt;setByteRate(\\Wav\\Builder::DEFAULT_SAMPLE_RATE * 1 * 16 \/ 8)     -&gt;setBlockAlign(1 * 16 \/ 8)     -&gt;setBitsPerSample(16)     -&gt;setSamples($samples);  $audio = $builder-&gt;build(); $audio-&gt;returnContent(); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p>  \u041a\u043e\u0434 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u043d\u0430 github: <a href=\"https:\/\/github.com\/nkolosov\/wav\">https:\/\/github.com\/nkolosov\/wav<\/a><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u043e\u0433\u043e-\u0442\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 composer:<\/p>\n<p>  <code>composer require nkolosov\/wav<br \/>  <\/code>  <\/p>\n<h3>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u043f\u043b\u0430\u043d\u044b<\/h3>\n<p>  \u041d\u0443, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 wav-\u0444\u0430\u0439\u043b\u043e\u0432 (\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0441\u0435\u0445 \u0441\u0435\u043a\u0446\u0438\u0439), \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043c\u043d\u043e\u0433\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 wav (\u0441\u043e \u0441\u0436\u0430\u0442\u0438\u0435\u043c \u0438 \u0442.\u043f), \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u043b\u043d\u044b (\u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0431\u044b\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0442\u043e\u043c, <a href=\"https:\/\/habrahabr.ru\/post\/113239\/\">\u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 Python<\/a>, \u043c\u043d\u0435 \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 PHP).<\/p>\n<p>  \u0412 \u043f\u043b\u0430\u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0432\u0443\u0447\u0430\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u044c \u0430\u043a\u043a\u043e\u0440\u0434\u044b \u0438 \u0442. \u0434.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u2014 welcome \u043d\u0430 GitHub.       <\/p>\n<div class=\"clear\"><\/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:\/\/habrahabr.ru\/post\/282922\/\"> https:\/\/habrahabr.ru\/post\/282922\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0441\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u043c \u0430\u0443\u0434\u0438\u043e-\u0444\u0430\u0439\u043b\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u2014 wav. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c, \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u0431\u043b\u0430\u0433\u043e, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d wav-\u0444\u0430\u0439\u043b \u00ab\u0438\u0437\u043d\u0443\u0442\u0440\u0438\u00bb \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e. <\/p>\n<p>  <s>\u0418 \u0442\u0443\u0442 \u041e\u0441\u0442\u0430\u043f\u0430 \u043f\u043e\u043d\u0435\u0441\u043b\u043e<\/s> \u0418 \u0442\u0443\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u0441\u0432\u0435\u0442\u043b\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0444\u0430\u0439\u043b\u0435, \u043d\u043e \u0438 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb. \u0414\u0443\u043c\u0430\u044e, \u0432\u0441\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0432 \u0441\u0435\u0442\u0438 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u00ab\u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0438\u0430\u043d\u0438\u043d\u043e\u00bb \u0438 \u043f\u0440\u043e\u0447\u0435\u0435, \u0432\u0435\u0440\u043d\u043e? <\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430 2 \u0432\u0435\u0447\u0435\u0440\u0430 \u2014 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.  <\/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-279544","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/279544","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=279544"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/279544\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}