welcome aboard.
most likely what happened is you lost oil pressure for what ever reason and took out a rod bearing.
reasons to loose oil pressure: water in oil from a failed oil cooler or head gasket loss due to overheating, loss of oil from a failed oil cooler, leaky oil pan, etc,
when the alarm first sounded, you should have pulled out of the navigation ways, keyed off and dropped anchor, then assessed your situation.
I suggest checking your oil like NHGuy stated. if it is black, and smells like burnt oil, the motor was overheated. if there is no oil on the stick, you lost oil. if its coffee colored and thick like pudding, you have water in the oil
since the motor started knocking, it will need to come out