Hi there, First of all:

Hi there,

First of all:

A very BiG thanx to all people involved of making/sharing/updating the FastLED code Universe.

I´m currently building up an audio-effector unit which shifts the phase angle of an incoming audio signal and add that to the audio source. (AKA a Phaser)
It has two channels, which can be used chained/independed/parallel or linked (stereo) or one within the feedback line of each other. And also the source signal can also be pre-shifted for true “through-zero” phasing.

Each channel has six stages, which will result in three notches which move within the spectrum of the output audio thus creating the phasing effect.

Nothing special - correct…but…read on…:wink:

Each stage is built around one tube (aka valve) and a variable condensor all pass filter. This is the most straight forward method of creating a phase shift.

I came across some mil-grade three chambered all electrically independend infinite turn rotary condensors.
Each one has a shaft and i combined two together with a dual-shaft stepper motor.

Both stepper motors are controlled via an arduinoUno.

Why i´m boring you with all that ?

The audio path is completely done, by now…but that´s only half of it, as it needs to be controlled…

To have some sort of visual feedback on what the unit is currently doing, i came up with the idea of a two dimensional readout:

A pointer/hand (mounted on a stepper shaft) rotates over a NEOPIXEL ring.

The pointer displays the current phase-angle of one line while the NEOPIXEL ring is colored with a rainbow according to the phase-angle with respect to the other line but at the same current position with respect to the hand. the brighness of each ring shows the feedback intensity.

And vice versa as i have two identical round windows within the housing.
(the housing had been a Philips GM2889 AM/FM signal generator)

I also included a feature what i call “analog convolution” where it´s possible to sum each stage together to an output via a designated fader. As the exact position of a fader is known, it will be (hopefully) also shown as the brightness of a 1/6th of the ring in a certain color rainbow brightness ranging from red to blue. The Phase shift angle can/will also be displayed with a rotation of the rainbow.

To make things easy i´ll use an Uno-chip for every Ring and another Uno-chip for each pointer stepper motor. I´m not a code warrior and need to simplify things as much as possible.

I´ll need to sync them nad have them controlled by a master, which also handles the main-encocder and 128x64 oled display.
Testcode is done and working.

I already done some RGB-LED-coding but the math underneath is not of something i like and even more painful to put into something that a µC will execute i the way i want it to…

And now i come across this library…it has nearly all i need…wrapping bytes…mapped sin(x).

No more lookup tables :slight_smile: i don´t need to write my byte overflow/underrun code…even for non-LED things…it´s like you´ve added some DSP power to the Arduino world.

I really can´t tell how nice that is…and also i found an easy way to light up all those pixels…

If you read until here…thanx…and if you want to see that thing, you may have a look at my INSTAGRAM page and also my YouTube channel.

https://www.instagram.com/tubical/

Many thanx for your interest and time,

TubiCal

Vacuum tubes and FastLED in the same project… I think I’m in heaven.

This is how it looks like right now:

https://www.instagram.com/p/BK3yowFgScE/

this is the main loop code (i mainly played around with the included rainbow palette)

void loop()
{

for (int t= 0; t < 200; t++)
{
for( int i = 0; i < NUM_LEDS; i++)
{
leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
colorIndex += 10;
//FastLED.delay(5);
FastLED.show();
}
}
for (int t= 0; t < 500; t++)
{
for( int i = 0; i < NUM_LEDS; i++)
{
leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
colorIndex += 11;
//FastLED.delay(5);
FastLED.show();
}
}

This is not right, but it helps to get the idea. 180degree is from min to max. the other 180 degrees returning from max to min again. therfore this should be mirrored. i only need twelve colors

is there an easy way to control the speed of the rotation

this would imply that the colorIndex accept foating numbers. to stop the rotation entirely i would need to set it to 255/24=10.625

or do i have to go the hard way:

setting up an array in where i store the 12colors in, and then set a pointer and cycle through it, in order to rotate the colors?
therefore i need to cycle from voilet (=highest phaseshift) to red (lowest phaseshift) or vice versa. if the motor turns in the opposite direction.

This doesn´t need to be super fast, but shooth, especially when the motor turns at low rates like 3 RPM or alike

The motor turns with about 150RPM max.

The motor is a stepper, therefore i know where it is and how many steps it has alreday done. 200 steps pre round gives roughly 8 steps from one pixel to another. i don´t want this to jump it has to fade. And also for all pixels…

I don´t see a way to code this myself.

Also i haven´t find a FastLED reference overview for all instructions.

To get an idea how audio-section works, feel free to watch this:

https://www.instagram.com/p/BKTekt8ARVj/?taken-by=tubical

and may be here as well:

https://www.instagram.com/p/BKOmfNjAyFe/?taken-by=tubical

thanx for stopping by…:slight_smile:

now i´m on my way, as i found this:

https://plus.google.com/b/116363807875890742340/112916219338292742137/posts/2VYNQgD38Pw

and also the “howTo” for the palette:

No wonder why i failed during my various tries…i done it completely wrong…:wink: