Nanoelectromechanical systems (NEMs) hold promise for a number of scientific and technological applications. In particular, NEMs oscillators have been proposed for use in ultrasensitive mass detection, radio-frequency signal processing, and as a model system for exploring quantum phenomena in macroscopic systems. Perhaps the ultimate material for these applications is a carbon nanotube. They are the stiffest material known, have low density, ultrasmall cross-sections and can be defect-free. Equally important, a nanotube can act as a transistor and thus may be able to sense its own motion. In spite of this great promise, a room-temperature, self-detecting nanotube oscillator has not been realized, although some progress has been made. Here we report the electrical actuation and detection of the guitar-string-like oscillation modes of doubly clamped nanotube oscillators. We show that the resonance frequency can be widely tuned and that the devices can be used to transduce very small forces.