How are musical instruments grouped?

by the wavelengths they produce

by how they produce pitch

by what they are made of

by their frequency