# HG changeset patch # User Chris Cannam # Date 1444653504 -3600 # Node ID 98898331dc2a174a883a883f93aa70c0517c7cd4 # Parent 815f82508f9635a727d55ec2d32d70bea4f39c6e# Parent 1cc96e03a903c36f2f9496532fff616c85a22b80 Merge from the default branch diff -r 815f82508f96 -r 98898331dc2a data/fileio/MIDIFileWriter.cpp --- a/data/fileio/MIDIFileWriter.cpp Thu Aug 20 15:33:13 2015 +0100 +++ b/data/fileio/MIDIFileWriter.cpp Mon Oct 12 13:38:24 2015 +0100 @@ -27,9 +27,13 @@ #include "base/Pitch.h" +#include + #include #include +//#define DEBUG_MIDI_FILE_WRITER 1 + using std::ofstream; using std::string; using std::ios; @@ -320,12 +324,9 @@ MIDIEvent *event; - event = new MIDIEvent(0, MIDI_FILE_META_EVENT, MIDI_CUE_POINT, - "Exported from Sonic Visualiser"); - m_midiComposition[track].push_back(event); - - event = new MIDIEvent(0, MIDI_FILE_META_EVENT, MIDI_CUE_POINT, - "http://www.sonicvisualiser.org/"); + event = new MIDIEvent + (0, MIDI_FILE_META_EVENT, MIDI_CUE_POINT, + ("Exported from " + qApp->applicationName()).toStdString()); m_midiComposition[track].push_back(event); long tempoValue = long(60000000.0 / m_tempo + 0.01); @@ -384,6 +385,10 @@ 127); // loudest silence you can muster m_midiComposition[track].push_back(event); + +#ifdef DEBUG_MIDI_FILE_WRITER + cerr << "midiTime = " << midiTime << ", endTime = " << endTime << endl; +#endif } // Now gnash through the MIDI events and turn the absolute times @@ -404,6 +409,9 @@ for (MIDITrack::iterator it = m_midiComposition[i].begin(); it != m_midiComposition[i].end(); it++) { unsigned long deltaTime = (*it)->getTime() - lastMidiTime; +#ifdef DEBUG_MIDI_FILE_WRITER + cerr << "time = " << (*it)->getTime() << ", lastMidiTime = " << lastMidiTime << ", deltaTime = " << deltaTime << endl; +#endif lastMidiTime = (*it)->getTime(); (*it)->setTime(deltaTime); } diff -r 815f82508f96 -r 98898331dc2a transform/FeatureWriter.h --- a/transform/FeatureWriter.h Thu Aug 20 15:33:13 2015 +0100 +++ b/transform/FeatureWriter.h Mon Oct 12 13:38:24 2015 +0100 @@ -42,9 +42,11 @@ virtual string getDescription() const = 0; struct Parameter { // parameter of the writer, not the plugin + Parameter() : hasArg(false), mandatory(false) { } string name; string description; bool hasArg; + bool mandatory; }; typedef vector ParameterList; virtual ParameterList getSupportedParameters() const {