- if (midi_debug_global_b)
- {
- str = String_convert::bin2hex (str) + "\n";
- // ugh, should have separate debugging output with Midi*::print routines
- int i = str.index ("0a");
- while (i >= 0)
- {
- str[i] = '\n';
- str[i + 1] = '\t';
- i = str.index ("0a");
- }
- }
- else
- {
- Byte * b = str.get_bytes ();
- for (int sz = str.length (); sz--;)
- {
- fputc (*b, out_file_);
- b++;
- }
- }
-
- return *this;