Do you have access to an ecm cable and the ecmspy program? If not, I would recommend getting one.
a few things could be the cause
1) Clean the throttle body. Alot of carbon builds up over time and oil residue because of the oil vapors venting into the intake. Use some carb cleaner and swabs to clean it out well. A gun cleaning kit actually works very well for this. You really do not wanna just spray it out, it would and load up the intake with a ton of carb cleaner. * A TPS reset is recommended after doing this (reason for getting the cable and program)
2) From time to time it is needed to reset the TPS (Throttle Positioning Sensor) and I would also reset the AFV to 100% (Adaptive Fuel Value). You will need the ECM cable and program to do this. The TPS can also go bad...Mine did. I knew this by opening the throttle wide open and the sensor was only reading 85% open. Ok, so after you reset it go for a ride and allow the ecm to learn/adjust to the riding environment. You do this by riding through all gears staying within 2000-4000 rpms for 10-20 mins or so. Basically normal riding at low rpms. there is a function in the ecm that will compensate for your fuel mixture and adapt to the environment.
3) Spark Plugs, when have they been replaced? Buells tend to have a rich idle and letting them idle too long can really foul a plug out. A rough idle can be a plug fouling and not getting a good spark. A lot of times a plug starting to go will clear up at higher rpms and then start running like crap once it goes back down to idle. Could just be firing on a weak plug.
4) Your intake could be leaking somewhere. mostly this happens at the intake seals on the manifold. the manual suggests using propane to check. I used carb cleaner when mine were bad. You do this by basically spraying the carb cleaner around the seal area. Do both sides around the entire seal. You will notice that at an idle, as you spray, it will suck in the carb cleaner and want to die or the rpms will rise. depending on the nature of the leak, it could do either. If the idle does NOT change, then you most likely do not have a leak there. Check all the flange bolts (they tend to rattle loose from time to time). Also check the rubber boot in side of the air box that is clamped onto the throttle body. A crack or hole could cause an intake leak by sucking out side air through it.
Take your time and start with the easy things first. Hopefully some of those suggestions will give you a place to start...