Yes, that was a very good response and a friendly way to say you didn't want to be searched. The most hostile and defensive people are, the more suspicious cops become. And they're already suspicious to begin with.

He couldn't do a warrantless search if he didn't have probable cause, and that generally consists of his seeing some evidence of weed or drugs, although cannabis odor alone will often stand up in court as sufficient probable cause.

Officers can cite (ticket) you for overly loud music because of city and county noise ordinances, which are basically local laws. They can also cite you if someone else complains about the noise. Generally if the noise seems excessive to the officer--or if it's bothering another citizen--that's enough for you to get a ticket. That's why it's wise to keep it down to a low roar--so you don't arouse suspicion or cause a cop to have to use his own judgement. Having the music at a reasonable level is also a safety issue, too, in many cases. You need to be able to hear other cars screeching their tires or honking at you--or to be able to hear oncoming trains.

Sounds like you had a very lucky afternoon! Good job.