comparison data/model/FlexiNoteModel.h @ 917:49618f39ff09

restore brace style
author Chris Cannam
date Tue, 03 Jun 2014 11:05:49 +0100
parents 515c654770ca
children 59e7fe1b1003
comparison
equal deleted inserted replaced
916:c0c679c3b5b9 917:49618f39ff09
233 233
234 NoteList getNotes(size_t startFrame, size_t endFrame) const 234 NoteList getNotes(size_t startFrame, size_t endFrame) const
235 { 235 {
236 PointList points = getPoints(startFrame, endFrame); 236 PointList points = getPoints(startFrame, endFrame);
237 NoteList notes; 237 NoteList notes;
238 for (PointList::iterator pli = points.begin(); pli != points.end(); ++pli) 238 for (PointList::iterator pli = points.begin(); pli != points.end(); ++pli) {
239 {
240 size_t duration = pli->duration; 239 size_t duration = pli->duration;
241 if (duration == 0 || duration == 1) { 240 if (duration == 0 || duration == 1) {
242 duration = getSampleRate() / 20; 241 duration = getSampleRate() / 20;
243 } 242 }
244 int pitch = lrintf(pli->value); 243 int pitch = lrintf(pli->value);
245 244
246 int velocity = 100; 245 int velocity = 100;
247 if (pli->level > 0.f && pli->level <= 1.f) 246 if (pli->level > 0.f && pli->level <= 1.f) {
248 {
249 velocity = lrintf(pli->level * 127); 247 velocity = lrintf(pli->level * 127);
250 } 248 }
251 249
252 NoteData note(pli->frame, duration, pitch, velocity); 250 NoteData note(pli->frame, duration, pitch, velocity);
253 251