Teensy-Audio Library 1.57 for PlatformIO

Hello Paul.Stoffregen and the PJRC team,

You are the author of the Teensy Audio Library v1.57

Is there a possibility to get your intriguing library to be usable
via PlatformIO and VSCode?

- the last available PlatformIO version is v1.3,
- while the latest version is v1.57

The Arduino environment is setting me very hard limits
and I would like to switch to PlatformIO.

I am in the early phase develop a really flexible small Audio synthesizer for the Teensy4.1.

Yours.
Frank Haferkorn, OatGrain-InnovationS
 
OatGrain:
Do remember that Visual Micro is only for Windows, so if you use another system it will not work.

I have been using PlatformIO now for a long time, since embedXcode on MacOS died and have been very happy with it. I am currently using Teensy 1.57 as Paul has not released 1.58.
You don't need get anything from PJRC to run this in PlatformIO.

Regards,
Ed
 
Hello Ed (sbfreddie)

I did not mention... I use VSCode on Linux , so I need PlatfromIO.
So , many thanks you for your answer.

Q: Can you give me a tip for the correct my platformio.ini settings?

My current setup is this the following...

Code:
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
lib_extra_dirs = ~/Documents/Arduino/libraries
platform_packages =
    platformio/framework-arduinoteensy@^1.157.220801
    platformio/toolchain-gccarmnoneeabi@^1.100301.220327
lib_deps_builtin =
    SPI
    Wire
    Audio


The log info is the following.... It looks like the library I use is Audio@1.3
Code:
Processing teensy41 (platform: teensy; board: teensy41; framework: arduino)
---------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy (4.17.0) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES: 
 - framework-arduinoteensy @ 1.157.220801 (1.57) 
 - tool-teensy @ 1.157.0 (1.57) 
 - toolchain-gccarmnoneeabi @ 1.100301.220327 (10.3.1)
Converting main.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 92 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Audio @ 1.3
|   |-- SerialFlash
|   |   |-- SPI @ 1.0
|   |-- Wire @ 1.0
|   |-- SD @ 2.0.0
|   |   |-- SdFat @ 2.1.2
|   |   |   |-- SPI @ 1.0
|   |-- SPI @ 1.0
|-- SD @ 2.0.0
|   |-- SdFat @ 2.1.2
|   |   |-- SPI @ 1.0
|-- SPI @ 1.0
|-- Wire @ 1.0

Can you give me a tip how to load the correct teensy Audio Library v.1,57 (not the wrong v1.3)
 
The version of the audio library included with TD 1.57 is indeed 1.3

The code being used should be found in ~/.platformio/packages/framework-arduinoteensy/libraries/Audio

library.properties contains
Code:
name=Audio
version=1.3
author=Paul Stoffregen
maintainer=Paul Stoffregen
sentence=Teensy Audio Library - Flexible, High Quality Audio Processing
paragraph=A toolkit for building streaming audio projects, featuring Polyphonic Playback, Recording, Synthesis, Analysis, Effects, Filtering, Mixing, Multiple Simultaneous Inputs & Outputs, Flexible Internal Signal Routing, Automatic Streaming 16 bits, 44.1 kHz as the Arduino Sketch Runs.
category=Signal Input/Output
url=http://www.pjrc.com/teensy/td_libs_Audio.html
architectures=*
 
OatGrain:
This is what my Platformio.ini looks like:

Code:
; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:stable]
platform = https://github.com/platformio/platform-teensy.git
;
board = teensy41
;
framework = arduino
;
;[env:teensy41]
;platform = teensy
;
;platform_packages =
  ;toolchain-gccarmnoneeabi@file:///Users/freddie/pio/teensy_1.58-beta3/toolchain-gccarmnoneeabi
  ;framework-arduinoteensy@file:///Users/freddie/pio/teensy_1.58-beta3/framework-arduinoteensy
  ;tool-teensy@file:///Users/freddie/pio/teensy_1.58-beta3/tool-teensy
;
;framework = arduino
;board = teensy41
build_flags =
    -Wl,--print-memory-usage
    -g
    -D USB_MTPDISK_SERIAL

;build_type = release
;
#lib_extra_dirs = ~/Documents/Arduino/libraries
;
check_tool = cppcheck
check_flags = --enable=all

extra_scripts = 
	pre:version_increment_pre.py
	post:version_increment_post.py
;
;board_build.f_cpu = 450000000

Regards,
Ed
 
OatGrain:
I checked in my .platformio folder for teensy versions 1.56, 1.57 and 1.58beta and they all have the same version of the Audio Library (1.3).

It looks like the Audio library has not been changed in quite awhile.

Regards
Ed
 
For anybody from the future finding this: The trick is to NOT add the Audio Library to your platformio.ini since it is included in the Teensy platform by default.

Details: You will actually find the Audio Library in the platformio library registry, and you can happily add it to your project, but this is an older version of the library. What makes this confusing is that Paul never updated the version number. So the version of the Audio library has been "1.3" since 2015, even though there have been quite a few changes since then.
 
Back
Top