Scale and bias for alpha

Is there are an option to use some kind of bias for alpha channel. I want to blend two images based on alpha data of second image but also need to have adjustable threshold. I.e. ones i want second image become fully transparent at 80% of transparency and smoothly change that value to 60% or 100%… and the same with opaque part…
Thanks.