[Top][All Lists]

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

Re: [Denemo-devel] importmidi.c

From: Jeremiah Benham
Subject: Re: [Denemo-devel] importmidi.c
Date: Mon, 24 Aug 2009 13:09:10 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Aug 22, 2009 at 02:32:18PM +0100, Richard Shann wrote:
> In the course of removing compiler warnings I noticed that importmidi.c
> was seriously abusing pointers. I have redefined the offending
> structures to contain integers, and changed the code to suit.
> I may have broken something in the process, I have just done a single
> MIDI import to make sure that there is nothing completely stupid there.
> But I thought that this would be a good time to get this cleaned up, as
> we are at the start of the 0.8.10 cycle, giving us time to sort out
> bugs.

Something is now broken. I think I am going to rewrite some of importmidi.c and 
put it in scheme. importmidi.c is doing some ugly low level stuff and I don't 
feel that it needs to be that way. My idea was to use libsmf to read the midi 
file and dump the track data out to be processed via scheme. The c portion of 
this is mostly all written in libsmf/smfsh.c. What is passed to scheme would be 
similar to the output of smfsh utiltily included in libsmf/ . Then when scheme 
recieves the string of events it then decides what to do about it. 

Some helper scripts that will need to be written to:

1. determine how much time is left in the measure. 
2. if note is inserted and note duration > space left in measure tie the note 
over to contain (duration - time_left) in next measure
3. if inserting a note at time x duration x does it collide with note already 
4. if note collides and duration and start time are =, add the note to the 
notelist for that object
5. if note collides and duration or start !=, put the note in next voice -> 
(create if nonexistant) (if existant rerun check for collision)

Richard if you think this is not a bad idea then I will get started on this 
now. I may need your help on some of it. 

Should I write a wiki page on my idea?



> I have also given the prototype of the DenemoDirective->graphic field as
> GObject *, to reflect its evolving role as a graphical object
> representing the directive. The case I have in mind is the textual
> commentry that people may want to add to a denemo music file, which will
> have its text editor stored here.
> Richard
> _______________________________________________
> Denemo-devel mailing list
> address@hidden

reply via email to

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