Hello, I am using a windows 10 with 64 bits, a Teensy 4.0 card and an Audio board.
I use the SimpleWave.ino example with one of the files found in the soundfontdecoder bank, Celesta, to start and understand. Then I would like to use files created with Polyphone. So I replace Flute_100kbyte with celesta and include celesta_samples.h and .cpp
I followed the tutorial of installation and the video on Youtube
I have this error message:
So as indicated in the tutorial, I include the file in my library, AudioSynthWavetable.h and AudioSynthWavetable.cpp, and I have this error:
When I go to this address, however, I have the AudioSynthWavetable.h file present in the folder C: \ Users \ US ~ 1 \ AppData \ Local \ Temp \ arduino_build_514752 \ sketch \AudioSynthWavetable.h
An idea ?
Thank you in advance for your help.
I use the SimpleWave.ino example with one of the files found in the soundfontdecoder bank, Celesta, to start and understand. Then I would like to use files created with Polyphone. So I replace Flute_100kbyte with celesta and include celesta_samples.h and .cpp
Code:
/* Play a flute sound when a button is pressed.
Connect a pushbutton to pin 1 and pots to pins A2 & A3.
The audio tutorial kit is the intended hardware:
https://www.pjrc.com/store/audio_tutorial_kit.html
Without pots connected, this program will play a very
strange sound due to rapid random fluctuation of the
pitch and volume!
Requires Teensy 3.2 or higher.
Requires Audio Shield: https://www.pjrc.com/store/teensy3_audio.html
*/
#include <Bounce.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#include "celesta_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;
// Bounce objects to read pushbuttons
Bounce button1 = Bounce(1, 15); // 15 ms debounce time
void setup() {
Serial.begin(115200);
pinMode(1, INPUT_PULLUP);
AudioMemory(20);
sgtl5000_1.enable();
sgtl5000_1.volume(0.8);
mixer.gain(0, 0.7);
wavetable.setInstrument(celesta);
wavetable.amplitude(1);
}
bool playing = false;
void loop() {
// Update all the button objects
button1.update();
//Read knob values
int knob1 = analogRead(A3);
int knob2 = analogRead(A2);
//Get frequency and gain from knobs (Flute range is 261 to 2100 Hz)
float freq = 261.0 + (float)knob1/1023.0 * (2100.0 - 261.0);
float gain = (float)knob2/1023.0;
//Set a low-limit to the gain
if (gain < .05) gain = .05;
if (button1.fallingEdge()) {
if (playing) {
playing = false;
wavetable.stop();
}
else {
playing = true;
wavetable.playFrequency(freq);
wavetable.amplitude(gain);
}
}
wavetable.amplitude(gain);
wavetable.setFrequency(freq);
}
I followed the tutorial of installation and the video on Youtube
I have this error message:
Code:
Arduino: 1.8.12 (Windows 10), TD: 1.52-beta1, Card: "Teensy 4.0, Serial, 600 MHz, Faster, US English"
In file included from C: \ Users \ US ~ 1 \ AppData \ Local \ Temp \ arduino_build_157559 \ sketch \ celesta_samples.cpp: 1: 0:
C: \ Users \ US ~ 1 \ AppData \ Local \ Temp \ arduino_build_157559 \ sketch \ celesta_samples.h: 3: 33: fatal error: AudioSynthWavetable.h: No such file or directory
compilation terminated.
Several libraries found for "SD.h"
Used: C: \ Users \ User \ Downloads \ arduino-1.8.12-windows \ arduino-1.8.12 \ hardware \ teensy \ avr \ libraries \ SD
Not used: C: \ Users \ User \ Downloads \ arduino-1.8.12-windows \ arduino-1.8.12 \ libraries \ SD
Compilation error for the Teensy 4.0 card
This report could be more detailed with
the option "Display the detailed results of the compilation"
activated in File -> Preferences.
So as indicated in the tutorial, I include the file in my library, AudioSynthWavetable.h and AudioSynthWavetable.cpp, and I have this error:
Code:
Arduino : 1.8.12 (Windows 10), TD: 1.52-beta1, Carte : "Teensy 4.0, Serial, 600 MHz, Faster, US English"
In file included from C:\Users\Utilisateur\Documents\Arduino\TutoWavetable\TutoWavetable.ino:22:0:
Plusieurs bibliothèque trouvées pour "SD.h"
Utilisé : C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\SD
C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_514752\sketch\celesta_samples.h:3:33: fatal error: AudioSynthWavetable.h: No such file or directory
Non utilisé : C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\libraries\SD
compilation terminated.
Erreur de compilation pour la carte Teensy 4.0
Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.
When I go to this address, however, I have the AudioSynthWavetable.h file present in the folder C: \ Users \ US ~ 1 \ AppData \ Local \ Temp \ arduino_build_514752 \ sketch \AudioSynthWavetable.h
An idea ?
Thank you in advance for your help.
Last edited: