-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
152 lines (118 loc) · 6.51 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>dn-m | NotationModel</title>
<link rel="stylesheet" type="text/css" href="../../../assets/css/jazzy.css">
<link rel="stylesheet" type="text/css" href="../../../assets/css/highlight.css">
<meta charset="utf-8">
<script src="../../../assets/js/jquery.min.js" defer></script>
<script src="../../../assets/js/jazzy.js" defer></script>
</head>
<body>
<a title="dn-m | NotationModel"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
dn-m Docs
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/dn-m/">
<img class="header-icon" src="../../../assets/img/gh.png">
View on GitHub
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="https://dn-m.github.io">dn-m</a>
<img class="carat" src="../../../assets/img/carat.png">
NotationModel
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name" id="Modules">
<span class="nav-group-name-link">Modules</span>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/PlotModel/index.html">PlotModel</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/SpelledPitch/index.html">SpelledPitch</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/SpelledRhythm/index.html">SpelledRhythm</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Modules/StaffModel/index.html">StaffModel</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content">
<h1>NotationModel</h1>
<p><img src="https://img.shields.io/badge/Swift-4.2-orange.svg" alt="Swift Version">
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey.svg" alt="Platforms">
<a href="https://travis-ci.org/dn-m/NotationModel"><img src="https://travis-ci.org/dn-m/NotationModel.svg?branch=master" alt="Build Status"></a></p>
<p>The <code>NotationModel</code> package contains modules for the purposes of defining a model of musical notations.</p>
<p>The types contained herein extend the structures defined in the <a href="https://github.com/dn-m/Music">dn-m/Music</a> package, providing a rich context for abstract musical information so that it can be represented within a variety of notational media. This package remains agnostic to the concrete rendering backend.</p>
<p>For work on the graphical representation of music in Swift, see <a href="https://github.com/dn-m/NotationView">dn-m/NotationView</a>.</p>
<h2>Modules</h2>
<h3><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/SpelledPitch"><code>SpelledPitch</code></a></h3>
<p>The <code>SpelledPitch</code> module exposes structures for describing abstract pitches (e.g., what you get if you press a key on a MIDI keyboard) with letter names and accidentals. This is done in a progressively-disclosed and type-safe manner: it is easy to describe common pitch scenarios, linearly more difficult to describe more-rare pitch scenarios, and it is impossible to describe logically-invalid pitch scenarios.</p>
<p>The <a href="https://github.com/dn-m/NotationModel/blob/master/Sources/SpelledPitch/Pitch.Spelling.swift"><code>Pitch.Spelling</code></a> structure provides a model of the <a href="http://www.marcsabat.com/pdfs/notation.pdf">Helmholtz-Ellis</a> notation system. This notation system scales elegantly from the Western common practice <a href="https://en.wikipedia.org/wiki/Equal_temperament">twelve-note equal division of the octave</a> tuning system to that of high-limit <a href="https://en.wikipedia.org/wiki/Just_intonation">just intonation</a>. This system is represented in the <a href="http://www.smufl.org/version/1.2/range/extendedHelmholtzEllisAccidentalsJustIntonation/">SMuFL specification</a>, making a mapping of these structures into a rendering context as seamless as possible.</p>
<h4>Pitch Speller</h4>
<p>The <code>SpelledPitch</code> module contains work toward a flexible <a href="https://github.com/dn-m/NotationModel/tree/master/Sources/SpelledPitch/PitchSpeller/Wetherfield">pitch spelling algorithm</a>, formalized by @bwetherfield. This project aims to take unspelled pitch information (e.g., MIDI note numbers), and produce optimal spelled versions of them, given the musical context and user preference.</p>
<h3><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/SpelledRhythm"><code>SpelledRhythm</code></a></h3>
<p>The <code>SpelledRhythm</code> module defines models of beams, ties, and dots.</p>
<h3><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/PlotModel"><code>PlotModel</code></a></h3>
<p>Defines a model for positioning values onto two-dimensional plots.</p>
<h3><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/StaffModel"><code>StaffModel</code></a></h3>
<p>Extends the <code>PlotModel</code>, incorporating the concept of clefs, noteheads, accidentals, etc.</p>
<h2>Development</h2>
<p>Work on this package requires Swift 4.2.</p>
<h3>Build instructions</h3>
<p>Clone the repo.</p>
<p><code>Bash
git clone https://github.com/dn-m/NotationModel
</code></p>
<p>Dive inside.</p>
<p><code>Bash
cd NotationModel
</code></p>
<p>Ask <a href="https://swift.org/package-manager/">Swift Package Manager</a> to update dependencies (all are <code>dn-m</code>).</p>
<p><code>Bash
swift package update
</code></p>
<p>Compiles code and runs tests in terminal.</p>
<p><code>Bash
swift test
</code></p>
<p>Ask Swift Package Manager to generate a nice Xcode project.</p>
<p><code>Bash
swift package generate-xcodeproj
</code></p>
<p>Open it up.</p>
<p><code>Bash
open NotationModel.xcodeproj/
</code></p>
<p>The <code>NotationModel</code> package contains several modules:</p>
<ul>
<li><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/SpelledPitch"><code>SpelledPitch</code></a></li>
<li><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/SpelledRhythm"><code>SpelledRhythm</code></a></li>
<li><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/PlotModel"><code>PlotModel</code></a></li>
<li><a href="https://github.com/dn-m/NotationModel/tree/master/Sources/StaffModel"><code>StaffModel</code></a></li>
</ul>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://github.com/dn-m" target="_blank" rel="external">dn-m</a>. All rights reserved.</p>
</section>
</body>
</html>