{"id":1023798,"date":"2024-12-30T14:08:07","date_gmt":"2024-12-30T06:08:07","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1023798.html"},"modified":"2024-12-30T14:08:10","modified_gmt":"2024-12-30T06:08:10","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%88%9b%e5%bb%bamidi-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1023798.html","title":{"rendered":"\u5982\u4f55\u7528python\u521b\u5efamidi"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/1d42203d-4c2d-494d-b5ef-4420622ba3ed.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u7528python\u521b\u5efamidi\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u521b\u5efaMIDI\u6587\u4ef6\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5e38\u89c1\u7684\u5305\u62ec\u4f7f\u7528<code>midiutil<\/code>\u5e93\u3001<code>pretty_midi<\/code>\u5e93\u3001\u4ee5\u53ca<code>mido<\/code>\u5e93\u7b49\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u521b\u5efa\u548c\u64cd\u4f5cMIDI\u6587\u4ef6\u7684\u4fbf\u6377\u65b9\u6cd5\u3002<\/strong>\u5176\u4e2d\uff0c\u4f7f\u7528<code>midiutil<\/code>\u5e93\u662f\u6700\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u6cd5\u4e4b\u4e00\uff0c\u56e0\u4e3a\u5b83\u5177\u6709\u76f4\u89c2\u7684API\uff0c\u9002\u5408\u521d\u5b66\u8005\u548c\u5feb\u901f\u5f00\u53d1\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528<code>midiutil<\/code>\u5e93\u521b\u5efa\u4e00\u4e2aMIDI\u6587\u4ef6\uff0c\u5e76\u9644\u5e26\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u5fc5\u8981\u7684\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5<code>midiutil<\/code>\u5e93\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u901a\u8fc7pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install midiutil<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684MIDI\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u6211\u4eec\u9996\u5148\u4ece\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u5f00\u59cb\uff0c\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u5355\u4e2a\u97f3\u7b26\u7684MIDI\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from midiutil import MIDIFile<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aMIDI\u5bf9\u8c61\uff0c\u53c2\u65701\u4ee3\u8868\u4e00\u4e2aMIDI\u8f68\u9053<\/strong><\/h2>\n<p>midi = MIDIFile(1)<\/p>\n<h2><strong>\u8bbe\u7f6e\u8f68\u9053\u3001\u65f6\u95f4\u3001\u548c\u6f14\u594f\u8005<\/strong><\/h2>\n<p>track = 0<\/p>\n<p>time = 0<\/p>\n<p>midi.addTrackName(track, time, &quot;Sample Track&quot;)<\/p>\n<p>midi.addTempo(track, time, 120)<\/p>\n<h2><strong>\u6dfb\u52a0\u4e00\u4e2a\u97f3\u7b26<\/strong><\/h2>\n<p>channel = 0<\/p>\n<p>pitch = 60  # C4<\/p>\n<p>duration = 1  # \u6301\u7eed\u65f6\u95f4\u4e3a1\u62cd<\/p>\n<p>volume = 100  # \u97f3\u91cf<\/p>\n<p>midi.addNote(track, channel, pitch, time, duration, volume)<\/p>\n<h2><strong>\u5c06MIDI\u5bf9\u8c61\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&quot;output.mid&quot;, &quot;wb&quot;) as output_file:<\/p>\n<p>    midi.writeFile(output_file)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5728MIDI\u4e2d\u6dfb\u52a0\u591a\u4e2a\u97f3\u7b26\u548c\u548c\u5f26<\/h3>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u4e00\u4e2aMIDI\u6587\u4ef6\u65f6\uff0c\u6dfb\u52a0\u591a\u4e2a\u97f3\u7b26\u548c\u548c\u5f26\u662f\u975e\u5e38\u5e38\u89c1\u7684\u9700\u6c42\u3002\u6211\u4eec\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u65f6\u95f4\u70b9\u6dfb\u52a0\u591a\u4e2a\u97f3\u7b26\uff0c\u751a\u81f3\u53ef\u4ee5\u540c\u65f6\u6dfb\u52a0\u591a\u4e2a\u97f3\u7b26\u4ee5\u521b\u5efa\u548c\u5f26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from midiutil import MIDIFile<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aMIDI\u5bf9\u8c61\uff0c\u53c2\u65701\u4ee3\u8868\u4e00\u4e2aMIDI\u8f68\u9053<\/strong><\/h2>\n<p>midi = MIDIFile(1)<\/p>\n<h2><strong>\u8bbe\u7f6e\u8f68\u9053\u3001\u65f6\u95f4\u3001\u548c\u6f14\u594f\u8005<\/strong><\/h2>\n<p>track = 0<\/p>\n<p>time = 0<\/p>\n<p>midi.addTrackName(track, time, &quot;Sample Track&quot;)<\/p>\n<p>midi.addTempo(track, time, 120)<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e9b\u97f3\u7b26<\/strong><\/h2>\n<p>notes = [<\/p>\n<p>    (60, 0, 1),   # C4\uff0c\u7b2c0\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (64, 1, 1),   # E4\uff0c\u7b2c1\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (67, 2, 1),   # G4\uff0c\u7b2c2\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (72, 3, 1)    # C5\uff0c\u7b2c3\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>]<\/p>\n<h2><strong>\u6dfb\u52a0\u8fd9\u4e9b\u97f3\u7b26<\/strong><\/h2>\n<p>channel = 0<\/p>\n<p>volume = 100<\/p>\n<p>for pitch, start_time, duration in notes:<\/p>\n<p>    midi.addNote(track, channel, pitch, start_time, duration, volume)<\/p>\n<h2><strong>\u5c06MIDI\u5bf9\u8c61\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&quot;output_multiple_notes.mid&quot;, &quot;wb&quot;) as output_file:<\/p>\n<p>    midi.writeFile(output_file)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u521b\u5efa\u4e00\u4e2a\u66f4\u590d\u6742\u7684MIDI\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u7ed3\u5408\u591a\u4e2a\u8f68\u9053\u548c\u66f4\u591a\u7684\u97f3\u7b26\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u66f4\u590d\u6742\u7684MIDI\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u5e26\u6709\u591a\u4e2a\u4e50\u5668\u8f68\u9053\u7684MIDI\u6587\u4ef6\uff0c\u6bcf\u4e2a\u8f68\u9053\u64ad\u653e\u4e0d\u540c\u7684\u65cb\u5f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from midiutil import MIDIFile<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aMIDI\u5bf9\u8c61\uff0c\u53c2\u65702\u4ee3\u8868\u4e24\u4e2aMIDI\u8f68\u9053<\/strong><\/h2>\n<p>midi = MIDIFile(2)<\/p>\n<h2><strong>\u8bbe\u7f6e\u8f68\u90531\u3001\u65f6\u95f4\u3001\u548c\u6f14\u594f\u8005<\/strong><\/h2>\n<p>track = 0<\/p>\n<p>time = 0<\/p>\n<p>midi.addTrackName(track, time, &quot;Piano Track&quot;)<\/p>\n<p>midi.addTempo(track, time, 120)<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e9b\u97f3\u7b26<\/strong><\/h2>\n<p>piano_notes = [<\/p>\n<p>    (60, 0, 1),   # C4\uff0c\u7b2c0\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (64, 1, 1),   # E4\uff0c\u7b2c1\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (67, 2, 1),   # G4\uff0c\u7b2c2\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (72, 3, 1)    # C5\uff0c\u7b2c3\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>]<\/p>\n<h2><strong>\u6dfb\u52a0\u8fd9\u4e9b\u97f3\u7b26\u5230\u8f68\u90531<\/strong><\/h2>\n<p>channel = 0<\/p>\n<p>volume = 100<\/p>\n<p>for pitch, start_time, duration in piano_notes:<\/p>\n<p>    midi.addNote(track, channel, pitch, start_time, duration, volume)<\/p>\n<h2><strong>\u8bbe\u7f6e\u8f68\u90532\u3001\u65f6\u95f4\u3001\u548c\u6f14\u594f\u8005<\/strong><\/h2>\n<p>track = 1<\/p>\n<p>time = 0<\/p>\n<p>midi.addTrackName(track, time, &quot;Drum Track&quot;)<\/p>\n<p>midi.addTempo(track, time, 120)<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e9b\u9f13\u97f3\u7b26<\/strong><\/h2>\n<p>drum_notes = [<\/p>\n<p>    (35, 0, 1),   # Bass Drum\uff0c\u7b2c0\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (38, 1, 1),   # Snare Drum\uff0c\u7b2c1\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (42, 2, 1),   # Closed Hi-Hat\uff0c\u7b2c2\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>    (46, 3, 1)    # Open Hi-Hat\uff0c\u7b2c3\u62cd\uff0c\u6301\u7eed1\u62cd<\/p>\n<p>]<\/p>\n<h2><strong>\u6dfb\u52a0\u8fd9\u4e9b\u97f3\u7b26\u5230\u8f68\u90532<\/strong><\/h2>\n<p>channel = 9  # \u9f13\u901a\u5e38\u4f7f\u7528MIDI\u901a\u905310\uff08\u7d22\u5f15\u4e3a9\uff09<\/p>\n<p>for pitch, start_time, duration in drum_notes:<\/p>\n<p>    midi.addNote(track, channel, pitch, start_time, duration, volume)<\/p>\n<h2><strong>\u5c06MIDI\u5bf9\u8c61\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&quot;output_complex.mid&quot;, &quot;wb&quot;) as output_file:<\/p>\n<p>    midi.writeFile(output_file)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528<code>pretty_midi<\/code>\u5e93\u8fdb\u884c\u9ad8\u7ea7\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p><code>pretty_midi<\/code>\u5e93\u63d0\u4f9b\u4e86\u66f4\u591a\u9ad8\u7ea7\u529f\u80fd\uff0c\u4f8b\u5982\u66f4\u590d\u6742\u7684MIDI\u6587\u4ef6\u89e3\u6790\u548c\u751f\u6210\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u8be5\u5e93\u521b\u5efa\u548c\u64cd\u4f5c\u66f4\u590d\u6742\u7684MIDI\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5<code>pretty_midi<\/code>\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pretty_midi<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684MIDI\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pretty_midi<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2aPrettyMIDI\u5bf9\u8c61<\/strong><\/h2>\n<p>midi = pretty_midi.PrettyMIDI()<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u4e50\u5668\u5b9e\u4f8b\uff0c\u94a2\u7434\u97f3\u8272\uff08\u7a0b\u5e8f\u53f7\u4e3a0\uff09<\/strong><\/h2>\n<p>instrument = pretty_midi.Instrument(program=0)<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u97f3\u7b26\u5b9e\u4f8b<\/strong><\/h2>\n<p>note = pretty_midi.Note(velocity=100, pitch=60, start=0, end=1)<\/p>\n<h2><strong>\u6dfb\u52a0\u97f3\u7b26\u5230\u4e50\u5668<\/strong><\/h2>\n<p>instrument.notes.append(note)<\/p>\n<h2><strong>\u6dfb\u52a0\u4e50\u5668\u5230MIDI\u5bf9\u8c61<\/strong><\/h2>\n<p>midi.instruments.append(instrument)<\/p>\n<h2><strong>\u5199\u5165MIDI\u6587\u4ef6<\/strong><\/h2>\n<p>midi.write(&quot;pretty_output.mid&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406MIDI\u6587\u4ef6\u7684\u9ad8\u7ea7\u529f\u80fd<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528<code>pretty_midi<\/code>\u5e93\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u8fdb\u884c\u66f4\u591a\u9ad8\u7ea7\u64cd\u4f5c\uff0c\u5982\u4fee\u6539\u73b0\u6709MIDI\u6587\u4ef6\u3001\u6dfb\u52a0\u63a7\u5236\u53d8\u5316\u3001\u4ee5\u53ca\u8ba1\u7b97\u97f3\u7b26\u7684\u97f3\u9ad8\u548c\u65f6\u95f4\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pretty_midi<\/p>\n<h2><strong>\u8bfb\u53d6\u4e00\u4e2a\u73b0\u6709\u7684MIDI\u6587\u4ef6<\/strong><\/h2>\n<p>midi = pretty_midi.PrettyMIDI(&quot;input.mid&quot;)<\/p>\n<h2><strong>\u904d\u5386\u6240\u6709\u4e50\u5668\u548c\u97f3\u7b26<\/strong><\/h2>\n<p>for instrument in midi.instruments:<\/p>\n<p>    print(f&quot;Instrument: {instrument.name}&quot;)<\/p>\n<p>    for note in instrument.notes:<\/p>\n<p>        print(f&quot;Note: {note.pitch}, Start: {note.start}, End: {note.end}&quot;)<\/p>\n<h2><strong>\u4fee\u6539\u67d0\u4e2a\u97f3\u7b26\u7684\u97f3\u9ad8<\/strong><\/h2>\n<p>midi.instruments[0].notes[0].pitch = 65<\/p>\n<h2><strong>\u4fdd\u5b58\u4fee\u6539\u540e\u7684MIDI\u6587\u4ef6<\/strong><\/h2>\n<p>midi.write(&quot;modified_output.mid&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u793a\u4f8b\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff0c\u4f7f\u7528Python\u521b\u5efa\u548c\u64cd\u4f5cMIDI\u6587\u4ef6\u662f\u975e\u5e38\u7075\u6d3b\u548c\u5f3a\u5927\u7684\u3002\u65e0\u8bba\u662f\u7b80\u5355\u7684\u97f3\u7b26\u6dfb\u52a0\uff0c\u8fd8\u662f\u590d\u6742\u7684\u8f68\u9053\u548c\u63a7\u5236\u53d8\u5316\u64cd\u4f5c\uff0cPython\u90fd\u80fd\u63d0\u4f9b\u9ad8\u6548\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u5e2e\u52a9\u4f60\u638c\u63e1\u5982\u4f55\u7528Python\u521b\u5efa\u548c\u64cd\u4f5cMIDI\u6587\u4ef6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u7528Python\u521b\u5efaMIDI\u6587\u4ef6\uff1f<\/strong><br \/>\u8981\u7528Python\u521b\u5efaMIDI\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u540d\u4e3a<code>mido<\/code>\u6216<code>pretty_midi<\/code>\u7684\u5e93\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u7b80\u5355\u7684API\u6765\u751f\u6210\u548c\u64cd\u4f5cMIDI\u6570\u636e\u3002\u5b89\u88c5\u8fd9\u4e9b\u5e93\u540e\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2aMIDI\u6587\u4ef6\u5e76\u6dfb\u52a0\u97f3\u7b26\u3001\u8282\u62cd\u548c\u5176\u4ed6MIDI\u6d88\u606f\u3002<\/p>\n<p><strong>\u521b\u5efaMIDI\u6587\u4ef6\u9700\u8981\u54ea\u4e9b\u57fa\u672c\u77e5\u8bc6\uff1f<\/strong><br \/>\u4e86\u89e3MIDI\u7684\u57fa\u672c\u6982\u5ff5\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002MIDI\u6587\u4ef6\u5305\u542b\u97f3\u7b26\u4fe1\u606f\uff0c\u4f8b\u5982\u97f3\u9ad8\u3001\u6301\u7eed\u65f6\u95f4\u548c\u97f3\u91cf\u3002\u6b64\u5916\uff0c\u5b66\u4e60\u5982\u4f55\u8bbe\u7f6eMIDI\u901a\u9053\u548c\u4f7f\u7528\u63a7\u5236\u4fe1\u606f\uff08\u5982\u97f3\u91cf\u63a7\u5236\u3001\u97f3\u8272\u53d8\u5316\u7b49\uff09\u5c06\u6709\u52a9\u4e8e\u60a8\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u521b\u5efa\u590d\u6742\u7684\u97f3\u4e50\u4f5c\u54c1\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u521b\u5efaMIDI\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u89c1\u7684\u9519\u8bef\u548c\u89e3\u51b3\u65b9\u6848\uff1f<\/strong><br \/>\u5e38\u89c1\u9519\u8bef\u5305\u62ec\u97f3\u7b26\u8d85\u51faMIDI\u8303\u56f4\u3001\u672a\u6b63\u786e\u5173\u95ed\u6587\u4ef6\u6216\u672a\u8bbe\u7f6e\u6b63\u786e\u7684\u97f3\u7b26\u6301\u7eed\u65f6\u95f4\u3002\u786e\u4fdd\u60a8\u7684\u97f3\u7b26\u57280\u5230127\u7684\u8303\u56f4\u5185\uff0c\u5e76\u4e14\u5728\u6dfb\u52a0\u97f3\u7b26\u540e\u8c03\u7528\u4fdd\u5b58\u65b9\u6cd5\u4ee5\u786e\u4fdd\u6587\u4ef6\u6b63\u786e\u5199\u5165\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528Python\u5e93\u6765\u4fee\u6539\u73b0\u6709\u7684MIDI\u6587\u4ef6\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>mido<\/code>\u6216<code>pretty_midi<\/code>\u5e93\u52a0\u8f7d\u73b0\u6709\u7684MIDI\u6587\u4ef6\u5e76\u8fdb\u884c\u7f16\u8f91\u3002\u60a8\u53ef\u4ee5\u6dfb\u52a0\u65b0\u7684\u97f3\u7b26\u3001\u4fee\u6539\u73b0\u6709\u97f3\u7b26\u7684\u5c5e\u6027\u6216\u5220\u9664\u4e0d\u9700\u8981\u7684\u90e8\u5206\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u60a8\u53ef\u4ee5\u5728\u4e0d\u4ece\u5934\u5f00\u59cb\u7684\u60c5\u51b5\u4e0b\u8f7b\u677e\u8c03\u6574\u548c\u6539\u8fdb\u60a8\u7684\u97f3\u4e50\u4f5c\u54c1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u521b\u5efaMIDI\u6587\u4ef6\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5e38\u89c1\u7684\u5305\u62ec\u4f7f\u7528midiutil\u5e93\u3001pretty_midi\u5e93\u3001\u4ee5\u53ca [&hellip;]","protected":false},"author":3,"featured_media":1023810,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1023798"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1023798"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1023798\/revisions"}],"predecessor-version":[{"id":1023815,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1023798\/revisions\/1023815"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1023810"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1023798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1023798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1023798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}