Vixconfig library can be found on github.com at https://github.com/Jonpro03/DIYC_Arduino
Description:
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:
|
1st Channel |
2nd Channel |
3rd Channel |
Nth Channel |
| 1st Event |
FF |
D3 |
A3 |
09 |
| 2nd Event |
00 |
F8 |
7A |
53 |
| 3rd Event |
FF |
08 |
8C |
9F |
| Nth Event |
00 |
49 |
6A |
3D |
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().
EX: Rudolph.vix
Code:
SD.remove("rudolph.dat"); //force config
Syntax:
vixconfig(filenameArray)
Parameters:
filenameArray: Name of the sequence file minus the extension placed into a 12 byte char array.
EX: Rudolph.vix
Code:
char seqNum1[12] = "rudolph";
.
.
.
vixconfig(seqNum1);
Returns:
Nothing.
Usage:
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 2.1.4.0 are supported
6. Be sure to include the SD library and the Base64 library (included)
EX:
Code:
#include <SD.h>
#include <Base64.h>
Errors:
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 2.1.4.0 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.
Bookmarks