Put the butter in a 3-quart saucier and melt over medium heat. Add the onion, salt, and rosemary, and sweat until the onion is translucent, about 5 minutes. Remove from heat.
Meanwhile, place a paper bowl upside down in the middle of a large mixing bowl. If you have an old-fashioned corn-on-the-cob-holder, insert one in the skinny end and place the ear vertically on the small bowl. If not, carefully hold the corn cob the same way. Using a chef's knife, cut off the kernels, slicing from top to bottom. When all the kernels have been removed, turn the knife around and use the spine of the bade to carefully scrape out any remaining pulp. Repeat with the rest of the ears of corn.
Add the corn, sugar, and turmeric to the saucier, return to medium-high heat, and continue cooking until the liquid from the corn thickens a bit, about 2 minutes. Sprinkle the cornmeal onto the corn mixture and stir to combine. Add the cream, reduce heat to medium, and cook until the corn is very soft, 2 to 3 minutes.
Fish out the rosemary, season with pepper and additional salt, if desired, and serve as a side to just about anything, or use to make cornbread.