Vixconfig library can be found on github.com at https://github.com/Jonpro03/DIYC_Arduino
Reads a Vixen2 .vix file and prepares the data for playback on the Arduino.
- Saves track length, event period, and number of channels in <filename>.dat in the root directory of the SD card in the form:
trackLength<eventPeriod<numChannels< unused data EX: 148000<50<32<
TrackLength, eventPeriod and numChannels are stored in ASCII and unused data is raw.
- Saves event values in <filename>.hex in the root directory of the SD card in the form:
So that the first event values for all channels are read in first, followed by the next event for all channels.
- Will check for the existence of <filename>.dat. If found, it will return having done nothing.
- Configuration can be forced by deleting the existing <filename>.dat file before calling vixconfig().
SD.remove("rudolph.dat"); //force config
filenameArray: Name of the sequence file minus the extension placed into a 12 byte char array.
char seqNum1 = "rudolph";
1. All file names must be in 8.3 format. This is the name of my file.vix will not work, but rudolph.vix will.
2. The Track Length must be evenly divisible by the Event Period.
EX. if your track length is 4:30:551 (4 minutes, 30seconds and 551 milliseconds) and your Event Period is 25ms, the configuration will fail.
If your track length was set to the length of your music in Vixen, this will likely happen. Round up sequence time to the next event period, ie 4:30:575 3. No more than 255 channels.
4. Files must be placed in the root of the SD card.
5. Only files created by Vixen 126.96.36.199 are supported
6. Be sure to include the SD library and the Base64 library (included)
Debug messages are printed to the serial port.
ERROR - FILE
The library was unable to find the .vix file you defined. Check the file name at the beginning of the code and ensure the file is in the root directory of the SD card.
ERROR - TRACKLENGTH
The library was unable to find the location of the track length in the .vix file you defined. Ensure you are using Vixen 188.8.131.52 for sequencing. Replace the .vix file.
ERROR - EVENT
The library was unable to find the location of the event period in the .vix file you defined. Try replacing the .vix file on the SD card.
ERROR - CHANNELS
The library was unable to find the location of the number of channels in the .vix file you defined. Try replacing the .vix file on the SD card.
ERROR - REMAINDER
The library detected that the track length is not evenly divisible by the event period. Round up your track length to the nearest event period.
ERROR - VALUES
The library was unable to find the location of the event values in the .vix file you defined. Try replacing the .vix file on the SD card.
ERROR - ORGANIZE
The library was unable to find the location of the event values in the .dat file. Try force-config for this track.