Licht auf bestimmte Musik !!!

Link zum Porgramm: http://www.vixenlights.com/downloads.html
Plugins: sind alle normalerweise dabei
Testdatei für Vixen mit 5 Kanälen: Im Anhang Testdatei5Kanäle.vix
Testdatei für Vixen mit 7 Kanälen: Im Anhang Testdatei7Kanäle.vix
Code für die Ansteuerung von 5 Kanälen:

/*
The purpose of this code is to allow the Arduino to use the 
generic serial output of vixen lights to control 5 channels of LEDs. 
Author: Matthew Strange
Created: 14 October 2010

*/

// Output
int Channel1 = 48;  // red LED,   connected to digital pin 5
int Channel2 = 46;  // green LED, connected to digital pin 6
int Channel3 = 44;  // red LED,  connected to digital pin 9
int Channel4 = 42;  // green LED,  connected to digital pin 10
int Channel5 = 40; // red LED,  connected to digital pin 11



int i = 0;     // Loop counter
int incomingByte[5];   // array to store the 7 values from the serial port

//setup the pins/ inputs & outputs
void setup()
{
  Serial.begin(9600);        // set up Serial at 9600 bps

  pinMode(Channel1, OUTPUT);   // sets the pins as output
  pinMode(Channel2, OUTPUT);
  pinMode(Channel3, OUTPUT);
  pinMode(Channel4, OUTPUT);
  pinMode(Channel5, OUTPUT);
  

}

void loop()
{  // 7 channels are coming in to the Arduino
   if (Serial.available() >= 5) {
    // read the oldest byte in the serial buffer:
    for (int i=0; i<6; i++) {
      // read each byte
      incomingByte[i] = Serial.read();
    }
    
    digitalWrite(Channel1, incomingByte[0]);   // Write current values to LED pins
    digitalWrite(Channel2, incomingByte[1]);   // Write current values to LED pins
    digitalWrite(Channel3, incomingByte[2]);   // Write current values to LED pins
    digitalWrite(Channel4, incomingByte[3]);   // Write current values to LED pins
    digitalWrite(Channel5, incomingByte[4]);
                    
   }
}

Code für die Ansteuerung von 7 Kanälen:

/*
The purpose of this code is to allow the Arduino to use the 
generic serial output of vixen lights to control 5 channels of LEDs. 
Author: Matthew Strange
Created: 14 October 2010

*/

// Output
int Channel1 = 48;  // red LED,   connected to digital pin 5
int Channel2 = 46;  // green LED, connected to digital pin 6
int Channel3 = 44;  // red LED,  connected to digital pin 9
int Channel4 = 42;  // green LED,  connected to digital pin 10
int Channel5 = 40; // red LED,  connected to digital pin 11
int Channel6 = 38;  // green LED,  connected to digital pin 10
int Channel7 = 36;

int i = 0;     // Loop counter
int incomingByte[7];   // array to store the 7 values from the serial port

//setup the pins/ inputs & outputs
void setup()
{
  Serial.begin(9600);        // set up Serial at 9600 bps

  pinMode(Channel1, OUTPUT);   // sets the pins as output
  pinMode(Channel2, OUTPUT);
  pinMode(Channel3, OUTPUT);
  pinMode(Channel4, OUTPUT);
  pinMode(Channel5, OUTPUT);
  pinMode(Channel6, OUTPUT);
  pinMode(Channel7, OUTPUT);
}

void loop()
{  // 7 channels are coming in to the Arduino
   if (Serial.available() >= 7) {
    // read the oldest byte in the serial buffer:
    for (int i=0; i<8; i++) {
      // read each byte
      incomingByte[i] = Serial.read();
    }
    
    digitalWrite(Channel1, incomingByte[0]);   // Write current values to LED pins
    digitalWrite(Channel2, incomingByte[1]);   // Write current values to LED pins
    digitalWrite(Channel3, incomingByte[2]);   // Write current values to LED pins
    digitalWrite(Channel4, incomingByte[3]);   // Write current values to LED pins
    digitalWrite(Channel5, incomingByte[4]);
    digitalWrite(Channel6, incomingByte[5]);   // Write current values to LED pins
    digitalWrite(Channel7, incomingByte[6]);   // Write current values to LED pins
   }
}

So ich hoffe das ich jetzt alles habe....
Ich hoffe ihr probiert das für mich aus ! :wink:

Testdatei5Kanäle.vix (5.18 KB)

Testdatei7Kanäle.vix (6.92 KB)