Hello everybody,
after the few messages about midi management in this list, I think it may be of interest for some of you to know about a few problems I had developing MyAlarms (to those who don't know, MyAlarms is an utility I released a couple of days ago to manage midi dbs and sounds).

1 (problem): localized PalmOS versions have localized System Midi db names. What happened to me is: I installed an italian PalmOS version over an international one, so I got two midi dbs with creator 'sysFileCSystem', one named 'Suoni System MIDI', the other 'System MIDI Sounds'. Now, while the Datebook function PlayAlarmSound searches for the most recent db(it uses DmGetNextDatabaseByTypeCreator), RockMusic (an example of Midi app included in Sdk) opens midi db by using the function DmOpenDatabaseByTypeCreator. What's more, Datebook passes 'false' as second argument of SndCreateMidiList function, so reading from the first db only. The result was that RockMusic installed new sounds in one db, Datebook created Midi pick list from the other...
In general,IMHO this could lead to problems or, at least, to a lot of confusion. This is the reason why, in MyAlarms, I decided not to allow users to create multiple system midi db: they could not see them in Datebook !

2 (lack of feature): SndCreateMidiList accepts creator only. It would be much easier if we could pass a Db name or db ID too.

3 (bug?) : the last argument of SndPlaySmf (bNoWait) is said to be ignored, because "This function always finishes playing the SMF selection before returning" (SDK Reference). This is certainly true, **but** it apparently returns if any event occurs. While in general this is correct (for example you can't ignore battery problems and many others), in particular something strange happens. I've already written a "playback" function for Noter (a music editor): the playback loop exits if any event occurs, and it works well. On the contrary, SndPlaySmf often (I'd say almost always) exits with no intervention from user. Any idea?

4 (example not clear?) The SMF header in MakeSMF.c (RockMusic) is commented not clearly. A certain byte value is descibed as "tempo (microseconds per quarter note)", while it is the resolution, not the tempo. If you want to build a SMF from scratch (as RockMusic does) and you need to set a different tempo from default (120 bpm) you will have to work a lot to do it correctly. I think it could be more useful to include the tempo bytes in the header, so that one can have a more complete example. (If anyone whishes, I can post my modified SMF header).


Thanks for reading,
GL
-----------------------------------------------------------------------------
Gianluca Barbaro
Storm Comunicazione & Tecnologia - Via B. De Rolandi, 1 - 20156 Milano - Italy
tel. +39-02-33.00.74.68 - fax +39-02-39.21.54.84
mailto:[EMAIL PROTECTED] - web site: http://www.storm.it

Pocket.Storm - Il portale italiano su Palm
http://www.pocket.storm.it/

Makers of http://www.palmpointer.com
the search engine for Palm Computing Platform

Makers of http://www.wincearch.com
the search engine for Windows CE
-----------------------------------------------------------------------------

Reply via email to