Hi, my name is Tyler and I am an experienced part-time mobile mechanic.
So if we look at the systems you describe, the noise seems to occur either when you accelerate (and engine revs increase) or when changing gear (and revs drop). This would indicate more of a mechanical issue the engine or gearbox than any electrical issues. You mention the engine is running rough, would you say it is almost like the engine is skipping a beat, or vibrating alot? if so this is likely a misfire, and would trigger the engine warning light.
When an engine misfires it will typically through a p030x error code, where x is the cylinder of the engine that is misfiring. For example a misfire on cylinder 1 would be p0301. The most common cause of this is a faulty coil pack or spark plugs. Most mechanics will typically fit new ones of these without any additional testing. Personally I would recommend carrying out a compression or leak down test on the cylinder to ensure it has adequate compression. Testing the wiring of the coil packs and checking the engine timing before sending the ECU away for repair as all these can cause a misfire as well and can be done "in house" by the garage.
Both the compression test and the wiring test are minimally invasive, should not take to long to do and will tell you a lot about the vehicles current condition.
the coil pack wiring will have a power and ground wire (to create an electrical circuit which powers the coil pack) as well as a signal wire. This signal wire connects to the ecu, and the ecu essentially sends an electrical pulse down this wire to tell the coil pack/spark plug to ignite the fuel in the combustion cylinder at the appropriate time. The good news is that this "signal" produces a voltage wave, which we can measure with an oscilloscope and compare with the waveform from the manufacturers data (haynes pro, autodata etc.). If this waveform is okay then we know that the ECU would be sending the signal at the correct time and thus should be working (assuming engine timing is checked first).
If we don,t see this waveform then it could either be the signal wire or ECU which is damaged. The wire should then be tested using a "continuity" test, the multi meter will beep if the wire is intact. an alternative method is measuring the wires resistance which is the exact same procedure, just a different setting on the multi-meter.
I hope this helps,
kind regards,
Tyler Monks