midilib 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Credits +5 -0
- data/README.rdoc +7 -0
- data/lib/midilib/event.rb +37 -10
- data/lib/midilib/info.rb +1 -1
- data/lib/midilib/track.rb +15 -2
- data/test/test_event.rb +29 -0
- data/test/test_io.rb +7 -0
- data/test/test_track.rb +5 -0
- metadata +2 -301
- data/html/classes/IO.html +0 -137
- data/html/classes/IO.src/M000001.html +0 -20
- data/html/classes/MIDI/ActiveSense.html +0 -156
- data/html/classes/MIDI/ActiveSense.src/M000160.html +0 -18
- data/html/classes/MIDI/ActiveSense.src/M000161.html +0 -18
- data/html/classes/MIDI/ChannelEvent.html +0 -179
- data/html/classes/MIDI/ChannelEvent.src/M000132.html +0 -20
- data/html/classes/MIDI/ChannelEvent.src/M000133.html +0 -18
- data/html/classes/MIDI/ChannelPressure.html +0 -184
- data/html/classes/MIDI/ChannelPressure.src/M000092.html +0 -19
- data/html/classes/MIDI/ChannelPressure.src/M000093.html +0 -20
- data/html/classes/MIDI/ChannelPressure.src/M000094.html +0 -18
- data/html/classes/MIDI/Clock.html +0 -156
- data/html/classes/MIDI/Clock.src/M000148.html +0 -18
- data/html/classes/MIDI/Clock.src/M000149.html +0 -18
- data/html/classes/MIDI/Continue.html +0 -156
- data/html/classes/MIDI/Continue.src/M000146.html +0 -18
- data/html/classes/MIDI/Continue.src/M000147.html +0 -18
- data/html/classes/MIDI/Controller.html +0 -189
- data/html/classes/MIDI/Controller.src/M000137.html +0 -21
- data/html/classes/MIDI/Controller.src/M000138.html +0 -21
- data/html/classes/MIDI/Controller.src/M000139.html +0 -18
- data/html/classes/MIDI/Event.html +0 -507
- data/html/classes/MIDI/Event.src/M000169.html +0 -30
- data/html/classes/MIDI/Event.src/M000170.html +0 -18
- data/html/classes/MIDI/Event.src/M000171.html +0 -18
- data/html/classes/MIDI/Event.src/M000172.html +0 -18
- data/html/classes/MIDI/Event.src/M000173.html +0 -18
- data/html/classes/MIDI/Event.src/M000174.html +0 -18
- data/html/classes/MIDI/Event.src/M000175.html +0 -18
- data/html/classes/MIDI/Event.src/M000176.html +0 -18
- data/html/classes/MIDI/Event.src/M000177.html +0 -18
- data/html/classes/MIDI/Event.src/M000178.html +0 -18
- data/html/classes/MIDI/Event.src/M000179.html +0 -18
- data/html/classes/MIDI/Event.src/M000180.html +0 -18
- data/html/classes/MIDI/Event.src/M000181.html +0 -22
- data/html/classes/MIDI/Event.src/M000182.html +0 -18
- data/html/classes/MIDI/Event.src/M000183.html +0 -18
- data/html/classes/MIDI/Event.src/M000184.html +0 -19
- data/html/classes/MIDI/Event.src/M000185.html +0 -18
- data/html/classes/MIDI/IO/MIDIFile.html +0 -959
- data/html/classes/MIDI/IO/MIDIFile.src/M000031.html +0 -22
- data/html/classes/MIDI/IO/MIDIFile.src/M000032.html +0 -24
- data/html/classes/MIDI/IO/MIDIFile.src/M000033.html +0 -19
- data/html/classes/MIDI/IO/MIDIFile.src/M000034.html +0 -20
- data/html/classes/MIDI/IO/MIDIFile.src/M000035.html +0 -19
- data/html/classes/MIDI/IO/MIDIFile.src/M000036.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000037.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000038.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000039.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000040.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000041.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000042.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000043.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000044.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000045.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000046.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000047.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000048.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000049.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000050.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000051.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000052.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000053.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000054.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000055.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000056.html +0 -17
- data/html/classes/MIDI/IO/MIDIFile.src/M000057.html +0 -43
- data/html/classes/MIDI/IO/MIDIFile.src/M000058.html +0 -34
- data/html/classes/MIDI/IO/MIDIFile.src/M000059.html +0 -96
- data/html/classes/MIDI/IO/MIDIFile.src/M000060.html +0 -18
- data/html/classes/MIDI/IO/MIDIFile.src/M000061.html +0 -49
- data/html/classes/MIDI/IO/MIDIFile.src/M000062.html +0 -42
- data/html/classes/MIDI/IO/MIDIFile.src/M000063.html +0 -19
- data/html/classes/MIDI/IO/MIDIFile.src/M000064.html +0 -19
- data/html/classes/MIDI/IO/MIDIFile.src/M000065.html +0 -20
- data/html/classes/MIDI/IO/MIDIFile.src/M000066.html +0 -21
- data/html/classes/MIDI/IO/MIDIFile.src/M000067.html +0 -31
- data/html/classes/MIDI/IO/MIDIFile.src/M000068.html +0 -20
- data/html/classes/MIDI/IO/MIDIFile.src/M000069.html +0 -22
- data/html/classes/MIDI/IO/MIDIFile.src/M000070.html +0 -30
- data/html/classes/MIDI/IO/MIDIFile.src/M000071.html +0 -18
- data/html/classes/MIDI/IO/MIDIFile.src/M000072.html +0 -20
- data/html/classes/MIDI/IO/MIDIFile.src/M000073.html +0 -18
- data/html/classes/MIDI/IO/MIDIFile.src/M000074.html +0 -18
- data/html/classes/MIDI/IO/SeqReader.html +0 -476
- data/html/classes/MIDI/IO/SeqReader.src/M000002.html +0 -22
- data/html/classes/MIDI/IO/SeqReader.src/M000003.html +0 -22
- data/html/classes/MIDI/IO/SeqReader.src/M000004.html +0 -21
- data/html/classes/MIDI/IO/SeqReader.src/M000005.html +0 -34
- data/html/classes/MIDI/IO/SeqReader.src/M000006.html +0 -26
- data/html/classes/MIDI/IO/SeqReader.src/M000007.html +0 -28
- data/html/classes/MIDI/IO/SeqReader.src/M000008.html +0 -21
- data/html/classes/MIDI/IO/SeqReader.src/M000009.html +0 -19
- data/html/classes/MIDI/IO/SeqReader.src/M000010.html +0 -19
- data/html/classes/MIDI/IO/SeqReader.src/M000011.html +0 -19
- data/html/classes/MIDI/IO/SeqReader.src/M000012.html +0 -19
- data/html/classes/MIDI/IO/SeqReader.src/M000013.html +0 -19
- data/html/classes/MIDI/IO/SeqReader.src/M000014.html +0 -18
- data/html/classes/MIDI/IO/SeqReader.src/M000015.html +0 -18
- data/html/classes/MIDI/IO/SeqReader.src/M000016.html +0 -29
- data/html/classes/MIDI/IO/SeqReader.src/M000017.html +0 -19
- data/html/classes/MIDI/IO/SeqReader.src/M000018.html +0 -18
- data/html/classes/MIDI/IO/SeqReader.src/M000019.html +0 -18
- data/html/classes/MIDI/IO/SeqReader.src/M000020.html +0 -18
- data/html/classes/MIDI/IO/SeqWriter.html +0 -282
- data/html/classes/MIDI/IO/SeqWriter.src/M000021.html +0 -19
- data/html/classes/MIDI/IO/SeqWriter.src/M000022.html +0 -25
- data/html/classes/MIDI/IO/SeqWriter.src/M000023.html +0 -22
- data/html/classes/MIDI/IO/SeqWriter.src/M000024.html +0 -54
- data/html/classes/MIDI/IO/SeqWriter.src/M000025.html +0 -49
- data/html/classes/MIDI/IO/SeqWriter.src/M000026.html +0 -21
- data/html/classes/MIDI/IO/SeqWriter.src/M000027.html +0 -19
- data/html/classes/MIDI/IO/SeqWriter.src/M000028.html +0 -23
- data/html/classes/MIDI/IO/SeqWriter.src/M000029.html +0 -24
- data/html/classes/MIDI/IO/SeqWriter.src/M000030.html +0 -19
- data/html/classes/MIDI/IO.html +0 -121
- data/html/classes/MIDI/KeySig.html +0 -241
- data/html/classes/MIDI/KeySig.src/M000140.html +0 -19
- data/html/classes/MIDI/KeySig.src/M000141.html +0 -23
- data/html/classes/MIDI/KeySig.src/M000142.html +0 -18
- data/html/classes/MIDI/KeySig.src/M000143.html +0 -18
- data/html/classes/MIDI/KeySig.src/M000144.html +0 -18
- data/html/classes/MIDI/KeySig.src/M000145.html +0 -23
- data/html/classes/MIDI/Marker.html +0 -139
- data/html/classes/MIDI/Marker.src/M000114.html +0 -18
- data/html/classes/MIDI/Measure.html +0 -242
- data/html/classes/MIDI/Measure.src/M000150.html +0 -23
- data/html/classes/MIDI/Measure.src/M000151.html +0 -20
- data/html/classes/MIDI/Measure.src/M000152.html +0 -18
- data/html/classes/MIDI/Measures.html +0 -217
- data/html/classes/MIDI/Measures.src/M000108.html +0 -20
- data/html/classes/MIDI/Measures.src/M000109.html +0 -18
- data/html/classes/MIDI/Measures.src/M000110.html +0 -21
- data/html/classes/MIDI/MetaEvent.html +0 -189
- data/html/classes/MIDI/MetaEvent.src/M000195.html +0 -21
- data/html/classes/MIDI/MetaEvent.src/M000196.html +0 -23
- data/html/classes/MIDI/MetaEvent.src/M000197.html +0 -53
- data/html/classes/MIDI/NoteEvent.html +0 -233
- data/html/classes/MIDI/NoteEvent.src/M000095.html +0 -21
- data/html/classes/MIDI/NoteEvent.src/M000096.html +0 -20
- data/html/classes/MIDI/NoteEvent.src/M000097.html +0 -18
- data/html/classes/MIDI/NoteEvent.src/M000098.html +0 -21
- data/html/classes/MIDI/NoteOffEvent.html +0 -169
- data/html/classes/MIDI/NoteOffEvent.src/M000090.html +0 -19
- data/html/classes/MIDI/NoteOffEvent.src/M000091.html +0 -19
- data/html/classes/MIDI/NoteOnEvent.html +0 -169
- data/html/classes/MIDI/NoteOnEvent.src/M000106.html +0 -19
- data/html/classes/MIDI/NoteOnEvent.src/M000107.html +0 -19
- data/html/classes/MIDI/PitchBend.html +0 -184
- data/html/classes/MIDI/PitchBend.src/M000111.html +0 -19
- data/html/classes/MIDI/PitchBend.src/M000112.html +0 -21
- data/html/classes/MIDI/PitchBend.src/M000113.html +0 -18
- data/html/classes/MIDI/PolyPressure.html +0 -186
- data/html/classes/MIDI/PolyPressure.src/M000198.html +0 -18
- data/html/classes/MIDI/PolyPressure.src/M000199.html +0 -18
- data/html/classes/MIDI/PolyPressure.src/M000200.html +0 -18
- data/html/classes/MIDI/PolyPressure.src/M000201.html +0 -19
- data/html/classes/MIDI/ProgramChange.html +0 -184
- data/html/classes/MIDI/ProgramChange.src/M000103.html +0 -20
- data/html/classes/MIDI/ProgramChange.src/M000104.html +0 -20
- data/html/classes/MIDI/ProgramChange.src/M000105.html +0 -18
- data/html/classes/MIDI/Realtime.html +0 -171
- data/html/classes/MIDI/Realtime.src/M000087.html +0 -19
- data/html/classes/MIDI/Realtime.src/M000088.html +0 -19
- data/html/classes/MIDI/Realtime.src/M000089.html +0 -18
- data/html/classes/MIDI/Sequence.html +0 -500
- data/html/classes/MIDI/Sequence.src/M000115.html +0 -28
- data/html/classes/MIDI/Sequence.src/M000116.html +0 -21
- data/html/classes/MIDI/Sequence.src/M000117.html +0 -22
- data/html/classes/MIDI/Sequence.src/M000120.html +0 -18
- data/html/classes/MIDI/Sequence.src/M000121.html +0 -27
- data/html/classes/MIDI/Sequence.src/M000122.html +0 -18
- data/html/classes/MIDI/Sequence.src/M000123.html +0 -19
- data/html/classes/MIDI/Sequence.src/M000124.html +0 -19
- data/html/classes/MIDI/Sequence.src/M000125.html +0 -19
- data/html/classes/MIDI/Sequence.src/M000126.html +0 -19
- data/html/classes/MIDI/Sequence.src/M000127.html +0 -18
- data/html/classes/MIDI/Sequence.src/M000128.html +0 -54
- data/html/classes/MIDI/SongPointer.html +0 -184
- data/html/classes/MIDI/SongPointer.src/M000162.html +0 -19
- data/html/classes/MIDI/SongPointer.src/M000163.html +0 -21
- data/html/classes/MIDI/SongPointer.src/M000164.html +0 -18
- data/html/classes/MIDI/SongSelect.html +0 -184
- data/html/classes/MIDI/SongSelect.src/M000134.html +0 -19
- data/html/classes/MIDI/SongSelect.src/M000135.html +0 -20
- data/html/classes/MIDI/SongSelect.src/M000136.html +0 -18
- data/html/classes/MIDI/Start.html +0 -156
- data/html/classes/MIDI/Start.src/M000101.html +0 -18
- data/html/classes/MIDI/Start.src/M000102.html +0 -18
- data/html/classes/MIDI/Stop.html +0 -156
- data/html/classes/MIDI/Stop.src/M000099.html +0 -18
- data/html/classes/MIDI/Stop.src/M000100.html +0 -18
- data/html/classes/MIDI/SystemCommon.html +0 -139
- data/html/classes/MIDI/SystemCommon.src/M000168.html +0 -19
- data/html/classes/MIDI/SystemExclusive.html +0 -184
- data/html/classes/MIDI/SystemExclusive.src/M000165.html +0 -19
- data/html/classes/MIDI/SystemExclusive.src/M000166.html +0 -23
- data/html/classes/MIDI/SystemExclusive.src/M000167.html +0 -18
- data/html/classes/MIDI/SystemReset.html +0 -156
- data/html/classes/MIDI/SystemReset.src/M000085.html +0 -18
- data/html/classes/MIDI/SystemReset.src/M000086.html +0 -18
- data/html/classes/MIDI/Tempo.html +0 -250
- data/html/classes/MIDI/Tempo.src/M000186.html +0 -18
- data/html/classes/MIDI/Tempo.src/M000187.html +0 -20
- data/html/classes/MIDI/Tempo.src/M000188.html +0 -18
- data/html/classes/MIDI/Tempo.src/M000189.html +0 -18
- data/html/classes/MIDI/Tempo.src/M000190.html +0 -18
- data/html/classes/MIDI/Tempo.src/M000191.html +0 -24
- data/html/classes/MIDI/Tempo.src/M000192.html +0 -18
- data/html/classes/MIDI/TimeSig.html +0 -263
- data/html/classes/MIDI/TimeSig.src/M000153.html +0 -19
- data/html/classes/MIDI/TimeSig.src/M000154.html +0 -25
- data/html/classes/MIDI/TimeSig.src/M000155.html +0 -18
- data/html/classes/MIDI/TimeSig.src/M000156.html +0 -18
- data/html/classes/MIDI/TimeSig.src/M000157.html +0 -18
- data/html/classes/MIDI/TimeSig.src/M000158.html +0 -18
- data/html/classes/MIDI/TimeSig.src/M000159.html +0 -18
- data/html/classes/MIDI/Track.html +0 -389
- data/html/classes/MIDI/Track.src/M000075.html +0 -23
- data/html/classes/MIDI/Track.src/M000076.html +0 -21
- data/html/classes/MIDI/Track.src/M000077.html +0 -26
- data/html/classes/MIDI/Track.src/M000078.html +0 -18
- data/html/classes/MIDI/Track.src/M000079.html +0 -22
- data/html/classes/MIDI/Track.src/M000080.html +0 -25
- data/html/classes/MIDI/Track.src/M000081.html +0 -22
- data/html/classes/MIDI/Track.src/M000082.html +0 -26
- data/html/classes/MIDI/Track.src/M000083.html +0 -18
- data/html/classes/MIDI/Track.src/M000084.html +0 -19
- data/html/classes/MIDI/TuneRequest.html +0 -171
- data/html/classes/MIDI/TuneRequest.src/M000129.html +0 -18
- data/html/classes/MIDI/TuneRequest.src/M000130.html +0 -19
- data/html/classes/MIDI/TuneRequest.src/M000131.html +0 -18
- data/html/classes/MIDI/Utils.html +0 -190
- data/html/classes/MIDI/Utils.src/M000193.html +0 -20
- data/html/classes/MIDI/Utils.src/M000194.html +0 -25
- data/html/classes/MIDI.html +0 -758
- data/html/created.rid +0 -1
- data/html/files/README_rdoc.html +0 -720
- data/html/files/TODO_rdoc.html +0 -150
- data/html/files/lib/midilib/consts_rb.html +0 -107
- data/html/files/lib/midilib/event_rb.html +0 -109
- data/html/files/lib/midilib/info_rb.html +0 -101
- data/html/files/lib/midilib/io/midifile_rb.html +0 -108
- data/html/files/lib/midilib/io/seqreader_rb.html +0 -110
- data/html/files/lib/midilib/io/seqwriter_rb.html +0 -115
- data/html/files/lib/midilib/measure_rb.html +0 -108
- data/html/files/lib/midilib/sequence_rb.html +0 -110
- data/html/files/lib/midilib/track_rb.html +0 -108
- data/html/files/lib/midilib/utils_rb.html +0 -101
- data/html/files/lib/midilib_rb.html +0 -124
- data/html/fr_class_index.html +0 -64
- data/html/fr_file_index.html +0 -39
- data/html/fr_method_index.html +0 -227
- data/html/index.html +0 -24
- data/html/rdoc-style.css +0 -208
data/html/files/README_rdoc.html
DELETED
@@ -1,720 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>File: README.rdoc</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="fileHeader">
|
50
|
-
<h1>README.rdoc</h1>
|
51
|
-
<table class="header-table">
|
52
|
-
<tr class="top-aligned-row">
|
53
|
-
<td><strong>Path:</strong></td>
|
54
|
-
<td>README.rdoc
|
55
|
-
</td>
|
56
|
-
</tr>
|
57
|
-
<tr class="top-aligned-row">
|
58
|
-
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Sun Jan 04 21:29:11 -0500 2009</td>
|
60
|
-
</tr>
|
61
|
-
</table>
|
62
|
-
</div>
|
63
|
-
<!-- banner header -->
|
64
|
-
|
65
|
-
<div id="bodyContent">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<div id="contextContent">
|
70
|
-
|
71
|
-
<div id="description">
|
72
|
-
<h1>midilib</h1>
|
73
|
-
<p>
|
74
|
-
midilib is a pure Ruby <a href="../classes/MIDI.html">MIDI</a> library
|
75
|
-
useful for reading and writing standard <a
|
76
|
-
href="../classes/MIDI.html">MIDI</a> files and manipulating <a
|
77
|
-
href="../classes/MIDI.html">MIDI</a> event data. Classes include <a
|
78
|
-
href="../classes/MIDI/Sequence.html">MIDI::Sequence</a>, <a
|
79
|
-
href="../classes/MIDI/Track.html">MIDI::Track</a>, <a
|
80
|
-
href="../classes/MIDI/Event.html">MIDI::Event</a>, and <a
|
81
|
-
href="../classes/MIDI/IO/MIDIFile.html">MIDI::IO::MIDIFile</a> and its
|
82
|
-
subclasses <a
|
83
|
-
href="../classes/MIDI/IO/SeqReader.html">MIDI::IO::SeqReader</a> and <a
|
84
|
-
href="../classes/MIDI/IO/SeqWriter.html">MIDI::IO::SeqWriter</a>.
|
85
|
-
</p>
|
86
|
-
<p>
|
87
|
-
The Web site of midilib is (<a
|
88
|
-
href="http://midilib.rubyforge.org">midilib.rubyforge.org</a>). The
|
89
|
-
RubyForge project page is <a
|
90
|
-
href="http://rubyforge.org/projects/midilib">rubyforge.org/projects/midilib</a>,
|
91
|
-
where the latest version of midilib may be downloaded. midilib is also
|
92
|
-
available as a RubyGem.
|
93
|
-
</p>
|
94
|
-
<h2>Dependencies</h2>
|
95
|
-
<p>
|
96
|
-
midilib does not require any other packages. The test suite in the tests
|
97
|
-
directory requires the testing framework TestUnit, which comes with Ruby
|
98
|
-
1.8 and later and can also be found in the Ruby Application Archive (<a
|
99
|
-
href="http://raa.ruby-lang.org">raa.ruby-lang.org</a>).
|
100
|
-
</p>
|
101
|
-
<p>
|
102
|
-
To rebuild the gem or RDocs or run the tests easily, you can use the
|
103
|
-
Rakefile which requires Rake (<a
|
104
|
-
href="http://rake.rubyforge.org">rake.rubyforge.org</a>).
|
105
|
-
</p>
|
106
|
-
<h2>Installation</h2>
|
107
|
-
<h3>RubyGems Installation</h3>
|
108
|
-
<p>
|
109
|
-
To install midilib as a gem, type
|
110
|
-
</p>
|
111
|
-
<pre>
|
112
|
-
% gem install midilib
|
113
|
-
</pre>
|
114
|
-
<p>
|
115
|
-
or
|
116
|
-
</p>
|
117
|
-
<pre>
|
118
|
-
% gem update midilib
|
119
|
-
</pre>
|
120
|
-
<p>
|
121
|
-
if you already have a previous version. You may need root privileges to
|
122
|
-
install or update the gem.
|
123
|
-
</p>
|
124
|
-
<h3>Manual Installation</h3>
|
125
|
-
<p>
|
126
|
-
After downloading and expanding the archive, you can install midilib with
|
127
|
-
the command
|
128
|
-
</p>
|
129
|
-
<pre>
|
130
|
-
% ruby install.rb
|
131
|
-
</pre>
|
132
|
-
<p>
|
133
|
-
(or)
|
134
|
-
</p>
|
135
|
-
<pre>
|
136
|
-
% ruby install.rb --install-dir=my_directory
|
137
|
-
</pre>
|
138
|
-
<p>
|
139
|
-
You may need root privileges to install.
|
140
|
-
</p>
|
141
|
-
<h2>Testing</h2>
|
142
|
-
<pre>
|
143
|
-
% rake test
|
144
|
-
</pre>
|
145
|
-
<p>
|
146
|
-
runs all of the tests in the test directory.
|
147
|
-
</p>
|
148
|
-
<h2>Overview</h2>
|
149
|
-
<p>
|
150
|
-
<a href="../classes/MIDI.html">MIDI</a> file <a
|
151
|
-
href="../classes/IO.html">IO</a> only understands <a
|
152
|
-
href="../classes/MIDI.html">MIDI</a> file format 1, where a sequence is
|
153
|
-
made up of multiple tracks. It doesn‘t yet understand format 0 (a
|
154
|
-
single track containing all events) or format 2 (a collection of format 0
|
155
|
-
files in one file).
|
156
|
-
</p>
|
157
|
-
<h3><a href="../classes/MIDI/Sequence.html">MIDI::Sequence</a></h3>
|
158
|
-
<p>
|
159
|
-
A sequence contains a collection of tracks and global information like the
|
160
|
-
sequence‘s pulses per quarter note (ppqn) and time signature.
|
161
|
-
</p>
|
162
|
-
<p>
|
163
|
-
The first track in a sequence is special; it holds meta-events like tempo
|
164
|
-
and sequence name. Don‘t put any notes in this track.
|
165
|
-
</p>
|
166
|
-
<p>
|
167
|
-
<a href="../classes/MIDI/Sequence.html">MIDI::Sequence</a> also contains
|
168
|
-
some convenience methods that let you set and retrieve the sequence‘s
|
169
|
-
name, the time signature, and to retrieve the first tempo event‘s
|
170
|
-
beats-per-minute value.
|
171
|
-
</p>
|
172
|
-
<p>
|
173
|
-
Normally instances of <a
|
174
|
-
href="../classes/MIDI/IO/SeqReader.html">MIDI::IO::SeqReader</a> and <a
|
175
|
-
href="../classes/MIDI/IO/SeqWriter.html">MIDI::IO::SeqWriter</a> are used
|
176
|
-
when a sequence reads itself from or writes itself to a <a
|
177
|
-
href="../classes/MIDI.html">MIDI</a> file. You can change that by setting a
|
178
|
-
sequence‘s reader_class or writer_class attributes. Instances of the
|
179
|
-
classes contained in those attributes are created and used whenever the
|
180
|
-
sequence reads or writes itself.
|
181
|
-
</p>
|
182
|
-
<h3><a href="../classes/MIDI/Track.html">MIDI::Track</a></h3>
|
183
|
-
<p>
|
184
|
-
A track contains an array of events.
|
185
|
-
</p>
|
186
|
-
<p>
|
187
|
-
When you modify the <tt>events</tt> array, make sure to call recalc_times
|
188
|
-
so each event gets its <tt>time_from_start</tt> recalculated. You
|
189
|
-
don‘t have to do that after every event you add; just remember to do
|
190
|
-
so before using the track in a way that expects the list of events to be
|
191
|
-
ordered correctly.
|
192
|
-
</p>
|
193
|
-
<p>
|
194
|
-
A Track also holds a bit mask that specifies the channels used by the
|
195
|
-
track. This bit mask is set when the track is read from the <a
|
196
|
-
href="../classes/MIDI.html">MIDI</a> file by a SeqReader but is
|
197
|
-
<em>not</em> kept up to date by any other methods. Specifically, if you add
|
198
|
-
events to a track at any other time, the bit mask will not be updated.
|
199
|
-
</p>
|
200
|
-
<h3><a href="../classes/MIDI/Measure.html">MIDI::Measure</a></h3>
|
201
|
-
<p>
|
202
|
-
This class contains information about a measure from the sequence. Measure
|
203
|
-
data is based on the time signature information from the sequence and is
|
204
|
-
not stored in the sequence itself.
|
205
|
-
</p>
|
206
|
-
<h3><a href="../classes/MIDI/Measures.html">MIDI::Measures</a></h3>
|
207
|
-
<p>
|
208
|
-
The class <a href="../classes/MIDI/Sequence.html">MIDI::Sequence</a> method
|
209
|
-
get_measures returns a <a
|
210
|
-
href="../classes/MIDI/Measures.html">MIDI::Measures</a> object. <a
|
211
|
-
href="../classes/MIDI/Measures.html">MIDI::Measures</a> is a subclass of
|
212
|
-
Array. It is a specialized container for <a
|
213
|
-
href="../classes/MIDI/Measure.html">MIDI::Measure</a> objects, which can be
|
214
|
-
use to map event times to measure numbers. Please note that this object has
|
215
|
-
to be remade when events are deleted/added in the sequence.
|
216
|
-
</p>
|
217
|
-
<p>
|
218
|
-
<a href="../classes/MIDI/Measure.html">MIDI::Measure</a> and <a
|
219
|
-
href="../classes/MIDI/Measures.html">MIDI::Measures</a> are brought to us
|
220
|
-
by Jari Williamsson <jari.williamsson@mailbox.swipnet.se>, who also
|
221
|
-
contributed some improvements to the <a
|
222
|
-
href="../classes/MIDI/Event.html">MIDI::Event</a> and <a
|
223
|
-
href="../classes/MIDI/Track.html">MIDI::Track</a> classes.
|
224
|
-
</p>
|
225
|
-
<h3><a href="../classes/MIDI/Event.html">MIDI::Event</a></h3>
|
226
|
-
<p>
|
227
|
-
Each event holds not only its delta time but also its time from the start
|
228
|
-
of the track. The track is responsible for recalculating its events’
|
229
|
-
start times. You can call MIDI::Track#recalc_times to do so.
|
230
|
-
</p>
|
231
|
-
<p>
|
232
|
-
Events have a number of boolean methods that identify their types, like
|
233
|
-
channel?, note?, note_on?, note_off?, meta?, system?, realtime?, and
|
234
|
-
program_change?. Events know how to print themselves. By default, all
|
235
|
-
numbers are printed as hexidecimal and channel numbers are printed from
|
236
|
-
0-15. Setting print_decimal_numbers to true will output decimal numbers and
|
237
|
-
setting print_channel_numbers_from_one will output channel numbers from
|
238
|
-
1-16.
|
239
|
-
</p>
|
240
|
-
<p>
|
241
|
-
Subclasses of <a href="../classes/MIDI/Event.html">MIDI::Event</a>
|
242
|
-
implement the various <a href="../classes/MIDI.html">MIDI</a> messages such
|
243
|
-
as note on and off, controller values, system exclusive data, and realtime
|
244
|
-
bytes.
|
245
|
-
</p>
|
246
|
-
<p>
|
247
|
-
<a href="../classes/MIDI/Realtime.html">MIDI::Realtime</a> events have
|
248
|
-
delta values and start times, just like all the other midilib event types
|
249
|
-
do. (<a href="../classes/MIDI.html">MIDI</a> real time status bytes
|
250
|
-
don‘t have delta times, but this way we can record when in a track
|
251
|
-
the realtime byte was received and should be sent. This is useful for
|
252
|
-
start/continue/stop events that control other devices, for example.) Note
|
253
|
-
that when a <a href="../classes/MIDI/Realtime.html">MIDI::Realtime</a>
|
254
|
-
event is written out to a <a href="../classes/MIDI.html">MIDI</a> file, the
|
255
|
-
delta time is not written.
|
256
|
-
</p>
|
257
|
-
<h2>How To Use</h2>
|
258
|
-
<p>
|
259
|
-
The following examples show you how to use midilib to read, write, and
|
260
|
-
manipulate <a href="../classes/MIDI.html">MIDI</a> files and modify track
|
261
|
-
events. See also the files in the examples directory, which are described
|
262
|
-
below.
|
263
|
-
</p>
|
264
|
-
<h3>Reading a <a href="../classes/MIDI.html">MIDI</a> File</h3>
|
265
|
-
<p>
|
266
|
-
To read a <a href="../classes/MIDI.html">MIDI</a> file, create a <a
|
267
|
-
href="../classes/MIDI/Sequence.html">MIDI::Sequence</a> object and call its
|
268
|
-
read method, passing in an <a href="../classes/IO.html">IO</a> object.
|
269
|
-
</p>
|
270
|
-
<p>
|
271
|
-
The read method takes an optional block. If present, the block is called
|
272
|
-
once after each track has finished being read. Each time, it is passed the
|
273
|
-
total number of tracks and the number of the current track that has just
|
274
|
-
been read. This is useful for notifying the user of progress, for example
|
275
|
-
by updating a GUI progress bar.
|
276
|
-
</p>
|
277
|
-
<pre>
|
278
|
-
require 'midi/io/seqreader'
|
279
|
-
|
280
|
-
# Create a new, empty sequence.
|
281
|
-
seq = MIDI::Sequence.new()
|
282
|
-
|
283
|
-
# Read the contents of a MIDI file into the sequence.
|
284
|
-
File.open('my_midi_file.mid', 'rb') { | file |
|
285
|
-
seq.read(file) { | num_tracks, i |
|
286
|
-
# Print something when each track is read.
|
287
|
-
puts "read track #{i} of #{num_tracks}"
|
288
|
-
}
|
289
|
-
}
|
290
|
-
</pre>
|
291
|
-
<h3>Writing a <a href="../classes/MIDI.html">MIDI</a> File</h3>
|
292
|
-
<p>
|
293
|
-
To write a <a href="../classes/MIDI.html">MIDI</a> file, call the write
|
294
|
-
method, passing in an <a href="../classes/IO.html">IO</a> object.
|
295
|
-
</p>
|
296
|
-
<pre>
|
297
|
-
require 'midi/io/seqwriter'
|
298
|
-
|
299
|
-
# Start with a sequence that has something worth saving.
|
300
|
-
seq = read_or_create_seq_we_care_not_how()
|
301
|
-
|
302
|
-
# Write the sequence to a MIDI file.
|
303
|
-
File.open('my_output_file.mid', 'wb') { | file | seq.write(file) }
|
304
|
-
</pre>
|
305
|
-
<h3>Editing a <a href="../classes/MIDI.html">MIDI</a> File</h3>
|
306
|
-
<p>
|
307
|
-
Combining the last two examples, here is a script that reads a <a
|
308
|
-
href="../classes/MIDI.html">MIDI</a> file, transposes some events, and
|
309
|
-
writes the sequence out to a different file. This is a useful template for
|
310
|
-
programatically manipulating <a href="../classes/MIDI.html">MIDI</a> data.
|
311
|
-
</p>
|
312
|
-
<p>
|
313
|
-
This code transposes all of the note events (note on, note off, and poly
|
314
|
-
pressure) on channel 5 down one octave. It‘s easy to find events that
|
315
|
-
need to be transposed: the method note? returns true.
|
316
|
-
</p>
|
317
|
-
<h4>Transposing One Channel</h4>
|
318
|
-
<pre>
|
319
|
-
require 'midi/io/seqreader'
|
320
|
-
require 'midi/io/seqwriter'
|
321
|
-
|
322
|
-
# Create a new, empty sequence.
|
323
|
-
seq = MIDI::Sequence.new()
|
324
|
-
|
325
|
-
# Read the contents of a MIDI file into the sequence.
|
326
|
-
File.open('my_input_file.mid', 'rb') { | file |
|
327
|
-
seq.read(file) { | num_tracks, i |
|
328
|
-
# Print something when each track is read.
|
329
|
-
puts "read track #{i} of #{num_tracks}"
|
330
|
-
}
|
331
|
-
}
|
332
|
-
|
333
|
-
# Iterate over every event in every track.
|
334
|
-
seq.each { | track |
|
335
|
-
track.each { | event |
|
336
|
-
# If the event is a note event (note on, note off, or poly
|
337
|
-
# pressure) and it is on MIDI channel 5 (channels start at
|
338
|
-
# 0, so we use 4), then transpose the event down one octave.
|
339
|
-
if event.note? && event.channel == 4
|
340
|
-
event.note -= 12
|
341
|
-
end
|
342
|
-
}
|
343
|
-
}
|
344
|
-
|
345
|
-
# Write the sequence to a MIDI file.
|
346
|
-
File.open('my_output_file.mid', 'wb') { | file | seq.write(file) }
|
347
|
-
</pre>
|
348
|
-
<h3>Manipulating tracks</h3>
|
349
|
-
<p>
|
350
|
-
If you modify a track‘s list of events directly, don‘t forget
|
351
|
-
to call MIDI::Track#recalc_times when you are done.
|
352
|
-
</p>
|
353
|
-
<pre>
|
354
|
-
track.events[42, 1] = array_of_events
|
355
|
-
track.events << an_event
|
356
|
-
track.merge(array_of_events)
|
357
|
-
track.recalc_times
|
358
|
-
</pre>
|
359
|
-
<h3>Calculating delta times</h3>
|
360
|
-
<p>
|
361
|
-
A few methods in <a href="../classes/MIDI/Sequence.html">MIDI::Sequence</a>
|
362
|
-
make it easier to calculate the delta times that represent note lengths.
|
363
|
-
MIDI::Sequence#length_to_delta takes a note length (a multiple of a quarter
|
364
|
-
note) and returns the delta time given the sequence‘s current ppqn
|
365
|
-
(pulses per quarter note) setting. 1 is a quarter note, 1.0/32.0 is a 32nd
|
366
|
-
note (use floating-point numbers to avoid integer rounding), 1.5 is a
|
367
|
-
dotted quarter, etc. See the documentation for that method for more
|
368
|
-
information.
|
369
|
-
</p>
|
370
|
-
<p>
|
371
|
-
MIDI::Sequence#note_to_length takes a note name and returns a length value
|
372
|
-
(again, as a multiple of a quarter note). Legal note names are those found
|
373
|
-
in MIDI::Sequence::NOTE_TO_LENGTH, and may begin with "dotted"
|
374
|
-
and/or end with "triplet". For example, "whole",
|
375
|
-
"sixteenth", "32nd", "quarter triplet",
|
376
|
-
"dotted 16th", and "dotted 8th triplet" are all legal
|
377
|
-
note names.
|
378
|
-
</p>
|
379
|
-
<p>
|
380
|
-
Finally, MIDI::Sequence#note_to_delta takes a note name and returns a delta
|
381
|
-
time. It does this by calling note_to_length, then passing the result to
|
382
|
-
length_to_delta.
|
383
|
-
</p>
|
384
|
-
<h3>Example Scripts</h3>
|
385
|
-
<p>
|
386
|
-
Here are short descriptions of each of the examples found in the examples
|
387
|
-
directory.
|
388
|
-
</p>
|
389
|
-
<ul>
|
390
|
-
<li>examples/from_scratch.rb shows you how to create a new sequence from
|
391
|
-
scratch and save it to a <a href="../classes/MIDI.html">MIDI</a> file. It
|
392
|
-
creates a file called ‘from_scratch.mid’.
|
393
|
-
|
394
|
-
</li>
|
395
|
-
<li>examples/seq2text.rb dumps a <a href="../classes/MIDI.html">MIDI</a> file
|
396
|
-
as text. It reads in a sequence and uses the to_s method of each event.
|
397
|
-
|
398
|
-
</li>
|
399
|
-
<li>examples/reader2text.rb dumps a <a href="../classes/MIDI.html">MIDI</a>
|
400
|
-
file as text. It subclasses MIDI::SeqReader instead of creating a sequence
|
401
|
-
containing tracks and events.
|
402
|
-
|
403
|
-
</li>
|
404
|
-
<li>examples/transpose.rb transposes all note events (note on, note off, poly
|
405
|
-
pressure) on a specified channel by a specified amount.
|
406
|
-
|
407
|
-
</li>
|
408
|
-
<li>There is also one <a href="../classes/MIDI.html">MIDI</a> file,
|
409
|
-
examples/NoFences.mid. It is a little pop ditty I wrote. The instruments in
|
410
|
-
this file use General <a href="../classes/MIDI.html">MIDI</a> patch numbers
|
411
|
-
and drum note assignments. Since I don‘t normally use GM patches, the
|
412
|
-
sounds used here are at best approximations of the sounds I use.
|
413
|
-
|
414
|
-
</li>
|
415
|
-
</ul>
|
416
|
-
<h2>Resources</h2>
|
417
|
-
<p>
|
418
|
-
The Ruby Web site (<a
|
419
|
-
href="http://www.ruby-lang.org/en/index.html">www.ruby-lang.org/en/index.html</a>)
|
420
|
-
contains an introduction to Ruby, the Ruby Application Archive (RAA) at <a
|
421
|
-
href="http://raa.ruby-lang.org">raa.ruby-lang.org</a>, and pointers to more
|
422
|
-
information.
|
423
|
-
</p>
|
424
|
-
<p>
|
425
|
-
<cite>Programming Ruby, The Pragmatic Programmer‘s
|
426
|
-
Guide</cite>, by David Thomas and Andrew Hunt, is a well-written and
|
427
|
-
practical introduction to Ruby. Its Web page at <a
|
428
|
-
href="http://www.rubycentral.com/book">www.rubycentral.com/book</a> also
|
429
|
-
contains a wealth of Ruby information. Though the first edition book is
|
430
|
-
available online, I encourage you to purchase a copy of the latest edition.
|
431
|
-
</p>
|
432
|
-
<p>
|
433
|
-
A description of the <a href="../classes/MIDI.html">MIDI</a> file format
|
434
|
-
can be found in a few places such as <a
|
435
|
-
href="http://www.borg.com/~jglatt/tech/midifile.htm">www.borg.com/~jglatt/tech/midifile.htm</a>.
|
436
|
-
</p>
|
437
|
-
<p>
|
438
|
-
The <a href="../classes/MIDI.html">MIDI</a> message reference at <a
|
439
|
-
href="http://www.io.com/~jimm/midi_ref.html">www.io.com/~jimm/midi_ref.html</a>
|
440
|
-
describes the format of <a href="../classes/MIDI.html">MIDI</a> commands.
|
441
|
-
</p>
|
442
|
-
<h1>To Do</h1>
|
443
|
-
<h2>Bugs</h2>
|
444
|
-
<ul>
|
445
|
-
<li>Track#recalc_delta_from_times needs to use a stable sorting algorithm. See
|
446
|
-
Adam‘s notes at <a
|
447
|
-
href="http://github.com/adamjmurray/cosy/wikis/midilib-notes">github.com/adamjmurray/cosy/wikis/midilib-notes</a>
|
448
|
-
and solution at <a
|
449
|
-
href="http://github.com/adamjmurray/cosy/tree/master/lib/cosy/renderer/midi_file_renderer.rb">github.com/adamjmurray/cosy/tree/master/lib/cosy/renderer/midi_file_renderer.rb</a>.
|
450
|
-
Adam has given me permission to include his fix.
|
451
|
-
|
452
|
-
</li>
|
453
|
-
</ul>
|
454
|
-
<h2>Features</h2>
|
455
|
-
<ul>
|
456
|
-
<li>Method to translate event‘s time_from_start to number of milliseconds
|
457
|
-
from start.
|
458
|
-
|
459
|
-
</li>
|
460
|
-
<li>Swing quantizing. (Implied by list email from Carl Youngblood
|
461
|
-
<carl.youngblood@gmail.com>)
|
462
|
-
|
463
|
-
</li>
|
464
|
-
<li>Implement key signature in SeqReader.
|
465
|
-
|
466
|
-
</li>
|
467
|
-
<li>Format 0 files.
|
468
|
-
|
469
|
-
</li>
|
470
|
-
<li>Format 2 files(?).
|
471
|
-
|
472
|
-
</li>
|
473
|
-
</ul>
|
474
|
-
<h2>Documentation</h2>
|
475
|
-
<ul>
|
476
|
-
<li>Write better docs.
|
477
|
-
|
478
|
-
</li>
|
479
|
-
</ul>
|
480
|
-
<h2>Tests</h2>
|
481
|
-
<ul>
|
482
|
-
<li>Tests for Adam‘s stable sorting algorithm.
|
483
|
-
|
484
|
-
</li>
|
485
|
-
<li>Tests for Noah Thorp‘s midilib bug fixes.
|
486
|
-
|
487
|
-
</li>
|
488
|
-
</ul>
|
489
|
-
<h1>Support</h1>
|
490
|
-
<ul>
|
491
|
-
<li>Visit the forums, bug list, and mailing list pages at <a
|
492
|
-
href="http://rubyforge.org/projects/midilib">rubyforge.org/projects/midilib</a>
|
493
|
-
|
494
|
-
</li>
|
495
|
-
<li>Send email to Jim Menard at <a href="mailto:jimm@io.com">jimm@io.com</a>
|
496
|
-
|
497
|
-
</li>
|
498
|
-
<li>Ask on the ruby-talk mailing list
|
499
|
-
|
500
|
-
</li>
|
501
|
-
</ul>
|
502
|
-
<h1>Administrivia</h1>
|
503
|
-
<table>
|
504
|
-
<tr><td valign="top">Author:</td><td>Jim Menard (<a href="mailto:jimm@io.com">jimm@io.com</a>)
|
505
|
-
|
506
|
-
</td></tr>
|
507
|
-
<tr><td valign="top">Copyright:</td><td>Copyright (c) 2003-2009 Jim Menard
|
508
|
-
|
509
|
-
</td></tr>
|
510
|
-
<tr><td valign="top">License:</td><td>Distributed under the same license as Ruby.
|
511
|
-
|
512
|
-
</td></tr>
|
513
|
-
</table>
|
514
|
-
<h2>Copying</h2>
|
515
|
-
<p>
|
516
|
-
midilib is copyrighted free software by Jim Menard and is released under
|
517
|
-
the same license as Ruby. See the Ruby license at <a
|
518
|
-
href="http://www.ruby-lang.org/en/LICENSE.txt">www.ruby-lang.org/en/LICENSE.txt</a>.
|
519
|
-
</p>
|
520
|
-
<p>
|
521
|
-
midilib may be freely copied in its entirety providing this notice, all
|
522
|
-
source code, all documentation, and all other files are included.
|
523
|
-
</p>
|
524
|
-
<p>
|
525
|
-
midilib is Copyright (c) 2003-2009 by Jim Menard.
|
526
|
-
</p>
|
527
|
-
<p>
|
528
|
-
The song "No Fences" contained in the <a
|
529
|
-
href="../classes/MIDI.html">MIDI</a> file examples/NoFences.mid is
|
530
|
-
Copyright (c) 1992 by Jim Menard (jimm@io.com). It may be freely used for
|
531
|
-
non-commercial purposes as long as the author is given credit.
|
532
|
-
</p>
|
533
|
-
<h3>Recent Changes</h3>
|
534
|
-
<h4>Changes for 1.2.0:</h4>
|
535
|
-
<p>
|
536
|
-
Use byte arrays instead of strings for passing around data. All tests now
|
537
|
-
pass for both Ruby 1.8.X and 1.9.X.
|
538
|
-
</p>
|
539
|
-
<h4>New code repository</h4>
|
540
|
-
<p>
|
541
|
-
The midilib code is now hosted at Github (<a
|
542
|
-
href="http://github.com/jimm/midilib">github.com/jimm/midilib</a>).
|
543
|
-
</p>
|
544
|
-
<h4>Changes for 1.1.4:</h4>
|
545
|
-
<ul>
|
546
|
-
<li>Fixed a bug in KeySig.data_as_bytes. Thanks to Noah Thorp for finding this
|
547
|
-
and the bug fixed in 1.1.3.
|
548
|
-
|
549
|
-
</li>
|
550
|
-
</ul>
|
551
|
-
<h4>Changes for 1.1.3:</h4>
|
552
|
-
<ul>
|
553
|
-
<li>Fixed the way midilib detects the behavior of IO.getc.
|
554
|
-
|
555
|
-
</li>
|
556
|
-
</ul>
|
557
|
-
<h4>Changes for 1.1.2:</h4>
|
558
|
-
<ul>
|
559
|
-
<li>Define MIDI::IO::MIDIFile.getc differently for different Ruby versions,
|
560
|
-
instead of checking for String.bytes every time we read a byte.
|
561
|
-
|
562
|
-
</li>
|
563
|
-
</ul>
|
564
|
-
<h4>Changes for 1.1.1:</h4>
|
565
|
-
<ul>
|
566
|
-
<li>Make MIDI::IO::MIDIFile.getc do the right thing for both Ruby 1.8 and 1.9.
|
567
|
-
|
568
|
-
</li>
|
569
|
-
</ul>
|
570
|
-
<h4>Changes for 1.1.0:</h4>
|
571
|
-
<ul>
|
572
|
-
<li>Added test/test.mid to list of files to be included when packaging midifile
|
573
|
-
for distribution.
|
574
|
-
|
575
|
-
</li>
|
576
|
-
</ul>
|
577
|
-
<h4>Changes for 1.0.0:</h4>
|
578
|
-
<ul>
|
579
|
-
<li>Fixed the bug in Track#recalc_delta_from_times found by Christopher Rose.
|
580
|
-
|
581
|
-
</li>
|
582
|
-
</ul>
|
583
|
-
<h4>Changes for 0.8.7:</h4>
|
584
|
-
<ul>
|
585
|
-
<li>Fixed the misspelled POLY_PRESSURE constant, thanks to Mario Pehle.
|
586
|
-
|
587
|
-
</li>
|
588
|
-
</ul>
|
589
|
-
<h4>Changes for 0.8.6:</h4>
|
590
|
-
<ul>
|
591
|
-
<li>Added missing test/test.mid.
|
592
|
-
|
593
|
-
</li>
|
594
|
-
</ul>
|
595
|
-
<h4>Changes for 0.8.5:</h4>
|
596
|
-
<ul>
|
597
|
-
<li>Fixed bugs in <a href="../classes/MIDI/PitchBend.html">MIDI::PitchBend</a>
|
598
|
-
reading and writing, thanks to Emanuel Borsboom.
|
599
|
-
|
600
|
-
</li>
|
601
|
-
<li>Fixed a bug in MIDI::Track#quantize.
|
602
|
-
|
603
|
-
</li>
|
604
|
-
<li>The argument to MIDI::Track#quantize has changed: it is now either a note
|
605
|
-
name ("sixteenth", "32nd", "8th triplet") or
|
606
|
-
a length (1 = quarter, 0.25 = sixteenth). This is a drastic change that
|
607
|
-
will break all previous calls to quantize. However, since that method was
|
608
|
-
broken already, I don‘t feel it‘s a burden to anybody to change
|
609
|
-
the arguments.
|
610
|
-
|
611
|
-
</li>
|
612
|
-
</ul>
|
613
|
-
<h4>Changes for 0.8.4:</h4>
|
614
|
-
<ul>
|
615
|
-
<li>Realtime status bytes now set @is_realtime to true and return true when
|
616
|
-
realtime? is called.
|
617
|
-
|
618
|
-
</li>
|
619
|
-
<li>All system common events now set @is_system to true and return true when
|
620
|
-
system? is called, not just system exclusive events.
|
621
|
-
|
622
|
-
</li>
|
623
|
-
<li>Added examples/from_scratch.rb, which shows how to create a sequence
|
624
|
-
manually.
|
625
|
-
|
626
|
-
</li>
|
627
|
-
<li>New <a href="../classes/MIDI/Sequence.html">MIDI::Sequence</a> methods that
|
628
|
-
turn note length names like "32nd", "dotted quarter",
|
629
|
-
and "16th triplet" into delta times. See the docs below and
|
630
|
-
MIDI::Sequence::length_to_delta, MIDI::Sequence::note_to_length, and
|
631
|
-
MIDI::Sequence::note_to_delta.
|
632
|
-
|
633
|
-
</li>
|
634
|
-
</ul>
|
635
|
-
<h4>Changes for 0.8.3:</h4>
|
636
|
-
<ul>
|
637
|
-
<li>Added MIDI::NoteEvent.note_to_s, which returns note name as a string like
|
638
|
-
"C4" or "F#6".
|
639
|
-
|
640
|
-
</li>
|
641
|
-
<li>Added new boolean attributes to <a
|
642
|
-
href="../classes/MIDI/Event.html">MIDI::Event</a>: @print_decimal_numbers
|
643
|
-
and @print_note_names. These are used by all Event to_s methods. See
|
644
|
-
examples/seq2text.rb for an example.
|
645
|
-
|
646
|
-
</li>
|
647
|
-
</ul>
|
648
|
-
<h4>Changes for 0.8.2:</h4>
|
649
|
-
<ul>
|
650
|
-
<li>Changed MIDI::MetaEvent.type to MIDI::MetaEvent.event_type to avoid runtime
|
651
|
-
complaints about Object#type calls.
|
652
|
-
|
653
|
-
</li>
|
654
|
-
<li>Added ‘b’ binary flag to file open modes for Windows.
|
655
|
-
|
656
|
-
</li>
|
657
|
-
<li>Fixed $LOAD_PATH in example files.
|
658
|
-
|
659
|
-
</li>
|
660
|
-
<li>Fixed read and write block arguments.
|
661
|
-
|
662
|
-
</li>
|
663
|
-
<li>Fixed other example script bugs.
|
664
|
-
|
665
|
-
</li>
|
666
|
-
</ul>
|
667
|
-
<h4>Changes for 0.8.1:</h4>
|
668
|
-
<ul>
|
669
|
-
<li>Fixed track sorting.
|
670
|
-
|
671
|
-
</li>
|
672
|
-
<li>Fixed track‘s recalc_delta_from_times method.
|
673
|
-
|
674
|
-
</li>
|
675
|
-
<li>Fixed event quantization.
|
676
|
-
|
677
|
-
</li>
|
678
|
-
<li>More tests and documentation.
|
679
|
-
|
680
|
-
</li>
|
681
|
-
</ul>
|
682
|
-
<h2>Warranty</h2>
|
683
|
-
<p>
|
684
|
-
This software is provided "as is" and without any express or
|
685
|
-
implied warranties, including, without limitation, the implied warranties
|
686
|
-
of merchantability and fitness for a particular purpose.
|
687
|
-
</p>
|
688
|
-
|
689
|
-
</div>
|
690
|
-
|
691
|
-
|
692
|
-
</div>
|
693
|
-
|
694
|
-
|
695
|
-
</div>
|
696
|
-
|
697
|
-
|
698
|
-
<!-- if includes -->
|
699
|
-
|
700
|
-
<div id="section">
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
<!-- if method_list -->
|
710
|
-
|
711
|
-
|
712
|
-
</div>
|
713
|
-
|
714
|
-
|
715
|
-
<div id="validator-badges">
|
716
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
717
|
-
</div>
|
718
|
-
|
719
|
-
</body>
|
720
|
-
</html>
|