based on note-heads-engraver.cc, by Jean-Baptiste Lamy <jiba@tuxfamily.org>,
- (c) 2002--2005
+ (c) 2002--2006
*/
#include <cctype>
#include <cstdio>
+using namespace std;
#include "rhythmic-head.hh"
#include "output-def.hh"
#include "warn.hh"
#include "duration.hh"
-
/**
make (guitar-like) tablature note
*/
return true;
}
else if (m->is_mus_type ("busy-playing-event"))
- {
- return note_events_.size ();
- }
+ return note_events_.size ();
return false;
}
Duration dur = *unsmob_duration (event->get_property ("duration"));
note->set_property ("duration-log",
- scm_int2num (dur.duration_log ()));
+ scm_from_int (dur.duration_log ()));
if (dur.dot_count ())
{
if (dur.dot_count ()
!= scm_to_int (d->get_property ("dot-count")))
- d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+ d->set_property ("dot-count", scm_from_int (dur.dot_count ()));
d->set_parent (note, Y_AXIS);
while (!string_found)
{
int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
- - scm_to_int (scm_list_ref (stringTunings, scm_int2num (tab_string - 1)));
+ - scm_to_int (scm_list_ref (stringTunings, scm_from_int (tab_string - 1)));
if (fret < min_fret)
tab_string += high_string_one ? 1 : -1;
else
string_found = true;
}
- SCM text = scm_call_3 (proc, scm_int2num (tab_string), stringTunings, scm_pitch);
+ SCM text = scm_call_3 (proc, scm_from_int (tab_string), stringTunings, scm_pitch);
int pos = 2 * tab_string - number_of_strings - 1; // No tab-note between the string !!!
if (to_boolean (get_property ("stringOneTopmost")))
note->set_property ("text", text);
- note->set_property ("staff-position", scm_int2num (pos));
+ note->set_property ("staff-position", scm_from_int (pos));
notes_.push (note);
}
}
#include "translator.icc"
ADD_TRANSLATOR (Tab_note_heads_engraver,
- /* descr */ "Generate one or more tablature noteheads from Music of type NoteEvent.",
- /* creats*/ "TabNoteHead Dots",
- /* accepts */ "note-event string-number-event busy-playing-event",
- /* reads */ "middleCPosition stringTunings minimumFret tablatureFormat highStringOne stringOneTopmost",
+ /* doc */ "Generate one or more tablature noteheads from Music of type NoteEvent.",
+ /* create */ "TabNoteHead Dots",
+ /* accept */ "note-event string-number-event busy-playing-event",
+ /* read */ "middleCPosition stringTunings minimumFret tablatureFormat highStringOne stringOneTopmost",
/* write */ "");