 He then spent about five years in St Petersburg from 1792 as a royal musician before returning to Germany in 1798 with a pension granted by the Emperor Paul I of Russia.From 1800 he resided in Marienburg, where he wrote his autobiography by means of an alphabet which had been invented for him by a college professor in Dresden.In 1823 he moved to Würzburg, where he died on 7 July 1826.