We propose an environment for musical constraint solving, in the visual programming language OpenMusic. We describe an implementation of a local search algorithm, called adaptive search, in the musical field. Adaptive search refines the concept of cost function by taking into account the weight of each variable. We show that an incomplete algorithm is well adapted for musical problems. The first experimental results on real musical problems are satisfying, including in terms of computation time. MOTS-CL