We construct a new family of affine
W-algebras
parameterized by partitions
and
associated with the centralizers of nilpotent elements in
. The new family unifies a few known classes of
W-algebras. In particular, for the column-partition
we recover the affine
W-algebras
of Kac, Roan and Wakimoto,
... [Show full abstract] associated with nilpotent elements of type . Our construction is based on a version of the BRST complex of the quantum Drinfeld-Sokolov reduction. We show that the application of the Zhu functor to the vertex algebras yields a family of generalized finite W-algebras which we also describe independently as associative algebras.