Fibonacci spiral LED sousaphone bell

Hi John, nice job! You will definetely attract attention with this fancy sousaphone!

Cheers,
Paul
 
Great for belting out some light melodies? Nice build, the vibration will test those solder joints thoroughly I think!
 
Thanks guys! I've been bringing it out more often and it's been getting positive responses. https://www.facebook.com/sousaphone/videos/10158805823554813

I'm wondering how I could ditch my laptop and do all my processing on the teensy 3.2

I could use the OctoWS2811 library with an electret condenser mic attached to the teensy, right?

If I could get the effect at 0:20 in the facebook video linked above, I'd be happy.. which libraries could help me achieve that?
 
It probably depends on how complex the software you run on the laptop is.

I haven't done anything with visualizers (or input at all), but if you go to the Audio -> Analysis -> SpectrumAnalyzerBasic example, there is a real simple program for getting audio from the electret microphone you can attach to the audio shield and doing a text bar graph on a simple I2C LCD display. It uses custom characters for the 8 bars. I imagine you could rip the display stuff out and switch to using Octows2811 library.
 
That is a phenomenal project. It's something that should be in a parade.

The T3.2 should be fast enough to do quite a lot with that. It hardly uses any CPU to drive the LEDs (just enough to generate the signal waveforms), so you have a lot of time for generating fancy effects. I had a physics engine with a primitive shader running on mine a few years ago.

If the T3.2 is not fast enough, you can get a T4.0 that will have almost identical pins. My project has two analog in and one PWM out driving a NeoPixel array, and I didn't have to change any of the pins to get the code running on the 4.0. It's physically the same size and fits in the same carrier I printed years ago. It runs at 600MHz and has an FPU, so it's not going to break a sweat doing the effects I see in your YouTube video. I was doing some benchmarks a few days ago and discovered that the T4.0 will cast a float to an int, add a number to a float, and iterate a loop, in 18 nanoseconds.

I would say to try getting your effects running on what you have now, and if the framerate isn't good enough, get a T4.0. Or a 4.1, if you have some notion to load assets (fonts, images, effect params, etc) from an SD card.
 
It probably depends on how complex the software you run on the laptop is.

I haven't done anything with visualizers (or input at all), but if you go to the Audio -> Analysis -> SpectrumAnalyzerBasic example, there is a real simple program for getting audio from the electret microphone you can attach to the audio shield and doing a text bar graph on a simple I2C LCD display. It uses custom characters for the 8 bars. I imagine you could rip the display stuff out and switch to using Octows2811 library.
I'd be willing to sacrifice the complexity of the Max patch in exchange for portability.

the way it works is it generates a 256x256 visualization, then the RGB data are extracted from the proper pixel coordinates corresponding to the fibonacci spiral pattern, and sent to the teensy in the correct order. I imagine the visualizations would look fine at even smaller resolutions. That's something I could test easily..

The Audio Shield and the Octows2811 Adaptor can both be attached to one teensy 3.2, correct?

That is a phenomenal project. It's something that should be in a parade.
Thanks!

The T3.2 should be fast enough to do quite a lot with that. It hardly uses any CPU to drive the LEDs (just enough to generate the signal waveforms), so you have a lot of time for generating fancy effects. I had a physics engine with a primitive shader running on mine a few years ago.
Nice! I’ve been experimenting with some physics effects too, @3:03 in this video: https://www.facebook.com/sousaphone/videos/10158811103029813/

If the T3.2 is not fast enough, you can get a T4.0 that will have almost identical pins. My project has two analog in and one PWM out driving a NeoPixel array, and I didn't have to change any of the pins to get the code running on the 4.0. It's physically the same size and fits in the same carrier I printed years ago. It runs at 600MHz and has an FPU, so it's not going to break a sweat doing the effects I see in your YouTube video. I was doing some benchmarks a few days ago and discovered that the T4.0 will cast a float to an int, add a number to a float, and iterate a loop, in 18 nanoseconds.

I would say to try getting your effects running on what you have now, and if the framerate isn't good enough, get a T4.0. Or a 4.1, if you have some notion to load assets (fonts, images, effect params, etc) from an SD card.
my 2012 macbook maxes out around 120 FPS. I'd be happy with just 60 FPS, though. Fonts and gifs would be nice to have. what code are you using on your 4.0? Would the Audio Shield and Octows2811 Adaptor both fit on one 4.0?



Just bought some WS2812b string lights to try to sew into an actual bell cover.
 
Last edited:
Unfortunately there are pin overlaps between the two boards. You might be able to do it if you don't connect certain pins on the audio board (6, 7, 12, 13, 14, 15). You might have an ordering problem, in that you might need to initialize the audio shield first, then reset the SPI pins back to the defaults, and then initialize the octws2811 board.

It may be simpler if you don't use the audio shield, and instead did analog reads on the microphone instead. Note, I've only used the audio shield for basic usage, and I've never used the octows2811 board. For Teensy 4.0/4.1, it is simpler, because the pins can be reassigned.
 
Teensy 4.0 would be a better choice because you can reassign the LED pins. On Teensy 3.2 the OctoWS2811 pins are fixed and some conflict with the audio shield.
 
what code are you using on your 4.0?
The code I am using started in 2013 as a simple "read DS3231 clock and put some cool scroll text onto a 20x4 display" project, then evolved to support ATMega644, then again to support NeoPixels, then again to run on a Teensy 3.1 with physics and multiple sine-tracking effects to create various displays. Almost all of it was written when I thought it was a fine idea to have 30 C++/header files in the same directory, with stupidly huge functions that had high cyclomatic complexity, and had no notion of test-driven development. I did really cool stuff with this code, but it's such a trash fire that improving it at all is like a root canal. There is far too much tight coupling, and if I breathe on it funny ten things will break for no apparent reason.

I am in the middle of an enormous refactor, where classes now live in separate directories; functions are much, much smaller; and for the first time I am using a very crude TDD framework with C++ code. At some point I will give away at least portions of the code. It's still so bad that I won't build any new features on it because I don't want its high-CRAP nature to infect what I would build on top of it.

This refactor is really making me appreciate every language that isn't C++. I have never had to do so much nose-wiping. The language seems to be built on the notion that what's convenient to people who write compilers and linkers is far more important than what would be convenient to the exponentially greater number of developers who are forced to use them. I would love it if someone would port Rust or another systems programming language that isn't so full of horse s***.
 
I only realized this was possible after soldering the OctoWS and the Teensy. The Audio Board isn't soldered yet. Could this work if I reassign the pins correctly?

20201028_165030.jpg
 
Back
Top