william590y commited on
Commit
151b875
·
verified ·
1 Parent(s): 205fbb0

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .DS_Store +0 -0
  2. .gitattributes +42 -0
  3. LICENSE.txt +201 -0
  4. README.md +106 -3
  5. __pycache__/alignment.cpython-312.pyc +0 -0
  6. __pycache__/alignment.cpython-39.pyc +0 -0
  7. __pycache__/annotation_mapping.cpython-39.pyc +0 -0
  8. alignment.py +235 -0
  9. anticipation/__init__.py +9 -0
  10. anticipation/__pycache__/__init__.cpython-312.pyc +0 -0
  11. anticipation/__pycache__/__init__.cpython-39.pyc +0 -0
  12. anticipation/__pycache__/config.cpython-312.pyc +0 -0
  13. anticipation/__pycache__/config.cpython-39.pyc +0 -0
  14. anticipation/__pycache__/convert.cpython-312.pyc +0 -0
  15. anticipation/__pycache__/convert.cpython-39.pyc +0 -0
  16. anticipation/__pycache__/ops.cpython-312.pyc +0 -0
  17. anticipation/__pycache__/ops.cpython-39.pyc +0 -0
  18. anticipation/__pycache__/sample.cpython-39.pyc +0 -0
  19. anticipation/__pycache__/tokenize.cpython-312.pyc +0 -0
  20. anticipation/__pycache__/tokenize.cpython-39.pyc +0 -0
  21. anticipation/__pycache__/vocab.cpython-312.pyc +0 -0
  22. anticipation/__pycache__/vocab.cpython-39.pyc +0 -0
  23. anticipation/config.py +60 -0
  24. anticipation/convert.py +359 -0
  25. anticipation/ops.py +333 -0
  26. anticipation/sample.py +406 -0
  27. anticipation/tokenize.py +397 -0
  28. anticipation/visuals.py +65 -0
  29. anticipation/vocab.py +58 -0
  30. asap-dataset-master/Bach/Fugue/bwv_846/Shi05M.mid +0 -0
  31. asap-dataset-master/Bach/Fugue/bwv_846/Shi05M_annotations.txt +106 -0
  32. asap-dataset-master/Bach/Fugue/bwv_846/midi_score.mid +0 -0
  33. asap-dataset-master/Bach/Fugue/bwv_846/midi_score_annotations.txt +106 -0
  34. asap-dataset-master/Bach/Fugue/bwv_846/xml_score.musicxml +0 -0
  35. asap-dataset-master/Bach/Fugue/bwv_848/Denisova06M.mid +0 -0
  36. asap-dataset-master/Bach/Fugue/bwv_848/Denisova06M_annotations.txt +217 -0
  37. asap-dataset-master/Bach/Fugue/bwv_848/Lee01M.mid +0 -0
  38. asap-dataset-master/Bach/Fugue/bwv_848/Lee01M_annotations.txt +217 -0
  39. asap-dataset-master/Bach/Fugue/bwv_848/LeeSH01M.mid +0 -0
  40. asap-dataset-master/Bach/Fugue/bwv_848/LeeSH01M_annotations.txt +217 -0
  41. asap-dataset-master/Bach/Fugue/bwv_848/Lin04M.mid +0 -0
  42. asap-dataset-master/Bach/Fugue/bwv_848/Lin04M_annotations.txt +217 -0
  43. asap-dataset-master/Bach/Fugue/bwv_848/Lou01M.mid +0 -0
  44. asap-dataset-master/Bach/Fugue/bwv_848/Lou01M_annotations.txt +217 -0
  45. asap-dataset-master/Bach/Fugue/bwv_848/MiyashitaM01M.mid +0 -0
  46. asap-dataset-master/Bach/Fugue/bwv_848/MiyashitaM01M_annotations.txt +217 -0
  47. asap-dataset-master/Bach/Fugue/bwv_848/Mizumoto03M.mid +0 -0
  48. asap-dataset-master/Bach/Fugue/bwv_848/Mizumoto03M_annotations.txt +217 -0
  49. asap-dataset-master/Bach/Fugue/bwv_848/SunY01M.mid +0 -0
  50. asap-dataset-master/Bach/Fugue/bwv_848/SunY01M_annotations.txt +217 -0
.DS_Store ADDED
Binary file (6.15 kB). View file
 
.gitattributes CHANGED
@@ -33,3 +33,45 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ asap-dataset-master/asap_annotations.json filter=lfs diff=lfs merge=lfs -text
37
+ asap-dataset-master/Balakirev/Islamey/Gorucan03.mid filter=lfs diff=lfs merge=lfs -text
38
+ asap-dataset-master/Balakirev/Islamey/Verbaite04.mid filter=lfs diff=lfs merge=lfs -text
39
+ asap-dataset-master/Beethoven/Piano_Sonatas/21-1_no_repeat/Dulu01.mid filter=lfs diff=lfs merge=lfs -text
40
+ asap-dataset-master/Beethoven/Piano_Sonatas/21-1_no_repeat/MorozovS01.mid filter=lfs diff=lfs merge=lfs -text
41
+ asap-dataset-master/Beethoven/Piano_Sonatas/21-1_no_repeat/Seo01.mid filter=lfs diff=lfs merge=lfs -text
42
+ asap-dataset-master/Beethoven/Piano_Sonatas/21-1_no_repeat/Sychev01.mid filter=lfs diff=lfs merge=lfs -text
43
+ asap-dataset-master/Beethoven/Piano_Sonatas/23-1/Ladid01.mid filter=lfs diff=lfs merge=lfs -text
44
+ asap-dataset-master/Beethoven/Piano_Sonatas/23-1/Na01.mid filter=lfs diff=lfs merge=lfs -text
45
+ asap-dataset-master/Beethoven/Piano_Sonatas/29-3/ChowK04.mid filter=lfs diff=lfs merge=lfs -text
46
+ asap-dataset-master/Chopin/Ballades/4/Lim03.mid filter=lfs diff=lfs merge=lfs -text
47
+ asap-dataset-master/Chopin/Ballades/4/ZhangX02.mid filter=lfs diff=lfs merge=lfs -text
48
+ asap-dataset-master/Liszt/Ballade_2/Sham05.mid filter=lfs diff=lfs merge=lfs -text
49
+ asap-dataset-master/Liszt/Mephisto_Waltz/Duepree10.mid filter=lfs diff=lfs merge=lfs -text
50
+ asap-dataset-master/Liszt/Mephisto_Waltz/Giltburg03.mid filter=lfs diff=lfs merge=lfs -text
51
+ asap-dataset-master/Liszt/Mephisto_Waltz/JIA08.mid filter=lfs diff=lfs merge=lfs -text
52
+ asap-dataset-master/Liszt/Mephisto_Waltz/Tysman07M.mid filter=lfs diff=lfs merge=lfs -text
53
+ asap-dataset-master/Liszt/Mephisto_Waltz/WangV03.mid filter=lfs diff=lfs merge=lfs -text
54
+ asap-dataset-master/Liszt/Sonata/Dulu07M.mid filter=lfs diff=lfs merge=lfs -text
55
+ asap-dataset-master/Liszt/Sonata/Dvorkine03.mid filter=lfs diff=lfs merge=lfs -text
56
+ asap-dataset-master/Liszt/Sonata/Gasanov06M.mid filter=lfs diff=lfs merge=lfs -text
57
+ asap-dataset-master/Liszt/Sonata/GiacomelliN11M.mid filter=lfs diff=lfs merge=lfs -text
58
+ asap-dataset-master/Liszt/Sonata/Huang01.mid filter=lfs diff=lfs merge=lfs -text
59
+ asap-dataset-master/Liszt/Sonata/midi_score.mid filter=lfs diff=lfs merge=lfs -text
60
+ asap-dataset-master/Liszt/Sonata/Yeletskiy05M.mid filter=lfs diff=lfs merge=lfs -text
61
+ asap-dataset-master/Liszt/Sonata/Zuber07M.mid filter=lfs diff=lfs merge=lfs -text
62
+ asap-dataset-master/Schubert/Impromptu_op142/1/Kleisen02.mid filter=lfs diff=lfs merge=lfs -text
63
+ asap-dataset-master/Schubert/Impromptu_op142/1/Lisiecki10M.mid filter=lfs diff=lfs merge=lfs -text
64
+ asap-dataset-master/Schubert/Impromptu_op142/3/Cui04.mid filter=lfs diff=lfs merge=lfs -text
65
+ asap-dataset-master/Schubert/Impromptu_op142/3/Lin05.mid filter=lfs diff=lfs merge=lfs -text
66
+ asap-dataset-master/Schubert/Impromptu_op142/3/Tuncali02.mid filter=lfs diff=lfs merge=lfs -text
67
+ asap-dataset-master/Schubert/Wanderer_fantasie/Kolessova02.mid filter=lfs diff=lfs merge=lfs -text
68
+ asap-dataset-master/Schubert/Wanderer_fantasie/Larionova05M.mid filter=lfs diff=lfs merge=lfs -text
69
+ asap-dataset-master/Schubert/Wanderer_fantasie/midi_score.mid filter=lfs diff=lfs merge=lfs -text
70
+ asap-dataset-master/Schubert/Wanderer_fantasie/SunY10M.mid filter=lfs diff=lfs merge=lfs -text
71
+ asap-dataset-master/Schumann/Toccata_repeat/WangY07M.mid filter=lfs diff=lfs merge=lfs -text
72
+ asap-dataset-master/Schumann/Toccata_repeat/Zhdanov06.mid filter=lfs diff=lfs merge=lfs -text
73
+ asap-dataset-master/Scriabin/Sonatas/5/FaB05M.mid filter=lfs diff=lfs merge=lfs -text
74
+ asap-dataset-master/Scriabin/Sonatas/5/Na03.mid filter=lfs diff=lfs merge=lfs -text
75
+ asap-dataset-master/Scriabin/Sonatas/5/Yeletskiy02.mid filter=lfs diff=lfs merge=lfs -text
76
+ data/output.txt filter=lfs diff=lfs merge=lfs -text
77
+ data/train.txt filter=lfs diff=lfs merge=lfs -text
LICENSE.txt ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2023] [John Thickstun]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
README.md CHANGED
@@ -1,3 +1,106 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Anticipatory Music Transformer
2
+
3
+ Implementation of the methods described in [Anticipatory Music Transformer](https://arxiv.org/abs/2306.08620).
4
+
5
+ by [__John Thickstun__](https://johnthickstun.com/), [__David Hall__](http://dlwh.org/), [__Chris Donahue__](https://chrisdonahue.com/), and [__Percy Liang__](https://cs.stanford.edu/~pliang/).
6
+
7
+ -------------------------------------------------------------------------------------
8
+
9
+ This repository provides the code for creating anticipatory training datasets, and for sampling from models trained with anticipation. It does _not_ contain code for training these models: you may use the preprocessed datasets constructed here as input to your favorite codebase for training autoregressive transformer models. We used the [Levanter](https://github.com/stanford-crfm/levanter) codebase to train models, and include instructions [here](train) for training an Anticipatory Music Transformer with Levanter.
10
+
11
+ For additional detail about this work, see the [paper](https://arxiv.org/abs/2306.08620). You may also be interested in this [blog post](https://crfm.stanford.edu/2023/06/16/anticipatory-music-transformer.html).
12
+
13
+ Pretrained models are hosted by the Center for Research on Foundation Models (CRFM) on the [HuggingFace Hub](https://huggingface.co/stanford-crfm).
14
+
15
+ This project is licensed under the terms of the Apache License, Version 2.0.
16
+
17
+ Begin by installing the anticipation package (from the root of this repository).
18
+
19
+ ```
20
+ pip install .
21
+ ```
22
+
23
+ ## Software Dependencies
24
+
25
+ Run the following command to install dependencies.
26
+
27
+ ```
28
+ pip install -r requirements.txt
29
+ ```
30
+
31
+ ## Generating Music with an Anticipatory Music Transformer
32
+
33
+ See the [Colab](https://colab.research.google.com/drive/1HCQDtGFwROpHRqcmZbV0byqbxDb74YGu?usp=sharing) notebook for interactive examples of music generation using the Anticipatory Music Transformer.
34
+
35
+ Load a pretrained model using the HuggingFace Transformers package, e.g.:
36
+
37
+ ```
38
+ from transformers import AutoModelForCausalLM
39
+
40
+ model = AutoModelForCausalLM.from_pretrained('stanford-crfm/music-medium-800k').cuda()
41
+ ```
42
+
43
+ Sample from this model using the custom `generate` function implementated by the anticipation package. You can convert generated event tokens to midi using the `events_to_midi` function:
44
+
45
+ ```
46
+ from anticipation.sample import generate
47
+ from anticipation.convert import events_to_midi
48
+
49
+ length = 10 # time in seconds
50
+ events = generate(model, start_time=0, end_time=length, top_p=.98)
51
+ mid = events_to_midi(events)
52
+ mid.save('generated.mid')
53
+ ```
54
+
55
+ Load your own MIDI and tokenize it using the `midi_to_events` function.
56
+
57
+ ```
58
+ from anticipation.convert import midi_to_events
59
+
60
+ events = midi_to_events('examples/strawberry.mid')
61
+ ```
62
+
63
+ To isolate a segment of a longer stream of events, use the `ops` library to clip the stream and translate the clipped segment to time zero. To isolate a melodic line, use `extract_instruments`:
64
+
65
+ ```
66
+ from anticipation import ops
67
+ from anticipation.tokenize import extract_instruments
68
+
69
+ events = ops.clip(events, 41, 41+20)
70
+ events = ops.translate(events, -ops.min_time(events, seconds=False))
71
+
72
+ events, melody = extract_instruments(events, [53])
73
+ ```
74
+
75
+ To generate an accompaniment to an isolated melody, call the `generate` function using the melody as control inputs. Recombine the generated accompaniment with the melody controls using `ops.combine`:
76
+
77
+ ```
78
+ history = ops.clip(events, 0, 5, clip_duration=False)
79
+ accompaniment = generate(model, 5, 20, inputs=history, controls=melody, top_p=.98)
80
+ completed_events = ops.combine(accompaniment, melody)
81
+ mid = events_to_midi(completed_events)
82
+ mid.save('generated.mid')
83
+ ```
84
+
85
+ See the [Colab](https://colab.research.google.com/drive/1HCQDtGFwROpHRqcmZbV0byqbxDb74YGu?usp=sharing) notebook for additional examples of infilling control using the Anticipatory Music Transformer.
86
+
87
+ ## Training an Anticipatory Music Transformer
88
+
89
+ See the [train](train) directory for instructions on preprocessing the Lakh MIDI dataset and using [Levanter](https://github.com/stanford-crfm/levanter) to train an Anticipatory Music Transformer.
90
+
91
+ ## Reproducing the Human Evaluation Procedure
92
+
93
+ See the [humaneval](humaneval) directory for instructions on reproducing data used for the human evaluation results reported in the paper.
94
+
95
+ -------------------------------------------------------------------------------------
96
+
97
+ To reference this work, please cite
98
+
99
+ ```bib
100
+ @article{thickstun2023anticipatory,
101
+ title={Anticipatory Music Transformer},
102
+ author={Thickstun, John and Hall, David and Donahue, Chris and Liang, Percy},
103
+ journal={arXiv preprint arXiv:2306.08620},
104
+ year={2023}
105
+ }
106
+ ```
__pycache__/alignment.cpython-312.pyc ADDED
Binary file (12 kB). View file
 
__pycache__/alignment.cpython-39.pyc ADDED
Binary file (5.17 kB). View file
 
__pycache__/annotation_mapping.cpython-39.pyc ADDED
Binary file (1.37 kB). View file
 
alignment.py ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import scipy.interpolate
3
+ from anticipation.convert import midi_to_events
4
+ from anticipation.config import *
5
+ from anticipation.vocab import *
6
+ from itertools import combinations
7
+
8
+ def load_annotation_file(file_path):
9
+ annotations = []
10
+
11
+ with open(file_path, 'r') as f:
12
+ for line in f:
13
+ parts = line.strip().split('\t')
14
+ if len(parts) >= 3:
15
+ timestamp = float(parts[0])
16
+ annotation = parts[2]
17
+ annotations.append((timestamp, annotation))
18
+
19
+ return annotations
20
+
21
+ def compare_annotations(file1_path, file2_path, interpolate=True):
22
+ """
23
+ Creates a mapping between downbeat and beat times in two annotation files.
24
+ Inputs are timestamps in the first file, outputs are timestamps in the second file
25
+ """
26
+
27
+ annotations1 = load_annotation_file(file1_path)
28
+ annotations2 = load_annotation_file(file2_path)
29
+
30
+ min_length = min(len(annotations1), len(annotations2))
31
+ if len(annotations1) != len(annotations2):
32
+ shorter_file = file1_path if len(annotations1) == min_length else file2_path
33
+ print(f'Number of annotations in {file1_path} and {file2_path} do not match.')
34
+ print(f"Proceeding with the first {min_length} annotations from {shorter_file}.")
35
+
36
+
37
+ data = []
38
+
39
+ for i in range(min_length):
40
+ data.append((annotations1[i][0], annotations2[i][0]))
41
+
42
+ x,y = list(zip(*data))
43
+
44
+ if interpolate:
45
+ map = scipy.interpolate.interp1d(x, y)
46
+
47
+ return map
48
+
49
+ else:
50
+ return x,y
51
+
52
+ def power_set(lst, min_length=2, max_length=6):
53
+ result = []
54
+ # Only iterate from min_length to max_length (inclusive)
55
+ for i in range(min_length, min(max_length + 1, len(lst) + 1)):
56
+ result.extend(combinations(lst, i))
57
+ return result
58
+
59
+ def align_tokens(file1, file2, file3, file4, skip_Nones=True):
60
+ # turn midi into events, without quantizing so we can get 16 digits of precision in arrival time
61
+ perf = midi_to_events(file1, quantize=False)
62
+ score = midi_to_events(file2, quantize=False)
63
+
64
+ p_beats, s_beats = compare_annotations(file3,file4,interpolate=False)
65
+ s_beats = np.array(s_beats)
66
+ p_beats = np.array(p_beats)
67
+ map = compare_annotations(file3, file4)
68
+
69
+ # create tuples, scaling arrival time back to seconds, which is the unit the annotation mapping uses
70
+ p_tuples = [[perf[3*i]/TIME_RESOLUTION, perf[3*i+1] - DUR_OFFSET, perf[3*i+2] - NOTE_OFFSET] for i in range(int(len(perf)/3))]
71
+ s_tuples = [[score[3*i]/TIME_RESOLUTION, score[3*i+1] - DUR_OFFSET, score[3*i+2] - NOTE_OFFSET] for i in range(int(len(score)/3))]
72
+ p_times = [tup[0] for tup in p_tuples]
73
+ s_times = [tup[0] for tup in s_tuples]
74
+
75
+ tol = 1e-4
76
+
77
+ # match score notes with corresponding beats in annotation file
78
+ s_tuples_b = []
79
+ assigned = []
80
+
81
+ for tup in s_tuples:
82
+ mask = np.abs(tup[0] - s_beats) <= tol
83
+ if sum(mask):
84
+ beat = list(np.where(mask)[0])[0]
85
+ s_tuples_b.append((tup[0], tup[1], tup[2], beat))
86
+ assigned.append(beat)
87
+ else:
88
+ s_tuples_b.append(tup)
89
+
90
+ for i in range(len(s_beats)):
91
+ if i not in assigned:
92
+ print(f'could not find notes in score associated with beat {i}')
93
+
94
+ # match perf notes with corresponding beats in annotation file
95
+ p_tuples_b = []
96
+ assigned = []
97
+
98
+ for tup in p_tuples:
99
+ mask = np.abs(tup[0] - p_beats) <= tol
100
+ if sum(mask):
101
+ beat = list(np.where(mask)[0])[0]
102
+ p_tuples_b.append((tup[0], tup[1], tup[2], beat))
103
+ assigned.append(beat)
104
+ else:
105
+ p_tuples_b.append(tup)
106
+
107
+ for j in [i for i in range(len(p_beats)) if i not in assigned]:
108
+ beat = p_beats[j]
109
+
110
+ candidates = [tup[0] for tup in p_tuples_b if len(tup)==3 and abs(tup[0]-beat)<=0.5]
111
+
112
+ success = False
113
+ for subset in power_set(candidates):
114
+ if np.abs(np.average(subset) - beat) <= tol:
115
+ for time in subset:
116
+ k = p_times.index(time)
117
+ p_tuples_b[k] = (p_tuples_b[k][0], p_tuples_b[k][1], p_tuples_b[k][2], j)
118
+ success = True
119
+ # print(f'at beat {j} succeeded in finding notes at times {subset} with average time {np.average(subset)} close to {beat}')
120
+ break
121
+ if not success:
122
+ print(f'could not find notes in perf associated with beat {j}')
123
+
124
+ # match score and perf notes that occurred on the same beats, then between
125
+ # (almost all correctly) matched beats, we want to use the map to match off-beat notes
126
+ # outside of the mapping range and domain, just match notes with the same pitch
127
+ matched_tuples = []
128
+
129
+ s_tuples_b_copy = s_tuples_b.copy()
130
+
131
+ p_min = map.x.min()
132
+ p_max = map.x.max()
133
+ s_min = map.y.min()
134
+ s_max = map.y.max()
135
+
136
+ for i, p_tuple in enumerate(p_tuples_b):
137
+ for j, s_tuple in enumerate(s_tuples_b_copy):
138
+
139
+ p_time, p_note = p_tuple[0], p_tuple[2]
140
+ s_time, s_note = s_tuple[0], s_tuple[2]
141
+
142
+ k = s_tuples_b.index(s_tuple)
143
+
144
+ if len(p_tuple) == 4 and len(s_tuple) == 4 and p_tuple[2:] == s_tuple[2:]:
145
+ matched_tuples.append([p_tuple,i,s_tuple,k])
146
+ s_tuples_b_copy.remove(s_tuple)
147
+ elif len(p_tuple) == 3 and len(s_tuple) == 3 and p_time < p_min and s_time < s_min and p_note == s_note:
148
+ matched_tuples.append([p_tuple,i,s_tuple,k])
149
+ s_tuples_b_copy.remove(s_tuple)
150
+ elif len(p_tuple) == 3 and len(s_tuple) == 3 and p_time > p_max and s_time > s_max and p_note == s_note:
151
+ matched_tuples.append([p_tuple,i,s_tuple,k])
152
+ s_tuples_b_copy.remove(s_tuple)
153
+ elif len(p_tuple) == 3 and len(s_tuple) == 3 and p_min <= p_time <= p_max and s_min <= s_time <= s_max and \
154
+ np.abs(map(p_time) - s_time) < .1 and p_note == s_note:
155
+ matched_tuples.append([p_tuple,i,s_tuple,k])
156
+ s_tuples_b_copy.remove(s_tuple)
157
+ if p_tuple not in [l[0] for l in matched_tuples] and not skip_Nones:
158
+ matched_tuples.append([p_tuple,i,[None,None,None],None])
159
+
160
+ # revert back to token format and remove beat indices
161
+ for i, l in enumerate(matched_tuples):
162
+ # performance tokens should have control offset
163
+ l[0] = [round(l[0][0]*TIME_RESOLUTION), l[0][1]+DUR_OFFSET, l[0][2]+NOTE_OFFSET]
164
+ l[0] = [CONTROL_OFFSET + t for t in l[0]]
165
+
166
+ if l[2][0] != None:
167
+ l[2] = [round(l[2][0]*TIME_RESOLUTION), l[2][1]+DUR_OFFSET, l[2][2]+NOTE_OFFSET]
168
+ matched_tuples[i] = l
169
+
170
+ return matched_tuples
171
+
172
+ def align_tokens2(file1, file2, file3, file4, skip_Nones=True, thres=0.1):
173
+ # turn midi into events, without quantizing so we can get 16 digits of precision in arrival time
174
+ perf = midi_to_events(file1, quantize=False)
175
+ score = midi_to_events(file2, quantize=False)
176
+
177
+ p_beats, s_beats = compare_annotations(file3,file4,interpolate=False)
178
+ s_beats = np.array(s_beats)
179
+ p_beats = np.array(p_beats)
180
+ map = compare_annotations(file3, file4)
181
+
182
+ # create tuples, scaling arrival time back to seconds, which is the unit the annotation mapping uses
183
+ p_tuples = [[perf[3*i]/TIME_RESOLUTION, perf[3*i+1] - DUR_OFFSET, perf[3*i+2] - NOTE_OFFSET] for i in range(int(len(perf)/3))]
184
+ s_tuples = [[score[3*i]/TIME_RESOLUTION, score[3*i+1] - DUR_OFFSET, score[3*i+2] - NOTE_OFFSET] for i in range(int(len(score)/3))]
185
+
186
+ matched_tuples = []
187
+
188
+ s_tuples_copy = s_tuples.copy()
189
+
190
+ p_min = map.x.min()
191
+ p_max = map.x.max()
192
+
193
+ for i, p_tuple in enumerate(p_tuples):
194
+ best_dist = np.inf
195
+ best_match = [None, None, None]
196
+ best_index = None
197
+
198
+ p_time, p_note = p_tuple[0], p_tuple[2]
199
+
200
+ if p_min <= p_time <= p_max:
201
+
202
+ for j, s_tuple in enumerate(s_tuples_copy):
203
+
204
+ s_time, s_note = s_tuple[0], s_tuple[2]
205
+
206
+ k = s_tuples.index(s_tuple)
207
+
208
+ dist = np.abs(map(p_time) - s_time)
209
+
210
+ if p_note != s_note:
211
+ continue # not a match (wrong pitch)
212
+
213
+ if dist <= thres and dist <= best_dist: # found a possible match
214
+ best_dist = dist
215
+ best_match = s_tuple
216
+ best_index = k
217
+
218
+ if best_index is not None:
219
+ matched_tuples.append([p_tuple,i,best_match,best_index])
220
+ s_tuples_copy.remove(best_match)
221
+ elif not skip_Nones:
222
+ matched_tuples.append([p_tuple,i,best_match,best_index])
223
+
224
+
225
+ # revert back to token format and remove beat indices
226
+ for i, l in enumerate(matched_tuples):
227
+ # performance tokens should have control offset
228
+ l[0] = [round(l[0][0]*TIME_RESOLUTION), l[0][1]+DUR_OFFSET, l[0][2]+NOTE_OFFSET]
229
+ l[0] = [CONTROL_OFFSET + t for t in l[0]]
230
+
231
+ if l[2][0] != None:
232
+ l[2] = [round(l[2][0]*TIME_RESOLUTION), l[2][1]+DUR_OFFSET, l[2][2]+NOTE_OFFSET]
233
+ matched_tuples[i] = l
234
+
235
+ return matched_tuples
anticipation/__init__.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ """ Infrastructure for constructing anticipatory infilling models.
2
+
3
+ This model provides infrastructure to preprocess Midi music datasets
4
+ for training anticipatory music infilling models. For more context, see:
5
+
6
+ Anticipatory Music Transformer
7
+ John Thickstun, David Hall, Chris Donahue, Percy Liang
8
+ Preprint Report, 2023
9
+ """
anticipation/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (505 Bytes). View file
 
anticipation/__pycache__/__init__.cpython-39.pyc ADDED
Binary file (505 Bytes). View file
 
anticipation/__pycache__/config.cpython-312.pyc ADDED
Binary file (1.83 kB). View file
 
anticipation/__pycache__/config.cpython-39.pyc ADDED
Binary file (1.42 kB). View file
 
anticipation/__pycache__/convert.cpython-312.pyc ADDED
Binary file (15.5 kB). View file
 
anticipation/__pycache__/convert.cpython-39.pyc ADDED
Binary file (9.34 kB). View file
 
anticipation/__pycache__/ops.cpython-312.pyc ADDED
Binary file (13.1 kB). View file
 
anticipation/__pycache__/ops.cpython-39.pyc ADDED
Binary file (8.25 kB). View file
 
anticipation/__pycache__/sample.cpython-39.pyc ADDED
Binary file (8.49 kB). View file
 
anticipation/__pycache__/tokenize.cpython-312.pyc ADDED
Binary file (18.1 kB). View file
 
anticipation/__pycache__/tokenize.cpython-39.pyc ADDED
Binary file (10.4 kB). View file
 
anticipation/__pycache__/vocab.cpython-312.pyc ADDED
Binary file (2.21 kB). View file
 
anticipation/__pycache__/vocab.cpython-39.pyc ADDED
Binary file (1.65 kB). View file
 
anticipation/config.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Global configuration for anticipatory infilling models.
3
+ """
4
+
5
+ # model hyper-parameters
6
+
7
+ CONTEXT_SIZE = 1024 # model context
8
+ EVENT_SIZE = 3 # each event/control is encoded as 3 tokens
9
+ M = 341 # model context (1024 = 1 + EVENT_SIZE*M)
10
+ DELTA = 5 # anticipation time in seconds
11
+
12
+ assert CONTEXT_SIZE == 1+EVENT_SIZE*M
13
+
14
+ # vocabulary constants
15
+
16
+ MAX_TIME_IN_SECONDS = 100 # exclude very long training sequences
17
+ MAX_DURATION_IN_SECONDS = 10 # maximum duration of a note
18
+ TIME_RESOLUTION = 100 # 10ms time resolution = 100 bins/second
19
+
20
+ MAX_PITCH = 128 # 128 MIDI pitches
21
+ MAX_INSTR = 129 # 129 MIDI instruments (128 + drums)
22
+ MAX_NOTE = MAX_PITCH*MAX_INSTR # note = pitch x instrument
23
+
24
+ MAX_INTERARRIVAL_IN_SECONDS = 10 # maximum interarrival time (for MIDI-like encoding)
25
+
26
+ # preprocessing settings
27
+
28
+ PREPROC_WORKERS = 16
29
+
30
+ COMPOUND_SIZE = 5 # event size in the intermediate compound tokenization
31
+ MAX_TRACK_INSTR = 16 # exclude tracks with large numbers of instruments
32
+ MAX_TRACK_TIME_IN_SECONDS = 3600 # exclude very long tracks (longer than 1 hour)
33
+ MIN_TRACK_TIME_IN_SECONDS = 10 # exclude very short tracks (less than 10 seconds)
34
+ MIN_TRACK_EVENTS = 100 # exclude very short tracks (less than 100 events)
35
+
36
+ # LakhMIDI dataset splits
37
+
38
+ LAKH_SPLITS = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
39
+ LAKH_VALID = ['e']
40
+ LAKH_TEST = ['f']
41
+
42
+ # derived quantities
43
+
44
+ MAX_TIME = TIME_RESOLUTION*MAX_TIME_IN_SECONDS
45
+ MAX_DUR = TIME_RESOLUTION*MAX_DURATION_IN_SECONDS
46
+
47
+ MAX_INTERARRIVAL = TIME_RESOLUTION*MAX_INTERARRIVAL_IN_SECONDS
48
+
49
+
50
+ if __name__ == '__main__':
51
+ print('Model constants:')
52
+ print(f' -> anticipation interval: {DELTA}s')
53
+ print('Vocabulary constants:')
54
+ print(f' -> maximum time of a sequence: {MAX_TIME_IN_SECONDS}s')
55
+ print(f' -> maximum duration of a note: {MAX_DURATION_IN_SECONDS}s')
56
+ print(f' -> time resolution: {TIME_RESOLUTION}bins/s ({1000//TIME_RESOLUTION}ms)')
57
+ print(f' -> maximum interarrival-time (MIDI-like encoding): {MAX_INTERARRIVAL_IN_SECONDS}s')
58
+ print('Preprocessing constants:')
59
+ print(f' -> maximum time of a track: {MAX_TRACK_TIME_IN_SECONDS}s')
60
+ print(f' -> minimum events in a track: {MIN_TRACK_EVENTS}s')
anticipation/convert.py ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Utilities for converting to and from Midi data and encoded/tokenized data.
3
+ """
4
+
5
+ from collections import defaultdict
6
+
7
+ import mido
8
+ import numpy as np
9
+
10
+ from anticipation.config import *
11
+ from anticipation.vocab import *
12
+ from anticipation.ops import unpad
13
+
14
+
15
+ def midi_to_interarrival(midifile, debug=False, stats=False):
16
+ midi = mido.MidiFile(midifile)
17
+
18
+ tokens = []
19
+ dt = 0
20
+
21
+ instruments = defaultdict(int) # default to code 0 = piano
22
+ tempo = 500000 # default tempo: 500000 microseconds per beat
23
+ truncations = 0
24
+ for message in midi:
25
+ dt += message.time
26
+
27
+ # sanity check: negative time?
28
+ if message.time < 0:
29
+ raise ValueError
30
+
31
+ if message.type == 'program_change':
32
+ instruments[message.channel] = message.program
33
+ elif message.type in ['note_on', 'note_off']:
34
+ delta_ticks = min(round(TIME_RESOLUTION*dt), MAX_INTERARRIVAL-1)
35
+ if delta_ticks != round(TIME_RESOLUTION*dt):
36
+ truncations += 1
37
+
38
+ if delta_ticks > 0: # if time elapsed since last token
39
+ tokens.append(MIDI_TIME_OFFSET + delta_ticks) # add a time step event
40
+
41
+ # special case: channel 9 is drums!
42
+ inst = 128 if message.channel == 9 else instruments[message.channel]
43
+ offset = MIDI_START_OFFSET if message.type == 'note_on' and message.velocity > 0 else MIDI_END_OFFSET
44
+ tokens.append(offset + (2**7)*inst + message.note)
45
+ dt = 0
46
+ elif message.type == 'set_tempo':
47
+ tempo = message.tempo
48
+ elif message.type == 'time_signature':
49
+ pass # we use real time
50
+ elif message.type in ['aftertouch', 'polytouch', 'pitchwheel', 'sequencer_specific']:
51
+ pass # we don't attempt to model these
52
+ elif message.type == 'control_change':
53
+ pass # this includes pedal and per-track volume: ignore for now
54
+ elif message.type in ['track_name', 'text', 'end_of_track', 'lyrics', 'key_signature',
55
+ 'copyright', 'marker', 'instrument_name', 'cue_marker',
56
+ 'device_name', 'sequence_number']:
57
+ pass # possibly useful metadata but ignore for now
58
+ elif message.type == 'channel_prefix':
59
+ pass # relatively common, but can we ignore this?
60
+ elif message.type in ['midi_port', 'smpte_offset', 'sysex']:
61
+ pass # I have no idea what this is
62
+ else:
63
+ if debug:
64
+ print('UNHANDLED MESSAGE', message.type, message)
65
+
66
+ if stats:
67
+ return tokens, truncations
68
+
69
+ return tokens
70
+
71
+
72
+ def interarrival_to_midi(tokens, debug=False):
73
+ mid = mido.MidiFile()
74
+ mid.ticks_per_beat = TIME_RESOLUTION // 2 # 2 beats/second at quarter=120
75
+
76
+ track_idx = {} # maps instrument to (track number, current time)
77
+ time_in_ticks = 0
78
+ num_tracks = 0
79
+ for token in tokens:
80
+ if token == MIDI_SEPARATOR:
81
+ continue
82
+
83
+ if token < MIDI_START_OFFSET:
84
+ time_in_ticks += token - MIDI_TIME_OFFSET
85
+ elif token < MIDI_END_OFFSET:
86
+ token -= MIDI_START_OFFSET
87
+ instrument = token // 2**7
88
+ pitch = token - (2**7)*instrument
89
+
90
+ try:
91
+ track, previous_time, idx = track_idx[instrument]
92
+ except KeyError:
93
+ idx = num_tracks
94
+ previous_time = 0
95
+ track = mido.MidiTrack()
96
+ mid.tracks.append(track)
97
+ if instrument == 128: # drums always go on channel 9
98
+ idx = 9
99
+ message = mido.Message('program_change', channel=idx, program=0)
100
+ else:
101
+ message = mido.Message('program_change', channel=idx, program=instrument)
102
+ track.append(message)
103
+ num_tracks += 1
104
+ if num_tracks == 9:
105
+ num_tracks += 1 # skip the drums track
106
+
107
+ track.append(mido.Message('note_on', note=pitch, channel=idx, velocity=96, time=time_in_ticks-previous_time))
108
+ track_idx[instrument] = (track, time_in_ticks, idx)
109
+ else:
110
+ token -= MIDI_END_OFFSET
111
+ instrument = token // 2**7
112
+ pitch = token - (2**7)*instrument
113
+
114
+ try:
115
+ track, previous_time, idx = track_idx[instrument]
116
+ except KeyError:
117
+ # shouldn't happen because we should have a corresponding onset
118
+ if debug:
119
+ print('IGNORING bad offset')
120
+
121
+ continue
122
+
123
+ track.append(mido.Message('note_off', note=pitch, channel=idx, time=time_in_ticks-previous_time))
124
+ track_idx[instrument] = (track, time_in_ticks, idx)
125
+
126
+ return mid
127
+
128
+
129
+ def midi_to_compound(midifile, debug=False, quantize=True):
130
+ """
131
+ Converts midi file to a compound tokenization that stores each note as
132
+ a 5-tuple of (time, duration, note, instrument, velocity).
133
+
134
+ Note that mido measures the time of a midi message in seconds, which we multiply by
135
+ TIME_RESOLUTION = 10ms to get a time in 10ms ticks.
136
+ """
137
+ # robustly detect string-like paths (including numpy.str_)
138
+ if isinstance(midifile, (str, np.generic)):
139
+ midi = mido.MidiFile(str(midifile))
140
+ else:
141
+ midi = midifile
142
+
143
+ tokens = []
144
+ note_idx = 0
145
+ open_notes = defaultdict(list)
146
+
147
+ time = 0
148
+ instruments = defaultdict(int) # default to code 0 = piano
149
+ tempo = 500000 # default tempo: 500000 microseconds per beat
150
+ for message in midi:
151
+ time += message.time
152
+
153
+ # sanity check: negative time?
154
+ if message.time < 0:
155
+ raise ValueError
156
+
157
+ if message.type == 'program_change':
158
+ instruments[message.channel] = message.program
159
+ elif message.type in ['note_on', 'note_off']:
160
+ # special case: channel 9 is drums!
161
+ instr = 128 if message.channel == 9 else instruments[message.channel]
162
+
163
+ if message.type == 'note_on' and message.velocity > 0: # onset
164
+ # time quantization
165
+ if quantize:
166
+ time_in_ticks = round(TIME_RESOLUTION*time) # with rounding
167
+ else:
168
+ time_in_ticks = TIME_RESOLUTION*time # without rounding
169
+
170
+ # Our compound word is: (time, duration, note, instr, velocity)
171
+ tokens.append(time_in_ticks) # 5ms resolution
172
+ tokens.append(-1) # placeholder (we'll fill this in later)
173
+ tokens.append(message.note)
174
+ tokens.append(instr)
175
+ tokens.append(message.velocity)
176
+
177
+ open_notes[(instr,message.note,message.channel)].append((note_idx, time))
178
+ note_idx += 1
179
+ else: # offset
180
+ try:
181
+ open_idx, onset_time = open_notes[(instr,message.note,message.channel)].pop(0)
182
+ except IndexError:
183
+ if debug:
184
+ print('WARNING: ignoring bad offset')
185
+ else:
186
+ duration_ticks = round(TIME_RESOLUTION*(time-onset_time))
187
+ tokens[5*open_idx + 1] = duration_ticks
188
+ #del open_notes[(instr,message.note,message.channel)]
189
+ elif message.type == 'set_tempo':
190
+ tempo = message.tempo
191
+ elif message.type == 'time_signature':
192
+ pass # we use real time
193
+ elif message.type in ['aftertouch', 'polytouch', 'pitchwheel', 'sequencer_specific']:
194
+ pass # we don't attempt to model these
195
+ elif message.type == 'control_change':
196
+ pass # this includes pedal and per-track volume: ignore for now
197
+ elif message.type in ['track_name', 'text', 'end_of_track', 'lyrics', 'key_signature',
198
+ 'copyright', 'marker', 'instrument_name', 'cue_marker',
199
+ 'device_name', 'sequence_number']:
200
+ pass # possibly useful metadata but ignore for now
201
+ elif message.type == 'channel_prefix':
202
+ pass # relatively common, but can we ignore this?
203
+ elif message.type in ['midi_port', 'smpte_offset', 'sysex']:
204
+ pass # I have no idea what this is
205
+ else:
206
+ if debug:
207
+ print('UNHANDLED MESSAGE', message.type, message)
208
+
209
+ unclosed_count = 0
210
+ for _,v in open_notes.items():
211
+ unclosed_count += len(v)
212
+
213
+ if debug and unclosed_count > 0:
214
+ print(f'WARNING: {unclosed_count} unclosed notes')
215
+ print(' ', midifile)
216
+
217
+ return tokens
218
+
219
+
220
+ def compound_to_midi(tokens, debug=False):
221
+ mid = mido.MidiFile()
222
+ mid.ticks_per_beat = TIME_RESOLUTION // 2 # 2 beats/second at quarter=120
223
+
224
+ it = iter(tokens)
225
+ time_index = defaultdict(list)
226
+ for _, (time_in_ticks,duration,note,instrument,velocity) in enumerate(zip(it,it,it,it,it)):
227
+ time_index[(time_in_ticks,0)].append((note, instrument, velocity)) # 0 = onset
228
+ time_index[(time_in_ticks+duration,1)].append((note, instrument, velocity)) # 1 = offset
229
+
230
+ track_idx = {} # maps instrument to (track number, current time)
231
+ num_tracks = 0
232
+ for time_in_ticks, event_type in sorted(time_index.keys()):
233
+ for (note, instrument, velocity) in time_index[(time_in_ticks, event_type)]:
234
+ if event_type == 0: # onset
235
+ try:
236
+ track, previous_time, idx = track_idx[instrument]
237
+ except KeyError:
238
+ idx = num_tracks
239
+ previous_time = 0
240
+ track = mido.MidiTrack()
241
+ mid.tracks.append(track)
242
+ if instrument == 128: # drums always go on channel 9
243
+ idx = 9
244
+ message = mido.Message('program_change', channel=idx, program=0)
245
+ else:
246
+ message = mido.Message('program_change', channel=idx, program=instrument)
247
+ track.append(message)
248
+ num_tracks += 1
249
+ if num_tracks == 9:
250
+ num_tracks += 1 # skip the drums track
251
+
252
+ track.append(mido.Message(
253
+ 'note_on', note=note, channel=idx, velocity=velocity,
254
+ time=time_in_ticks-previous_time))
255
+ track_idx[instrument] = (track, time_in_ticks, idx)
256
+ else: # offset
257
+ try:
258
+ track, previous_time, idx = track_idx[instrument]
259
+ except KeyError:
260
+ # shouldn't happen because we should have a corresponding onset
261
+ if debug:
262
+ print('IGNORING bad offset')
263
+
264
+ continue
265
+
266
+ track.append(mido.Message(
267
+ 'note_off', note=note, channel=idx,
268
+ time=time_in_ticks-previous_time))
269
+ track_idx[instrument] = (track, time_in_ticks, idx)
270
+
271
+ return mid
272
+
273
+
274
+ def compound_to_events(tokens, stats=False):
275
+ """
276
+ Converts a compound tokenization to a sequence of events according to Definition 2.2
277
+ in the anticipation paper, removing velocity and instrument and combining note as a pitch
278
+ and instrument.
279
+ """
280
+ assert len(tokens) % 5 == 0
281
+ tokens = tokens.copy()
282
+
283
+ # remove velocities
284
+ del tokens[4::5]
285
+
286
+ # combine (note, instrument)
287
+ assert all(-1 <= tok < 2**7 for tok in tokens[2::4])
288
+ assert all(-1 <= tok < 129 for tok in tokens[3::4])
289
+ tokens[2::4] = [SEPARATOR if note == -1 else MAX_PITCH*instr + note
290
+ for note, instr in zip(tokens[2::4],tokens[3::4])]
291
+ tokens[2::4] = [NOTE_OFFSET + tok for tok in tokens[2::4]]
292
+ del tokens[3::4]
293
+
294
+ # max duration cutoff and set unknown durations to 250ms
295
+ truncations = sum([1 for tok in tokens[1::3] if tok >= MAX_DUR]) # number of note durations exceeding 10s
296
+ tokens[1::3] = [TIME_RESOLUTION//4 if tok == -1 else min(tok, MAX_DUR-1)
297
+ for tok in tokens[1::3]]
298
+ tokens[1::3] = [DUR_OFFSET + tok for tok in tokens[1::3]]
299
+
300
+ assert min(tokens[0::3]) >= 0
301
+ tokens[0::3] = [TIME_OFFSET + tok for tok in tokens[0::3]]
302
+
303
+ assert len(tokens) % 3 == 0
304
+
305
+ if stats:
306
+ return tokens, truncations
307
+
308
+ return tokens
309
+
310
+
311
+ def events_to_compound(tokens, debug=False):
312
+ tokens = unpad(tokens)
313
+
314
+ # move all tokens to zero-offset for synthesis
315
+ tokens = [tok - CONTROL_OFFSET if tok >= CONTROL_OFFSET and tok != SEPARATOR else tok
316
+ for tok in tokens]
317
+
318
+ # remove type offsets
319
+ tokens[0::3] = [tok - TIME_OFFSET if tok != SEPARATOR else tok for tok in tokens[0::3]]
320
+ tokens[1::3] = [tok - DUR_OFFSET if tok != SEPARATOR else tok for tok in tokens[1::3]]
321
+ tokens[2::3] = [tok - NOTE_OFFSET if tok != SEPARATOR else tok for tok in tokens[2::3]]
322
+
323
+ offset = 0 # add max time from previous track for synthesis
324
+ track_max = 0 # keep track of max time in track
325
+ for j, (time,dur,note) in enumerate(zip(tokens[0::3],tokens[1::3],tokens[2::3])):
326
+ if note == SEPARATOR:
327
+ offset += track_max
328
+ track_max = 0
329
+ if debug:
330
+ print('Sequence Boundary')
331
+ else:
332
+ track_max = max(track_max, time+dur)
333
+ tokens[3*j] += offset
334
+
335
+ # strip sequence separators
336
+ assert len([tok for tok in tokens if tok == SEPARATOR]) % 3 == 0
337
+ tokens = [tok for tok in tokens if tok != SEPARATOR]
338
+
339
+ assert len(tokens) % 3 == 0
340
+ out = 5*(len(tokens)//3)*[0]
341
+ out[0::5] = tokens[0::3]
342
+ out[1::5] = tokens[1::3]
343
+ out[2::5] = [tok - (2**7)*(tok//2**7) for tok in tokens[2::3]]
344
+ out[3::5] = [tok//2**7 for tok in tokens[2::3]]
345
+ out[4::5] = (len(tokens)//3)*[72] # default velocity
346
+
347
+ assert max(out[1::5]) < MAX_DUR
348
+ assert max(out[2::5]) < MAX_PITCH
349
+ assert max(out[3::5]) < MAX_INSTR
350
+ assert all(tok >= 0 for tok in out)
351
+
352
+ return out
353
+
354
+
355
+ def events_to_midi(tokens, debug=False):
356
+ return compound_to_midi(events_to_compound(tokens, debug=debug), debug=debug)
357
+
358
+ def midi_to_events(midifile, debug=False, quantize=True):
359
+ return compound_to_events(midi_to_compound(midifile, debug=debug, quantize=quantize))
anticipation/ops.py ADDED
@@ -0,0 +1,333 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Utilities for operating on encoded Midi sequences.
3
+ """
4
+
5
+ from collections import defaultdict
6
+
7
+ from anticipation.config import *
8
+ from anticipation.vocab import *
9
+
10
+
11
+ def print_tokens(tokens):
12
+ print('---------------------')
13
+ for j, (tm, dur, note) in enumerate(zip(tokens[0::3],tokens[1::3],tokens[2::3])):
14
+ if note == SEPARATOR:
15
+ assert tm == SEPARATOR and dur == SEPARATOR
16
+ print(j, 'SEPARATOR')
17
+ continue
18
+
19
+ if note == REST:
20
+ assert tm < CONTROL_OFFSET
21
+ assert dur == DUR_OFFSET+0
22
+ print(j, tm, 'REST')
23
+ continue
24
+
25
+ if note < CONTROL_OFFSET:
26
+ tm = tm - TIME_OFFSET
27
+ dur = dur - DUR_OFFSET
28
+ note = note - NOTE_OFFSET
29
+ instr = note//2**7
30
+ pitch = note - (2**7)*instr
31
+ print(j, tm, dur, instr, pitch)
32
+ else:
33
+ tm = tm - ATIME_OFFSET
34
+ dur = dur - ADUR_OFFSET
35
+ note = note - ANOTE_OFFSET
36
+ instr = note//2**7
37
+ pitch = note - (2**7)*instr
38
+ print(j, tm, dur, instr, pitch, '(A)')
39
+
40
+
41
+ def clip(tokens, start, end, clip_duration=True, seconds=True):
42
+ if seconds:
43
+ start = int(TIME_RESOLUTION*start)
44
+ end = int(TIME_RESOLUTION*end)
45
+
46
+ new_tokens = []
47
+ for (time, dur, note) in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
48
+ if note < CONTROL_OFFSET:
49
+ this_time = time - TIME_OFFSET
50
+ this_dur = dur - DUR_OFFSET
51
+ else:
52
+ this_time = time - ATIME_OFFSET
53
+ this_dur = dur - ADUR_OFFSET
54
+
55
+ if this_time < start or end < this_time:
56
+ continue
57
+
58
+ # truncate extended notes
59
+ if clip_duration and end < this_time + this_dur:
60
+ dur -= this_time + this_dur - end
61
+
62
+ new_tokens.extend([time, dur, note])
63
+
64
+ return new_tokens
65
+
66
+
67
+ def mask(tokens, start, end):
68
+ new_tokens = []
69
+ for (time, dur, note) in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
70
+ if note < CONTROL_OFFSET:
71
+ this_time = (time - TIME_OFFSET)/float(TIME_RESOLUTION)
72
+ else:
73
+ this_time = (time - ATIME_OFFSET)/float(TIME_RESOLUTION)
74
+
75
+ if start < this_time < end:
76
+ continue
77
+
78
+ new_tokens.extend([time, dur, note])
79
+
80
+ return new_tokens
81
+
82
+
83
+ def delete(tokens, criterion):
84
+ new_tokens = []
85
+ for token in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
86
+ if criterion(token):
87
+ continue
88
+
89
+ new_tokens.extend(token)
90
+
91
+ return new_tokens
92
+
93
+
94
+ def sort(tokens):
95
+ """ sort sequence of events or controls (but not both) """
96
+
97
+ times = tokens[0::3]
98
+ indices = sorted(range(len(times)), key=times.__getitem__)
99
+
100
+ sorted_tokens = []
101
+ for idx in indices:
102
+ sorted_tokens.extend(tokens[3*idx:3*(idx+1)])
103
+
104
+ return sorted_tokens
105
+
106
+
107
+ def split(tokens):
108
+ """ split a sequence into events and controls """
109
+
110
+ events = []
111
+ controls = []
112
+ for (time, dur, note) in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
113
+ if note < CONTROL_OFFSET:
114
+ events.extend([time, dur, note])
115
+ else:
116
+ controls.extend([time, dur, note])
117
+
118
+ return events, controls
119
+
120
+
121
+ def pad(tokens, end_time=None, density=TIME_RESOLUTION):
122
+ """
123
+ Pads tokens up to end_time (if given) with REST (a special token value defined in vocab.py)
124
+ up to a desired density. see Definition 3.5 and Example 3.6 in the paper.
125
+ """
126
+ end_time = TIME_OFFSET+(end_time if end_time else max_time(tokens, seconds=False))
127
+ new_tokens = []
128
+ previous_time = TIME_OFFSET+0
129
+ for (time, dur, note) in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
130
+ # must pad before separation, anticipation
131
+ assert note < CONTROL_OFFSET
132
+
133
+ # insert pad tokens to ensure the desired density
134
+ while time > previous_time + density:
135
+ new_tokens.extend([previous_time+density, DUR_OFFSET+0, REST])
136
+ previous_time += density
137
+
138
+ new_tokens.extend([time, dur, note])
139
+ previous_time = time
140
+
141
+ while end_time > previous_time + density:
142
+ new_tokens.extend([previous_time+density, DUR_OFFSET+0, REST])
143
+ previous_time += density
144
+
145
+ return new_tokens
146
+
147
+
148
+ def unpad(tokens):
149
+ new_tokens = []
150
+ for (time, dur, note) in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
151
+ if note == REST: continue
152
+
153
+ new_tokens.extend([time, dur, note])
154
+
155
+ return new_tokens
156
+
157
+
158
+ def anticipate(events, controls, delta=DELTA*TIME_RESOLUTION):
159
+ """
160
+ Interleave a sequence of events with anticipated controls.
161
+
162
+ Inputs:
163
+ events : a sequence of events
164
+ controls : a sequence of time-localized controls
165
+ delta : the anticipation interval
166
+
167
+ Returns:
168
+ tokens : interleaved events and anticipated controls
169
+ controls : unconsumed controls (control time > max_time(events) + delta)
170
+ """
171
+
172
+ if len(controls) == 0:
173
+ return events, controls
174
+
175
+ tokens = []
176
+ event_time = 0
177
+ control_time = controls[0] - ATIME_OFFSET
178
+ for time, dur, note in zip(events[0::3],events[1::3],events[2::3]):
179
+ while event_time >= control_time - delta:
180
+ tokens.extend(controls[0:3])
181
+ controls = controls[3:] # consume this control
182
+ control_time = controls[0] - ATIME_OFFSET if len(controls) > 0 else float('inf')
183
+
184
+ assert note < CONTROL_OFFSET
185
+ event_time = time - TIME_OFFSET
186
+ tokens.extend([time, dur, note])
187
+
188
+ return tokens, controls
189
+
190
+
191
+ def anticipate2(events, controls, map, delta=DELTA*TIME_RESOLUTION):
192
+ """
193
+ Interleave a sequence of events with anticipated controls, where controls represent
194
+ the performance of a piece and events represent the score, and map is a mapping from
195
+ score beats and downbeats to performance beats and downbeats.
196
+
197
+ Note that ATIME_OFFSET, CONTROL_OFFSET, TIME_OFFSET offset the arrival times of
198
+ controls and events to differentiate between them. But they are subtracted to retrieve
199
+ the actual time of the event or control.
200
+
201
+ Also, our map interpolates from the first to last beats in the score/performance, so we need
202
+ to throw away tokens that are not in the domain and range of the map.
203
+ """
204
+
205
+ if len(controls) == 0:
206
+ return events, controls
207
+
208
+ domain_min = map.x.min()
209
+ domain_max = map.x.max()
210
+ range_min = map.y.min()
211
+ range_max = map.y.max()
212
+
213
+ filtered_events = [t for t in list(zip(events[0::3], events[1::3], events[2::3])) \
214
+ if domain_min <= t[0]/TIME_RESOLUTION <= domain_max]
215
+
216
+ filtered_controls = [t for t in list(zip(controls[0::3], controls[1::3], controls[2::3])) \
217
+ if range_min <= (t[0]-CONTROL_OFFSET)/TIME_RESOLUTION <= range_max]
218
+
219
+ tokens = []
220
+ control_time = filtered_controls[0][0] - ATIME_OFFSET
221
+
222
+ for time, dur, note in filtered_events:
223
+ while map(time / TIME_RESOLUTION)*TIME_RESOLUTION >= control_time - delta:
224
+ tokens.extend(filtered_controls[0])
225
+ filtered_controls = filtered_controls[1:] # consume this control
226
+ control_time = filtered_controls[0][0] - ATIME_OFFSET if len(filtered_controls) > 0 else float('inf')
227
+
228
+ assert note < CONTROL_OFFSET
229
+ tokens.extend([time, dur, note])
230
+
231
+ controls = [item for tup in filtered_controls for item in tup]
232
+ return tokens, controls
233
+
234
+
235
+ def sparsity(tokens):
236
+ max_dt = 0
237
+ previous_time = TIME_OFFSET+0
238
+ for (time, dur, note) in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
239
+ if note == SEPARATOR: continue
240
+ assert note < CONTROL_OFFSET # don't operate on interleaved sequences
241
+
242
+ max_dt = max(max_dt, time - previous_time)
243
+ previous_time = time
244
+
245
+ return max_dt
246
+
247
+
248
+ def min_time(tokens, seconds=True, instr=None):
249
+ mt = None
250
+ for time, dur, note in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
251
+ # stop calculating at sequence separator
252
+ if note == SEPARATOR: break
253
+
254
+ if note < CONTROL_OFFSET:
255
+ time -= TIME_OFFSET
256
+ note -= NOTE_OFFSET
257
+ else:
258
+ time -= ATIME_OFFSET
259
+ note -= ANOTE_OFFSET
260
+
261
+ # min time of a particular instrument
262
+ if instr is not None and instr != note//2**7:
263
+ continue
264
+
265
+ mt = time if mt is None else min(mt, time)
266
+
267
+ if mt is None: mt = 0
268
+ return mt/float(TIME_RESOLUTION) if seconds else mt
269
+
270
+
271
+ def max_time(tokens, seconds=True, instr=None):
272
+ mt = 0
273
+ for time, dur, note in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
274
+ # keep checking for max_time, even if it appears after a separator
275
+ # (this is important because we use this check for vocab overflow in tokenization)
276
+ if note == SEPARATOR: continue
277
+
278
+ if note < CONTROL_OFFSET:
279
+ time -= TIME_OFFSET
280
+ note -= NOTE_OFFSET
281
+ else:
282
+ time -= ATIME_OFFSET
283
+ note -= ANOTE_OFFSET
284
+
285
+ # max time of a particular instrument
286
+ if instr is not None and instr != note//2**7:
287
+ continue
288
+
289
+ mt = max(mt, time)
290
+
291
+ return mt/float(TIME_RESOLUTION) if seconds else mt
292
+
293
+
294
+ def get_instruments(tokens):
295
+ instruments = defaultdict(int)
296
+ for time, dur, note in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
297
+ if note >= SPECIAL_OFFSET: continue
298
+
299
+ if note < CONTROL_OFFSET:
300
+ note -= NOTE_OFFSET
301
+ else:
302
+ note -= ANOTE_OFFSET
303
+
304
+ instr = note//2**7
305
+ instruments[instr] += 1
306
+
307
+ return instruments
308
+
309
+
310
+ def translate(tokens, dt, seconds=False):
311
+ if seconds:
312
+ dt = int(TIME_RESOLUTION*dt)
313
+
314
+ new_tokens = []
315
+ for (time, dur, note) in zip(tokens[0::3],tokens[1::3],tokens[2::3]):
316
+ # stop translating after EOT
317
+ if note == SEPARATOR:
318
+ new_tokens.extend([time, dur, note])
319
+ dt = 0
320
+ continue
321
+
322
+ if note < CONTROL_OFFSET:
323
+ this_time = time - TIME_OFFSET
324
+ else:
325
+ this_time = time - ATIME_OFFSET
326
+
327
+ assert 0 <= this_time + dt
328
+ new_tokens.extend([time+dt, dur, note])
329
+
330
+ return new_tokens
331
+
332
+ def combine(events, controls):
333
+ return sort(events + [token - CONTROL_OFFSET for token in controls])
anticipation/sample.py ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ API functions for sampling from anticipatory infilling models.
3
+ """
4
+
5
+ import math
6
+
7
+ import torch
8
+ import torch.nn.functional as F
9
+
10
+ from tqdm import tqdm
11
+
12
+ from anticipation import ops
13
+ from anticipation.config import *
14
+ from anticipation.vocab import *
15
+
16
+
17
+ def safe_logits(logits, idx):
18
+ logits[CONTROL_OFFSET:SPECIAL_OFFSET] = -float('inf') # don't generate controls
19
+ logits[SPECIAL_OFFSET:] = -float('inf') # don't generate special tokens
20
+
21
+ # don't generate stuff in the wrong time slot
22
+ if idx % 3 == 0:
23
+ logits[DUR_OFFSET:DUR_OFFSET+MAX_DUR] = -float('inf')
24
+ logits[NOTE_OFFSET:NOTE_OFFSET+MAX_NOTE] = -float('inf')
25
+ elif idx % 3 == 1:
26
+ logits[TIME_OFFSET:TIME_OFFSET+MAX_TIME] = -float('inf')
27
+ logits[NOTE_OFFSET:NOTE_OFFSET+MAX_NOTE] = -float('inf')
28
+ elif idx % 3 == 2:
29
+ logits[TIME_OFFSET:TIME_OFFSET+MAX_TIME] = -float('inf')
30
+ logits[DUR_OFFSET:DUR_OFFSET+MAX_DUR] = -float('inf')
31
+
32
+ return logits
33
+
34
+
35
+ def nucleus(logits, top_p):
36
+ # from HF implementation
37
+ if top_p < 1.0:
38
+ sorted_logits, sorted_indices = torch.sort(logits, descending=True)
39
+ cumulative_probs = torch.cumsum(F.softmax(sorted_logits, dim=-1), dim=-1)
40
+
41
+ # Remove tokens with cumulative probability above the threshold (token with 0 are kept)
42
+ sorted_indices_to_remove = cumulative_probs > top_p
43
+
44
+ # Shift the indices to the right to keep also the first token above the threshold
45
+ sorted_indices_to_remove[..., 1:] = sorted_indices_to_remove[..., :-1].clone()
46
+ sorted_indices_to_remove[..., 0] = 0
47
+
48
+ # scatter sorted tensors to original indexing
49
+ indices_to_remove = sorted_indices_to_remove.scatter(0, sorted_indices, sorted_indices_to_remove)
50
+ logits[indices_to_remove] = -float("inf")
51
+
52
+ return logits
53
+
54
+
55
+ def future_logits(logits, curtime):
56
+ """ don't sample events in the past """
57
+ if curtime > 0:
58
+ logits[TIME_OFFSET:TIME_OFFSET+curtime] = -float('inf')
59
+
60
+ return logits
61
+
62
+
63
+ def instr_logits(logits, full_history):
64
+ """ don't sample more than 16 instruments """
65
+ instrs = ops.get_instruments(full_history)
66
+ if len(instrs) < 15: # 16 - 1 to account for the reserved drum track
67
+ return logits
68
+
69
+ for instr in range(MAX_INSTR):
70
+ if instr not in instrs:
71
+ logits[NOTE_OFFSET+instr*MAX_PITCH:NOTE_OFFSET+(instr+1)*MAX_PITCH] = -float('inf')
72
+
73
+ return logits
74
+
75
+
76
+ def add_token(model, z, tokens, top_p, current_time, debug=False):
77
+ assert len(tokens) % 3 == 0
78
+
79
+ history = tokens.copy()
80
+ lookback = max(len(tokens) - 1017, 0)
81
+ history = history[lookback:] # Markov window
82
+ offset = ops.min_time(history, seconds=False)
83
+ history[::3] = [tok - offset for tok in history[::3]] # relativize time in the history buffer
84
+
85
+ new_token = []
86
+ with torch.no_grad():
87
+ for i in range(3):
88
+ input_tokens = torch.tensor(z + history + new_token).unsqueeze(0).to(model.device)
89
+ logits = model(input_tokens).logits[0,-1]
90
+
91
+ idx = input_tokens.shape[1]-1
92
+ logits = safe_logits(logits, idx)
93
+ if i == 0:
94
+ logits = future_logits(logits, current_time - offset)
95
+ elif i == 2:
96
+ logits = instr_logits(logits, tokens)
97
+ logits = nucleus(logits, top_p)
98
+
99
+ probs = F.softmax(logits, dim=-1)
100
+ token = torch.multinomial(probs, 1)
101
+ new_token.append(int(token))
102
+
103
+ new_token[0] += offset # revert to full sequence timing
104
+ if debug:
105
+ print(f' OFFSET = {offset}, LEN = {len(history)}, TIME = {tokens[::3][-5:]}')
106
+
107
+ return new_token
108
+
109
+
110
+ def generate(model, start_time, end_time, inputs=None, controls=None, top_p=1.0, debug=False, delta=DELTA*TIME_RESOLUTION):
111
+ if inputs is None:
112
+ inputs = []
113
+
114
+ if controls is None:
115
+ controls = []
116
+
117
+ start_time = int(TIME_RESOLUTION*start_time)
118
+ end_time = int(TIME_RESOLUTION*end_time)
119
+
120
+ # prompt is events up to start_time
121
+ prompt = ops.pad(ops.clip(inputs, 0, start_time, clip_duration=False, seconds=False), start_time)
122
+
123
+ # treat events beyond start_time as controls
124
+ future = ops.clip(inputs, start_time+1, ops.max_time(inputs, seconds=False), clip_duration=False, seconds=False)
125
+ if debug:
126
+ print('Future')
127
+ ops.print_tokens(future)
128
+
129
+ # clip controls that preceed the sequence
130
+ controls = ops.clip(controls, DELTA, ops.max_time(controls, seconds=False), clip_duration=False, seconds=False)
131
+
132
+ if debug:
133
+ print('Controls')
134
+ ops.print_tokens(controls)
135
+
136
+ z = [ANTICIPATE] if len(controls) > 0 or len(future) > 0 else [AUTOREGRESS]
137
+ if debug:
138
+ print('AR Mode' if z[0] == AUTOREGRESS else 'AAR Mode')
139
+
140
+ # interleave the controls with the events
141
+ tokens, controls = ops.anticipate(prompt, ops.sort(controls + [CONTROL_OFFSET+token for token in future]))
142
+
143
+ if debug:
144
+ print('Prompt')
145
+ ops.print_tokens(tokens)
146
+
147
+ current_time = ops.max_time(prompt, seconds=False)
148
+ if debug:
149
+ print('Current time:', current_time)
150
+
151
+ with tqdm(range(end_time-start_time)) as progress:
152
+ if controls:
153
+ atime, adur, anote = controls[0:3]
154
+ anticipated_tokens = controls[3:]
155
+ anticipated_time = atime - ATIME_OFFSET
156
+ else:
157
+ # nothing to anticipate
158
+ anticipated_time = math.inf
159
+
160
+ while True:
161
+ while current_time >= anticipated_time - delta:
162
+ tokens.extend([atime, adur, anote])
163
+ if debug:
164
+ note = anote - ANOTE_OFFSET
165
+ instr = note//2**7
166
+ print('A', atime - ATIME_OFFSET, adur - ADUR_OFFSET, instr, note - (2**7)*instr)
167
+
168
+ if len(anticipated_tokens) > 0:
169
+ atime, adur, anote = anticipated_tokens[0:3]
170
+ anticipated_tokens = anticipated_tokens[3:]
171
+ anticipated_time = atime - ATIME_OFFSET
172
+ else:
173
+ # nothing more to anticipate
174
+ anticipated_time = math.inf
175
+
176
+ new_token = add_token(model, z, tokens, top_p, max(start_time,current_time))
177
+ new_time = new_token[0] - TIME_OFFSET
178
+ if new_time >= end_time:
179
+ break
180
+
181
+ if debug:
182
+ new_note = new_token[2] - NOTE_OFFSET
183
+ new_instr = new_note//2**7
184
+ new_pitch = new_note - (2**7)*new_instr
185
+ print('C', new_time, new_token[1] - DUR_OFFSET, new_instr, new_pitch)
186
+
187
+ tokens.extend(new_token)
188
+ dt = new_time - current_time
189
+ assert dt >= 0
190
+ current_time = new_time
191
+ progress.update(dt)
192
+
193
+ events, _ = ops.split(tokens)
194
+ return ops.sort(ops.unpad(events) + future)
195
+
196
+
197
+ def generate_ar(model, start_time, end_time, inputs=None, controls=None, top_p=1.0, debug=False, delta=DELTA*TIME_RESOLUTION):
198
+ if inputs is None:
199
+ inputs = []
200
+
201
+ if controls is None:
202
+ controls = []
203
+ else:
204
+ # treat controls as ordinary tokens
205
+ controls = [token-CONTROL_OFFSET for token in controls]
206
+
207
+ start_time = int(TIME_RESOLUTION*start_time)
208
+ end_time = int(TIME_RESOLUTION*end_time)
209
+
210
+ inputs = ops.sort(inputs + controls)
211
+
212
+ # prompt is events up to start_time
213
+ prompt = ops.pad(ops.clip(inputs, 0, start_time, clip_duration=False, seconds=False), start_time)
214
+ if debug:
215
+ print('Prompt')
216
+ ops.print_tokens(prompt)
217
+
218
+ # treat events beyond start_time as controls
219
+ controls = ops.clip(inputs, start_time+1, ops.max_time(inputs, seconds=False), clip_duration=False, seconds=False)
220
+ if debug:
221
+ print('Future')
222
+ ops.print_tokens(controls)
223
+
224
+ z = [AUTOREGRESS]
225
+ if debug:
226
+ print('AR Mode')
227
+
228
+ current_time = ops.max_time(prompt, seconds=False)
229
+ if debug:
230
+ print('Current time:', current_time)
231
+
232
+ tokens = prompt
233
+ with tqdm(range(end_time-start_time)) as progress:
234
+ if controls:
235
+ atime, adur, anote = controls[0:3]
236
+ anticipated_tokens = controls[3:]
237
+ anticipated_time = atime - TIME_OFFSET
238
+ else:
239
+ # nothing to anticipate
240
+ anticipated_time = math.inf
241
+
242
+ while True:
243
+ new_token = add_token(model, z, tokens, top_p, max(start_time,current_time))
244
+ new_time = new_token[0] - TIME_OFFSET
245
+ if new_time >= end_time:
246
+ break
247
+
248
+ dt = new_time - current_time
249
+ assert dt >= 0
250
+ current_time = new_time
251
+
252
+ # backfill anything that should have come before the new token
253
+ while current_time >= anticipated_time:
254
+ tokens.extend([atime, adur, anote])
255
+ if debug:
256
+ note = anote - NOTE_OFFSET
257
+ instr = note//2**7
258
+ print('A', atime - TIME_OFFSET, adur - DUR_OFFSET, instr, note - (2**7)*instr)
259
+
260
+ if len(anticipated_tokens) > 0:
261
+ atime, adur, anote = anticipated_tokens[0:3]
262
+ anticipated_tokens = anticipated_tokens[3:]
263
+ anticipated_time = atime - TIME_OFFSET
264
+ else:
265
+ # nothing more to anticipate
266
+ anticipated_time = math.inf
267
+
268
+ if debug:
269
+ new_note = new_token[2] - NOTE_OFFSET
270
+ new_instr = new_note//2**7
271
+ new_pitch = new_note - (2**7)*new_instr
272
+ print('C', new_time, new_token[1] - DUR_OFFSET, new_instr, new_pitch)
273
+
274
+ tokens.extend(new_token)
275
+ progress.update(dt)
276
+
277
+ if anticipated_time != math.inf:
278
+ tokens.extend([atime, adur, anote])
279
+
280
+ return ops.sort(ops.unpad(tokens) + controls)
281
+
282
+ def generate2(model, start_time, end_time, inputs=None, controls=None, map=None, top_p=1.0, debug=False, delta=DELTA*TIME_RESOLUTION):
283
+ """
284
+ Note that in this generate function (and the original one) the controls should already be offset by CONTROL_OFFSET.
285
+ Otherwise anticipate functions will not work correctly.
286
+
287
+ This function is just for testing; in reality we wouldn't be able to generate with a map.
288
+ """
289
+ if inputs is None:
290
+ inputs = []
291
+
292
+ if controls is None:
293
+ controls = []
294
+
295
+ start_time = int(TIME_RESOLUTION*start_time)
296
+ end_time = int(TIME_RESOLUTION*end_time)
297
+
298
+ # prompt is events up to start_time
299
+ prompt = ops.pad(ops.clip(inputs, 0, start_time, clip_duration=False, seconds=False), start_time)
300
+
301
+ # treat events beyond start_time as controls
302
+ future = ops.clip(inputs, start_time+1, ops.max_time(inputs, seconds=False), clip_duration=False, seconds=False)
303
+ if debug:
304
+ print('Future')
305
+ ops.print_tokens(future)
306
+
307
+ # clip controls that preceed the sequence
308
+ # start controls at anticipated time delta so that control_time - delta is non-negative
309
+ controls = ops.clip(controls, DELTA, ops.max_time(controls, seconds=False), clip_duration=False, seconds=False)
310
+
311
+ if debug:
312
+ print('Controls')
313
+ ops.print_tokens(controls)
314
+
315
+ z = [ANTICIPATE] if len(controls) > 0 or len(future) > 0 else [AUTOREGRESS]
316
+ if debug:
317
+ print('AR Mode' if z[0] == AUTOREGRESS else 'AAR Mode')
318
+
319
+ # interleave the controls with the events
320
+ # this shouldn't do anything if I'm only passing in controls; prompt is empty
321
+ # so tokens remains empty, controls remains the same
322
+ tokens, controls = ops.anticipate2(prompt, ops.sort(controls + [CONTROL_OFFSET+token for token in future]), map)
323
+
324
+ if debug:
325
+ print('Prompt')
326
+ ops.print_tokens(tokens)
327
+
328
+ current_time = ops.max_time(prompt, seconds=False) # should be 0 if prompt is empty
329
+ if debug:
330
+ print('Current time:', current_time)
331
+
332
+
333
+
334
+
335
+ # make sure the event time begins inside the domain of the map
336
+ domain_min = map.x.min()
337
+ domain_max = map.x.max()
338
+ range_min = map.y.min()
339
+ range_max = map.y.max()
340
+
341
+ if current_time/TIME_RESOLUTION < domain_min:
342
+ current_time = domain_min*TIME_RESOLUTION
343
+
344
+ if start_time/TIME_RESOLUTION < domain_min:
345
+ start_time = int(domain_min*TIME_RESOLUTION)
346
+
347
+ if end_time/TIME_RESOLUTION > domain_max:
348
+ end_time = int(domain_max*TIME_RESOLUTION)
349
+
350
+ # make sure the control time begins inside the range of the map, i.e.
351
+ # the score is only controlled by performance notes occurring within the first and last beats
352
+ filtered_controls = [t for t in list(zip(controls[0::3], controls[1::3], controls[2::3])) \
353
+ if range_min <= (t[0]-CONTROL_OFFSET)/TIME_RESOLUTION <= range_max]
354
+ controls = [item for tup in filtered_controls for item in tup]
355
+
356
+
357
+
358
+
359
+ with tqdm(range(end_time-start_time)) as progress:
360
+ if controls:
361
+ atime, adur, anote = controls[0:3]
362
+ anticipated_tokens = controls[3:]
363
+ anticipated_time = atime - ATIME_OFFSET
364
+ else:
365
+ # nothing to anticipate
366
+ anticipated_time = math.inf
367
+
368
+ while True:
369
+ while map(current_time/TIME_RESOLUTION)*TIME_RESOLUTION >= anticipated_time - delta:
370
+ tokens.extend([atime, adur, anote])
371
+ # print(f'inserted a control at time {(atime-ATIME_OFFSET)/TIME_RESOLUTION}')
372
+ if debug:
373
+ note = anote - ANOTE_OFFSET
374
+ instr = note//2**7
375
+ print('A', atime - ATIME_OFFSET, adur - ADUR_OFFSET, instr, note - (2**7)*instr)
376
+
377
+ if len(anticipated_tokens) > 0:
378
+ atime, adur, anote = anticipated_tokens[0:3]
379
+ anticipated_tokens = anticipated_tokens[3:]
380
+ anticipated_time = atime - ATIME_OFFSET
381
+ else:
382
+ # nothing more to anticipate
383
+ anticipated_time = math.inf
384
+
385
+ new_token = add_token(model, z, tokens, top_p, max(start_time,current_time))
386
+ new_time = new_token[0] - TIME_OFFSET
387
+ if new_time >= end_time:
388
+ # print(f'new time was {new_time/TIME_RESOLUTION} and end time was {end_time/TIME_RESOLUTION} so we are breaking')
389
+ break
390
+
391
+ # print(f'generated an event at time {new_time/TIME_RESOLUTION} with performance time {map(new_time/TIME_RESOLUTION)}')
392
+
393
+ if debug:
394
+ new_note = new_token[2] - NOTE_OFFSET
395
+ new_instr = new_note//2**7
396
+ new_pitch = new_note - (2**7)*new_instr
397
+ print('C', new_time, new_token[1] - DUR_OFFSET, new_instr, new_pitch)
398
+
399
+ tokens.extend(new_token)
400
+ dt = new_time - current_time
401
+ assert dt >= 0
402
+ current_time = new_time
403
+ progress.update(dt)
404
+
405
+ events, _ = ops.split(tokens)
406
+ return ops.sort(ops.unpad(events) + future)
anticipation/tokenize.py ADDED
@@ -0,0 +1,397 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Top-level functions for preprocessing data to be used for training.
3
+ """
4
+
5
+ from tqdm import tqdm
6
+
7
+ import numpy as np
8
+
9
+ from anticipation import ops
10
+ from anticipation.config import *
11
+ from anticipation.vocab import *
12
+ from anticipation.convert import compound_to_events, midi_to_interarrival, midi_to_compound
13
+ from alignment import *
14
+
15
+
16
+ def extract_spans(all_events, rate):
17
+ events = []
18
+ controls = []
19
+ span = True
20
+ next_span = end_span = TIME_OFFSET+0
21
+ for time, dur, note in zip(all_events[0::3],all_events[1::3],all_events[2::3]):
22
+ assert(note not in [SEPARATOR, REST]) # shouldn't be in the sequence yet
23
+
24
+ # end of an anticipated span; decide when to do it again (next_span)
25
+ if span and time >= end_span:
26
+ span = False
27
+ next_span = time+int(TIME_RESOLUTION*np.random.exponential(1./rate))
28
+
29
+ # anticipate a 3-second span
30
+ if (not span) and time >= next_span:
31
+ span = True
32
+ end_span = time + DELTA*TIME_RESOLUTION
33
+
34
+ if span:
35
+ # mark this event as a control
36
+ controls.extend([CONTROL_OFFSET+time, CONTROL_OFFSET+dur, CONTROL_OFFSET+note])
37
+ else:
38
+ events.extend([time, dur, note])
39
+
40
+ return events, controls
41
+
42
+
43
+ ANTICIPATION_RATES = 10
44
+ def extract_random(all_events, rate):
45
+ events = []
46
+ controls = []
47
+ for time, dur, note in zip(all_events[0::3],all_events[1::3],all_events[2::3]):
48
+ assert(note not in [SEPARATOR, REST]) # shouldn't be in the sequence yet
49
+
50
+ if np.random.random() < rate/float(ANTICIPATION_RATES):
51
+ # mark this event as a control
52
+ controls.extend([CONTROL_OFFSET+time, CONTROL_OFFSET+dur, CONTROL_OFFSET+note])
53
+ else:
54
+ events.extend([time, dur, note])
55
+
56
+ return events, controls
57
+
58
+
59
+ def extract_instruments(all_events, instruments):
60
+ events = []
61
+ controls = []
62
+ for time, dur, note in zip(all_events[0::3],all_events[1::3],all_events[2::3]):
63
+ assert note < CONTROL_OFFSET # shouldn't be in the sequence yet
64
+ assert note not in [SEPARATOR, REST] # these shouldn't either
65
+
66
+ instr = (note-NOTE_OFFSET)//2**7
67
+ if instr in instruments:
68
+ # mark this event as a control
69
+ controls.extend([CONTROL_OFFSET+time, CONTROL_OFFSET+dur, CONTROL_OFFSET+note])
70
+ else:
71
+ events.extend([time, dur, note])
72
+
73
+ return events, controls
74
+
75
+
76
+ def maybe_tokenize(compound_tokens):
77
+ """
78
+ Tokenizes a sequence of compound tokens if the length is appropriate.
79
+ Returns the list of events and truncations (number of notes above 10s that were truncated)
80
+ """
81
+ # skip sequences with very few events
82
+ if len(compound_tokens) < COMPOUND_SIZE*MIN_TRACK_EVENTS:
83
+ return None, None, 1 # short track
84
+
85
+ events, truncations = compound_to_events(compound_tokens, stats=True)
86
+ end_time = ops.max_time(events, seconds=False)
87
+
88
+ # don't want to deal with extremely short tracks
89
+ if end_time < TIME_RESOLUTION*MIN_TRACK_TIME_IN_SECONDS:
90
+ return None, None, 1 # short track
91
+
92
+ # don't want to deal with extremely long tracks
93
+ if end_time > TIME_RESOLUTION*MAX_TRACK_TIME_IN_SECONDS:
94
+ return None, None, 2 # long track
95
+
96
+ # skip sequences more instruments than MIDI channels (16)
97
+ if len(ops.get_instruments(events)) > MAX_TRACK_INSTR:
98
+ return None, None, 3 # too many instruments
99
+
100
+ return events, truncations, 0
101
+
102
+
103
+ def tokenize_ia(datafiles, output, augment_factor, idx=0, debug=False):
104
+ assert augment_factor == 1 # can't augment interarrival-tokenized data
105
+
106
+ all_truncations = 0
107
+ seqcount = rest_count = 0
108
+ stats = 4*[0] # (short, long, too many instruments, inexpressible)
109
+ np.random.seed(0)
110
+
111
+ with open(output, 'w') as outfile:
112
+ concatenated_tokens = []
113
+ for j, filename in tqdm(list(enumerate(datafiles)), desc=f'#{idx}', position=idx+1, leave=True):
114
+ with open(filename, 'r') as f:
115
+ _, _, status = maybe_tokenize([int(token) for token in f.read().split()])
116
+
117
+ if status > 0:
118
+ stats[status-1] += 1
119
+ continue
120
+
121
+ filename = filename[:-len('.compound.txt')] # get the original MIDI
122
+
123
+ # already parsed; shouldn't raise an exception
124
+ tokens, truncations = midi_to_interarrival(filename, stats=True)
125
+ tokens[0:0] = [MIDI_SEPARATOR]
126
+ concatenated_tokens.extend(tokens)
127
+ all_truncations += truncations
128
+
129
+ # write out full sequences to file
130
+ while len(concatenated_tokens) >= CONTEXT_SIZE:
131
+ seq = concatenated_tokens[0:CONTEXT_SIZE]
132
+ concatenated_tokens = concatenated_tokens[CONTEXT_SIZE:]
133
+ outfile.write(' '.join([str(tok) for tok in seq]) + '\n')
134
+ seqcount += 1
135
+
136
+ if debug:
137
+ fmt = 'Processed {} sequences (discarded {} tracks, discarded {} seqs, added {} rest tokens)'
138
+ print(fmt.format(seqcount, stats[0]+stats[1]+stats[2], stats[3], rest_count))
139
+
140
+ return (seqcount, rest_count, stats[0], stats[1], stats[2], stats[3], all_truncations)
141
+
142
+
143
+ def tokenize(datafiles, output, augment_factor, idx=0, debug=False):
144
+ """
145
+ Applies anticipatory tokenization to a list of datafiles, writing the results to output.
146
+ 1. These datafiles should be .txt files containing compound tokenizations, which are converted
147
+ to events via maybe_tokenize.
148
+ 2. Creates controls out of the events via augment_factor, or no augmentation (pure autoregression)
149
+ if augment_factor == 1.
150
+ 3. Calls anticipate() to interleave controls and events
151
+ 4. Splits the tokens into sequences of length 1023, which are written to the output
152
+ """
153
+ tokens = []
154
+ all_truncations = 0
155
+ seqcount = rest_count = 0
156
+ stats = 4*[0] # (short, long, too many instruments, inexpressible)
157
+ np.random.seed(0)
158
+
159
+ with open(output, 'w') as outfile:
160
+ concatenated_tokens = []
161
+ for j, filename in tqdm(list(enumerate(datafiles)), desc=f'#{idx}', position=idx+1, leave=True):
162
+ with open(filename, 'r') as f:
163
+ all_events, truncations, status = maybe_tokenize([int(token) for token in f.read().split()])
164
+
165
+ if status > 0:
166
+ stats[status-1] += 1
167
+ continue
168
+
169
+ instruments = list(ops.get_instruments(all_events).keys())
170
+ end_time = ops.max_time(all_events, seconds=False)
171
+
172
+ # different random augmentations
173
+ for k in range(augment_factor):
174
+ if k % 10 == 0:
175
+ # no augmentation
176
+ events = all_events.copy()
177
+ controls = []
178
+ elif k % 10 == 1:
179
+ # span augmentation
180
+ lmbda = .05
181
+ events, controls = extract_spans(all_events, lmbda)
182
+ elif k % 10 < 6:
183
+ # random augmentation
184
+ r = np.random.randint(1,ANTICIPATION_RATES)
185
+ events, controls = extract_random(all_events, r)
186
+ else:
187
+ if len(instruments) > 1:
188
+ # instrument augmentation: at least one, but not all instruments
189
+ u = 1+np.random.randint(len(instruments)-1)
190
+ subset = np.random.choice(instruments, u, replace=False)
191
+ events, controls = extract_instruments(all_events, subset)
192
+ else:
193
+ # no augmentation
194
+ events = all_events.copy()
195
+ controls = []
196
+
197
+ if len(concatenated_tokens) == 0:
198
+ z = ANTICIPATE if k % 10 != 0 else AUTOREGRESS
199
+
200
+ all_truncations += truncations
201
+ events = ops.pad(events, end_time)
202
+ rest_count += sum(1 if tok == REST else 0 for tok in events[2::3])
203
+ tokens, controls = ops.anticipate(events, controls)
204
+ assert len(controls) == 0 # should have consumed all controls (because of padding)
205
+ tokens[0:0] = [SEPARATOR, SEPARATOR, SEPARATOR]
206
+ concatenated_tokens.extend(tokens)
207
+
208
+ # write out full sequences to file
209
+ while len(concatenated_tokens) >= EVENT_SIZE*M:
210
+ seq = concatenated_tokens[0:EVENT_SIZE*M]
211
+ concatenated_tokens = concatenated_tokens[EVENT_SIZE*M:]
212
+
213
+ # relativize time to the context
214
+ seq = ops.translate(seq, -ops.min_time(seq, seconds=False), seconds=False)
215
+ assert ops.min_time(seq, seconds=False) == 0
216
+ if ops.max_time(seq, seconds=False) >= MAX_TIME:
217
+ stats[3] += 1
218
+ continue
219
+
220
+ # if seq contains SEPARATOR, global controls describe the first sequence
221
+ seq.insert(0, z)
222
+
223
+ outfile.write(' '.join([str(tok) for tok in seq]) + '\n')
224
+ seqcount += 1
225
+
226
+ # grab the current augmentation controls if we didn't already
227
+ z = ANTICIPATE if k % 10 != 0 else AUTOREGRESS
228
+
229
+ if debug:
230
+ fmt = 'Processed {} sequences (discarded {} tracks, discarded {} seqs, added {} rest tokens)'
231
+ print(fmt.format(seqcount, stats[0]+stats[1]+stats[2], stats[3], rest_count))
232
+
233
+ return (seqcount, rest_count, stats[0], stats[1], stats[2], stats[3], all_truncations)
234
+
235
+
236
+ def tokenize2(datafiles, output, idx=0, debug=False):
237
+ """
238
+ Applies anticipatory tokenization to a list of datafiles where each is a tuple
239
+ (file1, file2, file3, file4) with
240
+ 1. file1 being the path to the performance MIDI file
241
+ 2. file2 being the path to the score MIDI file
242
+ 3. file3 being the path to the performance annotation file
243
+ 4. file4 being the path to the score annotation file
244
+
245
+ Note: This is the old tokenization process that uses anticipation with mapping
246
+ """
247
+ tokens = []
248
+ all_truncations = 0
249
+ seqcount = rest_count = 0
250
+ stats = 4*[0] # (short, long, too many instruments, inexpressible)
251
+ np.random.seed(0)
252
+
253
+ with open(output, 'w') as outfile:
254
+ concatenated_tokens = []
255
+ for j, filegroup in tqdm(list(enumerate(datafiles)), desc=f'#{idx}', position=idx+1, leave=True):
256
+
257
+ file1, file2 = midi_to_compound(filegroup[0]), midi_to_compound(filegroup[1])
258
+ file3, file4 = filegroup[2], filegroup[3]
259
+
260
+ controls, truncations_c, _ = maybe_tokenize(file1)
261
+ controls = [CONTROL_OFFSET+token for token in controls] # mark these tokens as controls
262
+ all_events, truncations_e, _ = maybe_tokenize(file2)
263
+
264
+ z = ANTICIPATE
265
+
266
+ all_truncations += truncations_c + truncations_e
267
+
268
+ # only need to pad the events
269
+ events = ops.pad(all_events, end_time=ops.max_time(all_events, seconds=False))
270
+
271
+ rest_count += sum(1 if tok == REST else 0 for tok in events[2::3])
272
+
273
+ map = compare_annotations(file4, file3) # create mapping from score to performance
274
+ tokens, controls = ops.anticipate2(events, controls, map)
275
+
276
+ assert len(controls) == 0 # should have consumed all controls (because of padding)
277
+ tokens[0:0] = [SEPARATOR, SEPARATOR, SEPARATOR]
278
+ concatenated_tokens.extend(tokens)
279
+
280
+ # write sequences of length EVENT_SIZE*M = 1023 to the output file,
281
+ # any extra remain in concatenated_tokens for the next input file.
282
+ while len(concatenated_tokens) >= EVENT_SIZE*M:
283
+ seq = concatenated_tokens[0:EVENT_SIZE*M]
284
+ concatenated_tokens = concatenated_tokens[EVENT_SIZE*M:]
285
+
286
+ # make sure each sequence starts at time 0
287
+ seq = ops.translate(seq, -ops.min_time(seq, seconds=False), seconds=False)
288
+ assert ops.min_time(seq, seconds=False) == 0
289
+ if ops.max_time(seq, seconds=False) >= MAX_TIME:
290
+ stats[3] += 1
291
+ continue
292
+
293
+ # if seq contains SEPARATOR, global controls describe the first sequence
294
+ seq.insert(0, z)
295
+
296
+ outfile.write(' '.join([str(tok) for tok in seq]) + '\n')
297
+ seqcount += 1
298
+
299
+ if debug:
300
+ fmt = 'Processed {} sequences (discarded {} tracks, discarded {} seqs, added {} rest tokens)'
301
+ print(fmt.format(seqcount, stats[0]+stats[1]+stats[2], stats[3], rest_count))
302
+
303
+ return (seqcount, rest_count, stats[0], stats[1], stats[2], stats[3], all_truncations)
304
+
305
+ def tokenize3(datafiles, output, idx=0, debug=False, skip_Nones=True):
306
+ """
307
+ Applies anticipatory tokenization to a list of datafiles where each is a tuple
308
+ (file1, file2, file3, file4) with
309
+ 1. file1 being the path to the performance MIDI file
310
+ 2. file2 being the path to the score MIDI file
311
+ 3. file3 being the path to the performance annotation file
312
+ 4. file4 being the path to the score annotation file
313
+
314
+ Note: This is the new tokenization process that alternates score and perf tokens and inserts
315
+ None,None,None tokens whenver a corresponding score token cannot be found.
316
+ """
317
+ tokens = []
318
+ all_truncations = 0
319
+ seqcount = rest_count = 0
320
+ stats = 4*[0] # (short, long, too many instruments, inexpressible)
321
+ np.random.seed(0)
322
+
323
+ with open(output, 'w') as outfile:
324
+ concatenated_tokens = []
325
+ for j, filegroup in tqdm(list(enumerate(datafiles)), desc=f'#{idx}', position=idx+1, leave=True):
326
+
327
+ file1,file2,file3,file4 = filegroup
328
+
329
+ print(f'Now aligning {file1} and {file2}')
330
+ matched_tuples = align_tokens2(file1,file2,file3,file4,skip_Nones=skip_Nones)
331
+
332
+ # interleave the tokens via alternation
333
+ interleaved_tokens = []
334
+
335
+ for i, l in enumerate(matched_tuples):
336
+ if l[0][0]-CONTROL_OFFSET <= DELTA*TIME_RESOLUTION:
337
+ interleaved_tokens.extend(l[0])
338
+
339
+ prefix_len = int(len(interleaved_tokens)/3)
340
+
341
+ for i, l in enumerate(matched_tuples):
342
+ if i < len(matched_tuples)-prefix_len:
343
+ interleaved_tokens.extend(l[2])
344
+ interleaved_tokens.extend(matched_tuples[i+prefix_len][0])
345
+ else:
346
+ interleaved_tokens.extend(l[2])
347
+
348
+ # print(interleaved_tokens)
349
+
350
+ # because we already have a sequence of interleaved tokens, don't want to make any truncations
351
+ # controls, truncations_c, _ = maybe_tokenize(file1)
352
+ # controls = [CONTROL_OFFSET+token for token in controls] # mark these tokens as controls
353
+ # all_events, truncations_e, _ = maybe_tokenize(file2)
354
+
355
+ z = ANTICIPATE
356
+
357
+ # all_truncations += truncations_c + truncations_e
358
+
359
+ # only need to pad the events
360
+ # events = ops.pad(all_events, end_time=ops.max_time(all_events, seconds=False))
361
+
362
+ # rest_count += sum(1 if tok == REST else 0 for tok in events[2::3])
363
+
364
+ # map = compare_annotations(file4, file3) # create mapping from score to performance
365
+ # tokens, controls = ops.anticipate2(events, controls, map)
366
+
367
+ # assert len(controls) == 0 # should have consumed all controls (because of padding)
368
+
369
+ # separator is a special token with value 55025
370
+ tokens[0:0] = [SEPARATOR, SEPARATOR, SEPARATOR]
371
+ concatenated_tokens.extend(interleaved_tokens)
372
+
373
+ # write sequences of length EVENT_SIZE*M = 1023 to the output file,
374
+ # any extra remain in concatenated_tokens for the next input file.
375
+ while len(concatenated_tokens) >= EVENT_SIZE*M:
376
+ seq = concatenated_tokens[0:EVENT_SIZE*M]
377
+ concatenated_tokens = concatenated_tokens[EVENT_SIZE*M:]
378
+
379
+ # make sure each sequence starts at time 0 (shifts each token's arrival time by the
380
+ # min time of the sequence, accounting for control offsets)
381
+ seq = ops.translate(seq, -ops.min_time(seq, seconds=False), seconds=False)
382
+ assert ops.min_time(seq, seconds=False) == 0
383
+ if ops.max_time(seq, seconds=False) >= MAX_TIME:
384
+ stats[3] += 1
385
+ continue
386
+
387
+ # if seq contains SEPARATOR, global controls describe the first sequence
388
+ seq.insert(0, z)
389
+
390
+ outfile.write(' '.join([str(tok) for tok in seq]) + '\n')
391
+ seqcount += 1
392
+
393
+ if debug:
394
+ fmt = 'Processed {} sequences (discarded {} tracks, discarded {} seqs, added {} rest tokens)'
395
+ print(fmt.format(seqcount, stats[0]+stats[1]+stats[2], stats[3], rest_count))
396
+
397
+ return (seqcount, rest_count, stats[0], stats[1], stats[2], stats[3], all_truncations)
anticipation/visuals.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Utilities for inspecting encoded music data.
3
+ """
4
+
5
+ import numpy as np
6
+
7
+ import matplotlib
8
+ import matplotlib.pyplot as plt
9
+
10
+ import anticipation.ops as ops
11
+ from anticipation.config import *
12
+ from anticipation.vocab import *
13
+
14
+ def visualize(tokens, output, selected=None):
15
+ #colors = ['white', 'silver', 'red', 'sienna', 'darkorange', 'gold', 'yellow', 'palegreen', 'seagreen', 'cyan',
16
+ # 'dodgerblue', 'slategray', 'navy', 'mediumpurple', 'mediumorchid', 'magenta', 'lightpink']
17
+ colors = ['white', '#426aa0', '#b26789', '#de9283', '#eac29f', 'silver', 'red', 'sienna', 'darkorange', 'gold', 'yellow', 'palegreen', 'seagreen', 'cyan', 'dodgerblue', 'slategray', 'navy']
18
+
19
+ plt.rcParams['figure.dpi'] = 300
20
+ plt.rcParams['savefig.dpi'] = 300
21
+
22
+ max_time = ops.max_time(tokens, seconds=False)
23
+ grid = np.zeros([max_time, MAX_PITCH])
24
+ instruments = list(sorted(list(ops.get_instruments(tokens).keys())))
25
+ if 128 in instruments:
26
+ instruments.remove(128)
27
+
28
+ for j, (tm, dur, note) in enumerate(zip(tokens[0::3],tokens[1::3],tokens[2::3])):
29
+ if note == SEPARATOR:
30
+ assert tm == SEPARATOR and dur == SEPARATOR
31
+ print(j, 'SEPARATOR')
32
+ continue
33
+
34
+ if note == REST:
35
+ continue
36
+
37
+ assert note < CONTROL_OFFSET
38
+
39
+ tm = tm - TIME_OFFSET
40
+ dur = dur - DUR_OFFSET
41
+ note = note - NOTE_OFFSET
42
+ instr = note//2**7
43
+ pitch = note - (2**7)*instr
44
+
45
+ if instr == 128: # drums
46
+ continue # we don't visualize this
47
+
48
+ if selected and instr not in selected:
49
+ continue
50
+
51
+ grid[tm:tm+dur, pitch] = 1+instruments.index(instr)
52
+
53
+ plt.clf()
54
+ plt.axis('off')
55
+ cmap = matplotlib.colors.ListedColormap(colors)
56
+ bounds = list(range(MAX_TRACK_INSTR)) + [16]
57
+ norm = matplotlib.colors.BoundaryNorm(bounds, cmap.N)
58
+ plt.imshow(np.flipud(grid.T), aspect=16, cmap=cmap, norm=norm, interpolation='none')
59
+
60
+ patches = [matplotlib.patches.Patch(color=colors[i+1], label=f"{instruments[i]}")
61
+ for i in range(len(instruments))]
62
+ plt.legend(handles=patches, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0. )
63
+
64
+ plt.tight_layout()
65
+ plt.savefig(output)
anticipation/vocab.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ The vocabularies used for arrival-time and interarrival-time encodings.
3
+ """
4
+
5
+ # training sequence vocab
6
+
7
+ from anticipation.config import *
8
+
9
+ # the event block
10
+ EVENT_OFFSET = 0
11
+ TIME_OFFSET = EVENT_OFFSET
12
+ DUR_OFFSET = TIME_OFFSET + MAX_TIME
13
+ NOTE_OFFSET = DUR_OFFSET + MAX_DUR
14
+ REST = NOTE_OFFSET + MAX_NOTE
15
+
16
+ # the control block
17
+ CONTROL_OFFSET = NOTE_OFFSET + MAX_NOTE + 1
18
+ ATIME_OFFSET = CONTROL_OFFSET + 0
19
+ ADUR_OFFSET = ATIME_OFFSET + MAX_TIME
20
+ ANOTE_OFFSET = ADUR_OFFSET + MAX_DUR
21
+
22
+ # the special block
23
+ SPECIAL_OFFSET = ANOTE_OFFSET + MAX_NOTE
24
+ SEPARATOR = SPECIAL_OFFSET
25
+ AUTOREGRESS = SPECIAL_OFFSET + 1
26
+ ANTICIPATE = SPECIAL_OFFSET + 2
27
+ VOCAB_SIZE = ANTICIPATE+1
28
+
29
+ # interarrival-time (MIDI-like) vocab
30
+ MIDI_TIME_OFFSET = 0
31
+ MIDI_START_OFFSET = MIDI_TIME_OFFSET + MAX_INTERARRIVAL
32
+ MIDI_END_OFFSET = MIDI_START_OFFSET + MAX_NOTE
33
+ MIDI_SEPARATOR = MIDI_END_OFFSET + MAX_NOTE
34
+ MIDI_VOCAB_SIZE = MIDI_SEPARATOR + 1
35
+
36
+ if __name__ == '__main__':
37
+ print('Arrival-Time Training Sequence Format:')
38
+ print('Event Offset: ', EVENT_OFFSET)
39
+ print(' -> time offset :', TIME_OFFSET)
40
+ print(' -> duration offset :', DUR_OFFSET)
41
+ print(' -> note offset :', NOTE_OFFSET)
42
+ print(' -> rest token: ', REST)
43
+ print('Anticipated Control Offset: ', CONTROL_OFFSET)
44
+ print(' -> anticipated time offset :', ATIME_OFFSET)
45
+ print(' -> anticipated duration offset :', ADUR_OFFSET)
46
+ print(' -> anticipated note offset :', ANOTE_OFFSET)
47
+ print('Special Token Offset: ', SPECIAL_OFFSET)
48
+ print(' -> separator token: ', SEPARATOR)
49
+ print(' -> autoregression flag: ', AUTOREGRESS)
50
+ print(' -> anticipation flag: ', ANTICIPATE)
51
+ print('Arrival Encoding Vocabulary Size: ', VOCAB_SIZE)
52
+ print('')
53
+ print('Interarrival-Time Training Sequence Format:')
54
+ print(' -> time offset: ', MIDI_TIME_OFFSET)
55
+ print(' -> note-on offset: ', MIDI_START_OFFSET)
56
+ print(' -> note-off offset: ', MIDI_END_OFFSET)
57
+ print(' -> separator token: ', MIDI_SEPARATOR)
58
+ print('Interarrival Encoding Vocabulary Size: ', MIDI_VOCAB_SIZE)
asap-dataset-master/Bach/Fugue/bwv_846/Shi05M.mid ADDED
Binary file (13.3 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_846/Shi05M_annotations.txt ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1.0950520000000001 1.0950520000000001 b,,0
2
+ 2.364583 2.364583 b
3
+ 3.66276 3.66276 b
4
+ 4.924479 4.924479 db,4/4
5
+ 6.210938 6.210938 b
6
+ 7.497396000000001 7.497396000000001 b
7
+ 8.639323 8.639323 b
8
+ 9.818359 9.818359 db
9
+ 11.042317 11.042317 b
10
+ 12.251302 12.251302 b
11
+ 13.502604000000002 13.502604000000002 b
12
+ 14.721354999999999 14.721354999999999 db
13
+ 15.946615 15.946615 b
14
+ 17.155599 17.155599 b
15
+ 18.324219 18.324219 b
16
+ 19.564453 19.564453 db
17
+ 20.798828 20.798828 b
18
+ 22.010417 22.010417 b
19
+ 23.303819 23.303819 b
20
+ 24.564128 24.564128 db
21
+ 25.757378 25.757378 b
22
+ 27.005209000000004 27.005209000000004 b
23
+ 28.206163 28.206163 b
24
+ 29.405599 29.405599 db
25
+ 30.61198 30.61198 b
26
+ 31.81987800000001 31.81987800000001 b
27
+ 33.057726 33.057726 b
28
+ 34.286892 34.286892 db
29
+ 35.509766 35.509766 b
30
+ 36.789714000000004 36.789714000000004 b
31
+ 38.077474 38.077474 b
32
+ 39.503254999999996 39.503254999999996 db
33
+ 40.701389 40.701389 b
34
+ 41.920139 41.920139 b
35
+ 43.140190999999994 43.140190999999994 b
36
+ 44.348958 44.348958 db
37
+ 45.572266 45.572266 b
38
+ 46.886285 46.886285 b
39
+ 48.307943 48.307943 b
40
+ 49.560764 49.560764 db
41
+ 50.781902 50.781902 b
42
+ 52.022135 52.022135 b
43
+ 53.286457999999996 53.286457999999996 b
44
+ 54.525391000000006 54.525391000000006 db
45
+ 55.806424 55.806424 b
46
+ 57.069336 57.069336 b
47
+ 58.253255 58.253255 b
48
+ 59.508246 59.508246 db
49
+ 60.778645 60.778645 b
50
+ 62.015625 62.015625 b
51
+ 63.40234399999999 63.40234399999999 b
52
+ 65.034722 65.034722 db
53
+ 66.674479 66.674479 b
54
+ 67.992839 67.992839 b
55
+ 69.281901 69.281901 b
56
+ 70.520834 70.520834 db
57
+ 71.84700500000002 71.84700500000002 b
58
+ 73.13736999999998 73.13736999999998 b
59
+ 74.381185 74.381185 b
60
+ 75.654948 75.654948 db
61
+ 76.88107600000002 76.88107600000002 b
62
+ 78.101562 78.101562 b
63
+ 79.407986 79.407986 b
64
+ 80.680555 80.680555 db
65
+ 81.935873 81.935873 b
66
+ 83.467014 83.467014 b
67
+ 84.91059 84.91059 b
68
+ 86.196614 86.196614 db
69
+ 87.561198 87.561198 b
70
+ 88.796875 88.796875 b
71
+ 90.025391 90.025391 b
72
+ 91.22743100000001 91.22743100000001 db
73
+ 92.546729 92.546729 b
74
+ 94.398112 94.398112 b
75
+ 95.845703 95.845703 b
76
+ 97.080078 97.080078 db
77
+ 98.30013000000001 98.30013000000001 b
78
+ 99.515625 99.515625 b
79
+ 100.772786 100.772786 b
80
+ 102.036458 102.036458 db
81
+ 103.23893199999999 103.23893199999999 b
82
+ 104.423828 104.423828 b
83
+ 105.63151 105.63151 b
84
+ 106.889974 106.889974 db
85
+ 108.09700500000001 108.09700500000001 b
86
+ 109.379232 109.379232 b
87
+ 110.68446200000001 110.68446200000001 b
88
+ 111.941732 111.941732 db
89
+ 113.167318 113.167318 b
90
+ 114.5 114.5 b
91
+ 116.00846399999999 116.00846399999999 b
92
+ 117.830729 117.830729 db
93
+ 119.62174499999999 119.62174499999999 b
94
+ 121.011067 121.011067 b
95
+ 122.38151 122.38151 b
96
+ 123.727864 123.727864 db
97
+ 125.05664099999998 125.05664099999998 b
98
+ 126.307942 126.307942 b
99
+ 127.67903600000001 127.67903600000001 b
100
+ 129.14800400000001 129.14800400000001 db
101
+ 130.71875 130.71875 b
102
+ 132.488281 132.488281 b
103
+ 134.296875 134.296875 b
104
+ 136.052083 136.052083 db
105
+ 138.016927 138.016927 b
106
+ 140.876303 140.876303 b
asap-dataset-master/Bach/Fugue/bwv_846/midi_score.mid ADDED
Binary file (4.87 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_846/midi_score_annotations.txt ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.5 0.5 b,,0
2
+ 1.0 1.0 b
3
+ 1.5 1.5 b
4
+ 2.0 2.0 db,4/4
5
+ 2.5 2.5 b
6
+ 3.0 3.0 b
7
+ 3.5 3.5 b
8
+ 4.0 4.0 db
9
+ 4.5 4.5 b
10
+ 5.0 5.0 b
11
+ 5.5 5.5 b
12
+ 6.0 6.0 db
13
+ 6.5 6.5 b
14
+ 7.0 7.0 b
15
+ 7.5 7.5 b
16
+ 8.0 8.0 db
17
+ 8.5 8.5 b
18
+ 9.0 9.0 b
19
+ 9.5 9.5 b
20
+ 10.0 10.0 db
21
+ 10.5 10.5 b
22
+ 11.0 11.0 b
23
+ 11.5 11.5 b
24
+ 12.0 12.0 db
25
+ 12.5 12.5 b
26
+ 13.0 13.0 b
27
+ 13.5 13.5 b
28
+ 14.0 14.0 db
29
+ 14.5 14.5 b
30
+ 15.0 15.0 b
31
+ 15.5 15.5 b
32
+ 16.0 16.0 db
33
+ 16.5 16.5 b
34
+ 17.0 17.0 b
35
+ 17.5 17.5 b
36
+ 18.0 18.0 db
37
+ 18.5 18.5 b
38
+ 19.0 19.0 b
39
+ 19.5 19.5 b
40
+ 20.0 20.0 db
41
+ 20.5 20.5 b
42
+ 21.0 21.0 b
43
+ 21.5 21.5 b
44
+ 22.0 22.0 db
45
+ 22.5 22.5 b
46
+ 23.0 23.0 b
47
+ 23.5 23.5 b
48
+ 24.0 24.0 db
49
+ 24.5 24.5 b
50
+ 25.0 25.0 b
51
+ 25.5 25.5 b
52
+ 26.0 26.0 db
53
+ 26.5 26.5 b
54
+ 27.0 27.0 b
55
+ 27.5 27.5 b
56
+ 28.0 28.0 db
57
+ 28.5 28.5 b
58
+ 29.0 29.0 b
59
+ 29.5 29.5 b
60
+ 30.0 30.0 db
61
+ 30.5 30.5 b
62
+ 31.0 31.0 b
63
+ 31.5 31.5 b
64
+ 32.0 32.0 db
65
+ 32.5 32.5 b
66
+ 33.0 33.0 b
67
+ 33.5 33.5 b
68
+ 34.0 34.0 db
69
+ 34.5 34.5 b
70
+ 35.0 35.0 b
71
+ 35.5 35.5 b
72
+ 36.0 36.0 db
73
+ 36.5 36.5 b
74
+ 37.0 37.0 b
75
+ 37.5 37.5 b
76
+ 38.0 38.0 db
77
+ 38.5 38.5 b
78
+ 39.0 39.0 b
79
+ 39.5 39.5 b
80
+ 40.0 40.0 db
81
+ 40.5 40.5 b
82
+ 41.0 41.0 b
83
+ 41.5 41.5 b
84
+ 42.0 42.0 db
85
+ 42.5 42.5 b
86
+ 43.0 43.0 b
87
+ 43.5 43.5 b
88
+ 44.0 44.0 db
89
+ 44.5 44.5 b
90
+ 45.0 45.0 b
91
+ 45.5 45.5 b
92
+ 46.0 46.0 db
93
+ 46.5 46.5 b
94
+ 47.0 47.0 b
95
+ 47.5 47.5 b
96
+ 48.0 48.0 db
97
+ 48.5 48.5 b
98
+ 49.0 49.0 b
99
+ 49.5 49.5 b
100
+ 50.0 50.0 db
101
+ 50.5 50.5 b
102
+ 51.0 51.0 b
103
+ 51.5 51.5 b
104
+ 52.0 52.0 db
105
+ 52.5 52.5 b
106
+ 53.0 53.0 b
asap-dataset-master/Bach/Fugue/bwv_846/xml_score.musicxml ADDED
The diff for this file is too large to render. See raw diff
 
asap-dataset-master/Bach/Fugue/bwv_848/Denisova06M.mid ADDED
Binary file (8.82 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/Denisova06M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.825521 0.825521 b,,7
2
+ 1.341146 1.341146 b
3
+ 1.9335939999999998 1.9335939999999998 db,4/4
4
+ 2.467448 2.467448 b
5
+ 3.005208 3.005208 b
6
+ 3.5664059999999997 3.5664059999999997 b
7
+ 4.113281 4.113281 db
8
+ 4.6354169999999995 4.6354169999999995 b
9
+ 5.147136 5.147136 b
10
+ 5.664713 5.664713 b
11
+ 6.186198 6.186198 db
12
+ 6.738281 6.738281 b
13
+ 7.274088000000001 7.274088000000001 b
14
+ 7.792317999999999 7.792317999999999 b
15
+ 8.280599 8.280599 db
16
+ 8.783854 8.783854 b
17
+ 9.29948 9.29948 b
18
+ 9.792100999999999 9.792100999999999 b
19
+ 10.307292 10.307292 db
20
+ 10.832682 10.832682 b
21
+ 11.343099 11.343099 b
22
+ 11.835069 11.835069 b
23
+ 12.343099 12.343099 db
24
+ 12.861979 12.861979 b
25
+ 13.371094 13.371094 b
26
+ 13.860676999999999 13.860676999999999 b
27
+ 14.365885999999998 14.365885999999998 db
28
+ 14.873698000000001 14.873698000000001 b
29
+ 15.39388 15.39388 b
30
+ 15.877604000000002 15.877604000000002 b
31
+ 16.389974 16.389974 db
32
+ 16.913412 16.913412 b
33
+ 17.398438 17.398438 b
34
+ 17.879557000000005 17.879557000000005 b
35
+ 18.378906 18.378906 db
36
+ 18.875651 18.875651 b
37
+ 19.370442999999998 19.370442999999998 b
38
+ 19.860677 19.860677 b
39
+ 20.392360999999998 20.392360999999998 db
40
+ 20.922526 20.922526 b
41
+ 21.426215 21.426215 b
42
+ 21.947048000000002 21.947048000000002 b
43
+ 22.447917 22.447917 db
44
+ 22.964192 22.964192 b
45
+ 23.438802 23.438802 b
46
+ 23.92513 23.92513 b
47
+ 24.450521 24.450521 db
48
+ 24.971355 24.971355 b
49
+ 25.487413 25.487413 b
50
+ 25.962239999999998 25.962239999999998 b
51
+ 26.477431 26.477431 db
52
+ 26.958333000000003 26.958333000000003 b
53
+ 27.435546999999996 27.435546999999996 b
54
+ 27.940103999999998 27.940103999999998 b
55
+ 28.464192999999998 28.464192999999998 db
56
+ 28.97526 28.97526 b
57
+ 29.48567700000001 29.48567700000001 b
58
+ 29.986328000000004 29.986328000000004 b
59
+ 30.44401 30.44401 db
60
+ 30.936849 30.936849 b
61
+ 31.427083000000003 31.427083000000003 b
62
+ 31.901692999999998 31.901692999999998 b
63
+ 32.376953 32.376953 db
64
+ 32.863281 32.863281 b
65
+ 33.337891 33.337891 b
66
+ 33.819660999999996 33.819660999999996 b
67
+ 34.291016 34.291016 db
68
+ 34.769531 34.769531 b
69
+ 35.24348900000001 35.24348900000001 b
70
+ 35.71875 35.71875 b
71
+ 36.208984 36.208984 db
72
+ 36.688151 36.688151 b
73
+ 37.182292 37.182292 b
74
+ 37.660807 37.660807 b
75
+ 38.182292 38.182292 db
76
+ 38.688802 38.688802 b
77
+ 39.188151 39.188151 b
78
+ 39.707465 39.707465 b
79
+ 40.240885999999996 40.240885999999996 db
80
+ 40.752604 40.752604 b
81
+ 41.243924 41.243924 b
82
+ 41.755642 41.755642 b
83
+ 42.259549 42.259549 db
84
+ 42.733724 42.733724 b
85
+ 43.284288000000004 43.284288000000004 b
86
+ 43.77474 43.77474 b
87
+ 44.263020000000004 44.263020000000004 db
88
+ 44.759766 44.759766 b
89
+ 45.285156 45.285156 b
90
+ 45.776041 45.776041 b
91
+ 46.263672 46.263672 db
92
+ 46.763672 46.763672 b
93
+ 47.275391 47.275391 b
94
+ 47.756510999999996 47.756510999999996 b
95
+ 48.237629999999996 48.237629999999996 db
96
+ 48.73090300000001 48.73090300000001 b
97
+ 49.251302 49.251302 b
98
+ 49.770833 49.770833 b
99
+ 50.246745000000004 50.246745000000004 db
100
+ 50.746961999999996 50.746961999999996 b
101
+ 51.243922999999995 51.243922999999995 b
102
+ 51.757813 51.757813 b
103
+ 52.225260999999996 52.225260999999996 db
104
+ 52.726996 52.726996 b
105
+ 53.225910999999996 53.225910999999996 b
106
+ 53.77734399999999 53.77734399999999 b
107
+ 54.25260400000001 54.25260400000001 db
108
+ 54.761067000000004 54.761067000000004 b
109
+ 55.25260400000001 55.25260400000001 b
110
+ 55.76888 55.76888 b
111
+ 56.264974 56.264974 db
112
+ 56.757160999999996 56.757160999999996 b
113
+ 57.257813 57.257813 b
114
+ 57.764323 57.764323 b
115
+ 58.26215300000001 58.26215300000001 db
116
+ 58.764323 58.764323 b
117
+ 59.265625 59.265625 b
118
+ 59.755207999999996 59.755207999999996 b
119
+ 60.240233999999994 60.240233999999994 db
120
+ 60.70703100000001 60.70703100000001 b
121
+ 61.171875 61.171875 b
122
+ 61.66015600000001 61.66015600000001 b
123
+ 62.126953 62.126953 db
124
+ 62.597005 62.597005 b
125
+ 63.059245 63.059245 b
126
+ 63.546224 63.546224 b
127
+ 64.015625 64.015625 db
128
+ 64.486328 64.486328 b
129
+ 64.936198 64.936198 b
130
+ 65.389323 65.389323 b
131
+ 65.86067800000001 65.86067800000001 db
132
+ 66.317709 66.317709 b
133
+ 66.811198 66.811198 b
134
+ 67.294271 67.294271 b
135
+ 67.78775999999999 67.78775999999999 db
136
+ 68.231771 68.231771 b
137
+ 68.751302 68.751302 b
138
+ 69.24349000000001 69.24349000000001 b
139
+ 69.722656 69.722656 db
140
+ 70.195964 70.195964 b
141
+ 70.716146 70.716146 b
142
+ 71.19205699999998 71.19205699999998 b
143
+ 71.666667 71.666667 db
144
+ 72.134114 72.134114 b
145
+ 72.654948 72.654948 b
146
+ 73.144531 73.144531 b
147
+ 73.619792 73.619792 db
148
+ 74.085286 74.085286 b
149
+ 74.610677 74.610677 b
150
+ 75.089844 75.089844 b
151
+ 75.66275999999998 75.66275999999998 db
152
+ 76.201823 76.201823 b
153
+ 76.710938 76.710938 b
154
+ 77.20768299999997 77.20768299999997 b
155
+ 77.695964 77.695964 db
156
+ 78.210938 78.210938 b
157
+ 78.70638000000002 78.70638000000002 b
158
+ 79.175781 79.175781 b
159
+ 79.661459 79.661459 db
160
+ 80.146484 80.146484 b
161
+ 80.661458 80.661458 b
162
+ 81.132813 81.132813 b
163
+ 81.61393299999997 81.61393299999997 db
164
+ 82.085938 82.085938 b
165
+ 82.586589 82.586589 b
166
+ 83.07356700000003 83.07356700000003 b
167
+ 83.59700500000002 83.59700500000002 db
168
+ 84.121094 84.121094 b
169
+ 84.61263000000002 84.61263000000002 b
170
+ 85.119791 85.119791 b
171
+ 85.641276 85.641276 db
172
+ 86.103515 86.103515 b
173
+ 86.587239 86.587239 b
174
+ 87.072482 87.072482 b
175
+ 87.583334 87.583334 db
176
+ 88.10611999999998 88.10611999999998 b
177
+ 88.59700500000002 88.59700500000002 b
178
+ 89.08138000000002 89.08138000000002 b
179
+ 89.578776 89.578776 db
180
+ 90.080729 90.080729 b
181
+ 90.58138000000001 90.58138000000001 b
182
+ 91.04774300000001 91.04774300000001 b
183
+ 91.57486999999999 91.57486999999999 db
184
+ 92.074219 92.074219 b
185
+ 92.588541 92.588541 b
186
+ 93.061198 93.061198 b
187
+ 93.580078 93.580078 db
188
+ 94.065104 94.065104 b
189
+ 94.587239 94.587239 b
190
+ 95.08268299999999 95.08268299999999 b
191
+ 95.608724 95.608724 db
192
+ 96.083984 96.083984 b
193
+ 96.589844 96.589844 b
194
+ 97.084636 97.084636 b
195
+ 97.602214 97.602214 db
196
+ 98.078776 98.078776 b
197
+ 98.586589 98.586589 b
198
+ 99.093099 99.093099 b
199
+ 99.596354 99.596354 db
200
+ 100.054688 100.054688 b
201
+ 100.55924499999999 100.55924499999999 b
202
+ 101.04361999999999 101.04361999999999 b
203
+ 101.549479 101.549479 db
204
+ 102.029514 102.029514 b
205
+ 102.56466999999999 102.56466999999999 b
206
+ 103.061849 103.061849 b
207
+ 103.57204899999999 103.57204899999999 db
208
+ 104.084202 104.084202 b
209
+ 104.58810799999999 104.58810799999999 b
210
+ 105.05924499999999 105.05924499999999 b
211
+ 105.53710900000002 105.53710900000002 db
212
+ 106.00716100000001 106.00716100000001 b
213
+ 106.48111999999999 106.48111999999999 b
214
+ 106.94791699999999 106.94791699999999 b
215
+ 107.501953 107.501953 db
216
+ 108.185221 108.185221 b
217
+ 109.11849 109.11849 b
asap-dataset-master/Bach/Fugue/bwv_848/Lee01M.mid ADDED
Binary file (11.9 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/Lee01M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.846354 0.846354 b,,7
2
+ 1.4375 1.4375 b
3
+ 2.085938 2.085938 db,4/4
4
+ 2.7005209999999997 2.7005209999999997 b
5
+ 3.3359379999999996 3.3359379999999996 b
6
+ 3.951823000000001 3.951823000000001 b
7
+ 4.597656 4.597656 db
8
+ 5.19401 5.19401 b
9
+ 5.758463 5.758463 b
10
+ 6.327474 6.327474 b
11
+ 6.9069009999999995 6.9069009999999995 db
12
+ 7.494791999999999 7.494791999999999 b
13
+ 8.096355 8.096355 b
14
+ 8.647786 8.647786 b
15
+ 9.206380000000001 9.206380000000001 db
16
+ 9.757161 9.757161 b
17
+ 10.335286 10.335286 b
18
+ 10.880642 10.880642 b
19
+ 11.494791000000001 11.494791000000001 db
20
+ 12.086589 12.086589 b
21
+ 12.670573 12.670573 b
22
+ 13.226563 13.226563 b
23
+ 13.803385 13.803385 db
24
+ 14.38737 14.38737 b
25
+ 14.973307 14.973307 b
26
+ 15.531901000000001 15.531901000000001 b
27
+ 16.116537 16.116537 db
28
+ 16.707031 16.707031 b
29
+ 17.268881 17.268881 b
30
+ 17.843099 17.843099 b
31
+ 18.420573 18.420573 db
32
+ 19.000651 19.000651 b
33
+ 19.583984 19.583984 b
34
+ 20.154948 20.154948 b
35
+ 20.698567999999998 20.698567999999998 db
36
+ 21.261067999999998 21.261067999999998 b
37
+ 21.839844 21.839844 b
38
+ 22.395398999999998 22.395398999999998 b
39
+ 22.976562 22.976562 db
40
+ 23.569011 23.569011 b
41
+ 24.142360999999998 24.142360999999998 b
42
+ 24.706163 24.706163 b
43
+ 25.299479 25.299479 db
44
+ 25.873047 25.873047 b
45
+ 26.442057000000002 26.442057000000002 b
46
+ 26.994790999999996 26.994790999999996 b
47
+ 27.566406 27.566406 db
48
+ 28.188151 28.188151 b
49
+ 28.764322999999997 28.764322999999997 b
50
+ 29.337891 29.337891 b
51
+ 29.898871000000003 29.898871000000003 db
52
+ 30.464844 30.464844 b
53
+ 31.014322999999997 31.014322999999997 b
54
+ 31.564453000000004 31.564453000000004 b
55
+ 32.158854 32.158854 db
56
+ 32.714844 32.714844 b
57
+ 33.300781 33.300781 b
58
+ 33.871094 33.871094 b
59
+ 34.421875 34.421875 db
60
+ 34.981120000000004 34.981120000000004 b
61
+ 35.556641 35.556641 b
62
+ 36.103516 36.103516 b
63
+ 36.645833 36.645833 db
64
+ 37.210938 37.210938 b
65
+ 37.78776 37.78776 b
66
+ 38.34375 38.34375 b
67
+ 38.870443 38.870443 db
68
+ 39.433594 39.433594 b
69
+ 39.976563 39.976563 b
70
+ 40.543620000000004 40.543620000000004 b
71
+ 41.085938 41.085938 db
72
+ 41.636067 41.636067 b
73
+ 42.231771 42.231771 b
74
+ 42.770182 42.770182 b
75
+ 43.359375 43.359375 db
76
+ 43.963542 43.963542 b
77
+ 44.512370000000004 44.512370000000004 b
78
+ 45.071614000000004 45.071614000000004 b
79
+ 45.609375 45.609375 db
80
+ 46.203125 46.203125 b
81
+ 46.778646 46.778646 b
82
+ 47.371961999999996 47.371961999999996 b
83
+ 47.910157 47.910157 db
84
+ 48.503254999999996 48.503254999999996 b
85
+ 49.079427 49.079427 b
86
+ 49.667969 49.667969 b
87
+ 50.208984 50.208984 db
88
+ 50.759115 50.759115 b
89
+ 51.332031 51.332031 b
90
+ 51.894531 51.894531 b
91
+ 52.465495 52.465495 db
92
+ 53.042318 53.042318 b
93
+ 53.60612 53.60612 b
94
+ 54.169922 54.169922 b
95
+ 54.714193 54.714193 db
96
+ 55.26215300000001 55.26215300000001 b
97
+ 55.853516000000006 55.853516000000006 b
98
+ 56.454428 56.454428 b
99
+ 57.005858999999994 57.005858999999994 db
100
+ 57.57595500000001 57.57595500000001 b
101
+ 58.148437 58.148437 b
102
+ 58.71875 58.71875 b
103
+ 59.322916000000006 59.322916000000006 db
104
+ 59.875 59.875 b
105
+ 60.452474 60.452474 b
106
+ 61.036457999999996 61.036457999999996 b
107
+ 61.61328100000001 61.61328100000001 db
108
+ 62.17578100000001 62.17578100000001 b
109
+ 62.71875 62.71875 b
110
+ 63.27474 63.27474 b
111
+ 63.80859399999999 63.80859399999999 db
112
+ 64.388672 64.388672 b
113
+ 64.949219 64.949219 b
114
+ 65.566406 65.566406 b
115
+ 66.143663 66.143663 db
116
+ 66.710938 66.710938 b
117
+ 67.29231700000001 67.29231700000001 b
118
+ 67.860026 67.860026 b
119
+ 68.40625 68.40625 db
120
+ 68.935547 68.935547 b
121
+ 69.490235 69.490235 b
122
+ 70.045573 70.045573 b
123
+ 70.591797 70.591797 db
124
+ 71.152344 71.152344 b
125
+ 71.681641 71.681641 b
126
+ 72.249349 72.249349 b
127
+ 72.768229 72.768229 db
128
+ 73.263671 73.263671 b
129
+ 73.765625 73.765625 b
130
+ 74.296875 74.296875 b
131
+ 74.822266 74.822266 db
132
+ 75.353516 75.353516 b
133
+ 75.898438 75.898438 b
134
+ 76.44400999999998 76.44400999999998 b
135
+ 76.976562 76.976562 db
136
+ 77.514974 77.514974 b
137
+ 78.091146 78.091146 b
138
+ 78.62825500000002 78.62825500000002 b
139
+ 79.191406 79.191406 db
140
+ 79.735677 79.735677 b
141
+ 80.298828 80.298828 b
142
+ 80.850911 80.850911 b
143
+ 81.42838499999998 81.42838499999998 db
144
+ 81.983073 81.983073 b
145
+ 82.55143299999997 82.55143299999997 b
146
+ 83.113281 83.113281 b
147
+ 83.662109 83.662109 db
148
+ 84.218099 84.218099 b
149
+ 84.768229 84.768229 b
150
+ 85.31575500000002 85.31575500000002 b
151
+ 85.864583 85.864583 db
152
+ 86.41861999999998 86.41861999999998 b
153
+ 87.011719 87.011719 b
154
+ 87.541667 87.541667 b
155
+ 88.095052 88.095052 db
156
+ 88.65755300000002 88.65755300000002 b
157
+ 89.239584 89.239584 b
158
+ 89.77018299999996 89.77018299999996 b
159
+ 90.322266 90.322266 db
160
+ 90.857422 90.857422 b
161
+ 91.416666 91.416666 b
162
+ 91.934896 91.934896 b
163
+ 92.486979 92.486979 db
164
+ 93.039714 93.039714 b
165
+ 93.591146 93.591146 b
166
+ 94.140625 94.140625 b
167
+ 94.71875 94.71875 db
168
+ 95.300781 95.300781 b
169
+ 95.88150999999999 95.88150999999999 b
170
+ 96.463542 96.463542 b
171
+ 97.047527 97.047527 db
172
+ 97.614584 97.614584 b
173
+ 98.173828 98.173828 b
174
+ 98.726563 98.726563 b
175
+ 99.311198 99.311198 db
176
+ 99.863281 99.863281 b
177
+ 100.46549499999999 100.46549499999999 b
178
+ 101.013021 101.013021 b
179
+ 101.577474 101.577474 db
180
+ 102.15169200000001 102.15169200000001 b
181
+ 102.727214 102.727214 b
182
+ 103.28559 103.28559 b
183
+ 103.87174499999999 103.87174499999999 db
184
+ 104.45638000000001 104.45638000000001 b
185
+ 105.03906299999998 105.03906299999998 b
186
+ 105.61111100000001 105.61111100000001 b
187
+ 106.151692 106.151692 db
188
+ 106.73763000000001 106.73763000000001 b
189
+ 107.31835900000002 107.31835900000002 b
190
+ 107.88541699999999 107.88541699999999 b
191
+ 108.45638000000001 108.45638000000001 db
192
+ 109.018229 109.018229 b
193
+ 109.60156299999998 109.60156299999998 b
194
+ 110.20833300000001 110.20833300000001 b
195
+ 110.77083300000001 110.77083300000001 db
196
+ 111.345703 111.345703 b
197
+ 111.93033899999999 111.93033899999999 b
198
+ 112.49283899999999 112.49283899999999 b
199
+ 113.079427 113.079427 db
200
+ 113.63216100000001 113.63216100000001 b
201
+ 114.202474 114.202474 b
202
+ 114.72721399999999 114.72721399999999 b
203
+ 115.3125 115.3125 db
204
+ 115.87716999999999 115.87716999999999 b
205
+ 116.480903 116.480903 b
206
+ 117.05273400000002 117.05273400000002 b
207
+ 117.610677 117.610677 db
208
+ 118.18533000000001 118.18533000000001 b
209
+ 118.741753 118.741753 b
210
+ 119.292317 119.292317 b
211
+ 119.832031 119.832031 db
212
+ 120.372396 120.372396 b
213
+ 120.89974 120.89974 b
214
+ 121.45833300000001 121.45833300000001 b
215
+ 122.05599 122.05599 db
216
+ 122.75520800000001 122.75520800000001 b
217
+ 123.87161499999999 123.87161499999999 b
asap-dataset-master/Bach/Fugue/bwv_848/LeeSH01M.mid ADDED
Binary file (13.2 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/LeeSH01M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.855208 0.855208 b,,7
2
+ 1.520833 1.520833 b
3
+ 2.229167 2.229167 db,4/4
4
+ 2.928125 2.928125 b
5
+ 3.6427080000000003 3.6427080000000003 b
6
+ 4.375 4.375 b
7
+ 5.0885419999999995 5.0885419999999995 db
8
+ 5.767708 5.767708 b
9
+ 6.419792 6.419792 b
10
+ 7.058333 7.058333 b
11
+ 7.727603999999999 7.727603999999999 db
12
+ 8.402083 8.402083 b
13
+ 9.067708 9.067708 b
14
+ 9.753125 9.753125 b
15
+ 10.4 10.4 db
16
+ 11.048958 11.048958 b
17
+ 11.703125 11.703125 b
18
+ 12.336111 12.336111 b
19
+ 12.983333 12.983333 db
20
+ 13.632291 13.632291 b
21
+ 14.290625 14.290625 b
22
+ 14.966667000000001 14.966667000000001 b
23
+ 15.613021 15.613021 db
24
+ 16.303125 16.303125 b
25
+ 16.961458 16.961458 b
26
+ 17.606771 17.606771 b
27
+ 18.277084 18.277084 db
28
+ 18.970312 18.970312 b
29
+ 19.645312 19.645312 b
30
+ 20.317187 20.317187 b
31
+ 20.957292000000002 20.957292000000002 db
32
+ 21.65625 21.65625 b
33
+ 22.308332999999998 22.308332999999998 b
34
+ 22.916666 22.916666 b
35
+ 23.563021 23.563021 db
36
+ 24.198957999999998 24.198957999999998 b
37
+ 24.852605 24.852605 b
38
+ 25.493403 25.493403 b
39
+ 26.1625 26.1625 db
40
+ 26.83125 26.83125 b
41
+ 27.484721999999998 27.484721999999998 b
42
+ 28.146875 28.146875 b
43
+ 28.786806 28.786806 db
44
+ 29.442708000000003 29.442708000000003 b
45
+ 30.080208000000002 30.080208000000002 b
46
+ 30.697396 30.697396 b
47
+ 31.277603999999997 31.277603999999997 db
48
+ 32.042709 32.042709 b
49
+ 32.682639 32.682639 b
50
+ 33.34948 33.34948 b
51
+ 34.010069 34.010069 db
52
+ 34.644791999999995 34.644791999999995 b
53
+ 35.270833 35.270833 b
54
+ 35.921875 35.921875 b
55
+ 36.58125 36.58125 db
56
+ 37.263542 37.263542 b
57
+ 37.928646 37.928646 b
58
+ 38.591146 38.591146 b
59
+ 39.229167 39.229167 db
60
+ 39.882813 39.882813 b
61
+ 40.543229 40.543229 b
62
+ 41.180208 41.180208 b
63
+ 41.808854 41.808854 db
64
+ 42.445313 42.445313 b
65
+ 43.0875 43.0875 b
66
+ 43.720312 43.720312 b
67
+ 44.346354 44.346354 db
68
+ 44.986979 44.986979 b
69
+ 45.6375 45.6375 b
70
+ 46.271355 46.271355 b
71
+ 46.895313 46.895313 db
72
+ 47.514583 47.514583 b
73
+ 48.202604 48.202604 b
74
+ 48.85 48.85 b
75
+ 49.55 49.55 db
76
+ 50.232292 50.232292 b
77
+ 50.878646 50.878646 b
78
+ 51.540972 51.540972 b
79
+ 52.26007 52.26007 db
80
+ 52.89375 52.89375 b
81
+ 53.561459 53.561459 b
82
+ 54.202778 54.202778 b
83
+ 54.89895799999999 54.89895799999999 db
84
+ 55.558854000000004 55.558854000000004 b
85
+ 56.286457999999996 56.286457999999996 b
86
+ 56.972917 56.972917 b
87
+ 57.608334 57.608334 db
88
+ 58.26302 58.26302 b
89
+ 58.911458999999994 58.911458999999994 b
90
+ 59.578125 59.578125 b
91
+ 60.229167000000004 60.229167000000004 db
92
+ 60.852084 60.852084 b
93
+ 61.483854 61.483854 b
94
+ 62.12916600000001 62.12916600000001 b
95
+ 62.766144999999995 62.766144999999995 db
96
+ 63.406943999999996 63.406943999999996 b
97
+ 64.10208399999999 64.10208399999999 b
98
+ 64.779687 64.779687 b
99
+ 65.427084 65.427084 db
100
+ 66.10625 66.10625 b
101
+ 66.795833 66.795833 b
102
+ 67.463021 67.463021 b
103
+ 68.136979 68.136979 db
104
+ 68.80555600000001 68.80555600000001 b
105
+ 69.508333 69.508333 b
106
+ 70.192709 70.192709 b
107
+ 70.87083299999998 70.87083299999998 db
108
+ 71.545834 71.545834 b
109
+ 72.227604 72.227604 b
110
+ 72.890625 72.890625 b
111
+ 73.548438 73.548438 db
112
+ 74.165104 74.165104 b
113
+ 74.850521 74.850521 b
114
+ 75.49947900000002 75.49947900000002 b
115
+ 76.160764 76.160764 db
116
+ 76.832986 76.832986 b
117
+ 77.475521 77.475521 b
118
+ 78.127604 78.127604 b
119
+ 78.767708 78.767708 db
120
+ 79.408333 79.408333 b
121
+ 80.044271 80.044271 b
122
+ 80.690104 80.690104 b
123
+ 81.315625 81.315625 db
124
+ 81.963021 81.963021 b
125
+ 82.595313 82.595313 b
126
+ 83.226563 83.226563 b
127
+ 83.860416 83.860416 db
128
+ 84.495312 84.495312 b
129
+ 85.11666600000002 85.11666600000002 b
130
+ 85.777604 85.777604 b
131
+ 86.414583 86.414583 db
132
+ 87.05416600000002 87.05416600000002 b
133
+ 87.82135500000004 87.82135500000004 b
134
+ 88.486458 88.486458 b
135
+ 89.127083 89.127083 db
136
+ 89.776562 89.776562 b
137
+ 90.44166700000001 90.44166700000001 b
138
+ 91.095833 91.095833 b
139
+ 91.735417 91.735417 db
140
+ 92.379688 92.379688 b
141
+ 93.04739599999999 93.04739599999999 b
142
+ 93.72604100000001 93.72604100000001 b
143
+ 94.382292 94.382292 db
144
+ 95.03072900000001 95.03072900000001 b
145
+ 95.678125 95.678125 b
146
+ 96.326562 96.326562 b
147
+ 96.971875 96.971875 db
148
+ 97.603646 97.603646 b
149
+ 98.258854 98.258854 b
150
+ 98.894791 98.894791 b
151
+ 99.43333299999999 99.43333299999999 db
152
+ 100.086979 100.086979 b
153
+ 100.732292 100.732292 b
154
+ 101.380729 101.380729 b
155
+ 102.01823 102.01823 db
156
+ 102.651042 102.651042 b
157
+ 103.322395 103.322395 b
158
+ 103.958333 103.958333 b
159
+ 104.58802 104.58802 db
160
+ 105.227604 105.227604 b
161
+ 105.88333300000001 105.88333300000001 b
162
+ 106.522396 106.522396 b
163
+ 107.139583 107.139583 db
164
+ 107.7625 107.7625 b
165
+ 108.40625 108.40625 b
166
+ 109.04635400000001 109.04635400000001 b
167
+ 109.77968700000001 109.77968700000001 db
168
+ 110.48125 110.48125 b
169
+ 111.143229 111.143229 b
170
+ 111.803646 111.803646 b
171
+ 112.469792 112.469792 db
172
+ 113.120313 113.120313 b
173
+ 113.761459 113.761459 b
174
+ 114.42361100000001 114.42361100000001 b
175
+ 115.111979 115.111979 db
176
+ 115.795833 115.795833 b
177
+ 116.4625 116.4625 b
178
+ 117.121354 117.121354 b
179
+ 117.759895 117.759895 db
180
+ 118.427604 118.427604 b
181
+ 119.08541699999999 119.08541699999999 b
182
+ 119.729514 119.729514 b
183
+ 120.394271 120.394271 db
184
+ 121.07291699999999 121.07291699999999 b
185
+ 121.700521 121.700521 b
186
+ 122.35763899999999 122.35763899999999 b
187
+ 123.028646 123.028646 db
188
+ 123.699479 123.699479 b
189
+ 124.37031200000001 124.37031200000001 b
190
+ 125.06458300000001 125.06458300000001 b
191
+ 125.722916 125.722916 db
192
+ 126.3875 126.3875 b
193
+ 127.059375 127.059375 b
194
+ 127.76406200000001 127.76406200000001 b
195
+ 128.41718799999998 128.41718799999998 db
196
+ 129.070313 129.070313 b
197
+ 129.726042 129.726042 b
198
+ 130.3875 130.3875 b
199
+ 131.055208 131.055208 db
200
+ 131.676042 131.676042 b
201
+ 132.31093700000002 132.31093700000002 b
202
+ 132.965625 132.965625 b
203
+ 133.647396 133.647396 db
204
+ 134.309028 134.309028 b
205
+ 134.981944 134.981944 b
206
+ 135.67031200000002 135.67031200000002 b
207
+ 136.348264 136.348264 db
208
+ 137.027431 137.027431 b
209
+ 137.781597 137.781597 b
210
+ 138.515104 138.515104 b
211
+ 139.165104 139.165104 db
212
+ 139.797396 139.797396 b
213
+ 140.448959 140.448959 b
214
+ 141.09531299999998 141.09531299999998 b
215
+ 141.872917 141.872917 db
216
+ 142.854167 142.854167 b
217
+ 144.533333 144.533333 b
asap-dataset-master/Bach/Fugue/bwv_848/Lin04M.mid ADDED
Binary file (9.42 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/Lin04M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.81901 0.81901 b,,7
2
+ 1.3424479999999999 1.3424479999999999 b
3
+ 1.9726560000000002 1.9726560000000002 db,4/4
4
+ 2.519531 2.519531 b
5
+ 3.126302 3.126302 b
6
+ 3.7265620000000004 3.7265620000000004 b
7
+ 4.3125 4.3125 db
8
+ 4.871094 4.871094 b
9
+ 5.402344 5.402344 b
10
+ 5.929037 5.929037 b
11
+ 6.50651 6.50651 db
12
+ 7.063802000000001 7.063802000000001 b
13
+ 7.638021000000001 7.638021000000001 b
14
+ 8.210938 8.210938 b
15
+ 8.755208 8.755208 db
16
+ 9.282552 9.282552 b
17
+ 9.838541000000001 9.838541000000001 b
18
+ 10.359809 10.359809 b
19
+ 10.909505000000001 10.909505000000001 db
20
+ 11.470052 11.470052 b
21
+ 12.035156 12.035156 b
22
+ 12.560764 12.560764 b
23
+ 13.071614 13.071614 db
24
+ 13.615234 13.615234 b
25
+ 14.176432 14.176432 b
26
+ 14.718098999999999 14.718098999999999 b
27
+ 15.248698000000001 15.248698000000001 db
28
+ 15.817708999999999 15.817708999999999 b
29
+ 16.379557000000002 16.379557000000002 b
30
+ 16.941406 16.941406 b
31
+ 17.457682000000002 17.457682000000002 db
32
+ 18.027344 18.027344 b
33
+ 18.575521 18.575521 b
34
+ 19.113932000000002 19.113932000000002 b
35
+ 19.630208 19.630208 db
36
+ 20.160156 20.160156 b
37
+ 20.695963 20.695963 b
38
+ 21.259549 21.259549 b
39
+ 21.806424 21.806424 db
40
+ 22.369792 22.369792 b
41
+ 22.909722 22.909722 b
42
+ 23.460504 23.460504 b
43
+ 24.009114 24.009114 db
44
+ 24.546875 24.546875 b
45
+ 25.065755 25.065755 b
46
+ 25.594401 25.594401 b
47
+ 26.089844 26.089844 db
48
+ 26.660156 26.660156 b
49
+ 27.209635 27.209635 b
50
+ 27.746094 27.746094 b
51
+ 28.321615 28.321615 db
52
+ 28.871094 28.871094 b
53
+ 29.411458000000003 29.411458000000003 b
54
+ 29.946615 29.946615 b
55
+ 30.501303000000004 30.501303000000004 db
56
+ 31.059896000000002 31.059896000000002 b
57
+ 31.627603999999998 31.627603999999998 b
58
+ 32.188803 32.188803 b
59
+ 32.733073 32.733073 db
60
+ 33.279297 33.279297 b
61
+ 33.828776 33.828776 b
62
+ 34.375651 34.375651 b
63
+ 34.904297 34.904297 db
64
+ 35.451172 35.451172 b
65
+ 36.019531 36.019531 b
66
+ 36.545573 36.545573 b
67
+ 37.082682 37.082682 db
68
+ 37.619141 37.619141 b
69
+ 38.206379999999996 38.206379999999996 b
70
+ 38.736979 38.736979 b
71
+ 39.268229999999996 39.268229999999996 db
72
+ 39.789063 39.789063 b
73
+ 40.335938 40.335938 b
74
+ 40.859375 40.859375 b
75
+ 41.436849 41.436849 db
76
+ 41.997396 41.997396 b
77
+ 42.55599 42.55599 b
78
+ 43.123047 43.123047 b
79
+ 43.689236 43.689236 db
80
+ 44.265625 44.265625 b
81
+ 44.81684 44.81684 b
82
+ 45.391927 45.391927 b
83
+ 45.948785 45.948785 db
84
+ 46.505208 46.505208 b
85
+ 47.057292 47.057292 b
86
+ 47.60026 47.60026 b
87
+ 48.138672 48.138672 db
88
+ 48.651042 48.651042 b
89
+ 49.217448 49.217448 b
90
+ 49.749348 49.749348 b
91
+ 50.302083 50.302083 db
92
+ 50.832031 50.832031 b
93
+ 51.386719 51.386719 b
94
+ 51.917969 51.917969 b
95
+ 52.459635999999996 52.459635999999996 db
96
+ 53.006944 53.006944 b
97
+ 53.557291000000006 53.557291000000006 b
98
+ 54.114582999999996 54.114582999999996 b
99
+ 54.654947 54.654947 db
100
+ 55.23697900000001 55.23697900000001 b
101
+ 55.790365 55.790365 b
102
+ 56.34375 56.34375 b
103
+ 56.928385999999996 56.928385999999996 db
104
+ 57.467448 57.467448 b
105
+ 58.054035999999996 58.054035999999996 b
106
+ 58.619141000000006 58.619141000000006 b
107
+ 59.182943 59.182943 db
108
+ 59.73828100000001 59.73828100000001 b
109
+ 60.30078100000001 60.30078100000001 b
110
+ 60.87109399999999 60.87109399999999 b
111
+ 61.442707999999996 61.442707999999996 db
112
+ 61.999349 61.999349 b
113
+ 62.536457999999996 62.536457999999996 b
114
+ 63.11328100000001 63.11328100000001 b
115
+ 63.668836999999996 63.668836999999996 db
116
+ 64.237413 64.237413 b
117
+ 64.805339 64.805339 b
118
+ 65.345703 65.345703 b
119
+ 65.87174499999999 65.87174499999999 db
120
+ 66.419922 66.419922 b
121
+ 66.979166 66.979166 b
122
+ 67.51432199999999 67.51432199999999 b
123
+ 68.0625 68.0625 db
124
+ 68.602864 68.602864 b
125
+ 69.136719 69.136719 b
126
+ 69.667969 69.667969 b
127
+ 70.202473 70.202473 db
128
+ 70.73111999999998 70.73111999999998 b
129
+ 71.25455699999998 71.25455699999998 b
130
+ 71.80599000000002 71.80599000000002 b
131
+ 72.359375 72.359375 db
132
+ 72.88736999999998 72.88736999999998 b
133
+ 73.442709 73.442709 b
134
+ 74.011719 74.011719 b
135
+ 74.548177 74.548177 db
136
+ 75.085286 75.085286 b
137
+ 75.649089 75.649089 b
138
+ 76.208334 76.208334 b
139
+ 76.760417 76.760417 db
140
+ 77.295573 77.295573 b
141
+ 77.86263000000002 77.86263000000002 b
142
+ 78.425781 78.425781 b
143
+ 78.984375 78.984375 db
144
+ 79.516927 79.516927 b
145
+ 80.067708 80.067708 b
146
+ 80.617839 80.617839 b
147
+ 81.15494699999998 81.15494699999998 db
148
+ 81.689453 81.689453 b
149
+ 82.244791 82.244791 b
150
+ 82.717448 82.717448 b
151
+ 83.268229 83.268229 db
152
+ 83.818359 83.818359 b
153
+ 84.37955699999998 84.37955699999998 b
154
+ 84.93294200000003 84.93294200000003 b
155
+ 85.451172 85.451172 db
156
+ 85.998046 85.998046 b
157
+ 86.558594 86.558594 b
158
+ 87.09375 87.09375 b
159
+ 87.62044300000002 87.62044300000002 db
160
+ 88.167969 88.167969 b
161
+ 88.728516 88.728516 b
162
+ 89.274089 89.274089 b
163
+ 89.789062 89.789062 db
164
+ 90.322266 90.322266 b
165
+ 90.843099 90.843099 b
166
+ 91.373047 91.373047 b
167
+ 91.90950500000001 91.90950500000001 db
168
+ 92.460938 92.460938 b
169
+ 93.01106800000001 93.01106800000001 b
170
+ 93.561849 93.561849 b
171
+ 94.092448 94.092448 db
172
+ 94.616536 94.616536 b
173
+ 95.13736999999999 95.13736999999999 b
174
+ 95.66275999999999 95.66275999999999 b
175
+ 96.220052 96.220052 db
176
+ 96.753906 96.753906 b
177
+ 97.328125 97.328125 b
178
+ 97.88736999999999 97.88736999999999 b
179
+ 98.486979 98.486979 db
180
+ 98.953125 98.953125 b
181
+ 99.516927 99.516927 b
182
+ 100.02908000000001 100.02908000000001 b
183
+ 100.57486999999999 100.57486999999999 db
184
+ 101.117188 101.117188 b
185
+ 101.65755300000001 101.65755300000001 b
186
+ 102.175347 102.175347 b
187
+ 102.681641 102.681641 db
188
+ 103.25 103.25 b
189
+ 103.764974 103.764974 b
190
+ 104.337891 104.337891 b
191
+ 104.891927 104.891927 db
192
+ 105.44596399999999 105.44596399999999 b
193
+ 105.968099 105.968099 b
194
+ 106.53971399999999 106.53971399999999 b
195
+ 107.09960900000002 107.09960900000002 db
196
+ 107.65104199999999 107.65104199999999 b
197
+ 108.175781 108.175781 b
198
+ 108.72851599999998 108.72851599999998 b
199
+ 109.27408899999999 109.27408899999999 db
200
+ 109.811849 109.811849 b
201
+ 110.33658899999999 110.33658899999999 b
202
+ 110.852865 110.852865 b
203
+ 111.386068 111.386068 db
204
+ 111.916233 111.916233 b
205
+ 112.449219 112.449219 b
206
+ 112.996094 112.996094 b
207
+ 113.51736100000001 113.51736100000001 db
208
+ 114.069879 114.069879 b
209
+ 114.58420100000001 114.58420100000001 b
210
+ 115.11263000000001 115.11263000000001 b
211
+ 115.62174499999999 115.62174499999999 db
212
+ 116.15299499999999 116.15299499999999 b
213
+ 116.636068 116.636068 b
214
+ 117.14908899999999 117.14908899999999 b
215
+ 117.674479 117.674479 db
216
+ 118.313368 118.313368 b
217
+ 119.267187 119.267187 b
asap-dataset-master/Bach/Fugue/bwv_848/Lou01M.mid ADDED
Binary file (11.5 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/Lou01M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.813802 0.813802 b,,7
2
+ 1.321615 1.321615 b
3
+ 1.9726560000000002 1.9726560000000002 db,4/4
4
+ 2.541667 2.541667 b
5
+ 3.154948 3.154948 b
6
+ 3.7317709999999997 3.7317709999999997 b
7
+ 4.372396 4.372396 db
8
+ 4.955729 4.955729 b
9
+ 5.513021 5.513021 b
10
+ 6.0052080000000005 6.0052080000000005 b
11
+ 6.6171880000000005 6.6171880000000005 db
12
+ 7.226561999999999 7.226561999999999 b
13
+ 7.798177000000001 7.798177000000001 b
14
+ 8.347005000000001 8.347005000000001 b
15
+ 8.920573 8.920573 db
16
+ 9.514323 9.514323 b
17
+ 10.102214 10.102214 b
18
+ 10.638021 10.638021 b
19
+ 11.257161 11.257161 db
20
+ 11.853516 11.853516 b
21
+ 12.438802 12.438802 b
22
+ 12.9796 12.9796 b
23
+ 13.607422 13.607422 db
24
+ 14.208332999999998 14.208332999999998 b
25
+ 14.766926999999999 14.766926999999999 b
26
+ 15.322266 15.322266 b
27
+ 15.892578 15.892578 db
28
+ 16.505208 16.505208 b
29
+ 17.065104 17.065104 b
30
+ 17.61263 17.61263 b
31
+ 18.180338 18.180338 db
32
+ 18.775391 18.775391 b
33
+ 19.348308 19.348308 b
34
+ 19.940104 19.940104 b
35
+ 20.519531 20.519531 db
36
+ 21.050131 21.050131 b
37
+ 21.59375 21.59375 b
38
+ 22.116319 22.116319 b
39
+ 22.724392 22.724392 db
40
+ 23.321614 23.321614 b
41
+ 23.885416 23.885416 b
42
+ 24.459201999999998 24.459201999999998 b
43
+ 25.090712 25.090712 db
44
+ 25.664713 25.664713 b
45
+ 26.22005200000001 26.22005200000001 b
46
+ 26.780599 26.780599 b
47
+ 27.320963 27.320963 db
48
+ 27.990885 27.990885 b
49
+ 28.561632 28.561632 b
50
+ 29.101563 29.101563 b
51
+ 29.683159000000003 29.683159000000003 db
52
+ 30.276041999999997 30.276041999999997 b
53
+ 30.84375 30.84375 b
54
+ 31.384766 31.384766 b
55
+ 31.989583000000003 31.989583000000003 db
56
+ 32.585938 32.585938 b
57
+ 33.149088 33.149088 b
58
+ 33.703776 33.703776 b
59
+ 34.291667 34.291667 db
60
+ 34.897135999999996 34.897135999999996 b
61
+ 35.445963 35.445963 b
62
+ 36.010417 36.010417 b
63
+ 36.563802 36.563802 db
64
+ 37.130208 37.130208 b
65
+ 37.699219 37.699219 b
66
+ 38.242188 38.242188 b
67
+ 38.778646 38.778646 db
68
+ 39.358724 39.358724 b
69
+ 39.924479 39.924479 b
70
+ 40.516927 40.516927 b
71
+ 41.129558 41.129558 db
72
+ 41.695963 41.695963 b
73
+ 42.261719 42.261719 b
74
+ 42.82465300000001 42.82465300000001 b
75
+ 43.425781 43.425781 db
76
+ 43.986328 43.986328 b
77
+ 44.576823 44.576823 b
78
+ 45.136719 45.136719 b
79
+ 45.759549 45.759549 db
80
+ 46.303385999999996 46.303385999999996 b
81
+ 46.865451 46.865451 b
82
+ 47.424479 47.424479 b
83
+ 48.033854 48.033854 db
84
+ 48.617838 48.617838 b
85
+ 49.273003 49.273003 b
86
+ 49.841146 49.841146 b
87
+ 50.408203 50.408203 db
88
+ 50.923177 50.923177 b
89
+ 51.489584 51.489584 b
90
+ 52.057942 52.057942 b
91
+ 52.64388 52.64388 db
92
+ 53.163410999999996 53.163410999999996 b
93
+ 53.757813 53.757813 b
94
+ 54.337891000000006 54.337891000000006 b
95
+ 54.904948 54.904948 db
96
+ 55.419270999999995 55.419270999999995 b
97
+ 55.998698 55.998698 b
98
+ 56.608073 56.608073 b
99
+ 57.147785999999996 57.147785999999996 db
100
+ 57.727431 57.727431 b
101
+ 58.361111 58.361111 b
102
+ 58.927083999999994 58.927083999999994 b
103
+ 59.523438 59.523438 db
104
+ 60.05078100000001 60.05078100000001 b
105
+ 60.671224 60.671224 b
106
+ 61.279297 61.279297 b
107
+ 61.852865 61.852865 db
108
+ 62.415365 62.415365 b
109
+ 62.958332999999996 62.958332999999996 b
110
+ 63.55859399999999 63.55859399999999 b
111
+ 64.13150999999999 64.13150999999999 db
112
+ 64.689454 64.689454 b
113
+ 65.298828 65.298828 b
114
+ 65.861329 65.861329 b
115
+ 66.4375 66.4375 db
116
+ 66.977864 66.977864 b
117
+ 67.53580699999999 67.53580699999999 b
118
+ 68.123047 68.123047 b
119
+ 68.673828 68.673828 db
120
+ 69.203776 69.203776 b
121
+ 69.726563 69.726563 b
122
+ 70.274739 70.274739 b
123
+ 70.816406 70.816406 db
124
+ 71.34505300000002 71.34505300000002 b
125
+ 71.88150999999998 71.88150999999998 b
126
+ 72.434895 72.434895 b
127
+ 72.96549499999998 72.96549499999998 db
128
+ 73.51236999999998 73.51236999999998 b
129
+ 74.037109 74.037109 b
130
+ 74.59375 74.59375 b
131
+ 75.144531 75.144531 db
132
+ 75.70052 75.70052 b
133
+ 76.302734 76.302734 b
134
+ 76.85025999999998 76.85025999999998 b
135
+ 77.376302 77.376302 db
136
+ 77.90039 77.90039 b
137
+ 78.47200500000002 78.47200500000002 b
138
+ 79.055339 79.055339 b
139
+ 79.583333 79.583333 db
140
+ 80.110026 80.110026 b
141
+ 80.688151 80.688151 b
142
+ 81.25 81.25 b
143
+ 81.807292 81.807292 db
144
+ 82.36393299999997 82.36393299999997 b
145
+ 82.962891 82.962891 b
146
+ 83.59700500000002 83.59700500000002 b
147
+ 84.143229 84.143229 db
148
+ 84.649739 84.649739 b
149
+ 85.212891 85.212891 b
150
+ 85.921224 85.921224 b
151
+ 86.496094 86.496094 db
152
+ 87.066406 87.066406 b
153
+ 87.649739 87.649739 b
154
+ 88.255208 88.255208 b
155
+ 88.798177 88.798177 db
156
+ 89.344401 89.344401 b
157
+ 89.935547 89.935547 b
158
+ 90.529948 90.529948 b
159
+ 91.075521 91.075521 db
160
+ 91.651041 91.651041 b
161
+ 92.25 92.25 b
162
+ 92.841797 92.841797 b
163
+ 93.390625 93.390625 db
164
+ 93.93294200000001 93.93294200000001 b
165
+ 94.481771 94.481771 b
166
+ 95.031901 95.031901 b
167
+ 95.61263000000001 95.61263000000001 db
168
+ 96.208333 96.208333 b
169
+ 96.763021 96.763021 b
170
+ 97.350261 97.350261 b
171
+ 97.98893299999999 97.98893299999999 db
172
+ 98.60481700000001 98.60481700000001 b
173
+ 99.13736999999999 99.13736999999999 b
174
+ 99.666666 99.666666 b
175
+ 100.263021 100.263021 db
176
+ 100.884766 100.884766 b
177
+ 101.46549499999999 101.46549499999999 b
178
+ 102.014974 102.014974 b
179
+ 102.59049499999999 102.59049499999999 db
180
+ 103.166667 103.166667 b
181
+ 103.738281 103.738281 b
182
+ 104.261719 104.261719 b
183
+ 104.86914099999998 104.86914099999998 db
184
+ 105.47851599999998 105.47851599999998 b
185
+ 106.03125 106.03125 b
186
+ 106.580729 106.580729 b
187
+ 107.21549499999999 107.21549499999999 db
188
+ 107.845703 107.845703 b
189
+ 108.41341100000001 108.41341100000001 b
190
+ 108.998698 108.998698 b
191
+ 109.584635 109.584635 db
192
+ 110.16341100000001 110.16341100000001 b
193
+ 110.705729 110.705729 b
194
+ 111.308594 111.308594 b
195
+ 111.910156 111.910156 db
196
+ 112.470703 112.470703 b
197
+ 113.016927 113.016927 b
198
+ 113.608073 113.608073 b
199
+ 114.14843799999998 114.14843799999998 db
200
+ 114.735026 114.735026 b
201
+ 115.35156299999998 115.35156299999998 b
202
+ 115.904297 115.904297 b
203
+ 116.453776 116.453776 db
204
+ 116.97091999999999 116.97091999999999 b
205
+ 117.570746 117.570746 b
206
+ 118.16601599999998 118.16601599999998 b
207
+ 118.732422 118.732422 db
208
+ 119.326823 119.326823 b
209
+ 119.942274 119.942274 b
210
+ 120.60091100000001 120.60091100000001 b
211
+ 121.16210900000002 121.16210900000002 db
212
+ 121.722656 121.722656 b
213
+ 122.33398400000002 122.33398400000002 b
214
+ 122.921875 122.921875 b
215
+ 123.557942 123.557942 db
216
+ 124.331055 124.331055 b
217
+ 125.465104 125.465104 b
asap-dataset-master/Bach/Fugue/bwv_848/MiyashitaM01M.mid ADDED
Binary file (10.8 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/MiyashitaM01M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.809375 0.809375 b,,7
2
+ 1.36875 1.36875 b
3
+ 2.009375 2.009375 db,4/4
4
+ 2.6010419999999996 2.6010419999999996 b
5
+ 3.2208330000000003 3.2208330000000003 b
6
+ 3.839583 3.839583 b
7
+ 4.496875 4.496875 db
8
+ 5.1197919999999995 5.1197919999999995 b
9
+ 5.717187 5.717187 b
10
+ 6.2802089999999975 6.2802089999999975 b
11
+ 6.8994789999999995 6.8994789999999995 db
12
+ 7.5125 7.5125 b
13
+ 8.115103999999999 8.115103999999999 b
14
+ 8.719791 8.719791 b
15
+ 9.326563 9.326563 db
16
+ 9.971875 9.971875 b
17
+ 10.603646000000001 10.603646000000001 b
18
+ 11.193056 11.193056 b
19
+ 11.814062 11.814062 db
20
+ 12.450521 12.450521 b
21
+ 13.058333 13.058333 b
22
+ 13.688889000000001 13.688889000000001 b
23
+ 14.291667000000002 14.291667000000002 db
24
+ 14.942186999999999 14.942186999999999 b
25
+ 15.535936999999999 15.535936999999999 b
26
+ 16.130209 16.130209 b
27
+ 16.739062 16.739062 db
28
+ 17.376041 17.376041 b
29
+ 17.984896 17.984896 b
30
+ 18.569792 18.569792 b
31
+ 19.182292 19.182292 db
32
+ 19.798437 19.798437 b
33
+ 20.424479 20.424479 b
34
+ 20.994270999999998 20.994270999999998 b
35
+ 21.596875 21.596875 db
36
+ 22.183854999999998 22.183854999999998 b
37
+ 22.809896 22.809896 b
38
+ 23.38125 23.38125 b
39
+ 24.00625 24.00625 db
40
+ 24.622396 24.622396 b
41
+ 25.235417 25.235417 b
42
+ 25.852083 25.852083 b
43
+ 26.451389000000002 26.451389000000002 db
44
+ 27.042187 27.042187 b
45
+ 27.629687 27.629687 b
46
+ 28.209896 28.209896 b
47
+ 28.831771000000003 28.831771000000003 db
48
+ 29.502083000000002 29.502083000000002 b
49
+ 30.108681 30.108681 b
50
+ 30.710938 30.710938 b
51
+ 31.337846999999996 31.337846999999996 db
52
+ 31.9375 31.9375 b
53
+ 32.549479 32.549479 b
54
+ 33.109896 33.109896 b
55
+ 33.725 33.725 db
56
+ 34.341667 34.341667 b
57
+ 34.934895000000004 34.934895000000004 b
58
+ 35.536458 35.536458 b
59
+ 36.135417 36.135417 db
60
+ 36.733854 36.733854 b
61
+ 37.346875 37.346875 b
62
+ 37.914583 37.914583 b
63
+ 38.506771 38.506771 db
64
+ 39.119792 39.119792 b
65
+ 39.734896 39.734896 b
66
+ 40.317709 40.317709 b
67
+ 40.901562 40.901562 db
68
+ 41.502604 41.502604 b
69
+ 42.107292 42.107292 b
70
+ 42.696875 42.696875 b
71
+ 43.301041 43.301041 db
72
+ 43.89375 43.89375 b
73
+ 44.515104 44.515104 b
74
+ 45.083853999999995 45.083853999999995 b
75
+ 45.726042 45.726042 db
76
+ 46.358334 46.358334 b
77
+ 46.98020800000001 46.98020800000001 b
78
+ 47.595139 47.595139 b
79
+ 48.204167 48.204167 db
80
+ 48.798958 48.798958 b
81
+ 49.426041999999995 49.426041999999995 b
82
+ 50.031944 50.031944 b
83
+ 50.676041999999995 50.676041999999995 db
84
+ 51.321875 51.321875 b
85
+ 51.930208 51.930208 b
86
+ 52.559375 52.559375 b
87
+ 53.173438 53.173438 db
88
+ 53.757813 53.757813 b
89
+ 54.39010500000001 54.39010500000001 b
90
+ 54.998957999999995 54.998957999999995 b
91
+ 55.617188 55.617188 db
92
+ 56.20885500000001 56.20885500000001 b
93
+ 56.85260400000001 56.85260400000001 b
94
+ 57.472917 57.472917 b
95
+ 58.08125 58.08125 db
96
+ 58.665625 58.665625 b
97
+ 59.30104100000001 59.30104100000001 b
98
+ 59.935417 59.935417 b
99
+ 60.5375 60.5375 db
100
+ 61.162847 61.162847 b
101
+ 61.815971999999995 61.815971999999995 b
102
+ 62.411979 62.411979 b
103
+ 63.057291000000006 63.057291000000006 db
104
+ 63.653125 63.653125 b
105
+ 64.271354 64.271354 b
106
+ 64.900521 64.900521 b
107
+ 65.514062 65.514062 db
108
+ 66.113541 66.113541 b
109
+ 66.713889 66.713889 b
110
+ 67.322917 67.322917 b
111
+ 67.929688 67.929688 db
112
+ 68.536979 68.536979 b
113
+ 69.13125 69.13125 b
114
+ 69.766667 69.766667 b
115
+ 70.378472 70.378472 db
116
+ 70.993055 70.993055 b
117
+ 71.615625 71.615625 b
118
+ 72.201042 72.201042 b
119
+ 72.788542 72.788542 db
120
+ 73.390625 73.390625 b
121
+ 73.974479 73.974479 b
122
+ 74.59322900000002 74.59322900000002 b
123
+ 75.190625 75.190625 db
124
+ 75.790625 75.790625 b
125
+ 76.392708 76.392708 b
126
+ 77.014583 77.014583 b
127
+ 77.619271 77.619271 db
128
+ 78.206771 78.206771 b
129
+ 78.796355 78.796355 b
130
+ 79.409375 79.409375 b
131
+ 80.00573 80.00573 db
132
+ 80.58645899999998 80.58645899999998 b
133
+ 81.19895799999998 81.19895799999998 b
134
+ 81.814583 81.814583 b
135
+ 82.41770799999998 82.41770799999998 db
136
+ 83.017188 83.017188 b
137
+ 83.659896 83.659896 b
138
+ 84.276041 84.276041 b
139
+ 84.89375 84.89375 db
140
+ 85.476563 85.476563 b
141
+ 86.098959 86.098959 b
142
+ 86.698437 86.698437 b
143
+ 87.304167 87.304167 db
144
+ 87.892188 87.892188 b
145
+ 88.510937 88.510937 b
146
+ 89.114584 89.114584 b
147
+ 89.716667 89.716667 db
148
+ 90.345833 90.345833 b
149
+ 90.979166 90.979166 b
150
+ 91.616667 91.616667 b
151
+ 92.239583 92.239583 db
152
+ 92.869791 92.869791 b
153
+ 93.52448000000001 93.52448000000001 b
154
+ 94.142708 94.142708 b
155
+ 94.751563 94.751563 db
156
+ 95.363021 95.363021 b
157
+ 96.015105 96.015105 b
158
+ 96.627083 96.627083 b
159
+ 97.240625 97.240625 db
160
+ 97.85625 97.85625 b
161
+ 98.494791 98.494791 b
162
+ 99.115625 99.115625 b
163
+ 99.729687 99.729687 db
164
+ 100.342709 100.342709 b
165
+ 100.963541 100.963541 b
166
+ 101.571875 101.571875 b
167
+ 102.235938 102.235938 db
168
+ 102.8875 102.8875 b
169
+ 103.51302 103.51302 b
170
+ 104.132292 104.132292 b
171
+ 104.761979 104.761979 db
172
+ 105.42031200000001 105.42031200000001 b
173
+ 106.02968700000001 106.02968700000001 b
174
+ 106.64513899999999 106.64513899999999 b
175
+ 107.28854199999999 107.28854199999999 db
176
+ 107.927605 107.927605 b
177
+ 108.54479199999999 108.54479199999999 b
178
+ 109.157292 109.157292 b
179
+ 109.775 109.775 db
180
+ 110.418229 110.418229 b
181
+ 111.071354 111.071354 b
182
+ 111.65763899999999 111.65763899999999 b
183
+ 112.292709 112.292709 db
184
+ 112.9375 112.9375 b
185
+ 113.553646 113.553646 b
186
+ 114.19513899999998 114.19513899999998 b
187
+ 114.865104 114.865104 db
188
+ 115.49791699999999 115.49791699999999 b
189
+ 116.12031200000001 116.12031200000001 b
190
+ 116.77604199999999 116.77604199999999 b
191
+ 117.405208 117.405208 db
192
+ 118.02395800000001 118.02395800000001 b
193
+ 118.659375 118.659375 b
194
+ 119.30416699999999 119.30416699999999 b
195
+ 119.965104 119.965104 db
196
+ 120.589583 120.589583 b
197
+ 121.206771 121.206771 b
198
+ 121.85781200000001 121.85781200000001 b
199
+ 122.49270800000001 122.49270800000001 db
200
+ 123.078125 123.078125 b
201
+ 123.69583300000001 123.69583300000001 b
202
+ 124.301041 124.301041 b
203
+ 124.925 124.925 db
204
+ 125.518055 125.518055 b
205
+ 126.16493100000001 126.16493100000001 b
206
+ 126.790625 126.790625 b
207
+ 127.42708300000001 127.42708300000001 db
208
+ 128.071528 128.071528 b
209
+ 128.692361 128.692361 b
210
+ 129.320833 129.320833 b
211
+ 129.929167 129.929167 db
212
+ 130.547395 130.547395 b
213
+ 131.183854 131.183854 b
214
+ 131.790104 131.790104 b
215
+ 132.4625 132.4625 db
216
+ 133.45286399999998 133.45286399999998 b
217
+ 135.404792 135.404792 b
asap-dataset-master/Bach/Fugue/bwv_848/Mizumoto03M.mid ADDED
Binary file (9.21 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/Mizumoto03M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.88151 0.88151 b,,7
2
+ 1.459635 1.459635 b
3
+ 2.1276040000000003 2.1276040000000003 db,4/4
4
+ 2.729167 2.729167 b
5
+ 3.3619790000000003 3.3619790000000003 b
6
+ 4.042969 4.042969 b
7
+ 4.71875 4.71875 db
8
+ 5.326823 5.326823 b
9
+ 5.913411 5.913411 b
10
+ 6.481771 6.481771 b
11
+ 7.0774740000000005 7.0774740000000005 db
12
+ 7.674478999999999 7.674478999999999 b
13
+ 8.311849 8.311849 b
14
+ 8.9375 8.9375 b
15
+ 9.546875 9.546875 db
16
+ 10.125651 10.125651 b
17
+ 10.727213 10.727213 b
18
+ 11.28125 11.28125 b
19
+ 11.911458 11.911458 db
20
+ 12.519531 12.519531 b
21
+ 13.117188 13.117188 b
22
+ 13.684028 13.684028 b
23
+ 14.294270000000001 14.294270000000001 db
24
+ 14.917969 14.917969 b
25
+ 15.502604000000002 15.502604000000002 b
26
+ 16.092448 16.092448 b
27
+ 16.697266 16.697266 db
28
+ 17.309896 17.309896 b
29
+ 17.889974 17.889974 b
30
+ 18.479167 18.479167 b
31
+ 19.077474 19.077474 db
32
+ 19.692709 19.692709 b
33
+ 20.269531 20.269531 b
34
+ 20.849609 20.849609 b
35
+ 21.436198 21.436198 db
36
+ 22.045573 22.045573 b
37
+ 22.626953 22.626953 b
38
+ 23.202257 23.202257 b
39
+ 23.829860999999998 23.829860999999998 db
40
+ 24.384766 24.384766 b
41
+ 24.996094 24.996094 b
42
+ 25.592448 25.592448 b
43
+ 26.204427 26.204427 db
44
+ 26.795572999999997 26.795572999999997 b
45
+ 27.363281 27.363281 b
46
+ 27.915365 27.915365 b
47
+ 28.521484 28.521484 db
48
+ 29.13737 29.13737 b
49
+ 29.71875 29.71875 b
50
+ 30.292317999999998 30.292317999999998 b
51
+ 30.909722 30.909722 db
52
+ 31.48567700000001 31.48567700000001 b
53
+ 32.078776 32.078776 b
54
+ 32.641276 32.641276 b
55
+ 33.270833 33.270833 db
56
+ 33.90625 33.90625 b
57
+ 34.504558 34.504558 b
58
+ 35.138021 35.138021 b
59
+ 35.716146 35.716146 db
60
+ 36.291667 36.291667 b
61
+ 36.867838 36.867838 b
62
+ 37.435547 37.435547 b
63
+ 37.991535999999996 37.991535999999996 db
64
+ 38.569660999999996 38.569660999999996 b
65
+ 39.160156 39.160156 b
66
+ 39.749349 39.749349 b
67
+ 40.297526 40.297526 db
68
+ 40.886068 40.886068 b
69
+ 41.452474 41.452474 b
70
+ 42.008464000000004 42.008464000000004 b
71
+ 42.580078 42.580078 db
72
+ 43.171224 43.171224 b
73
+ 43.762370000000004 43.762370000000004 b
74
+ 44.330078 44.330078 b
75
+ 44.957031 44.957031 db
76
+ 45.550131 45.550131 b
77
+ 46.146484 46.146484 b
78
+ 46.751736 46.751736 b
79
+ 47.371961999999996 47.371961999999996 db
80
+ 47.966146 47.966146 b
81
+ 48.550781 48.550781 b
82
+ 49.140625 49.140625 b
83
+ 49.733073 49.733073 db
84
+ 50.377604999999996 50.377604999999996 b
85
+ 50.936632 50.936632 b
86
+ 51.498698 51.498698 b
87
+ 52.093099 52.093099 db
88
+ 52.666666000000006 52.666666000000006 b
89
+ 53.259115 53.259115 b
90
+ 53.83072900000001 53.83072900000001 b
91
+ 54.399089000000004 54.399089000000004 db
92
+ 54.952474 54.952474 b
93
+ 55.511068 55.511068 b
94
+ 56.114582999999996 56.114582999999996 b
95
+ 56.634766000000006 56.634766000000006 db
96
+ 57.22526 57.22526 b
97
+ 57.86263 57.86263 b
98
+ 58.460285999999996 58.460285999999996 b
99
+ 59.054035999999996 59.054035999999996 db
100
+ 59.660591000000004 59.660591000000004 b
101
+ 60.263020999999995 60.263020999999995 b
102
+ 60.838542000000004 60.838542000000004 b
103
+ 61.446615 61.446615 db
104
+ 62.013020999999995 62.013020999999995 b
105
+ 62.615233999999994 62.615233999999994 b
106
+ 63.248698 63.248698 b
107
+ 63.860026 63.860026 db
108
+ 64.423828 64.423828 b
109
+ 65.017361 65.017361 b
110
+ 65.608073 65.608073 b
111
+ 66.195964 66.195964 db
112
+ 66.76888000000001 66.76888000000001 b
113
+ 67.35611999999999 67.35611999999999 b
114
+ 67.944011 67.944011 b
115
+ 68.53689200000001 68.53689200000001 db
116
+ 69.13064200000001 69.13064200000001 b
117
+ 69.703125 69.703125 b
118
+ 70.259766 70.259766 b
119
+ 70.828777 70.828777 db
120
+ 71.390625 71.390625 b
121
+ 71.973958 71.973958 b
122
+ 72.541016 72.541016 b
123
+ 73.119792 73.119792 db
124
+ 73.69986999999998 73.69986999999998 b
125
+ 74.265625 74.265625 b
126
+ 74.852214 74.852214 b
127
+ 75.439454 75.439454 db
128
+ 76.009766 76.009766 b
129
+ 76.575521 76.575521 b
130
+ 77.130209 77.130209 b
131
+ 77.689453 77.689453 db
132
+ 78.259766 78.259766 b
133
+ 78.863281 78.863281 b
134
+ 79.420573 79.420573 b
135
+ 79.99349000000002 79.99349000000002 db
136
+ 80.552083 80.552083 b
137
+ 81.15169200000003 81.15169200000003 b
138
+ 81.707031 81.707031 b
139
+ 82.25911500000002 82.25911500000002 db
140
+ 82.825521 82.825521 b
141
+ 83.400391 83.400391 b
142
+ 83.962891 83.962891 b
143
+ 84.510417 84.510417 db
144
+ 85.085286 85.085286 b
145
+ 85.653645 85.653645 b
146
+ 86.240886 86.240886 b
147
+ 86.789714 86.789714 db
148
+ 87.324219 87.324219 b
149
+ 87.91275999999998 87.91275999999998 b
150
+ 88.41861999999998 88.41861999999998 b
151
+ 88.994792 88.994792 db
152
+ 89.559896 89.559896 b
153
+ 90.171875 90.171875 b
154
+ 90.764323 90.764323 b
155
+ 91.313802 91.313802 db
156
+ 91.894531 91.894531 b
157
+ 92.5 92.5 b
158
+ 93.070964 93.070964 b
159
+ 93.60481800000001 93.60481800000001 db
160
+ 94.183594 94.183594 b
161
+ 94.778646 94.778646 b
162
+ 95.304036 95.304036 b
163
+ 95.85677 95.85677 db
164
+ 96.399089 96.399089 b
165
+ 96.951172 96.951172 b
166
+ 97.515625 97.515625 b
167
+ 98.154297 98.154297 db
168
+ 98.755208 98.755208 b
169
+ 99.326172 99.326172 b
170
+ 99.920573 99.920573 b
171
+ 100.526042 100.526042 db
172
+ 101.13736999999999 101.13736999999999 b
173
+ 101.652344 101.652344 b
174
+ 102.22091999999999 102.22091999999999 b
175
+ 102.80794300000001 102.80794300000001 db
176
+ 103.40625 103.40625 b
177
+ 104.001953 104.001953 b
178
+ 104.574219 104.574219 b
179
+ 105.205729 105.205729 db
180
+ 105.70898400000002 105.70898400000002 b
181
+ 106.27604199999999 106.27604199999999 b
182
+ 106.83854199999999 106.83854199999999 b
183
+ 107.44335900000002 107.44335900000002 db
184
+ 108.050781 108.050781 b
185
+ 108.625 108.625 b
186
+ 109.1875 109.1875 b
187
+ 109.81835900000002 109.81835900000002 db
188
+ 110.384115 110.384115 b
189
+ 110.99414099999998 110.99414099999998 b
190
+ 111.579427 111.579427 b
191
+ 112.174479 112.174479 db
192
+ 112.761067 112.761067 b
193
+ 113.34700500000001 113.34700500000001 b
194
+ 113.96354199999999 113.96354199999999 b
195
+ 114.56770800000001 114.56770800000001 db
196
+ 115.14843799999998 115.14843799999998 b
197
+ 115.776692 115.776692 b
198
+ 116.40039099999998 116.40039099999998 b
199
+ 116.971354 116.971354 db
200
+ 117.529948 117.529948 b
201
+ 118.16471399999999 118.16471399999999 b
202
+ 118.785807 118.785807 b
203
+ 119.358724 119.358724 db
204
+ 119.9579 119.9579 b
205
+ 120.56033000000001 120.56033000000001 b
206
+ 121.154948 121.154948 b
207
+ 121.74132 121.74132 db
208
+ 122.351128 122.351128 b
209
+ 123.001302 123.001302 b
210
+ 123.561849 123.561849 b
211
+ 124.11263000000001 124.11263000000001 db
212
+ 124.639323 124.639323 b
213
+ 125.19596399999999 125.19596399999999 b
214
+ 125.764974 125.764974 b
215
+ 126.417318 126.417318 db
216
+ 127.243164 127.243164 b
217
+ 128.558333 128.558333 b
asap-dataset-master/Bach/Fugue/bwv_848/SunY01M.mid ADDED
Binary file (11.4 kB). View file
 
asap-dataset-master/Bach/Fugue/bwv_848/SunY01M_annotations.txt ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0.822917 0.822917 b,,7
2
+ 1.36875 1.36875 b
3
+ 1.965625 1.965625 db,4/4
4
+ 2.545833 2.545833 b
5
+ 3.1333330000000004 3.1333330000000004 b
6
+ 3.723958 3.723958 b
7
+ 4.3125 4.3125 db
8
+ 4.890625 4.890625 b
9
+ 5.454167 5.454167 b
10
+ 5.992708 5.992708 b
11
+ 6.525521 6.525521 db
12
+ 7.084375 7.084375 b
13
+ 7.6458330000000005 7.6458330000000005 b
14
+ 8.173438 8.173438 b
15
+ 8.684896 8.684896 db
16
+ 9.227083 9.227083 b
17
+ 9.797396 9.797396 b
18
+ 10.344445 10.344445 b
19
+ 10.923958 10.923958 db
20
+ 11.486459 11.486459 b
21
+ 12.057813000000001 12.057813000000001 b
22
+ 12.588889 12.588889 b
23
+ 13.133332999999999 13.133332999999999 db
24
+ 13.709375 13.709375 b
25
+ 14.246355 14.246355 b
26
+ 14.797917000000002 14.797917000000002 b
27
+ 15.328645000000002 15.328645000000002 db
28
+ 15.904166 15.904166 b
29
+ 16.458333 16.458333 b
30
+ 17.001562 17.001562 b
31
+ 17.542188 17.542188 db
32
+ 18.108333 18.108333 b
33
+ 18.667188 18.667188 b
34
+ 19.195313 19.195313 b
35
+ 19.756771 19.756771 db
36
+ 20.293229 20.293229 b
37
+ 20.851042 20.851042 b
38
+ 21.389931 21.389931 b
39
+ 21.944097 21.944097 db
40
+ 22.511457999999998 22.511457999999998 b
41
+ 23.078472 23.078472 b
42
+ 23.621875 23.621875 b
43
+ 24.192014 24.192014 db
44
+ 24.739062 24.739062 b
45
+ 25.2875 25.2875 b
46
+ 25.822917 25.822917 b
47
+ 26.364583000000003 26.364583000000003 db
48
+ 26.949478999999997 26.949478999999997 b
49
+ 27.484721999999998 27.484721999999998 b
50
+ 28.03177100000001 28.03177100000001 b
51
+ 28.578125 28.578125 db
52
+ 29.108333000000002 29.108333000000002 b
53
+ 29.685938 29.685938 b
54
+ 30.225521 30.225521 b
55
+ 30.790625 30.790625 db
56
+ 31.360416999999998 31.360416999999998 b
57
+ 31.899479 31.899479 b
58
+ 32.457813 32.457813 b
59
+ 33.005208 33.005208 db
60
+ 33.564583 33.564583 b
61
+ 34.113021 34.113021 b
62
+ 34.638542 34.638542 b
63
+ 35.188542 35.188542 db
64
+ 35.748959 35.748959 b
65
+ 36.314583 36.314583 b
66
+ 36.85 36.85 b
67
+ 37.41614600000001 37.41614600000001 db
68
+ 37.988541999999995 37.988541999999995 b
69
+ 38.558854 38.558854 b
70
+ 39.106771 39.106771 b
71
+ 39.652604 39.652604 db
72
+ 40.207291999999995 40.207291999999995 b
73
+ 40.757813 40.757813 b
74
+ 41.309375 41.309375 b
75
+ 41.894791 41.894791 db
76
+ 42.483334 42.483334 b
77
+ 43.030729 43.030729 b
78
+ 43.594097 43.594097 b
79
+ 44.189583 44.189583 db
80
+ 44.743229 44.743229 b
81
+ 45.308681 45.308681 b
82
+ 45.842014 45.842014 b
83
+ 46.409375 46.409375 db
84
+ 46.983854 46.983854 b
85
+ 47.564236 47.564236 b
86
+ 48.142708 48.142708 b
87
+ 48.68177100000001 48.68177100000001 db
88
+ 49.247395000000004 49.247395000000004 b
89
+ 49.802083 49.802083 b
90
+ 50.3625 50.3625 b
91
+ 50.903645000000004 50.903645000000004 db
92
+ 51.438021 51.438021 b
93
+ 51.998437 51.998437 b
94
+ 52.534895 52.534895 b
95
+ 53.073437 53.073437 db
96
+ 53.606597 53.606597 b
97
+ 54.160938 54.160938 b
98
+ 54.75677099999999 54.75677099999999 b
99
+ 55.311459 55.311459 db
100
+ 55.863195 55.863195 b
101
+ 56.421875 56.421875 b
102
+ 56.970833 56.970833 b
103
+ 57.544270999999995 57.544270999999995 db
104
+ 58.084028 58.084028 b
105
+ 58.66041600000001 58.66041600000001 b
106
+ 59.245833999999995 59.245833999999995 b
107
+ 59.78698000000001 59.78698000000001 db
108
+ 60.342188 60.342188 b
109
+ 60.91631999999999 60.91631999999999 b
110
+ 61.470312 61.470312 b
111
+ 62.01823 62.01823 db
112
+ 62.564583 62.564583 b
113
+ 63.125521 63.125521 b
114
+ 63.708333999999994 63.708333999999994 b
115
+ 64.267708 64.267708 db
116
+ 64.842361 64.842361 b
117
+ 65.395834 65.395834 b
118
+ 65.956771 65.956771 b
119
+ 66.494271 66.494271 db
120
+ 67.042709 67.042709 b
121
+ 67.577605 67.577605 b
122
+ 68.121875 68.121875 b
123
+ 68.671875 68.671875 db
124
+ 69.215625 69.215625 b
125
+ 69.761459 69.761459 b
126
+ 70.295834 70.295834 b
127
+ 70.829688 70.829688 db
128
+ 71.376563 71.376563 b
129
+ 71.91354100000002 71.91354100000002 b
130
+ 72.471875 72.471875 b
131
+ 73.008333 73.008333 db
132
+ 73.55625 73.55625 b
133
+ 74.110938 74.110938 b
134
+ 74.642708 74.642708 b
135
+ 75.179167 75.179167 db
136
+ 75.717709 75.717709 b
137
+ 76.290625 76.290625 b
138
+ 76.846875 76.846875 b
139
+ 77.397917 77.397917 db
140
+ 77.934375 77.934375 b
141
+ 78.497396 78.497396 b
142
+ 79.04375 79.04375 b
143
+ 79.598958 79.598958 db
144
+ 80.133854 80.133854 b
145
+ 80.676563 80.676563 b
146
+ 81.223438 81.223438 b
147
+ 81.75885500000003 81.75885500000003 db
148
+ 82.283333 82.283333 b
149
+ 82.834896 82.834896 b
150
+ 83.342187 83.342187 b
151
+ 83.860417 83.860417 db
152
+ 84.41041700000002 84.41041700000002 b
153
+ 84.9625 84.9625 b
154
+ 85.508854 85.508854 b
155
+ 86.052084 86.052084 db
156
+ 86.588021 86.588021 b
157
+ 87.144271 87.144271 b
158
+ 87.679167 87.679167 b
159
+ 88.216145 88.216145 db
160
+ 88.768229 88.768229 b
161
+ 89.304167 89.304167 b
162
+ 89.849479 89.849479 b
163
+ 90.363021 90.363021 db
164
+ 90.902604 90.902604 b
165
+ 91.453125 91.453125 b
166
+ 91.99427 91.99427 b
167
+ 92.573437 92.573437 db
168
+ 93.159375 93.159375 b
169
+ 93.706771 93.706771 b
170
+ 94.256771 94.256771 b
171
+ 94.813541 94.813541 db
172
+ 95.39375 95.39375 b
173
+ 95.930208 95.930208 b
174
+ 96.469792 96.469792 b
175
+ 97.026041 97.026041 db
176
+ 97.626563 97.626563 b
177
+ 98.17239599999999 98.17239599999999 b
178
+ 98.717708 98.717708 b
179
+ 99.241667 99.241667 db
180
+ 99.817709 99.817709 b
181
+ 100.392708 100.392708 b
182
+ 100.931944 100.931944 b
183
+ 101.513021 101.513021 db
184
+ 102.099479 102.099479 b
185
+ 102.65572900000001 102.65572900000001 b
186
+ 103.203125 103.203125 b
187
+ 103.765625 103.765625 db
188
+ 104.326042 104.326042 b
189
+ 104.89218799999999 104.89218799999999 b
190
+ 105.459375 105.459375 b
191
+ 106.02395800000001 106.02395800000001 db
192
+ 106.59322900000001 106.59322900000001 b
193
+ 107.145312 107.145312 b
194
+ 107.72604199999999 107.72604199999999 b
195
+ 108.309375 108.309375 db
196
+ 108.847396 108.847396 b
197
+ 109.40416699999999 109.40416699999999 b
198
+ 109.993229 109.993229 b
199
+ 110.557813 110.557813 db
200
+ 111.09583300000001 111.09583300000001 b
201
+ 111.65416699999999 111.65416699999999 b
202
+ 112.20156200000001 112.20156200000001 b
203
+ 112.77604099999999 112.77604099999999 db
204
+ 113.32951399999999 113.32951399999999 b
205
+ 113.886458 113.886458 b
206
+ 114.46041699999999 114.46041699999999 b
207
+ 115.025695 115.025695 db
208
+ 115.57361100000001 115.57361100000001 b
209
+ 116.153125 116.153125 b
210
+ 116.692187 116.692187 b
211
+ 117.239062 117.239062 db
212
+ 117.785416 117.785416 b
213
+ 118.340625 118.340625 b
214
+ 118.8875 118.8875 b
215
+ 119.4625 119.4625 db
216
+ 120.14609399999999 120.14609399999999 b
217
+ 121.303125 121.303125 b