Hey,
I'm just getting started with Teensy and i've tried some very simple things, I created an oscillator(waveform->saw) but i can't control the volume of it, or at least i can't tell any difference when i change the values from the mixer or from the osc. Please find attached a picture of teensy. I have an audio output connected to the dac output and ground.
Any help or tips to get started to produce proper output will be great!
Note: i know about the audio shield, but i can't buy one in my country, it will take a while before arrives if i order it online.
Here is the code:
I'm just getting started with Teensy and i've tried some very simple things, I created an oscillator(waveform->saw) but i can't control the volume of it, or at least i can't tell any difference when i change the values from the mixer or from the osc. Please find attached a picture of teensy. I have an audio output connected to the dac output and ground.
Any help or tips to get started to produce proper output will be great!
Note: i know about the audio shield, but i can't buy one in my country, it will take a while before arrives if i order it online.
Here is the code:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=251,461
AudioMixer4 mixer1; //xy=468,472
AudioOutputAnalog dac1; //xy=642,496
AudioConnection patchCord1(waveform1, 0, mixer1, 0);
AudioConnection patchCord2(mixer1, dac1);
// GUItool: end automatically generated code
void setup() {
// put your setup code here, to run once:
AudioMemory(12);
}
void loop() {
// put your main code here, to run repeatedly:
waveform1.begin(WAVEFORM_SAWTOOTH);
waveform1.amplitude(0.1);
waveform1.frequency(440);
mixer1.gain(0,0.5);
//waveform1.amplitude(1);
}