From what you describe your rights may very well have been violated. Briefly and generally speaking Miranda warnings are required to be given when a suspect is in custody (meaning s/he is not free to leave, whether or not in handcuffs) and the police question the suspect. The only remedy, however, for this violation is suppression of the statements that were obtained. If you were arrested and now have a criminal case pending against you, the best advice is for you to get an attorney ASAP. After reviewing all of the facts and circumstances the attorney will be able to evaluate the course of action to take. Good luck.
You appear to have it right. Once it was clear to you that you could not leave (for example, they use the word arrest), you were due to have your right read. As my colleague points out, however, the "remedy" is having any statement you made suppressed, that is, it cannot be used in court. You should consult a criminal defense attorney. While this aspect may not be useful to you, they may have made other errors.
We do not have a client/attorney relationship until you make an appointment, we discuss your case face to face, I accept a retainer, and we explictly agree to enter into representation.
As the others have explained, as a general rule the police should read you your Miranda warning after you are placed in custody (that is, once you are no longer free to leave), and before asking any questions designed to elicit an incriminating response (interrogation). The police can generally ask non-interrogative questions prior to reading your Miranda rights (such as name, address, etc.), but if the questions appear to be designed to elicit an incriminating response under the circumstances, then your answers should be inadmissible in court if taken in violation of Miranda.
In general, the best option in all such circumstances is to decline to answer any questions without a lawyer present, but given that you've already made statements, you may have legal options to limit the government's ability to use them against you. As others have noted, you should definitely speak with a qualified local attorney to advise you on how to proceed.
Please note that my response to your question is a general answer based on insufficient information to provide sound legal advice on the specific facts of this case. My answer does not constitute legal advice. Further, my response to your question does not create an attorney-client relationship. For proper legal advice, you should consult with a licensed attorney in your jurisdiction with adequate knowledge of the specific subject matter of your case to provide a proper evaluation of the specific facts and legal issues in your case.