Re: events not recorded when syncing to MTC

From: stefano barbi <stefanobarbi_at_gmail.com>
Date: Tue Mar 23 2010 - 17:07:58 CET
Both solutions work. Thank you very much.


2010/3/23 Alexandre Ratchov <alex@caoua.org>:
> On Fri, Mar 19, 2010 at 05:21:42PM +0100, stefano barbi wrote:
>> Hi,
>> I am trying to sync midish with ardour, using ardour as master.
>> Relocation and playback work fine but events are not recorded.
>>
>> this is my ~/.midishrc:
>>
>> dnew 0 "14:0" ro                # midi through Ardour is attached here
>> dnew 1 "135:0" ro               # vkeybd
>> dnew 2 "132:0" wo               # zynaddsubfx
>>
>> and this is my rmidish session:
>> send EOF character (control-D) to quit
>> [0000:00]> inew vk {1 0}
>> [0000:00]> onew zyn {2 0}
>> [0000:00]> tnew pippo
>> [0000:00]> r
>> .. press play on ardour, timer starts on midish, press some notes on vk
>> [0005:00]> s
>> [0000:00]> p
>> ..press again play on ardour but midi events are not played back
>> [0006:00]>
>>
>> If I disable syncing (dmtcrx nil) events are recorded and played back.
>> Am I doing something wrong?
>>
>
> after some thinking, I guess ardour is sending a second "MTC
> full frame" message, which means "prepare to start". If so,
> midish erases the recorded part of the track and prepares to
> record it again (as it expects another recording cycle). If
> that's the problem, the solution would be to stop midish
> before ardour stops.
>
> Alternatively, midish could be modified to save recorded
> events when the timer stops (instead of when it's stopped by
> hand). I.e. call song_mergerec() from song_stopcb(), this
> seems more correct than the current behaviour but requires
> wider testing
>
> the diff below (against CVS version) does this
>
> -- Alexandre
>
> Index: song.c
> ===================================================================
> RCS file: /home/alex/cvs/midish/song.c,v
> retrieving revision 1.124
> diff -u -p -r1.124 song.c
> --- song.c      23 Mar 2010 10:20:05 -0000      1.124
> +++ song.c      23 Mar 2010 10:20:48 -0000
> @@ -830,6 +830,8 @@ song_stopcb(struct song *o)
>        SONG_FOREACH_TRK(o, t) {
>                song_confcancel(&t->trackptr->statelist);
>        }
> +       if (o->mode >= SONG_REC)
> +               song_mergerec(o);
>  }
>
>  /*
>
Received on Tue, 23 Mar 2010 17:07:58 +0100

This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:32:21 CET