On Tue, Nov 13, 2012 at 12:06:19AM +0100, gorest wrote: > hello, > > after a first pass reading the code, i dropped some notes and > questions about what to do and where. As there is no developer > docs, i need to understand the global behavior of the program and > its specificities. > > So the following statements are considered for a first step : > parsing the meta events of the SMF file into the meta track of > the song structure. > > ev.h > > add a "#DEFINE EV_MARKER 0xValue" > errr? if it must be > only 1 byte (char), then there is only 0x01 left, is it > usable ? yes; if more event types are needed, meta events could be moved at offset 0x10, if so, afaics only EV_xxx and EVSPEC_ macros need to be updated. If you don't mind, I'd prefer a shorter word or abreviation for marker, (eg. tag or mark) > > add a #"define marker_val" to struct ev {...} > what > value ? v0 or v1 ? v0 would be more consistent with what we do for other events > ev.c > > ev_dbg(?) : add EV_MARKER case yes > smf.c > > smf_getvar(?) read a variable length value usefull to get > the marker info > > smf_puttrack : store a track in the smf > add marker > events to the meta track ? > > song_exportsmf : open the smf and store the whole song > add marker events to the meta track ? > > smf_gettrack : parse a track 'varlen event ... ' > > THE PLACE TO PARSE THE MARKER EVENTS > > add statement : else if (type == 0x06) {?} /*marker event*/ I don't know how markers are stored in .mid files > song.h > > add an entry to "struct song" for a marker meta track, or > use the meta track ? (the meta track is reffered as > "tempo track" in comments) afaics using the tempo/meta track seems simpler for markers; for instance if silence is inserted, markers won't need special handling to move naturally. > song.c > > add a function like : does_song_have_markers(?) ? > > if any, add marker track initialisation > > add EV_MARKER case to song_metaput(?) if some action is to be done when a marker is reached > xxxx? yes > > add a new proc "lmarkers" to show the list of markers > listed in the song's meta track I've no clear opinion here, may be the "minfo" function could be used for this as well. -- AlexandreReceived on Tue, 13 Nov 2012 22:51:55 +0100
This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:32:23 CET