MIDIUtilPython的MIDI开发包
MIDIUtil 是一个 Python 包,用来生成 MIDI 音乐文件。
示例代码:
#Import the library
from midiutil.MidiFile import MIDIFile
# Create the MIDIFile Object with 1 track
MyMIDI = MIDIFile(1)
# Tracks are numbered from zero. Times are measured in beats.
track = 0
time = 0
# Add track name and tempo.
MyMIDI.addTrackName(track,time,"Sample Track")
MyMIDI.addTempo(track,time,120)
# Add a note. addNote expects the following information:
track = 0
channel = 0
pitch = 60
time = 0
duration = 1
volume = 100
# Now add the note.
MyMIDI.addNote(track,channel,pitch,time,duration,volume)
# And write it to disk.
binfile = open("output.mid", 'wb')
MyMIDI.writeFile(binfile)
binfile.close()
评论
python-github2Python 的开发包
python-github2 是 Python 的开发包,封装了 Github API v2 版本。
python-github2Python 的开发包
0
pytrietrie 的开发包
pytrie是一个前缀树(Trie)数据结构的Python开发包。在pytrie模块中,CharTrie和StringTrie类可以执行一个可变的映射接口。这个工具包具有以下特点:完整的可变映射实现。
pytrietrie 的开发包
0
JVOIPLIBVoIP的C++开发包
JVOIPLIB是一个面向对象的VoIP库,采用C++编写。ItisbaseduponworkdoneformythesisattheSchoolforKnowledgeTechnology(or'S
JVOIPLIBVoIP的C++开发包
0
ErlmongoMongoDB 的 Erlang 开发包
Erlmongo是一个第三方的MongoDB的Erlang语言开发包,对MongoDB的特性支持非常完整。示例代码:% -record(mydoc {name, i}).% This will wor
ErlmongoMongoDB 的 Erlang 开发包
0
MagickStudioImageMagick 的 Perl 开发包
MagickStudio 是 ImageMagick 的 Perl 开发包。
MagickStudioImageMagick 的 Perl 开发包
0