Metronome: a device used by musicians that marks time at a selected rate by giving a regular tick. If you've ever felt that you needed a metronome in Impromptu, here is a little Scheme object that can do that job for you.
Live coding with Impromptu is an exciting experience, but keeping time while building musical patterns on the fly can be challenging. Having an audible metronome click helps maintain rhythmic accuracy and makes it easier to layer multiple musical elements coherently.
make-metroclickThe make-metroclick function returns a closure that can be called with a specific time in beats. It plays a sound for each beat and marks the downbeat (the first beat of each measure) using a different sound, making it easy to track where you are in the musical phrase.
This is particularly useful for keeping track of downbeats while you compose, or for experimenting with rhythmic figures before composing a more complex drum kit section. The distinct downbeat sound helps orient you within the measure, which is especially valuable when working with complex time signatures or polyrhythmic patterns.
Here's a short example of how to use it:
The make-metroclick function relies on the standard libraries that come with Impromptu, in particular make-metro, which is described in this tutorial and in this video.
Before using make-metroclick, you need to define a metro object first. For example:
(define *metro* (make-metro 120))
This sets up a metronome at 120 beats per minute, which serves as the timing foundation for the metronome clicks.
Here's the source code:
Cite this blog post:
Comments via Github:
2011
2010
2009