Hi
I am working on a project with fluxamasynth, I have books on c++ and arduino.
some ression i do not have the right librarys for this code.
When I try to compile my code it says, "can not find Wprogram.h" and "byte not declared".
I am trying code like this to fix it.
#include <Fluxamasynth.h>
#include <NewSoftSerial.h>
#include <PgmChange.h>
#include <fluxamasynth_nss.h>
#include <newsoftserial.h>
#if (ARDUINO >= 100)
#include <Arduino.h>
#else
#include <WProgram.h>
#endif
Fluxamasynth synth;
#define byte uint8_t
#define c3 48 // define our notes to their midi values
#define e3 52
#define g3 55
#define c4 60
void setup()
{
Serial.begin(9600);
synth.setMasterVolume(100);
}
void loop()
{
byte i=0,n=0,z=0;
for (n=0;n<=1;n++)
{
for(i=0;i<=127;i++)
{
synth.programChange(n*127,0, i);
Serial.print("Bank: ");
Serial.print(n,DEC);
Serial.print(" Sound: ");
Serial.println(i,DEC);
z=random(0,12);
synth.noteOn(0, c3+z, 107);
delay(100);
synth.noteOn(0, e3+z, 107);
delay(100);
synth.noteOn(0, g3+z, 107);
delay(100);
synth.noteOn(0, c4+z, 107);
delay(200);
synth.noteOff(0, c3+z);
synth.noteOff(0, e3+z);
synth.noteOff(0, g3+z);
synth.noteOff(0, c4+z);
delay(200);
}
}
}
Do I need Wprogram.h at all?
I used the code
#if (ARDUINO >= 100)
#include <Arduino.h>
#else
#include <WProgram.h>
#endif