denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Linking smf events to Denemo objects


From: Richard Shann
Subject: Re: [Denemo-devel] Linking smf events to Denemo objects
Date: Wed, 20 May 2009 08:51:14 +0100

Following a chat with Nils on irc, it would seem that we could allow
DenemoDirectives to specify port(i.e. track), channel and program at any
point (at the start of the staff/voice, or in any sequence of notes), we
just do the output as requested. The present code would give default
values.

Another, minor, point is that a note would not have just a single
smf_envent_t attached, but a list, since it describes NoteOn and NoteOff
and other stuff potentially added on via DenemoDirectives.

Richard

On Tue, 2009-05-19 at 14:41 -0500, Jeremiah Benham wrote:
> It looks to me like we could overhaul exportmidi.c changing all the
> > places where it writes to the output file to be calls to the smf
> > library, creating smf_event_t s inserting them into the si->smf and
> > putting a pointer to the smf_event_t in the DenemoObject. Writing
> to  
> > an
> > output file would then be a single smf library call, and playing
> could
> > be started at any point by going to the smf_event_t attached to the
> > current object and doing the smf library next call. (There would
> be  
> > one
> > smf structure attached to each DenemoScore object, ie movement or
> > "song", this is what I have called si->smf above).
> >
> > For an initial version of the code, we could just invalidate the smf
> > whenever the score was changed; later we could enable the
> DenemoObject
> > insertion routine to call the smf library to update the si->smf
> > structure. For this we would want exportmidi.c to be broken down
> into
> > tiny functions for each DenemoObject type, instead of the large
> switch
> > statement that it has at the moment.
> > Does this all sound ok?
> 
> This all sounds good to me. Clearing up export and import midi was
> the  
> reason I added libsmf into the project directory.
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]