Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: Soundfontdecoder compatible with Teensy 4.0?

  1. #1
    Junior Member
    Join Date
    Apr 2020
    Location
    France
    Posts
    19

    Soundfontdecoder compatible with Teensy 4.0?

    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
    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 by SPIRIT; 05-14-2020 at 02:01 PM.

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,590
    First thing would be to do as suggested :
    Ce rapport pourrait être plus détaillé avecl'option "Afficher les résultats détaillés de la compilation"
    activée dans Fichier -> Préférences.
    and then to post the details here ;-)

  3. #3
    Junior Member
    Join Date
    Apr 2020
    Location
    France
    Posts
    19
    It' true, it's more complete. Could it be a problem of compatibility or access to the file? Tanks.

    Code:
    Arduino : 1.8.12 (Windows 10), TD: 1.52-beta1, Carte : "Teensy 4.0, Serial, 600 MHz, Faster, US English"
    
    C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\tools-builder -tools C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\libraries -libraries C:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10812 -build-path C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_592291 -warnings=none -build-cache C:\Users\UTILIS~1\AppData\Local\Temp\arduino_cache_321507 -verbose C:\Users\Utilisateur\Documents\Arduino\TutoWavetable\TutoWavetable.ino
    C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\arduino-builder -compile -logger=machine -hardware C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\tools-builder -tools C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\libraries -libraries C:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10812 -build-path C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_592291 -warnings=none -build-cache C:\Users\UTILIS~1\AppData\Local\Temp\arduino_cache_321507 -verbose C:\Users\Utilisateur\Documents\Arduino\TutoWavetable\TutoWavetable.ino
    Using board 'teensy40' from platform in folder: C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr
    Using core 'teensy4' from platform in folder: C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr
    Detecting libraries used...
    "C:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_592291\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for Bounce.h: [Bounce]
    ResolveLibrary(Bounce.h)
      -> candidates: [Bounce]
    "C:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Bounce" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_592291\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for Audio.h: [Audio@1.3]
    ResolveLibrary(Audio.h)
      -> candidates: [Audio@1.3]
    "C:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Audio" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_592291\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for SPI.h: [SPI@1.0]
    ResolveLibrary(SPI.h)
      -> candidates: [SPI@1.0]
    "C:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_592291\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for SD.h: [SD@1.2.4 SD@1.2.2]
    ResolveLibrary(SD.h)
      -> candidates: [SD@1.2.4 SD@1.2.2]
    "C:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\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_592291\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for SerialFlash.h: [SerialFlash@0.5]
    ResolveLibrary(SerialFlash.h)
      -> candidates: [SerialFlash@0.5]
    "C:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SD" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SerialFlash" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_592291\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for Wire.h: [Wire@1.0]
    ResolveLibrary(Wire.h)
      -> candidates: [Wire@1.0]
    "C:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SD" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\SerialFlash" "-IC:\\Users\\Utilisateur\\Downloads\\arduino-1.8.12-windows\\arduino-1.8.12\\hardware\\teensy\\avr\\libraries\\Wire" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_592291\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for AudioSynthWavetable.h: []
    In file included from C:\Users\Utilisateur\Documents\Arduino\TutoWavetable\TutoWavetable.ino:22:0:
    ResolveLibrary(AudioSynthWavetable.h)
    
      -> candidates: []
    Plusieurs bibliothèque trouvées pour "SD.h"
    C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_592291\sketch\celesta_samples.h:3:33: fatal error: AudioSynthWavetable.h: No such file or directory
    
    Utilisé : C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\SD
    compilation terminated.
    
    Non utilisé : C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\libraries\SD
    Utilisation de la bibliothèque Bounce prise dans le dossier : C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\Bounce (legacy)
    Utilisation de la bibliothèque Audio version 1.3 dans le dossier: C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\Audio 
    Utilisation de la bibliothèque SPI version 1.0 dans le dossier: C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\SPI 
    Utilisation de la bibliothèque SD version 1.2.2 dans le dossier: C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\SD 
    Utilisation de la bibliothèque SerialFlash version 0.5 dans le dossier: C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\SerialFlash 
    Utilisation de la bibliothèque Wire version 1.0 dans le dossier: C:\Users\Utilisateur\Downloads\arduino-1.8.12-windows\arduino-1.8.12\hardware\teensy\avr\libraries\Wire 
    Erreur de compilation pour la carte Teensy 4.0

  4. #4
    Junior Member
    Join Date
    Apr 2020
    Location
    France
    Posts
    19
    I saw that I had 2 versions of Arduino, so 2 files. So I deleted the one that was present in the download folder and use the one in Programs (x86). I have a 64-bit version of Windows, does that change anything?

    Code:
    Arduino : 1.8.12 (Windows 10), TD: 1.52-beta3, Carte : "Teensy 4.0, Serial, 600 MHz, Faster, US English"
    
    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10812 -build-path C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_87683 -warnings=none -build-cache C:\Users\UTILIS~1\AppData\Local\Temp\arduino_cache_318162 -verbose C:\Users\Utilisateur\Documents\Arduino\TutoWavetable\TutoWavetable.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Utilisateur\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Utilisateur\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Utilisateur\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10812 -build-path C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_87683 -warnings=none -build-cache C:\Users\UTILIS~1\AppData\Local\Temp\arduino_cache_318162 -verbose C:\Users\Utilisateur\Documents\Arduino\TutoWavetable\TutoWavetable.ino
    Using board 'teensy40' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Using core 'teensy4' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Detecting libraries used...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_87683\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for Bounce.h: [Bounce]
    ResolveLibrary(Bounce.h)
      -> candidates: [Bounce]
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Bounce" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_87683\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for Audio.h: [Audio@1.3]
    ResolveLibrary(Audio.h)
      -> candidates: [Audio@1.3]
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Audio" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_87683\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for SPI.h: [SPI@1.0]
    ResolveLibrary(SPI.h)
      -> candidates: [SPI@1.0]
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_87683\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for SD.h: [SD@1.2.4 SD@1.2.2]
    ResolveLibrary(SD.h)
      -> candidates: [SD@1.2.4 SD@1.2.2]
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SD" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_87683\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for SerialFlash.h: [SerialFlash@0.5]
    ResolveLibrary(SerialFlash.h)
      -> candidates: [SerialFlash@0.5]
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SD" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SerialFlash" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_87683\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for Wire.h: [Wire@1.0]
    ResolveLibrary(Wire.h)
      -> candidates: [Wire@1.0]
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Bounce" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Audio" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SD" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\SerialFlash" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\Wire" "C:\\Users\\UTILIS~1\\AppData\\Local\\Temp\\arduino_build_87683\\sketch\\TutoWavetable.ino.cpp" -o nul
    Alternatives for AudioSynthWavetable.h: []
    In file included from C:\Users\Utilisateur\Documents\Arduino\TutoWavetable\TutoWavetable.ino:22:0:
    ResolveLibrary(AudioSynthWavetable.h)
    
      -> candidates: []
    C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_87683\sketch\celesta_samples.h:3:33: fatal error: AudioSynthWavetable.h: No such file or directory
    
    Plusieurs bibliothèque trouvées pour "SD.h"
    compilation terminated.
    
    Utilisé : C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
    Non utilisé : C:\Program Files (x86)\Arduino\libraries\SD
    Utilisation de la bibliothèque Bounce prise dans le dossier : C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Bounce (legacy)
    Utilisation de la bibliothèque Audio version 1.3 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio 
    Utilisation de la bibliothèque SPI version 1.0 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI 
    Utilisation de la bibliothèque SD version 1.2.2 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD 
    Utilisation de la bibliothèque SerialFlash version 0.5 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SerialFlash 
    Utilisation de la bibliothèque Wire version 1.0 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire 
    Erreur de compilation pour la carte Teensy 4.0

  5. #5
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,590
    The error messages seem to point towards a problem (among still multiple library instances present on your hard disk -> fais le ménage !!!) in celesta_samples.h, line 3.

    I'd do a differential diagnosis by checking if the same sketch works with the original flute sample.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,061
    The reference to AudioSynthWavetable.h probably means these wavetable files were created with a very old version of SoundfontDecoder, from before Teensyduino 1.44.

    Probably your best option is to create new .cpp and .h files with the latest SoundfontDecoder.

    https://github.com/PaulStoffregen/SoundfontDecoder

    Going back to the very old version probably will not work, because Teensy 4 didn't exist at that time. But if you want to try anyway, the old Teensyduino versions are still on the server. Just copy the download location, then paste the URL and edit the 3 digit number to the old version you want.

    Back then the wavetable stuff was a separate library. Here's the original source.

    https://github.com/TeensyAudio/Wavetable-Synthesis

    There might be some way to use this old version with the latest audio library. Perhaps start by deleting the synth_wavetable.h and synth_wavetable.cpp files from the library, and edit Audio.h to not include synth_wavetable.h.

    But running the latest SoundfontDecoder to generate files compatible with the modern audio library is probably the easiest and best path.

  7. #7
    Junior Member
    Join Date
    Apr 2020
    Location
    France
    Posts
    19
    Thank you for your help. I just learned to use Python and it works. I made with python a new version of SoundfontDecoder.exe. Now the code is different with the .h and .cpp files. and it looks ok. But now I have a different error:
    SimpleWavetableTEST.ino.elf section `.data 'will not fit in region` DTCM'
    or :
    SimpleWavetableTEST.ino.elf section `.bss 'is not within region` DTCM'

    Code:
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_828023/SimpleWavetableTEST.ino.elf section `.data' will not fit in region `DTCM'
    
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: address 0x200ed2c0 of C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_828023/SimpleWavetableTEST.ino.elf section `.bss' is not within region `DTCM'
    
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: address 0x200ed2c0 of C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_828023/SimpleWavetableTEST.ino.elf section `.bss' is not within region `DTCM'
    
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: region `DTCM' overflowed by 447168 bytes
    
    collect2.exe: error: ld returned 1 exit status
    
    Utilisation de la bibliothèque Bounce prise dans le dossier : C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Bounce (legacy)
    Utilisation de la bibliothèque Audio version 1.3 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio 
    Utilisation de la bibliothèque SPI version 1.0 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI 
    Utilisation de la bibliothèque SD version 1.2.2 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD 
    Utilisation de la bibliothèque SerialFlash version 0.5 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SerialFlash 
    Utilisation de la bibliothèque Wire version 1.0 dans le dossier: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire 
    Erreur de compilation pour la carte Teensy 4.0

  8. #8
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    7,089
    Try to add PROGMEM to the array with the data. And make it const (don't know if it is already)

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,061
    Oh, yeah, that python code should be updated to put PROGMEM into the generated files.

    You might also need to include Arduino.h, since PROGMEM won't be defined by default in a .cpp file.

    Here are examples of how the files should look:

    https://github.com/PaulStoffregen/Au...mpet_samples.h

    https://github.com/PaulStoffregen/Au...et_samples.cpp

  10. #10
    Junior Member
    Join Date
    Apr 2020
    Location
    France
    Posts
    19
    Thanks for your help. PROGMEM was indeed missing in the .cpp file and .h is correct

    Code:
    #include "flut_samples.h"
    
    PROGMEM
    
    static const uint32_t sample_0_flut_flut1[80000] = {
    Code:
    #pragma once
    #include <Audio.h>
    extern const AudioSynthWavetable::instrument_data flut;


    but I still get the same error. However it compiles with Teensy 3.6 but not with Teensy 4.0.

    Code:
    Arduino : 1.8.12 (Windows 10), TD: 1.52-beta3, Carte : "Teensy 4.0, Serial, 600 MHz, Faster, US English"
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\input_i2s.cpp: In static member function 'static void AudioInputI2S::isr()':
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\input_i2s.cpp:125:52: warning: invalid conversion from 'const void*' to 'void*' [-fpermissive]
    
        arm_dcache_delete(src, sizeof(i2s_rx_buffer) / 2);
    
                                                        ^
    
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/core_pins.h:32:0,
    
                     from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/wiring.h:39,
    
                     from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/WProgram.h:45,
    
                     from C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_289786\pch\Arduino.h:6:
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/imxrt.h:9124:20: note:   initializing argument 1 of 'void arm_dcache_delete(void*, uint32_t)'
    
     static inline void arm_dcache_delete(void *addr, uint32_t size)
    
                        ^
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\input_i2s2.cpp: In static member function 'static void AudioInputI2S2::isr()':
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\input_i2s2.cpp:106:53: warning: invalid conversion from 'const void*' to 'void*' [-fpermissive]
    
        arm_dcache_delete(src, sizeof(i2s2_rx_buffer) / 2);
    
                                                         ^
    
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/core_pins.h:32:0,
    
                     from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/wiring.h:39,
    
                     from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/WProgram.h:45,
    
                     from C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_289786\pch\Arduino.h:6:
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/imxrt.h:9124:20: note:   initializing argument 1 of 'void arm_dcache_delete(void*, uint32_t)'
    
     static inline void arm_dcache_delete(void *addr, uint32_t size)
    
                        ^
    
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_289786/SimpleWavetableTEST.ino.elf section `.data' will not fit in region `DTCM'
    
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: address 0x2009f2c0 of C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_289786/SimpleWavetableTEST.ino.elf section `.bss' is not within region `DTCM'
    
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: address 0x2009f2c0 of C:\Users\UTILIS~1\AppData\Local\Temp\arduino_build_289786/SimpleWavetableTEST.ino.elf section `.bss' is not within region `DTCM'
    
    c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: region `DTCM' overflowed by 127680 bytes
    
    collect2.exe: error: ld returned 1 exit status
    
    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.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,061
    region `DTCM' overflowed by 127680 bytes
    One or more is probably still missing PROGMEM

  12. #12
    Junior Member
    Join Date
    Apr 2020
    Location
    France
    Posts
    19
    Hello, that was it! PROGMEM were missing before static const. Now it works for all my SF2 files.
    Thank you very much for your help. I have a lot of fun with my Teensy 4.0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •