Hi Yannick! Thank you for responding so quickly and so helpfully. I've made some progress, and hopefully I can explain what I'm working on just a bit more clearly so that you might be able to help me get over the final hurdle here!
I found Peter Zukerman's page on Adjusting Pitch Contour with Parselmouth-Praat. His methodology for adjusting pitch is to a) open a Manipulation Object, which would be the original synthesized recording; b) Create a Pitch Tier with the values you want to modify for whatever duration; c) synthesize the two using "Replace Pitch Tier" and "Get Resynthesis (Overlap-Add)". All of these functions are callable through Parselmouth. I was able to modify this procedure to obtain a kind of vibrato in the Sound version of the KlattGrid I have already written. Thank you Peter Zukerman!!!!
Now, what I'd like to do is develop a similar methodology that would allow me to choose formant and bandwidth values for sections of my pre-existing KlattGrid, synthesize those formant and bandwidth values into my Manipulation object, and play back the result. I'd use this as the basis for a Reinforcement Learning model that would measure error and adjust the formant and bandwidth values to get closer to a ground-truth recording made by a human.
The code you suggested works perfectly. I can create a Formant Grid and add Formant and Bandwidth values to my heart's content. Here's what it looks like:
manipulation_rig = call(rig_snd, "To Manipulation", 0.0113, 20, 750)
NOTE: #"rig_snd' is the Parselmouth object I created from my original KlattGrid, excerpted from Verdi's Rigoletto.
formant_tier_rig_a = call("Create FormantGrid", "name", 0, 0.731, 2, 350, 300, 60, 50)
NOTE: #create a pitchTier between 0 and 0.8 seconds to focus on the first vowel of the sung excerpt (0.02-0.731 in the KlattGrid-- the other values are just dummy values to fill in the boxes in the Praat menu).
call(formant_tier_rig_a, "Add formant point", 1, 0.02, 300) #creating an artificial first formant value
call(formant_tier_rig_a, "Add formant point", 2, 0.02, 600) #creating an artificial second formant value
All of the above worked thanks to your very helpful suggestions.
HOWEVER I would now want to synthesize these new formant values with the Parselmouth object which I've called "rig_snd" above. Praat does not seem to offer a way to interface a Formant Grid with a Manipulation Object the way it can synthesize a Pitch Tier with a Manipulation Object. Do you know how I might accomplish this?
OH AND BY THE WAY: speaking of how I might measure error, I notice that calling "snd.values" in Parselmouth gives two arrays. Can you tell me what the values in these arrays represents? I'm thinking to use one of them as an error metric but I don't really understand what they are... Let me know!
Thanks again for your time and extremely helpful suggestions! I know you're busy and deeply appreciate any advice you can offer! All the best William