AVMIDIPlayer has an instance property "duration":
var duration: TimeInterval { get }
So I've written:
let time = midiPlayer?.duration as! TimeInterval
print (time)which runs, but of course I get error messages about 'forced cast from 'TimeInterval?' to 'TimeInterval' (aka 'Double') only unwraps optionals; did you mean to use '!'?
What am I doing wrong? (It's usually not enough or too many question marks....😁 )