Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(350)

Side by Side Diff: lily/include/audio-item.hh

Issue 284280043: Add Staff.midiCC context property, refactor handling of MIDI control changes
Patch Set: Created 9 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lily/audio-item.cc ('k') | lily/include/lily-proto.hh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1996--2015 Jan Nieuwenhuizen <janneke@gnu.org> 4 Copyright (C) 1996--2015 Jan Nieuwenhuizen <janneke@gnu.org>
5 5
6 LilyPond is free software: you can redistribute it and/or modify 6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 class Audio_time_signature : public Audio_item 132 class Audio_time_signature : public Audio_item
133 { 133 {
134 public: 134 public:
135 Audio_time_signature (int beats, int one_beat); 135 Audio_time_signature (int beats, int one_beat);
136 136
137 int beats_; 137 int beats_;
138 int one_beat_; 138 int one_beat_;
139 }; 139 };
140 140
141 class Audio_control_function_value_change : public Audio_item 141 class Audio_control_change : public Audio_item
142 { 142 {
143 public: 143 public:
144 // Supported control functions. 144 Audio_control_change (int control, int value);
145 enum Control
146 {
147 BALANCE = 0, PAN_POSITION, EXPRESSION, REVERB_LEVEL, CHORUS_LEVEL,
148 // pseudo value for representing the size of the enum; must be kept last
149 NUM_CONTROLS
150 };
151 145
152 Audio_control_function_value_change (Control control, Real value); 146 int control_;
153 147 int value_;
154 // Information about a context property corresponding to a control function
155 // (name, the corresponding enumeration value, and the allowed range for the
156 // value of the context property).
157 struct Context_property
158 {
159 const char *name_;
160 Control control_;
161 Real range_min_;
162 Real range_max_;
163 };
164
165 // Mapping from supported control functions to the corresponding context
166 // properties.
167 static const Context_property context_properties_[];
168
169 Control control_;
170 Real value_;
171 }; 148 };
172 149
173 int moment_to_ticks (Moment); 150 int moment_to_ticks (Moment);
174 Real moment_to_real (Moment); 151 Real moment_to_real (Moment);
175 Moment remap_grace_duration (Moment); 152 Moment remap_grace_duration (Moment);
176 153
177 #endif // AUDIO_ITEM_HH 154 #endif // AUDIO_ITEM_HH
178 155
OLDNEW
« no previous file with comments | « lily/audio-item.cc ('k') | lily/include/lily-proto.hh » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b