Projectitis
Well-known member
Hi all,
I've uploaded the latest version of libxm_t3 to github: https://github.com/projectitis/libxm_t3
libxm_t3 is a port of a compact XM player, libxm by Artefact2: https://github.com/Artefact2/libxm
I've only tested on T_3.6 so far, but should also work on T_3.5, T_3.2 and T_3.1, though it drops to mono output for the latter two (only 1x DAC available) and also drops to 24kHz - not sure if it needs to. If someone wants to test this on T_3.5, T_3.2, T_3.1 I would be much obliged.
The original author was instrumental in helping implement a low memory mode where a module can be played almost entirely from Flash memory, with only 10kb or so of RAM used.
Only XM files are supported at this time (not MOD, S3M etc).
I'd like to acknowledge Jarkko, who has recently completed a similar project: https://github.com/JarkkoPFC/arduino-music-player
Jarkko's player uses even less memory than libxm, but I started this port because I didn't want to rely on an intermediate file format. Jarkko's player uses his own PMF (Profoundic Music File) format, and requires files to be converted to this first. I was only partially successful - libxm_t3 allows playing the original XM (as long as it is converted to header file first - still working on SD card loading), but in order to use the low memory mode, the XM does have to be converted to a slightly different file format.
Examples are included in the repo, and I plan to add to this library over time - next up is loading from SD card.
Here is example code to play a low-memory XM file:
And here is my Teensy setup. Note the output of the DACs are going through a preamp and then on to my speakers. I have also been successful connecting the DAC pins directly to powered speakers. What you can't see in the photo is that I have an external 3.3v power supply hooked up to the power rails running along the top (powering the preamp).
Cheers,
Peter
I've uploaded the latest version of libxm_t3 to github: https://github.com/projectitis/libxm_t3
libxm_t3 is a port of a compact XM player, libxm by Artefact2: https://github.com/Artefact2/libxm
I've only tested on T_3.6 so far, but should also work on T_3.5, T_3.2 and T_3.1, though it drops to mono output for the latter two (only 1x DAC available) and also drops to 24kHz - not sure if it needs to. If someone wants to test this on T_3.5, T_3.2, T_3.1 I would be much obliged.
The original author was instrumental in helping implement a low memory mode where a module can be played almost entirely from Flash memory, with only 10kb or so of RAM used.
Only XM files are supported at this time (not MOD, S3M etc).
I'd like to acknowledge Jarkko, who has recently completed a similar project: https://github.com/JarkkoPFC/arduino-music-player
Jarkko's player uses even less memory than libxm, but I started this port because I didn't want to rely on an intermediate file format. Jarkko's player uses his own PMF (Profoundic Music File) format, and requires files to be converted to this first. I was only partially successful - libxm_t3 allows playing the original XM (as long as it is converted to header file first - still working on SD card loading), but in order to use the low memory mode, the XM does have to be converted to a slightly different file format.
Examples are included in the repo, and I plan to add to this library over time - next up is loading from SD card.
Here is example code to play a low-memory XM file:
Code:
#include <xm_t3.h>
#include "shooting_star_libxmize.h"
void setup() {
// Loading the module in libxmize format results in:
// 104 kB of flash memory used
// 10 kB of RAM used for module
xm_player_xmize( shooting_star_libxmize );
xm_player_start();
}
void loop() {
xm_player_update();
}
And here is my Teensy setup. Note the output of the DACs are going through a preamp and then on to my speakers. I have also been successful connecting the DAC pins directly to powered speakers. What you can't see in the photo is that I have an external 3.3v power supply hooked up to the power rails running along the top (powering the preamp).
Cheers,
Peter