{"id":932,"date":"2021-06-26T07:38:43","date_gmt":"2021-06-25T22:38:43","guid":{"rendered":"https:\/\/machiaworx.net\/?p=932"},"modified":"2021-06-26T08:10:38","modified_gmt":"2021-06-25T23:10:38","slug":"%e3%83%95%e3%82%a3%e3%83%ab%e3%82%bf%e4%bd%9c%e6%88%90%e5%85%a5%e9%96%80-%e2%91%a0%e5%9f%ba%e7%a4%8e%e3%82%af%e3%83%a9%e3%82%b9%e7%a7%bb%e5%8b%95%e5%b9%b3%e5%9d%87%e3%83%95%e3%82%a3%e3%83%ab%e3%82%bf","status":"publish","type":"post","link":"https:\/\/machiaworx.net\/?p=932","title":{"rendered":"\u30d5\u30a3\u30eb\u30bf\u4f5c\u6210\u5165\u9580-\u2460\u79fb\u52d5\u5e73\u5747\u30d5\u30a3\u30eb\u30bf"},"content":{"rendered":"<p>\u5510\u7a81\u306b\u30e1\u30e2\u308a\u305f\u304f\u306a\u3063\u305f\u306e\u3067\u3002<\/p>\n<h3>\u6982\u8981<\/h3>\n<p>\u30b7\u30f3\u30bb\u30b5\u30a4\u30b6\u30fc\u5236\u4f5c\u306b\u304a\u3051\u308b\u30d5\u30a3\u30eb\u30bf\u4f5c\u6210\u306b\u3064\u3044\u3066\u5b9f\u88c5\u3092\u6b8b\u3059\u3082\u306e<\/p>\n<h3>\u7d4c\u7def<\/h3>\n<p>\u30d5\u30a3\u30eb\u30bf\u4f5c\u6210\u306b\u304b\u304b\u308b\u8cc7\u6599\u3063\u3066\u306e\u306f\u96fb\u6c17\u56de\u8def\u3068\u304b\u305d\u3046\u3044\u3046\u3068\u3053\u308d\u304b\u3089\u8aad\u307f\u89e3\u304f\u5fc5\u8981\u304c\u3042\u308a\u3001<br \/>\n\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u843d\u3068\u3057\u8fbc\u3093\u3060\u8cc7\u6599\u307f\u305f\u3044\u306a\u306e\u306f\u5272\u3068\u5c11\u306a\u3044\u3002<\/p>\n<p>\u81ea\u5206\u304c\u5fc5\u8981\u306a\u8a00\u8a9e\u306e\u8cc7\u6599\u306b\u306a\u308b\u3068\u307e\u3063\u305f\u304f\u3082\u3063\u3066\u5c11\u306a\u3044\u3002<br \/>\n\uff08\u3053\u3053\u3089\u3078\u3093\u81ea\u5206\u304c\u30b7\u30f3\u30bb\u30b5\u30a4\u30b6\u30fc\u306e\u8a18\u4e8b\u3092Qiita\u306b\u66f8\u3044\u305f\u3068\u304d\u3068\u305d\u308c\u307b\u3069\u72b6\u6cc1\u306f\u5909\u308f\u3063\u3066\u306a\u3044\u306a\uff09<\/p>\n<p>\u3088\u3063\u3066\u3001\u81ea\u5206\u304c\u4f7f\u3046\u8a00\u8a9e\u306e\u30b7\u30f3\u30bb\u3092\u4f5c\u308b\u7fbd\u76ee\u306b\u306a\u3063\u305f\u7ba1\u7406\u8005\u304c\u5b9f\u88c5\u3092\u30e1\u30e2\u308b\u3082\u306e\u3002<br \/>\n\u3067\u3001Unity+C#\u3092\u4f7f\u3063\u3066\u3044\u308b\u305f\u3081\u3001C#\u3067\u66f8\u3044\u3066\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3001C++\u3068\u304b\u306b\u79fb\u884c\u3059\u308b\u306e\u3082\u96e3\u3057\u304f\u306a\u3044\u304b\u3068\u3002<br \/>\n\uff08\u3042\u308b\u3082\u306e\u306f\u53c2\u8003\u6587\u732e\u3068\u304b\u3082\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\uff09<\/p>\n<h3>\u79fb\u52d5\u5e73\u5747\u30d5\u30a3\u30eb\u30bf<\/h3>\n<p>\u7d4c\u904e\u524d\u5f8c\u3092\u52a0\u7b97\u3057\u3001\u6700\u5f8c\u306b\u30b5\u30f3\u30d7\u30eb\u6570\u3067\u5272\u308b\u3068\u3044\u3046\u30b7\u30f3\u30d7\u30eb\u306a\u69cb\u6210\u3002<br \/>\n\u7279\u6027\u3068\u3057\u3066\u3001\u9ad8\u5468\u6ce2\u57df\u3067\u968e\u6bb5\u4e0a\u306b\u30d5\u30a3\u30eb\u30bf\u51e6\u7406\u304c\u767a\u751f\u3059\u308b\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\npublic class SimpleMovingAverage{\r\n  double[] past_buffer;\r\n  int cnt=5;\r\n  public int sampling_rate;\r\n  public SimpleMovingAverage(int s_rate){\r\n    sampling_rate=s_rate; \r\n    past_buffer = new double[cnt-1];\r\n  }\r\n  public double Calc(double buffer){\r\n    double total=0.0f;\r\n    for(int i=0;i&lt;cnt-1;i++){\r\n      total+=past_buffer[i];\r\n    }\r\n\r\n    \/\/\u4eca\u5165\u3063\u3066\u304d\u305f\u97f3\u3092\u8db3\u3059\r\n    total+=buffer;\r\n    \/\/\u5e73\u5747\u5024\u3092\u6c42\u3081\u308b\r\n    total\/=(float)cnt;\r\n\r\n    \/\/\u30d0\u30c3\u30d5\u30a1\u3092\u30bb\u30c3\u30c8\u3057\u76f4\u3057\u3002\r\n    for(int i=cnt-2;i&gt;0;i--){\r\n      past_buffer[i]=past_buffer[i-1];\r\n    }\r\n\r\n    past_buffer[0]=buffer;\r\n    return total;\r\n  }\r\n}\r\n<\/pre>\n<h3>\u53c2\u8003\u8cc7\u6599<\/h3>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=ebwGMlR3Z6A&amp;t=5s\">gen~\u3068gen for event\u3067\u89e6\u308c\u308b\u7269\u7406\u30e2\u30c7\u30ea\u30f3\u30b0\u30b7\u30f3\u30bb &#8211; YouTube<\/a><\/p>\n<p><a href=\"http:\/\/www.heg.co.jp\/dspnyuumon\/dsp1-3.htm\">\u30c7\u30a3\u30b8\u30bf\u30eb\u4fe1\u53f7\u51e6\u7406\u306e\u4f8b\uff08\u79fb\u52d5\u5e73\u5747\uff09 &#8211; DSP\u5165\u9580(\u30c7\u30a3\u30b8\u30bf\u30eb\u4fe1\u53f7\u51e6\u7406\u5165\u9580) (heg.co.jp)<\/a><\/p>\n<p><a href=\"https:\/\/tech-blog.cerevo.com\/archives\/9745\/\">\u6570\u5f0f\u3092\u307b\u3068\u3093\u3069\u4f7f\u308f\u305a\u306b\u7406\u89e3\u3059\u308b\u30c7\u30a3\u30b8\u30bf\u30eb\u30d5\u30a3\u30eb\u30bf | Cerevo TechBlog<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5510\u7a81\u306b\u30e1\u30e2\u308a\u305f\u304f\u306a\u3063\u305f\u306e\u3067\u3002 \u6982\u8981 \u30b7\u30f3\u30bb\u30b5\u30a4\u30b6\u30fc\u5236\u4f5c\u306b\u304a\u3051\u308b\u30d5\u30a3\u30eb\u30bf\u4f5c\u6210\u306b\u3064\u3044\u3066\u5b9f\u88c5\u3092\u6b8b\u3059\u3082\u306e \u7d4c\u7def \u30d5\u30a3\u30eb\u30bf\u4f5c\u6210\u306b\u304b\u304b\u308b\u8cc7\u6599\u3063\u3066\u306e\u306f\u96fb\u6c17\u56de\u8def\u3068\u304b\u305d\u3046\u3044\u3046\u3068\u3053\u308d\u304b\u3089\u8aad\u307f\u89e3\u304f\u5fc5\u8981\u304c\u3042\u308a\u3001 \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u843d\u3068\u3057\u8fbc\u3093\u3060\u8cc7\u6599\u307f&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/machiaworx.net\/?p=932\" class=\"more-link read-more\" rel=\"bookmark\"><span class=\"screen-reader-text\">\u30d5\u30a3\u30eb\u30bf\u4f5c\u6210\u5165\u9580-\u2460\u79fb\u52d5\u5e73\u5747\u30d5\u30a3\u30eb\u30bf<\/span><i class=\"fa fa-arrow-right\"><\/i> \u306e\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11,4],"tags":[],"class_list":["post-932","post","type-post","status-publish","format-standard","hentry","category-unity","category-synth-dev","category-pgm"],"_links":{"self":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=932"}],"version-history":[{"count":5,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/932\/revisions"}],"predecessor-version":[{"id":937,"href":"https:\/\/machiaworx.net\/index.php?rest_route=\/wp\/v2\/posts\/932\/revisions\/937"}],"wp:attachment":[{"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/machiaworx.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}