Could you make your code better looking.
For example more comments, more empty lines to seperate different parts and a seperate section for the pin numbers.
// Pin numbers
const int inputPin = 12;
const int ButtonPin = 11;
const int LedPin = 13;
const int AlarmPin = 10;
That makes it better to read, and avoids pin 13 defined twice as you have now.
When you declare global variables, you declare some with a calculation.
float minute_duration=duration / 60;
float gpm=frequency/gpm_constant;
A calculation has to be done in the code, not when declaring a variable.
The variable 'frequency' is a global variable. It is also returned by the function 'get_frequency'. That is confusing. Give it a different name, or use 'frequency' local.
You do the same with 'get_duration' and 'new_duration'.
To make the code better to read, I prefer use floating point numbers when doing floating point calculations.
For example "60.0" instead of "60" and "0.0" instead of "0".
Floating point numbers are almost never exact.
This is weird: "if(new_duration!=old_duration)", since both are floating point numbers. They are almost never the same.
The 'duration' is an integer and 'minute_duration', 'old_duration' and 'new_duration' are float. In the sketch, calculations are done with those numbers, even millis() is used for them.
The result is not accurate and will go wrong in many places.
When using millis(), you have to use unsigned long variables.
The same applies to 'alarm_time;
My suggestion is to make the code better looking. Try to use local variables inside the functions if possible. Rewrite everything you do with millis() and duration.