【midi音乐】小星星
By
jerryxjr1220
at 2022-11-24 • 0人收藏 • 631人看过
老大更新了midi音乐库,挺好玩的。
找了个最简单的乐谱《小星星》
import console; console.open(); console.setTitle("小星星"); import sys.midiOut; midi = sys.midiOut() notes = sys.midiOut.notes; drm = { notes.C4, 500, notes.C4, 500, notes.G4, 500, notes.G4, 500, notes.A4, 500, notes.A4, 500, notes.G4, 1000, notes.F4, 500, notes.F4, 500, notes.E4, 500, notes.E4, 250, notes.E4, 250, notes.D4, 500, notes.D4, 500, notes.C4, 1000, notes.G4, 500, notes.G4, 500, notes.F4, 500, notes.F4, 500, notes.E4, 500, notes.E4, 500, notes.D4, 1000, notes.G4, 500, notes.G4, 500, notes.F4, 500, notes.F4, 500, notes.E4, 500, notes.E4, 500, notes.D4, 1000, notes.C4, 500, notes.C4, 500, notes.G4, 500, notes.G4, 500, notes.A4, 500, notes.A4, 500, notes.G4, 1000, notes.F4, 500, notes.F4, 500, notes.E4, 500, notes.E4, 250, notes.E4, 250, notes.D4, 500, notes.D4, 500, notes.C4, 1000, } for i, pth in drm { if pth<127 { midi.note(pth, 127); } else { sleep(pth); } } console.pause(true);
登录后方可回帖