We propose a methodology especially conceived to exploit the musical media in order to vehiculate some aspects in the realm of computational thinking to pupils of the lower secondary school (6 th to 8 th grades). The related activities are based on a visual programming language whose execution generates a melody shown using both its traditionally-notated musical score and its audio reproduction. This language provides the basic programming tools, such as simple and structured variables, iterations and so on. The learning activities are based on challenging small groups of students to solve programming exercises of increasing difficulty.