I'm glad to hear you are a coder sebo. Unfortunately I code in assembly which I find the easiest understood and the most straightforward not sure where you use. I have written a cold for the atmel AVR in atmel studio and I have been able to monitor a coils Behavior. It is very strange you bring this up because I was going to post this today anyways. This chip I have program monitors a coil and I have found that to get a coil to resonate you have to send square waves only not triangle not sine waves to get the coil to resonate at itself frequency. I would like to share this in case I died or something and I want this pointed out and I want special attention brought to what I am about to say. So please give the following special attention.
When you pulse a coil and you see a ringing wave after the square wave and they are perfect ringing rigs that is that coils resonant frequency. They can call it ringing all they want and teach that it is indeed ringing and not a resonant frequency but I decline 2 agree with such rubbish. As a tester an experimenter I can tell you the ringing frequency is a self resonance they coil is behaving at.
I will also share a coil does not like for the resonant frequency determined by the Bell ringing to be reproduced back to itself it is stubborn like a mule. I have obtained and recorded a coils resonant frequency and replicated that frequency and played it back to the coil to ring that coil and they coil will refuse to respond. I have found that just about a square wave at a very wide range of frequency will cause any coil to ring in this way especially around 100,000 Hertz of a square wave. This is indeed the latest of my findings and I could have never found this if I would have never programmed the atmel AVR are to help me pinpoint where residents is in a coil so this I do share.
I found the following video on YouTube the very start of the video shows you what ringing I am referring to I'm not sure what the rest of the video is about.