Hello Everybody!
Very excited - it s my first post! I am using the trellis board/ Teensy 3.2 and the Audioshield. I wanna built a simple Sampler like: one trellis button turns on one sample (as an add on for my bass guitar)
I wrote this simple sketch to check if trellis triggers anything. It doesnt work
Is it an i2c issue or simply "newbiness"
here it is
#include <Bounce.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#include "Flute_100kbyte_samples.h"
AudioSynthWavetable wavetable;
AudioOutputI2S i2s1;
AudioMixer4 mixer;
AudioConnection patchCord1(wavetable, 0, mixer, 0);
AudioConnection patchCord2(mixer, 0, i2s1, 0);
AudioConnection patchCord3(mixer, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1;
// Trellis Zeug
#include <Wire.h>
#include "Adafruit_Trellis.h"
Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis = Adafruit_TrellisSet(&matrix0);
#define NUMTRELLIS 1
#define numKeys (NUMTRELLIS * 16)
#define INTPIN A2
void setup() {
Serial.begin(115200);
Wire.setSCL(16); // set i2c communication to other pins
Wire.setSDA(17); // set i2c communication to other pins
Wire.begin();// set i2c communication to other pins
Serial.println("Trellis Demo");
// begin() with the addresses of each panel in order
trellis.begin(0x70);
for (uint8_t i=0; i<numKeys; i++) {
trellis.setLED(i);
trellis.writeDisplay();
delay(50);
}
// then turn them off
for (uint8_t i=0; i<numKeys; i++) {
trellis.clrLED(i);
trellis.writeDisplay();
delay(50);
}
AudioMemory(20);
sgtl5000_1.enable();
sgtl5000_1.volume(0.8);
mixer.gain(0, 0.7);
wavetable.setInstrument(Flute_100kbyte);
wavetable.amplitude(1);
}
void loop() {
delay(30);
if (trellis.justPressed(0))
{
wavetable.playFrequency(261.0 );
wavetable.amplitude(0.7);
}
}
More failures form my past:
I tried the i2c on the other pins too.
I tired playing something form the SD.
.h and .cpp data is from Examples-> Audio -> synthesis -> Wavetable -> SimpleWavetable
Can anybody safe me from insanity?
<3
Very excited - it s my first post! I am using the trellis board/ Teensy 3.2 and the Audioshield. I wanna built a simple Sampler like: one trellis button turns on one sample (as an add on for my bass guitar)
I wrote this simple sketch to check if trellis triggers anything. It doesnt work
Is it an i2c issue or simply "newbiness"
here it is
#include <Bounce.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#include "Flute_100kbyte_samples.h"
AudioSynthWavetable wavetable;
AudioOutputI2S i2s1;
AudioMixer4 mixer;
AudioConnection patchCord1(wavetable, 0, mixer, 0);
AudioConnection patchCord2(mixer, 0, i2s1, 0);
AudioConnection patchCord3(mixer, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1;
// Trellis Zeug
#include <Wire.h>
#include "Adafruit_Trellis.h"
Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis = Adafruit_TrellisSet(&matrix0);
#define NUMTRELLIS 1
#define numKeys (NUMTRELLIS * 16)
#define INTPIN A2
void setup() {
Serial.begin(115200);
Wire.setSCL(16); // set i2c communication to other pins
Wire.setSDA(17); // set i2c communication to other pins
Wire.begin();// set i2c communication to other pins
Serial.println("Trellis Demo");
// begin() with the addresses of each panel in order
trellis.begin(0x70);
for (uint8_t i=0; i<numKeys; i++) {
trellis.setLED(i);
trellis.writeDisplay();
delay(50);
}
// then turn them off
for (uint8_t i=0; i<numKeys; i++) {
trellis.clrLED(i);
trellis.writeDisplay();
delay(50);
}
AudioMemory(20);
sgtl5000_1.enable();
sgtl5000_1.volume(0.8);
mixer.gain(0, 0.7);
wavetable.setInstrument(Flute_100kbyte);
wavetable.amplitude(1);
}
void loop() {
delay(30);
if (trellis.justPressed(0))
{
wavetable.playFrequency(261.0 );
wavetable.amplitude(0.7);
}
}
More failures form my past:
I tried the i2c on the other pins too.
I tired playing something form the SD.
.h and .cpp data is from Examples-> Audio -> synthesis -> Wavetable -> SimpleWavetable
Can anybody safe me from insanity?
<3