*/
#include "proto.hh"
-#include "plist.hh"
-#include "pcursor.hh"
#include "debug.hh"
#include "misc.hh"
#include "string.hh"
Midi_instrument::str () const
{
Byte program_byte = 0;
- for (int i = 0; instrument_name_sz_a_[i]; i++)
+ bool found = false;
+ for (int i = 0; !found && instrument_name_sz_a_[i]; i++)
if (instrument_str_ == String (instrument_name_sz_a_[ i ]))
{
program_byte = (Byte)i;
- break;
+ found = true;
}
+ if (!found)
+ {
+ warning (_f("No such instrument: `%s'", instrument_str_.ch_C ()));
+ }
+
String str = to_str ((char) (0xc0 + channel_i_));
str += to_str ((char)program_byte);
return str;
String str = to_str ((char)status_byte);
str += to_str ((char) (pitch_i () + c0_pitch_i_c_));
-#if 0
- // poor man's staff dynamics:
- str += to_str ((char) (dynamic_byte_ - 0x10 * channel_i_));
-#endif
-
+ str += to_str ((char)dynamic_byte_);
return str;
}