2003-02-15 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * lily/include/*.hh: string() -> to_string()
+
* scm/chords-ignatzek.scm: new file.
* ly/chord-modifiers-init.ly (ignatzekExceptionMusic): define
/* Join components to full path. */
String
-Path::string () const
+Path::to_string () const
{
String s;
if (!root.empty_b ())
- s = root + to_string (ROOTSEP);
+ s = root + ::to_string (ROOTSEP);
if (!dir.empty_b ())
- s += dir + to_string (DIRSEP);
+ s += dir + ::to_string (DIRSEP);
s += base;
if (!ext.empty_b ())
- s += to_string (EXTSEP) + ext;
+ s += ::to_string (EXTSEP) + ext;
return s;
}
for (int i=0; i < size (); i++)
{
String path = elem (i);
- String sep = to_string (DIRSEP);
+ String sep = ::to_string (DIRSEP);
String right (path.right_string (1));
if (path.length () && right != sep)
- path += to_string (DIRSEP);
+ path += ::to_string (DIRSEP);
path += nm;
}
String
-File_path::string () const
+File_path::to_string () const
{
String s;
for (int i=0; i< size (); i++)
}
String
-Long_option_init::string () const
+Long_option_init::to_string () const
{
String str;
if (shortname_char_)
{
String s;
if (shortname_char_)
- s = "-" + to_string (shortname_char_);
+ s = "-" + ::to_string (shortname_char_);
else
s = " ";
{
case E_ARGEXPECT:
str += _f ("option `%s' requires an argument",
- found_option_->string ());
+ found_option_->to_string ());
break;
case E_NOARGEXPECT:
str += _f ("option `%s' doesn't allow an argument",
- found_option_->string ());
+ found_option_->to_string ());
break;
case E_UNKNOWNOPTION:
str += _f ("unrecognized option: `%s'",
break;
case E_ILLEGALARG:
str += _f ("invalid argument `%s' to option `%s'",
- optional_argument_str0_, found_option_->string ());
+ optional_argument_str0_, found_option_->to_string ());
break;
default:
assert (false);
String base;
String ext;
- String string () const;
+ String to_string () const;
};
class File_path : private Array<String>
Array<String>::push;
void prepend (String str) { Array<String>::insert (str, 0); }
- String string ()const;
+ String to_string ()const;
bool try_add (String str);
void add (String);
void parse_path (String);
char const * help_str0_;
- String string () const;
+ String to_string () const;
String str_for_help () const;
// NO constructor!
Real linear_combination (Real x) const {
return ((1.0 - x) * Real (elem (LEFT)) + (x + 1.0) * Real (elem (RIGHT))) * 0.5;
}
- String string () const;
+ String to_string () const;
bool elem_b (T r);
void negate () {
template<class T>
String
-Interval_t<T>::string () const
+Interval_t<T>::to_string () const
{
if (empty_b ())
return "[empty]";
0.0;
}
- String string () const;
+ String to_string () const;
void mirror (Axis);
Real arg () const;
Rational &operator %= (Rational);
static int compare (Rational const&, Rational const&);
int sign () const;
- String string () const;
+ String to_string () const;
};
IMPLEMENT_ARITHMETIC_OPERATOR (Rational, / );
String
Interval_t<Real>::T_to_string (Real r)
{
- return to_string (r);
+ return ::to_string (r);
}
String
Interval_t<int>::T_to_string (int i)
{
- return to_string (i);
+ return ::to_string (i);
}
template INTERVAL__INSTANTIATE (int);
#ifndef STANDALONE
String
-Offset::string () const
+Offset::to_string () const
{
String s;
- s = String (" (") + to_string (coordinate_a_[X_AXIS]) + ", "
- + to_string (coordinate_a_[Y_AXIS]) + ")";
+ s = String (" (") + ::to_string (coordinate_a_[X_AXIS]) + ", "
+ + ::to_string (coordinate_a_[Y_AXIS]) + ")";
return s;
}
#endif
}
String
-Rational::string () const
+Rational::to_string () const
{
if (infty_b ())
{
String s (sign_ > 0 ? "" : "-" );
return String (s + "infinity");
}
- String s = to_string (num ());
+
+ String s = ::to_string (num ());
if (den () != 1 && num ())
- s += "/" + to_string (den ());
+ s += "/" + ::to_string (den ());
return s;
}
String
String_convert::rational_string (Rational r)
{
- return r.string ();
+ return r.to_string ();
}
String
return f;
error (_f ("can't find default font: `%s'", def_name.to_str0 ()));
- error (_f ("(search path: `%s')", search_path_.string ()));
+ error (_f ("(search path: `%s')", search_path_.to_string ()));
error (_ ("Giving up"));
return 0;
if (where->main_part_)
{
get_music ()->origin ()->warning (_f ("barcheck failed at: %s",
- where->string ()));
+ where->to_string ()));
if (to_boolean (sync))
{
tr = tr->where_defined (ly_symbol2scm("measurePosition"));
for (SCM i = sub; gh_pair_p (i); i = ly_cdr (i))
warning (_f ("invalid subtraction: not part of chord: %s",
- unsmob_pitch (ly_car (i))->string ()));
+ unsmob_pitch (ly_car (i))->to_string ()));
return pitches;
}
}
else
warning (_f ("invalid inversion pitch: not part of chord: %s",
- unsmob_pitch (inversion)->string ()));
+ unsmob_pitch (inversion)->to_string ()));
}
/* Bass is easy, just add if requested */
String
-Duration::string () const
+Duration::to_string () const
{
String s;
if (durlog_ < 0 )
- s = "log = " + to_string (durlog_);
+ s = "log = " + ::to_string (durlog_);
else
- s = to_string (1 << durlog_);
+ s = ::to_string (1 << durlog_);
- s += to_string ('.', dots_);
+ s += ::to_string ('.', dots_);
if (factor_ != Moment (Rational (1,1)))
{
- s += "*" + factor_.string ();
+ s += "*" + factor_.to_string ();
}
return s;
}
Duration *r = (Duration *) ly_cdr (s);
scm_puts ("#<Duration ", port);
- scm_display (scm_makfrom0str (r->string ().to_str0 ()), port);
+ scm_display (scm_makfrom0str (r->to_string ().to_str0 ()), port);
scm_puts (" >", port);
return 1;
if (abs (np.get_alteration ()) > 2)
{
warning (_f ("Transposition by %s makes alteration larger than two",
- delta.string ()));
+ delta.to_string ()));
}
set_mus_property ("pitch", np.smobbed_copy ());
w = sneaky_insert_extra_moment (w);
- // printf ("proccing %s\n ", w.string ().to_str0 ());
+ // printf ("proccing %s\n ", w.to_string ().to_str0 ());
if (first)
{
first = false;
{
String msg = _f ("can't find file: `%s'", s);
msg += "\n";
- msg += _f ("(search path: `%s')", global_sources->path_C_->string ().to_str0 ());
+ msg += _f ("(search path: `%s')", global_sources->path_C_->to_string ().to_str0 ());
msg += "\n";
LexerError (msg.to_str0 ());
AFM_CharMetricInfo const *find_char_metric (String name, bool warn=true) const;
AFM_CharMetricInfo const *find_ascii_metric (int, bool warn=true) const;
- String string () const;
+ String to_string () const;
~Adobe_font_metric ();
static SCM make_afm (AFM_Font_info*, unsigned);
Duration ();
Duration (int, int);
- String string () const;
+ String to_string () const;
Duration compressed (Rational) const;
Rational get_length () const ;
Lilypond_version (int major, int minor, int patch);
Lilypond_version (String str);
- String string () const;
+ String to_string () const;
operator int () const;
int major_;
static String i2varint_string (int i);
- virtual String string () const = 0;
+ virtual String to_string () const = 0;
int channel_;
};
Moment delta_mom_;
Midi_item* midi_;
- String string () const;
+ String to_string () const;
};
/**
{
public:
void set (String header_string, String data_string, String footer_string);
- virtual String string () const;
+ virtual String to_string () const;
virtual String data_string () const;
private:
public:
Midi_duration (Real seconds_f);
- virtual String string () const;
+ virtual String to_string () const;
Real seconds_;
};
public:
Midi_instrument (Audio_instrument*);
- virtual String string () const;
+ virtual String to_string () const;
Audio_instrument* audio_;
};
public:
Midi_key (Audio_key*);
- virtual String string () const;
+ virtual String to_string () const;
Audio_key* audio_;
};
public:
Midi_time_signature (Audio_time_signature*);
- virtual String string () const;
+ virtual String to_string () const;
Audio_time_signature* audio_;
int clocks_per_1_;
Moment get_length () const;
int get_pitch () const;
- virtual String string () const;
+ virtual String to_string () const;
Audio_note* audio_;
public:
Midi_note_off (Midi_note*);
- virtual String string () const;
+ virtual String to_string () const;
Midi_note* on_;
Byte aftertouch_byte_;
Midi_text (Audio_text*);
- virtual String string () const;
+ virtual String to_string () const;
Audio_text* audio_;
};
public:
Midi_dynamic (Audio_dynamic*);
- virtual String string () const;
+ virtual String to_string () const;
Audio_dynamic* audio_;
};
public:
Midi_piano_pedal (Audio_piano_pedal*);
- virtual String string () const;
+ virtual String to_string () const;
Audio_piano_pedal* audio_;
};
public:
Midi_tempo (Audio_tempo*);
- virtual String string () const;
+ virtual String to_string () const;
Audio_tempo* audio_;
};
Deliver a copy of THIS as a smobified SCM
*/
SCM smobbed_copy () const;
- String string () const;
+ String to_string () const;
static int compare (Moment const&, Moment const&);
};
int steps () const;
/// return pitch from central c (in halfnotes)
int semitone_pitch () const;
- String string () const;
+ String to_string () const;
SCM smobbed_copy () const;
DECLARE_SCHEME_CALLBACK (less_p, (SCM a, SCM b));
Array<Tfm_kern> kerns_;
Array<Tfm_ligature> ligatures_;
- String string () const;
+ String to_string () const;
Tex_font_char_metric ();
Box dimensions () const;
virtual Box get_char (int) const;
Tex_font_char_metric const *find_ascii (int ascii, bool warn=true) const;
- String string () const;
-
-
+ String to_string () const;
Tfm_info info_;
Tfm_header header_;
{
Path p = split_path (output_name_global);
p.ext = "dep";
- write_dependency_file (p.string (),
+ write_dependency_file (p.to_string (),
target_strings_,
inclusion_names_);
}
if (init_string.length () && global_path.find (init_string).empty_b ())
{
warning (_f ("can't find file: `%s'", init_string));
- warning (_f ("(search path: `%s')", global_path.string ().to_str0 ()));
+ warning (_f ("(search path: `%s')", global_path.to_string ().to_str0 ()));
return;
}
if ((file_string != "-") && global_path.find (file_string).empty_b ())
Lilypond_version ver (s);
if (! ((ver >= oldest_version) && (ver <= current)))
{
- non_fatal_error (_f ("Incorrect lilypond version: %s (%s, %s)", ver.string (), oldest_version.string (), current.string ()));
+ non_fatal_error (_f ("Incorrect lilypond version: %s (%s, %s)", ver.to_string (), oldest_version.to_string (), current.to_string ()));
non_fatal_error (_ ("Consider updating the input with the convert-ly script"));
return false;
}
{
String e = _f ("can't find file: `%s'", fn);
e += " ";
- e += _f ("(load path: `%s')", global_path.string ());
+ e += _f ("(load path: `%s')", global_path.to_string ());
error (e);
}
else if (verbose_global_b)
}
String
-Lilypond_version::string () const
+Lilypond_version::to_string () const
{
- return to_string (major_) + "." + to_string (minor_) + "." + to_string (patch_);
+ return ::to_string (major_) + "." + ::to_string (minor_) + "." + ::to_string (patch_);
}
Lilypond_version::operator int () const
if (*extensions[i] && !p.ext.empty_b ())
p.ext += ".";
p.ext += extensions[i];
- if (!global_path.find (p.string ()).empty_b ())
+ if (!global_path.find (p.to_string ()).empty_b ())
break;
}
/* Reshuffle extension */
- p = split_path (p.string ());
+ p = split_path (p.to_string ());
}
return p;
}
progress_indication ("\n");
- all_fonts_global = new All_font_metrics (global_path.string ());
+ all_fonts_global = new All_font_metrics (global_path.to_string ());
init_scheme_code_string += ")";
gh_eval_str ((char *)init_scheme_code_string.to_str0 ());
/* By default, use base name of input file for output file name */
Path outpath = inpath;
- if (inpath.string () != "-")
+ if (inpath.to_string () != "-")
outpath.ext = format_to_ext (output_format_global);
/* By default, write output to cwd; do not copy directory part
/* Burp: output name communication goes through _global */
String save_output_name_global = output_name_global;
- output_name_global = outpath.string ();
- do_one_file (init, inpath.string ());
+ output_name_global = outpath.to_string ();
+ do_one_file (init, inpath.to_string ());
output_name_global = save_output_name_global;
p++;
Path p = split_path (s);
if (s != "-" && p.ext.empty_b ())
p.ext = format_to_ext (output_format_global);
- output_name_global = p.string ();
+ output_name_global = p.to_string ();
}
break;
case 'e':
}
String
-Midi_chunk::string () const
+Midi_chunk::to_string () const
{
String str = header_string_;
String dat = data_string ();
}
String
-Midi_duration::string () const
+Midi_duration::to_string () const
{
- return String ("<duration: ") + to_string (seconds_) + ">";
+ return String ("<duration: ") + ::to_string (seconds_) + ">";
}
Midi_event::Midi_event (Moment delta_mom, Midi_item* midi)
ugh. midi output badly broken since grace note hackage.
*/
String
-Midi_event::string () const
+Midi_event::to_string () const
{
Rational rat_dt = (delta_mom_.main_part_ * Rational (384) +
delta_mom_.grace_part_ * Rational (100))*Rational (4);
int delta_i = int (rat_dt);
String delta_string = Midi_item::i2varint_string (delta_i);
- String midi_string = midi_->string ();
+ String midi_string = midi_->to_string ();
assert (midi_string.length ());
return delta_string + midi_string;
}
}
String
-Midi_instrument::string () const
+Midi_instrument::to_string () const
{
Byte program_byte = 0;
bool found = false;
else
warning (_f ("no such instrument: `%s'", audio_->str_.to_str0 ()));
- String str = to_string ((char) (0xc0 + channel_)); //YIKES! FIXME: Should be track. -rz
- str += to_string ((char)program_byte);
+ String str = ::to_string ((char) (0xc0 + channel_)); //YIKES! FIXME: Should be track. -rz
+ str += ::to_string ((char)program_byte);
return str;
}
String str;
while (1)
{
- str += to_string ((char)buffer_i);
+ str += ::to_string ((char)buffer_i);
if (buffer_i & 0x80)
buffer_i >>= 8;
else
}
String
-Midi_key::string () const
+Midi_key::to_string () const
{
String str = "ff5902";
str += String_convert::int2hex (audio_->accidentals_, 2, '0');
}
String
-Midi_time_signature::string () const
+Midi_time_signature::to_string () const
{
int num = audio_->beats_;
int den = audio_->one_beat_;
}
String
-Midi_note::string () const
+Midi_note::to_string () const
{
Byte status_byte = (char) (0x90 + channel_);
- String str = to_string ((char)status_byte);
- str += to_string ((char) (get_pitch () + c0_pitch_i_));
+ String str = ::to_string ((char)status_byte);
+ str += ::to_string ((char) (get_pitch () + c0_pitch_i_));
- str += to_string ((char)dynamic_byte_);
+ str += ::to_string ((char)dynamic_byte_);
return str;
}
}
String
-Midi_note_off::string () const
+Midi_note_off::to_string () const
{
Byte status_byte = (char) (0x80 + channel_);
- String str = to_string ((char)status_byte);
- str += to_string ((char) (get_pitch () + Midi_note::c0_pitch_i_));
- str += to_string ((char)aftertouch_byte_);
+ String str = ::to_string ((char)status_byte);
+ str += ::to_string ((char) (get_pitch () + Midi_note::c0_pitch_i_));
+ str += ::to_string ((char)aftertouch_byte_);
return str;
}
}
String
-Midi_dynamic::string () const
+Midi_dynamic::to_string () const
{
Byte status_byte = (char) (0xB0 + channel_);
- String str = to_string ((char)status_byte);
+ String str = ::to_string ((char)status_byte);
/*
Main volume controller (per channel):
if (volume > full_scale)
volume = (int)full_scale;
- str += to_string ((char)0x07);
- str += to_string ((char)volume);
+ str += ::to_string ((char)0x07);
+ str += ::to_string ((char)volume);
return str;
}
}
String
-Midi_piano_pedal::string () const
+Midi_piano_pedal::to_string () const
{
Byte status_byte = (char) (0xB0 + channel_);
- String str = to_string ((char)status_byte);
+ String str = ::to_string ((char)status_byte);
if (audio_->type_string_ == "Sostenuto")
- str += to_string ((char)0x42);
+ str += ::to_string ((char)0x42);
else if (audio_->type_string_ == "Sustain")
- str += to_string ((char)0x40);
+ str += ::to_string ((char)0x40);
else if (audio_->type_string_ == "UnaCorda")
- str += to_string ((char)0x43);
+ str += ::to_string ((char)0x43);
int pedal = ((1 - audio_->dir_) / 2) * 0x7f;
- str += to_string ((char)pedal);
+ str += ::to_string ((char)pedal);
return str;
}
}
String
-Midi_tempo::string () const
+Midi_tempo::to_string () const
{
int useconds_per_4_i = 60 * (int)1e6 / audio_->per_minute_4_;
String str = "ff5103";
}
String
-Midi_text::string () const
+Midi_text::to_string () const
{
String str = "ff" + String_convert::int2hex (audio_->type_, 2, '0');
str = String_convert::hex2bin (str);
str += "\n";
for (Cons<Midi_event> *i=event_p_list_.head_; i; i = i->next_)
{
- str += i->car_->string ();
+ str += i->car_->to_string ();
if (midi_debug_global_b)
str += "\n";
}
Midi_stream&
Midi_stream::operator << (Midi_item const& midi_c_r)
{
- String str = midi_c_r.string ();
+ String str = midi_c_r.to_string ();
if (midi_debug_global_b)
scm_puts ("#<Molecule ", port);
#if 0
Molecule *r = (Molecule *) ly_cdr (s);
- String string (r->string ());
+ String string (r->to_string ());
scm_puts ((char *)str.to_str0 (), port);
#endif
scm_puts (" >", port);
Moment *r = (Moment *) ly_cdr (s);
scm_puts ("#<Mom ", port);
- String str = r->string ();
+ String str = r->to_string ();
scm_puts ((char *)str.to_str0 (), port);
scm_puts (" >", port);
String
-Moment::string () const
+Moment::to_string () const
{
- String s = main_part_.string ();
+ String s = main_part_.to_string ();
if (grace_part_)
{
- s += "G" + grace_part_.string ();
+ s += "G" + grace_part_.to_string ();
}
return s;
}
std::ostream &
operator << (std::ostream &os, Moment const &m)
{
- os << m.string ();
+ os << m.to_string ();
return os;
}
#endif
{
Path p = split_path (out);
p.base += "-" + to_string (def);
- out = p.string ();
+ out = p.to_string ();
}
return out;
}
ADD_INTERFACE (Note_collision_interface, "note-collision-interface",
- "An object that handles collisions between notes with different stem
-directions and horizontal shifts. Most of the interesting properties
-are to be set in @ref{note-column-interface}: these are
-@code{force-hshift} and @code{horizontal-shift}.
-",
+ "An object that handles collisions between notes with different stem "
+"directions and horizontal shifts. Most of the interesting properties "
+"are to be set in @ref{note-column-interface}: these are "
+"@code{force-hshift} and @code{horizontal-shift}. ",
"merge-differently-dotted merge-differently-headed collision-done");
{
if (i)
s += " ";
- s += unsmob_pitch (reqs_[i]->get_mus_property ("pitch"))->string ();
+ s += unsmob_pitch (reqs_[i]->get_mus_property ("pitch"))->to_string ();
}
if (s.length ())
{
Paper_outputter * po = new Paper_outputter (outname);
Path p = split_path (outname);
p.ext = "";
- po->basename_ = p.string ();
+ po->basename_ = p.to_string ();
return po;
}
{
Path p = split_path (out);
p.base += "-" + to_string (def);
- out = p.string ();
+ out = p.to_string ();
}
/* Maybe a bit crude, but we had this before */
Path p = split_path (out);
p.ext = "midi";
- out = p.string ();
+ out = p.to_string ();
Midi_stream midi_stream (out);
progress_indication (_f ("MIDI output to `%s'...", out));
char const *accname[] = {"eses", "es", "", "is" , "isis"};
String
-Pitch::string () const
+Pitch::to_string () const
{
int n = (notename_ + 2) % 7;
- String s = to_string (char (n + 'a'));
+ String s = ::to_string (char (n + 'a'));
if (alteration_)
s += String (accname[alteration_ + 2]);
{
int o = (-octave_) - 1;
while (o--)
- s += to_string (',');
+ s += ::to_string (',');
}
return s;
Pitch *r = (Pitch *) ly_cdr (s);
scm_puts ("#<Pitch ", port);
- scm_display (scm_makfrom0str (r->string ().to_str0 ()), port);
+ scm_display (scm_makfrom0str (r->to_string ().to_str0 ()), port);
scm_puts (" >", port);
return 1;
ADD_INTERFACE (Spaceable_grob,"spaceable-grob-interface",
- "A grob (a Paper_column) that takes part in the
-spacing problem. ",
- "measure-length spacing-wishes penalty minimum-distances ideal-distances
-left-neighbors right-neighbors");
+ "A grob (a Paper_column) that takes part in the \n"
+ "spacing problem. ",
+ "measure-length spacing-wishes penalty minimum-distances ideal-distances "
+"left-neighbors right-neighbors");
global_shortest = find_shortest (me, all);
if (verbose_global_b)
{
- progress_indication (_f("Global shortest duration is %s\n", global_shortest.string ()));
+ progress_indication (_f("Global shortest duration is %s\n", global_shortest.to_string ()));
}
}
prune_loose_colunms (me, &all, global_shortest);
if (! shortest_playing_len.to_bool ())
{
- programming_error ("can't find a ruling note at " + Paper_column::when_mom (lc).string ());
+ programming_error ("can't find a ruling note at " + Paper_column::when_mom (lc).to_string ());
shortest_playing_len = 1;
}
ENTER_DESCRIPTION(Span_bar_engraver,
-/* descr */ "This engraver makes cross-staff barlines: It catches all normal
-bar lines, and draws a single span-bar across them.",
+/* descr */ "This engraver makes cross-staff barlines: It catches all normal "
+"bar lines, and draws a single span-bar across them.",
/* creats*/ "SpanBar",
/* accepts */ "",
/* acks */ "bar-line-interface",
ADD_INTERFACE (Staff_symbol,"staff-symbol-interface",
- "This spanner draws the lines of a staff. The center (i.e. middle line
-or space) is position 0. The length of the symbol may be set by hand
-through the @code{width} property.
-",
+ "This spanner draws the lines of a staff. The center (i.e. middle line "
+"or space) is position 0. The length of the symbol may be set by hand "
+"through the @code{width} property. ",
"width staff-space thickness line-count");
ADD_INTERFACE (System,"system-interface",
- "Super grob, parent of all:
-
-The columns of a score that form one line. The toplevel grob. Any
-grob has a Line_of_score as both X and Y reference point. The
-Paper_score contains one grob of this type. Control enters the
-Grob dependency calculation from this single Line_of_score
-object.",
+ "Super grob, parent of all: "
+"\n\n"
+"The columns of a score that form one line. The toplevel grob. Any "
+"grob has a Line_of_score as both X and Y reference point. The "
+"Paper_score contains one grob of this type. Control enters the "
+"Grob dependency calculation from this single Line_of_score "
+"object.",
"between-system-string all-elements columns");
String
Interval_t<Rational>::T_to_string (Rational a)
{
- return a.string ();
+ return a.to_string ();
}
italic_correction_fix_ = 0;
}
-#define APPEND_CHAR_METRIC_ELT(k) outstr += to_string (#k) + " " + to_string (k ## _) + "; "
+#define APPEND_CHAR_METRIC_ELT(k) outstr += ::to_string (#k) + " " + ::to_string (k ## _) + "; "
String
-Tex_font_char_metric::string () const
+Tex_font_char_metric::to_string () const
{
String outstr ;
String
-Tex_font_metric::string () const
+Tex_font_metric::to_string () const
{
String outstr;
for (int i=0; i < char_metrics_.size (); i++)
- outstr += char_metrics_[i].string ();
+ outstr += char_metrics_[i].to_string ();
return outstr;
}
(define (pitch->note-name pitch)
(cons (cadr pitch) (caddr pitch)))
-(define (accidental->markup acc)
+(define (old-accidental->markup acc)
"ACC is an int, return a markup making an accidental."
(if (= acc 0)
(make-line-markup (list empty-markup))
(string-append "accidentals-"
(number->string acc))))))
-; unused.
-(define (accidental->markupp acc pos)
-
- (if (= acc 0)
- empty-markup
- (let ((acc-markup (make-musicglyph-markup
- (string-append "accidentals-"
- (number->string acc)))))
-
- (if (equal? pos 'columns)
- (make-line-markup (list (make-smaller-markup acc-markup)))
- (if (equal? pos 'super)
- (make-line-markup (list (make-super-markup acc-markup)))
- ;; not 'super or 'columns must be 'sub...
- (make-line-markup (list (make-sub-markup acc-markup))))))))
-
; unused.
;; FIXME: possibly to be used for american/jazz style
;; However, only pos == columns is used, which seems to do
-;; exactly what accidental->markup does...
+;; exactly what old-accidental->markup does...
(define (amy-accidental->text acc) (accidental->textp acc 'columns))
(make-simple-markup
(vector-ref #("C" "D" "E" "F" "G" "A" "B") (cadr pitch)))
(make-normal-size-super-markup
- (accidental->markup (caddr pitch))))))
+ (old-accidental->markup (caddr pitch))))))
;;; Hooks to override chord names and note names,
;;; see input/tricks/german-chords.ly
(define (step->markup-previously-alternate-jazz pitch)
(make-line-markup
(list
- (accidental->markup (caddr pitch))
+ (old-accidental->markup (caddr pitch))
(make-simple-markup
(number->string (+ (cadr pitch) (if (= (car pitch) 0) 1 8)))))))
;; sharp 7 only included for completeness?
((-2) (make-line-markup
(list
- (accidental->markup -1)
+ (old-accidental->markup -1)
(make-simple-markup "7"))))
((-1) (make-simple-markup "7"))
((0) (make-simple-markup "maj7"))
;; (list (make-simple-markup "maj7"))))
((1) (make-line-markup
(list
- (accidental->markup 1) (make-simple-markup "7"))))
+ (old-accidental->markup 1) (make-simple-markup "7"))))
((2) (make-line-markup
- (list (accidental->markup 1)
+ (list (old-accidental->markup 1)
(make-simple-markup "7")))))
(step->markup-previously-alternate-jazz pitch)))
(make-line-markup
(list
(case (caddr pitch)
- ((-2) (accidental->markup -2))
- ((-1) (accidental->markup -1))
+ ((-2) (old-accidental->markup -2))
+ ((-1) (old-accidental->markup -1))
((0) empty-markup)
- ((1) (accidental->markup 1))
- ((2) (accidental->markup 2)))
+ ((1) (old-accidental->markup 1))
+ ((2) (old-accidental->markup 2)))
(make-simple-markup (number->string (+ (cadr pitch) (if (= (car pitch) 0) 1 8)))))))
(define-public chord::exception-alist-american
(define (step->markup-american pitch)
(case (cadr pitch)
((6) (case (caddr pitch)
- ((-2) (make-line-markup (list (accidental->markup -1) (make-simple-markup "7"))))
+ ((-2) (make-line-markup (list (old-accidental->markup -1) (make-simple-markup "7"))))
((-1) (make-simple-markup "7"))
((0) (make-simple-markup "maj7"))
- ((1) (make-line-markup (list (accidental->markup 1) (make-simple-markup "7"))))
- ((2) (make-line-markup (list (accidental->markup 2) (make-simple-markup "7"))))))
+ ((1) (make-line-markup (list (old-accidental->markup 1) (make-simple-markup "7"))))
+ ((2) (make-line-markup (list (old-accidental->markup 2) (make-simple-markup "7"))))))
((4) (case (caddr pitch)
- ((-2) (make-line-markup (list (accidental->markup -2) (make-simple-markup "5"))))
+ ((-2) (make-line-markup (list (old-accidental->markup -2) (make-simple-markup "5"))))
;;choose your symbol for the diminished fifth
((-1) (make-simple-markup "-5"))
- ;;((-1) (make-line-markup (list (accidental->markup -1) (make-simple-markup "5")))))
+ ;;((-1) (make-line-markup (list (old-accidental->markup -1) (make-simple-markup "5")))))
((0) empty-markup)
;;choose your symbol for the augmented fifth
;;((1) (make-simple-markup "aug"))
- ;;((1) (make-line-markup (list (accidental->markup 1) (make-simple-markup "5")))))
+ ;;((1) (make-line-markup (list (old-accidental->markup 1) (make-simple-markup "5")))))
((1) (make-simple-markup "+5"))
- ((2) (make-line-markup (list (accidental->markup 2) (make-simple-markup "5"))))))
+ ((2) (make-line-markup (list (old-accidental->markup 2) (make-simple-markup "5"))))))
(else (if (and (= (car pitch) 0)
(= (cadr pitch) 3)
(= (caddr pitch) 0))
(define (step->markup-jazz pitch)
(case (cadr pitch)
((6) (case (caddr pitch)
- ((-2) (make-line-markup (list (accidental->markup -1) (make-simple-markup "7"))))
+ ((-2) (make-line-markup (list (old-accidental->markup -1) (make-simple-markup "7"))))
((-1) (make-simple-markup "7"))
;;Pick your favorite maj7
((0) mathm-markup-object) ;;a white triangle
;;((0) mathn-markup-object) ;;a black triangle
;;((0) (make-simple-markup "maj7")) ;;good old maj7
- ((1) (make-line-markup (list (accidental->markup 1) (make-simple-markup "7"))))
- ((2) (make-line-markup (list (accidental->markup 2) (make-simple-markup "7"))))))
+ ((1) (make-line-markup (list (old-accidental->markup 1) (make-simple-markup "7"))))
+ ((2) (make-line-markup (list (old-accidental->markup 2) (make-simple-markup "7"))))))
((4) (case (caddr pitch)
- ((-2) (make-line-markup (list (accidental->markup -2) (make-simple-markup "5"))))
+ ((-2) (make-line-markup (list (old-accidental->markup -2) (make-simple-markup "5"))))
;;choose your symbol for the diminished fifth
;;((-1) (make-simple-markup "-5"))
- ((-1) (make-line-markup (list (accidental->markup -1) (make-simple-markup "5"))))
+ ((-1) (make-line-markup (list (old-accidental->markup -1) (make-simple-markup "5"))))
((0) empty-markup)
;;choose your symbol for the augmented fifth
;;((1) (make-simple-markup "aug"))
- ((1) (make-line-markup (list (accidental->markup 1) (make-simple-markup "5"))))
+ ((1) (make-line-markup (list (old-accidental->markup 1) (make-simple-markup "5"))))
;;((1) (make-simple-markup "+5"))
- ((2) (make-line-markup (list (accidental->markup 2) (make-simple-markup "5"))))))
+ ((2) (make-line-markup (list (old-accidental->markup 2) (make-simple-markup "5"))))))
(else (if (and (= (car pitch) 0)
(= (cadr pitch) 3)
(= (caddr pitch) 0))
(begin
(ly:warn "Attempt to determine tonality of transposed scale")
#t)
- (eq? (cdr (list-ref pitch-list 4)) (cdr (list-ref pitch-list 6)))))
+ (eq? (cdr (list-ref pitch-list 4)) (cdr (list-ref pitch-list 6))))
+ )