Glasses are mostly produced by cooling from the melt. In order to understand the mechanism of melting & glass formation, the enthalpy function & the specific heat capacities of one-component systems have been analysed. In many cases, the specific heat capacity due to atomic vibrations is increased near the melting transition by a contribution due to electronic transitions from low to high energy levels. These electronic transitions, which increase with the temperature, are accompanied by a change of the corresponding wave-functions & of the local charge distributions. The charge distribution changes according to the random time series of the different occupied electronic states & drives the core ions into new positions.