/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2000--2010 Jan Nieuwenhuizen <janneke@gnu.org>
+ Copyright (C) 2000--2014 Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "translator.icc"
-typedef enum Pedal_type {SOSTENUTO, SUSTAIN, UNA_CORDA, NUM_PEDAL_TYPES};
+enum Pedal_type {SOSTENUTO, SUSTAIN, UNA_CORDA, NUM_PEDAL_TYPES};
/**
perform Piano pedals
DECLARE_TRANSLATOR_LISTENER (una_corda);
DECLARE_TRANSLATOR_LISTENER (sostenuto);
private:
- vector<Audio_piano_pedal*> audios_;
+ vector<Audio_piano_pedal *> audios_;
Pedal_info info_alist_[NUM_PEDAL_TYPES];
};
{
switch (t)
{
- case SOSTENUTO:
+ case SOSTENUTO:
return "Sostenuto";
case SUSTAIN:
return "Sustain";
- case UNA_CORDA:
+ case UNA_CORDA:
return "UnaCorda";
default:
programming_error ("Unknown pedal type");
{
string pedal_type = pedal_type_str (i);
if (p->event_drul_[STOP])
- {
- if (!p->start_event_)
- p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", pedal_type));
- else
- {
- Audio_piano_pedal *a = new Audio_piano_pedal;
- a->type_string_ = pedal_type;
- a->dir_ = STOP;
- audios_.push_back (a);
+ {
+ if (!p->start_event_)
+ p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", pedal_type));
+ else
+ {
+ Audio_piano_pedal *a = new Audio_piano_pedal;
+ a->type_string_ = pedal_type;
+ a->dir_ = STOP;
+ audios_.push_back (a);
Audio_element_info info (a, p->event_drul_[STOP]);
announce_element (info);
- }
- p->start_event_ = 0;
- }
+ }
+ p->start_event_ = 0;
+ }
if (p->event_drul_[START])
- {
- p->start_event_ = p->event_drul_[START];
- Audio_piano_pedal *a = new Audio_piano_pedal;
- a->type_string_ = pedal_type;
- a->dir_ = START;
- audios_.push_back (a);
+ {
+ p->start_event_ = p->event_drul_[START];
+ Audio_piano_pedal *a = new Audio_piano_pedal;
+ a->type_string_ = pedal_type;
+ a->dir_ = START;
+ audios_.push_back (a);
Audio_element_info info (a, p->event_drul_[START]);
announce_element (info);
- }
+ }
p->event_drul_[START] = 0;
p->event_drul_[STOP] = 0;
}
}
ADD_TRANSLATOR (Piano_pedal_performer,
- /* doc */
- "",
+ /* doc */
+ "",
- /* create */
- "",
+ /* create */
+ "",
- /* read */
- "",
+ /* read */
+ "",
- /* write */
- ""
- );
+ /* write */
+ ""
+ );