According to "Nitro-Explosives: A Practical Treatise" by P. Gerald Sanford (available via Project Gutenberg):-
"The products of perfectly detonated gun-cotton may be expressed by the following equation:-
2C12H14O4(NO3)6 = 18CO + 6CO2 + 14H2O + 12N.
It does not therefore contain sufficient oxygen for the complete combustion of its carbon."
The production of carbon monoxide is dangerous in mining operations in particular, so additional oxygen is provided by mixing a nitrate compound with the guncotton. Various nitrates have been used (nitre, potassium nitrate, barium nitrate, ammonium nitrate).
"The explosive tonite was patented by Messrs Trench, Faure, and Mackie."