mercredi, février 27, 2008

Beam it, play it, fix it, repeat

I had an argument with the CVS repository last night, but i finally managed to make it accept a new branch with the sources for runme featuring the NTXM player. I hope 0xtob won't be against the re-diffusion of his sources (well, he shouldn't since they're LGPL) ... I am now able to upload any .xm to the DS (up to 512KB) and play it with NTXM. I can also upgrade the software to a new build by just pressing SELECT (and test new effects). All it required was a small rewrite of the XMTransport class so that it works with an (abstract) DataReader rather than plain FILE* ... It even makes it more elegant ^_^

edit: okay, i've got "set tempo/speed" effect added. I also added (untested) offset effect and wrote a small tool that inspect .xm to report what effects they're using... I'm not that happy with the way the player keeps state, anyway. Both "Instrument" and "Sample" classes are used as an "samples database", but nothing capture the current state of a playing note, which makes e.g. offset effect tedious to implement ... I fear similar boring edits to be required when we'll have to support retrig and the like.

3 commentaires:

sylvainulg a dit…

"When using linear Freq Tables, the distance between two octaves is
255 portamento units. e.g. the effect "1FF" at speed 1 will slide the
pitch one octave up."

(http://aluigi.altervista.org/mymusic/xm.txt)

cyborgjeff a dit…

c'est bien, c'est bien.. tu ne te décourrages pas.. et tu pourras bientot rentabiliser toutes mes compos.. et les autres "programmeurs homebrew" pourront ensuite s'inspirer de cela pour eux aussi rentabiliser mes compos ;)

héhé

sylvainulg a dit…

http://deku.gbadev.org/program/sound8.html#portaupdown

"static void MODFXPortaUpMid(MOD_UPDATE_VARS *vars)
{
vars->modChn->period =
MODPitchSlide(vars->modChn->period, -vars->modChn->portaSpeed); // Negative=higher pitch
vars->updateFlags |= MOD_UPD_FLG_SET_FREQ;
}"