Beware VecFever only!
Its Jasons fault. Really, he said it would be cool to play sampled music from the VecFever.
That started it – I thought “can’t be too hard to sample a piece of music – and play it like “bad apple”. I’ll ask Thomas for a sample code and do it.”
Now, that was at the beginning of the week, and nearly every free Vectrex minute I invested the last few days went into that – well, and a bit more, as you will see.
With the next Vide version you can make these sample files yourself!
And on tab three the last entry:
Enter ANY WAV file you like. It will be converted to vectrex “eatable” samples, split into chunks and added to a sample player, which loads these chunks from the VecFever. The result is a *.v4e, which you can copy to your VecFever and play there.
- Button 1 exits
- Button 2 switches to “PSG sample player” – which sounds much worse, but those poor guys with a “noBuzz” Vectrex will at least hear SOMETHING (Beware, once switched to PSG, you can not switch back – I have no time to read silly joystick buttons!)
- Here a “sample”: http://vectrex.malban.de/sample.v4e (link!)
- The playing could still be done a bit “cleaner” – what should be done before bankswitching (because the VecFever needs some time to load a bank) is to copy some samples to RAM and keep on playing while waiting for the loading to finish. This should get rid of these little “ticks”. But actually the weekend is “over” and I just wanted to finish this :-).
Also – I am telling the story backwards actually. Jason also pointed out, that the old vectrex BadApple demo I did (which is also on the VecFever) stutters! (and so does the original I made it from), BTW: http://malban.de/extreme-vectrex-reproduction-of-badapple (almost all credits go to SpritesMods).
I took that as a challenge to set up the “tool chain” again for that demo – which again was not THAT easy. But I succeeded, here a link to a NEW BadApple demo for Vectrex: http://vectrex.malban.de/BadApple30.v4e
Also, if you followed my YouTube activities you may have seen my “BlaBla” vectrex thingy: https://www.youtube.com/watch?v=eI6CreLab9A
If you watched that “closely” you will have noticed, that all lines are doubled. This is because the tool for conversion (potrace) does not use so called “centerline tracing”.
Since I also included “potrace” into Vide you can easily see what I mean, by loading a frame of the video into Vide:
This is called “outline tracing”.
Now… I have known about another tool for quite some time now, but I never really took the time to explore, a tool called “autotrace”. I knew it supported centerline tracing – but I never used it. Now was the time – now was the place. Every now and again I NEEDED centerline tracing – what I always did – use potrace and remove all double lines – which was really BORING.
Look again at the above picture – this is from my current “work in progress” Vide version – there is a radio button at the top, called “autotrace” – lets just press it – ok:
Ok, both tools have myriads of options, there was a lot of trial and error involved, but I think I have found good ones!
Also – both tools surely were not made to be Vide compatible, I somehow had to convert the output to something I could use.
For potrace I used Jason output format – as this was the format used by SpritesMods – so that one came “natural”.
Autotrace on the other side – while having several output options – did not have Jason. I chose SVG as output format (most simple form, only “PATH” and that only with “M” and “L”, but that proved to be all I need).
Once I had a more firm grip on autotrace the next logical step was to upgrade the “SpritesMods” tool chain to create animations too.
So I changed the “combine.php”, to be able to load SVG, added some documtation and some more optimizations… (which now sounds easy, but I never did PHP before, and I grew one or two grey hairs about SpritesMods data structure…) if interested I certainly can make the updated “combine.php” available (being GPL 3 if I remember correctly).
All this “little” stuff took a couple of days to bare fruit… combined again with input from Thomas on how to load (up to 8192) banks from the VecFever.
If anyone also puts together the “SpritesMods” toolchain, the end result (a “vec.bin” file) can now be also inserted in “FileUtils” (see first picture on this page) – and a VecFever playable animation will be created!
Also – with the next version, Vide will have two additional source projects, “ExtremePlayer” and “WAVPlayer” which contain the source code for both players. Both will work in “extreme” mode (which Vide can emulate) and “VecFever” mode, which Vide can not emulate but compile :-).
So you can try your animations/music in vide in extreme mode and switch to production (aka VecFever) mode to deploy :-).
Some facts about the animation player:
- plays in 30Hz
- half of the time is needed for samples, the other half can be used for vector drawing
- sample rate is somewhat around 10000 – 12000 Hz (depends a little bit, optimally it should be adjusted for each animation)
- for the new player I added a simple “sync” mechanism, if one polygon was drawn, which consists of more than 30 vectors, a ZREF will be done (problem still is if a polygon has about 100-200 vectors, than drift will still be a thing)
- all vectors/positionings are done with scale $18
- for the drift, not only the scale has to be accounted for – after EACH vector a sample is played. The time for sample playing is also taking its toll in regard to drift.
Ok, now two more links, to two more animations:
And a video as example: