<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=MIDI%E9%9F%B3%E4%B9%90</id>
		<title>MIDI音乐 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=MIDI%E9%9F%B3%E4%B9%90"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=MIDI%E9%9F%B3%E4%B9%90&amp;action=history"/>
		<updated>2026-04-21T16:05:52Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=MIDI%E9%9F%B3%E4%B9%90&amp;diff=26710&amp;oldid=prev</id>
		<title>2018年11月22日 (四) 03:36 502748957@qq.com</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=MIDI%E9%9F%B3%E4%B9%90&amp;diff=26710&amp;oldid=prev"/>
				<updated>2018-11-22T03:36:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2018年11月22日 (四) 03:36的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;第2行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第2行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p style=&amp;quot;color: #4F4E4E;font-size:220%&amp;quot;&amp;gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;AudioPro播放MP3示例&lt;/del&gt;'''&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p style=&amp;quot;color: #4F4E4E;font-size:220%&amp;quot;&amp;gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;AudioPro播放MIDI示例&lt;/ins&gt;'''&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;在下面的示例中，使用Core+核心控制AudioPro模块播放MIDI格式的声音。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;在下面的示例中，使用Core+核心控制AudioPro模块播放MIDI格式的声音。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>502748957@qq.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=MIDI%E9%9F%B3%E4%B9%90&amp;diff=26709&amp;oldid=prev</id>
		<title>502748957@qq.com：创建页面，内容为“{| style=&quot;width: 800px;&quot; |- | &lt;p style=&quot;color: #4F4E4E;font-size:220%&quot;&gt;'''AudioPro播放MP3示例'''&lt;/p&gt; &lt;br&gt; 在下面的示例中，使用Core+核心控制AudioPro…”</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=MIDI%E9%9F%B3%E4%B9%90&amp;diff=26709&amp;oldid=prev"/>
				<updated>2018-11-22T03:36:07Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“{| style=&amp;quot;width: 800px;&amp;quot; |- | &amp;lt;p style=&amp;quot;color: #4F4E4E;font-size:220%&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;AudioPro播放MP3示例&amp;#039;&amp;#039;&amp;#039;&amp;lt;/p&amp;gt; &amp;lt;br&amp;gt; 在下面的示例中，使用Core+核心控制AudioPro…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #4F4E4E;font-size:220%&amp;quot;&amp;gt;'''AudioPro播放MP3示例'''&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
在下面的示例中，使用Core+核心控制AudioPro模块播放MIDI格式的声音。&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #E87E05;font-size:155%&amp;quot;&amp;gt;所需硬件&amp;lt;/p&amp;gt;&lt;br /&gt;
*[[MCookie-Core+]]&lt;br /&gt;
*[[MBattery+]]&lt;br /&gt;
*[[MCookie-Module AudioPro]]&lt;br /&gt;
*喇叭&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #E87E05;font-size:155%&amp;quot;&amp;gt;电路搭建&amp;lt;/p&amp;gt;&lt;br /&gt;
将Battery+、Core+、MCookie-Module AudioPro堆叠在一起，通过MicroUSB数据线接入电脑。喇叭接在Audio Pro模块上&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;color: #E87E05;font-size:155%&amp;quot;&amp;gt;代码&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
   Microduino_AudioPro支持库例程&lt;br /&gt;
   模块WIKI：https://wiki.microduino.cn/index.php/MCookie-Module_AudioPro&lt;br /&gt;
   SPI的MIDI例程&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;Microduino_AudioPro.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
AudioPro midiPlayer;&lt;br /&gt;
&lt;br /&gt;
uint8_t toneNum[12] = {57, 59, 60, 62, 64, 65, 67, 69, 71, 72, 74, 76};&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  delay(200);&lt;br /&gt;
&lt;br /&gt;
  if (! midiPlayer.begin()) { // initialise the music player&lt;br /&gt;
    Serial.println(F(&amp;quot;Couldn't find VS1053, do you have the right pins defined?&amp;quot;));&lt;br /&gt;
    while (1);&lt;br /&gt;
  }&lt;br /&gt;
  Serial.println(F(&amp;quot;VS1053 found&amp;quot;));&lt;br /&gt;
  midiPlayer.applyPatch(MIDIPatch, sizeof(MIDIPatch) / sizeof(uint16_t));&lt;br /&gt;
&lt;br /&gt;
  midiPlayer.midiSetVolume(0, 127); //channels,volume&lt;br /&gt;
  // See http://www.vlsi.fi/fileadmin/datasheets/vs1053.pdf Pg 31&lt;br /&gt;
  // VS1053_BANK_DEFAULT VS1053_BANK_MELODY VS1053_BANK_DRUMS1 VS1053_BANK_DRUMS2&lt;br /&gt;
  midiPlayer.midiSetBank(0, VS1053_BANK_MELODY);&lt;br /&gt;
  // See http://www.vlsi.fi/fileadmin/datasheets/vs1053.pdf Pg 32 for more!&lt;br /&gt;
  midiPlayer.midiSetInstrument(0, VS1053_GM1_RHODES_PIANO);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  for (uint8_t i = 0; i &amp;lt; 12; i++) {&lt;br /&gt;
    midiPlayer.noteOn(0, toneNum[i], 127);&lt;br /&gt;
    delay(100);&lt;br /&gt;
    midiPlayer.noteOff(0, toneNum[i], 127);&lt;br /&gt;
    delay(50);&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
&lt;br /&gt;
  for (uint8_t i = 27; i &amp;lt; 87; i++) {&lt;br /&gt;
    midiPlayer.noteOn(0, i, 127);&lt;br /&gt;
    delay(100);&lt;br /&gt;
    midiPlayer.noteOff(0, i, 127);&lt;br /&gt;
    delay(50);&lt;br /&gt;
  }&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*程序运行结果：打开串口后看到&amp;quot;VS1053 found&amp;quot;的同时可以听到喇叭中先播放12个单音，音调逐渐增高。之后连续播放60个单音，声音由很低至高。&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[MCookie-Module AudioPro | 返回AudioPro页面]]&lt;/div&gt;</summary>
		<author><name>502748957@qq.com</name></author>	</entry>

	</feed>