Author Options:

VB6 Christmas Light Controller Answered

I have created a VB6 program that synchronizes Christmas lights to music. It could use some refinements in the program. I have used this program for over 13 years. It is capable of 128 channels, may be more but I do not need any more at this time. As of right now the program loads the sync file first then plays the music. This takes up to 4 minutes to load the music sync file between songs. I would like to read the file as it needs it when playing the music. That way to load time would be almost nothing. These are only on and off (blinky) lights for my display, but that is fine with me. I call this program Rudolf and it works on almost any computer. I have run this on a 166 MHz computer with only 48mb of ram and Windows 98! The program also could some help with the editing feature for the lights. If anyone is willing to give me a hand with this I would be very grateful. I am more than willing to give the source code to any one for free. I plan on using this program for many more years to come. I have tried Vixen, but it stops running after a while. Thank You Ricki


The forums are retiring in 2021 and are now closed for new topics and comments.

1 year ago

The easiest option that comes to my mind might not work as planned...
But since it runs on a normal PC it should be possible to load what you need into the RAM.
Working with two table the first sync file is loaded on start up.
The second sync file while the first song is playing already.
This conticues by replacing the first table when the second song is playing.

If loading times are the main issue then it might also help to create the sycn file as a tiny database file.
That way you don't need the entire file but only allow for enough free time to read the next entry or entries in the databse.

Last idea, that needs the most work IMHO would be to embed the sync info into the music file.
Similar or identical concept as embedding lyrics for a karaoke file.
With this approach you can even include the timing but I am not sure if there is something available in VB to deal with karaoke. :(

Why does it take so long to read or load your sync file?
I can only think of it having a huge file size.
If so, did you ever consider using compression or encoding for it?
Should be possible to create byte or word sized info packets instead of plain text - if you use plain text that is.
Just as an example as I don't know anything about your structure here:
If a single info line of the sync file would look something like this;
Timestamp channel function1 function2 effect
and all these values are either numberical or characters your VB program interprets,
then it could all be transfered into a single HEX value or a Word for the entire line.
Brings a massive size reduction.