SCIENCE!
I made a copy of my DF 0.34.11 folder and removed most of the stone raws except for 1 layer stone of each type (sedimentary, metamorphic, igneous intrusive, and igneous extrusive). These stones were renamed after their types to make reading dfhack easier. The sedimentary stone was also the only flux.
I then generated a world where the volcanic variance was low, and exported the volcanism map from legends mode. On the volcanism map, 255 (white) is high volcanic, whereas 0 (black) is low volcanic. The map had large blobs of light and dark, with grey shades in between.
I then used dfhack prospect to examine sites in the world and compare the layer stones to the volcanism levels from the map. I also tried to note other patterns. The flux finder is not reliable.
Results:
(all results assume dfhack prospect is trustworthy)
1. After surveying the map, I observed that sites in the top 20% of volcanism (200-255) have igneous extrusive, and sites in the bottom 40% of volcanism have sedimentary (0-100).
2. The remainder of the map (100-200 or the upper-middle 40%) can have sedimentary, or metamorphic, or igneous intrusive, but NOT igneous extrusive. The logic here is a bit fuzzy and unknown. I GUESS that the game is randomly choosing from the available stone types, perhaps with some weighting.
3. ALL sites in the world have metamorphic and igneous intrusive underground, below the variable surface layers.
4. Soil depth varies with elevation (i.e. mountain vs swamp), and is not related to stone types.
5. Due to max number of subregions or something, an region might look like it should contain a variety of layer types, but instead the entire region contains one set of layer types. If your volcanic variance is high (perhaps to cause volcanoes to appear worldwide), this might cause regions to assume a higher or lower volcanism than you'd prefer.
If I retested this, I would add a dozen metamorphic stones, but keep only 1 of each of the other stone types, to bias and reveal the presence of random selection at low volcanism.