From 36a2b9b94f845675756d8561f057c0cb738f0ad3 Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Sun, 7 Apr 2019 11:33:24 +0200 Subject: increase max midi notes per key to 512. --- VERSION | 2 +- monitors.ttl.in | 3 +++ monitors_midi_pianoroll.c | 13 +++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index f9a70ce..86b96a4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.235 +0.1.253 diff --git a/monitors.ttl.in b/monitors.ttl.in index 6f617d5..e28a406 100644 --- a/monitors.ttl.in +++ b/monitors.ttl.in @@ -45,6 +45,9 @@ idisp:queue_draw idisp:interface a lv2:ExtensionData . +ui:updateRate + a opts:Option . + # Maintainer omk:me a foaf:Person ; diff --git a/monitors_midi_pianoroll.c b/monitors_midi_pianoroll.c index 0df1f85..04cd841 100644 --- a/monitors_midi_pianoroll.c +++ b/monitors_midi_pianoroll.c @@ -32,7 +32,7 @@ #define MAX_GRAPH 0x20000 //FIXME actually measure this #define MAX_NPROPS 7 #define MAX_KEYS 0x80 -#define MAX_NOTES 0x80 +#define MAX_NOTES 0x200 #define MAX_VELOCITY 0x80 #define MASK_KEYS (MAX_KEYS - 1) #define MASK_NOTES (MAX_NOTES - 1) @@ -434,7 +434,8 @@ instantiate(const LV2_Descriptor* descriptor, double rate, lv2_canvas_idisp_init(&handle->idisp, queue_draw, handle->map); #endif - handle->midi_MidiEvent = handle->map->map(handle->map->handle, LV2_MIDI__MidiEvent); + handle->midi_MidiEvent = handle->map->map(handle->map->handle, + LV2_MIDI__MidiEvent); const LV2_URID ui_update_rate= handle->map->map(handle->map->handle, LV2_UI__updateRate); @@ -446,8 +447,11 @@ instantiate(const LV2_Descriptor* descriptor, double rate, opt && (opt->key != 0) && (opt->value != NULL); opt++) { - if( (opt->key == ui_update_rate) && (opt->type == handle->notify.forge.Float) ) + if( (opt->key == ui_update_rate) + && (opt->type == handle->notify.forge.Float) ) + { handle->update_rate = *(float*)opt->value; + } } handle->spf = handle->sample_rate / handle->update_rate; @@ -595,7 +599,8 @@ run(LV2_Handle instance, uint32_t nsamples) { const LV2_Atom_Object *obj = (const LV2_Atom_Object *)atom; - props_advance(&handle->props, &handle->notify.forge, ev->time.frames, obj, &handle->notify.ref); + props_advance(&handle->props, &handle->notify.forge, ev->time.frames, obj, + &handle->notify.ref); } const int64_t to = ev->time.frames; -- cgit v1.2.1