<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sktrokaru</author_name>
  <author_url>https://blog.hatena.ne.jp/sktrokaru/</author_url>
  <blog_title>蕗狩軽便図画模型工作部日記</blog_title>
  <blog_url>https://sktrokaru.hatenablog.com/</blog_url>
  <categories>
    <anon>模型・工作</anon>
    <anon>電子工作、DCC、パソコン関係</anon>
  </categories>
  <description>Arduinoのtone()関数を使って簡単に電子音オルゴールが作れます。arduinoのスケッチ例に収められているToneMelodyがそれです。 tone関数に、出力ピン、周波数、音の長さを指定したスケッチを実行すると、出力ピンに繋いだスピーカーから指定の音が出ます。 pinches.hというライブラリを使うと、楽譜のド、レ、ミ、を、NOTE_C4, NOTE_D4, NOTE_E4、の様に書けば周波数に変換してくれるので、これを配列に納めます。音の長さは１音ずつ別の配列に納めます。 ToneMelodyのスケッチに楽譜データを上書きするのが簡単です。別名で保存するとpinches.hファ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsktrokaru.hatenablog.com%2Fentry%2F2024%2F08%2F22%2F120000&quot; title=&quot;Arduinoのtone()関数を使ったオルゴールです - 蕗狩軽便図画模型工作部日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/sktrokaru/20240821/20240821132054.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-08-22 12:00:00</published>
  <title>Arduinoのtone()関数を使ったオルゴールです</title>
  <type>rich</type>
  <url>https://sktrokaru.hatenablog.com/entry/2024/08/22/120000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
