Add preference to set PPQN of exported MIDI files
This also changes the default from 19200 to 1920
This commit is contained in:
parent
f7f3c1a920
commit
c3102ab8a5
|
@ -281,3 +281,4 @@ CONFIG_VARIABLE (bool, show_video_server_dialog, "show-video-server-dialog", fal
|
|||
/* export */
|
||||
CONFIG_VARIABLE (float, export_preroll, "export-preroll", 2.0) // seconds
|
||||
CONFIG_VARIABLE (float, export_silence_threshold, "export-silence-threshold", -90) // dB
|
||||
CONFIG_VARIABLE (float, ppqn_factor_for_export, "ppqn-factor-for-export", 1) // Temporal::ticks_per_beat
|
||||
|
|
|
@ -18,9 +18,11 @@
|
|||
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include "temporal/tempo.h"
|
||||
|
||||
#include "ardour/export_smf_writer.h"
|
||||
#include "ardour/midi_buffer.h"
|
||||
#include "temporal/tempo.h"
|
||||
#include "ardour/rc_configuration.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace Evoral;
|
||||
|
@ -43,7 +45,7 @@ int
|
|||
ExportSMFWriter::init (std::string const& path, samplepos_t timespan_start)
|
||||
{
|
||||
::g_unlink (path.c_str ());
|
||||
if (SMF::create (path)) {
|
||||
if (SMF::create (path, 1, Temporal::ticks_per_beat * Config->get_ppqn_factor_for_export ())) {
|
||||
return -1;
|
||||
}
|
||||
_path = path;
|
||||
|
|
Loading…
Reference in New Issue