Hi, I sent this 2 weeks ago, but got no feedback at all, so I'm giving it another try.
*addon - plugin.audio.mozart *version - 0.0.1 *url - svn://svn.online.bg/plugin.audio.mozart/TAGS/0.0.1 *revision - 6 *branch - TAGS/0.0.1 *xbmc version - dharma, eden-pre N.B.: this is a new add-on. Summary: It is a simple script which, when called, generates a random waltz theme following Mozart's Musical Dice Game (Musikalisches Würfelspiel). Details: Few years before his death, Mozart showed once again his musical genius by creating a unique musical game. He devised a waltz that consist of two parts: a minuet (16 bars of music) and a trio (another 16 bars). Then, he wrote 11 different pieces of music for the first bar, 11 for the second bar etc. - a total of 272 pieces. He also set up a combination table which, upon a dice roll, selected which piece to be played for the first bar, which for the second etc. This results in a total of 1.3 * (10^29) different variations. For one who enjoys Mozart's music, this is truly an endless source of pleasure. WAV files used in this project are found at Princeton University's public FTP, ftp://ftp.cs.princeton.edu/pub/cs126/mozart/mozart.jar Tech note 1: It seems that the XBMC's built-in Python in the Ubuntu PPA (2.4, am I correct?) is a bit out of date and maybe a bit buggy; some comments are available inside the code in two places where I had to use workarounds for things which work on Python 2.6, 2.7 (2.6 system-wide on Ubuntu Lucid; 2.7 on Fedora 14 where XBMC seems to use the system-side Python) but do not work for the built-in from Ubuntu PPA: the first was unzipping files (with subdirectories) and second was merging WAV files. Tech note 2: This implementation uses pre-built WAV files for each of the 272 pieces of music. While this makes it compatible with all ports of XBMC, it has one small disadvantage: the WAV files are about 35 MB and it takes some time to initially download them. This can be circumvented by using MIDI files, which are much smaller (all 272 take less than 100 KB). However, a MIDI-only version will make the add-on less compatible, since not all platforms can XBMC play MIDI files out of the box (e.g., on Linux you need to manually install a soundfont of approx 100 MB, which not all users decide to do). It will be probably best to have both implemented plus a check whether the host supports MIDI (then use it), else revert to WAV. Here comes a tricky moment: can anyone point me to a reliable method to check whether MIDI playback is available on a system? I've tried a simple check: try: xbmc.Player().play(<path_to_some_midi>) When the player cannot play it (e.g., no soundfont is installed) in the xbmc.log I get "... skipping unplayable item...", but in the addon the call returns "true". Any ideas how to properly do the check (if possible at all)? WWell, Assen ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Xbmc-addons mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xbmc-addons
