//in setup()
...
stepFiltered = analogRead(STEP_PIN); // Initial input
....
//In the loop()
...
stepFiltered = ((stepFiltered * 3) + analogRead(STEP_PIN)) >> 2;
What this does is a weighted running average of the pressure sensor.
They initialize the pressure in the setup and then At the beginning of each loop they measure what the pressure is, mix that with the previous value so that there are no sudden huge spikes (smoothen the variation) and then use this stepFiltered value in the rest of the program to do interesting effects.
A vibration switch (is it a tilt switch?) will be ON or OFF, not give you a smooth analog value of how much vibration you get so you can only drive from this two values (ON and OFF) for the stepFiltered variable, 0 when not moving and something you need to experiment with when moving, simulating a stable pressure from the old code. Challenge probably is that you will get tons of on off so drive just no effect to some effects many time per seconds, won't look good;
You need to measure somewhat a degree of vibration to have the effects work, for example by measuring how fast your vibration sensor vibrates --> need to build some sort of frequency count analysis, may be by connecting the output of the tilt sensor (0 1) to an interrupt on transition from LOW to HIGH and just count the number in the ISR. Then in the loop use that count as the current measure of vibration (the more vibration, the more interrupts you will get, the bigger the count) for a given loop and reset the count. While you execute the loop the ISR will calculate again the number of vibrations and you can use their very same formula of weighted running average to smoothen the vibration measure.
I've not read the code, may be ISR are used elsewhere or you don't get vibrations really so we would need more infos about the sensor and what you attach your sensor to to help out with ideas