Combining SnowSparkle & ColorWipe/chase into one sequence

Hello!

I am still very new to this but I am trying to get a specific animation. I could be approaching this incorrectly, so please correct me or point me in the right direction if i am wrong.

i am still new to coding but i am trying to get a snowsparkle and ColorWipe (or Chase animation) combined. that is i want the snowsparkle active wile the color wipe/chase is running.

I have the code in one sketch but i they only act in sequences one after the other. is there a way to combine and have them both act at the same time?

this is the code i have now. should i look into a different type of code?

#include <Adafruit_NeoPixel.h>
#define PIN 6
#define NUM_LEDS 4
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}

void loop() {
SnowSparkle(0xff, 0x8a, 0x05, 20, random(100,1000));

// colorWipe(0,0,0, 50);
// colorWipe(0xf5,0xd4,0x00, 50);
// colorWipe(0,0,0, 50);
}

void SnowSparkle(byte red, byte green, byte blue, int SparkleDelay, int SpeedDelay) {
setAll(red,green,blue);

int Pixel = random(NUM_LEDS);
setPixel(Pixel,0xff,0xff,0x0);
showStrip();
delay(SparkleDelay);
setPixel(Pixel,red,green,blue);
showStrip();
delay(SpeedDelay);
}

void colorWipe(byte red, byte green, byte blue, int SpeedDelay) {
for(uint16_t i=0; i<NUM_LEDS; i++) {
setPixel(i, red, green, blue);
showStrip();
delay(100);
}
}

void showStrip() {
#ifdef ADAFRUIT_NEOPIXEL_H
// NeoPixel
strip.show();
#endif
#ifndef ADAFRUIT_NEOPIXEL_H
// FastLED
FastLED.show();
#endif
}

void setPixel(int Pixel, byte red, byte green, byte blue) {
#ifdef ADAFRUIT_NEOPIXEL_H
// NeoPixel
strip.setPixelColor(Pixel, strip.Color(red, green, blue));
#endif
#ifndef ADAFRUIT_NEOPIXEL_H
// FastLED
leds[Pixel].r = red;
leds[Pixel].g = green;
leds[Pixel].b = blue;
#endif
}

void setAll(byte red, byte green, byte blue) {
for(int i = 0; i < NUM_LEDS; i++ ) {
setPixel(i, red, green, blue);
}
showStrip();
}

have the code in one sketch but i they only act in sequences one after the other. is there a way to combine and have them both act at the same time?

Yes you need to split up the code for each anamation into a state machine. This is where just a tiny portion of the pattern gets done each time slice.

Lots of examples but here is my take on things
http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html

Please read the how to use this forum sticky post as you post is breaking the rules about how to post code.