Change code to work with 20x4 LCD instead of 16x2

Can sort of see how that works however when I place that code in it starts complaining that 'decay' was not declared in this scope, so I commented out decay(1); to see what else it got stuck on and it says 'peak_2' was not declared. Don't know what to declare it as. tried declaring it as an int (probably not correct thing to do) but then it had a problem with lcd.write(peaks[x],0); saying no matching function for call to 'LiquidCrystal::write(float&, int)'.

There was me thinking this was just going to be a case of changing a few values lol