- {
- ostringstream id_str(ios::ate);
- id_str << int(note->id());
- xml_note->add_property("id", id_str.str());
- }
-
- {
- ostringstream note_str(ios::ate);
- note_str << int(note->note());
- xml_note->add_property("note", note_str.str());
- }
-
- {
- ostringstream channel_str(ios::ate);
- channel_str << int(note->channel());
- xml_note->add_property("channel", channel_str.str());
- }
-
- {
- ostringstream time_str(ios::ate);
- time_str << note->time();
- xml_note->add_property("time", time_str.str());
- }
-
- {
- ostringstream length_str(ios::ate);
- length_str << note->length();
- xml_note->add_property("length", length_str.str());
- }
-
- {
- ostringstream velocity_str(ios::ate);
- velocity_str << (unsigned int) note->velocity();
- xml_note->add_property("velocity", velocity_str.str());
- }
+ xml_note->set_property ("id", note->id ());
+ xml_note->set_property ("note", note->note ());
+ xml_note->set_property ("channel", note->channel ());
+ xml_note->set_property ("time", note->time ());
+ xml_note->set_property ("length", note->length ());
+ xml_note->set_property ("velocity", note->velocity ());