We have several phenomena that contribute to tonogenesis and tone changes. The few below are by no means an exhaustive list:
- loss of final consonants
- devoicing of initial voiced consonants
- vowel length
- glottalisation and other vowel phonation
Combinations of these effects are well attested. But they don't necessarily result in tones (otherwise we would expect French to have a lot of tonal variety going on)!
For the emergence of the tone system of early Mandarin then, we turn to the 中原音韵 Zhōngyuán Yīnyùn, compiled in the year 1324. This is a very valuable source, as it distinguishes the phonologies of the readings for each character based on contemporary verse, rather than the more conservative dictionaries of the same era.
In the 中原音韵, we already see the emergence of the four-tone system of Mandarin, after the effects of initial devoicing and other internal restructuring. One of these effect was the redistribution of the departing tone 入聲 into three of the other tones based on the nature of the original initial:
- voiceless initial (e.g. of 北 and 百) = rising tone 上聲; this is not true in modern standard Mandarin, where the distribution is nigh on random, but it is true of Dalian Mandarin though, apparently.
- voiced sonorant initial (e.g. of 入) = departing tone 去聲, now fourth tone.
- voiced obstruent initial (e.g. of 白) = light level tone 陽平聲, now second tone.
Although the 中原音韵 does not specifically state whether these retained or lost their final consonant stops, there is much contemporary and modern evidence to suggest that the loss of the final consonants was progressive, starting from the north during the Yuan dynasty. To this day, the southernmost Mandarin varieties of Sichuan and the Jianghuai region around Nanjing retain these final glottal stops.
Although we do not have nearly as much documentary evidence for the history of Cantonese, a comparison between modern Cantonese and the Qieyun will reveal the patterns for standard Guangzhou Cantonese very readily, where the aforementioned medieval tone split caused by initial devoicing is quite neat.
What is even more interesting is how most Yue varieties have split the departing tone 入聲 of the historically voiceless initials again, by vowel length. This has caused 北, with a short vowel, to be in a different tone to 百 which has a long vowel. Phonetically, these are all single-pitch tones (high and mid respectively for these historically voiceless initials; low for the historically voiced ones, which lines up with what we would expect cross-linguistically) rather than falling tones. These three departing tones phonetically line up quite well with 陰平、陰去 and 陽去 respectively in Standard Cantonese.
As a side note, in the Yue variety of Bobai, even the historically voiced-initial characters have undergone a tonal split based on vowel length.
Hence the emergence of both Mandarin and Cantonese tone systems is an example of where tonal splitting was more or less independent of the loss of final consonants. Thus 入聲 had no new pitch contours, but developed closely alongside the rest of the tonal system. If you want to see something a bit more complex, you'll have to look at Wenzhounese in Wu and many of the Min varieties.