Involved in the biosynthesis of the bicyclic sesquiterpene (S)-beta-macrocarpene. Can use both geranyl diphosphate and farnesyl diphosphate as substrate, but not geranylgeranyl diphosphate. Produces mainly (S)-beta-macrocarpene, but also smaller amounts of beta-bisabolene and (E)-beta-farnesene when used with farnesyl diphosphate as substrate. In the presence of geranyl diphosphate, produces the acyclic monoterpenes beta-myrcene and linalool along with minor amounts of the cyclic compounds limonene, alpha-thujene, sabinene and alpha-terpinolene. May be involved in plant defense. (S)-beta-bisabolene = (S)-beta-macrocarpene (2E,6E)-farnesyl diphosphate = (S)-beta-bisabolene + diphosphate (2E)-geranyl diphosphate = (4S)-limonene + diphosphate (2E)-geranyl diphosphate = beta-myrcene + diphosphate (2E)-geranyl diphosphate = diphosphate + terpinolene (2E)-geranyl diphosphate + H2O = (S)-linalool + diphosphate Binds 3 Mg(2+) or Mn(2+) ions per subunit. Optimum pH is 7.0. Higher pH values favor the formation of (S)-beta-bisabolene. Secondary metabolite biosynthesis; terpenoid biosynthesis. Monomer. Expressed in roots. Not detected in leaves, unless damaged by herbivory or infected by fungi. Up-regulated by herbivory and fungi (e.g. Fusarium spp., C.heterostrophus, F.verticillioides, R.microsporus and A.parasiticus). The Asp-Asp-Xaa-Xaa-Asp/Glu (DDXXD/E) motif is important for the catalytic activity, presumably through binding to Mg(2+). In the presence of magnesium, the product spectrum is shifted toward an increased production of (S)-beta-bisabolene and a decreased production of (S)-beta-macrocarpene. Belongs to the terpene synthase family.