In this post I share a Pd patch I made to simulate a Mellotron, which can be played with your computer’s keyboard of with a real midi keyboard. This instrument was invented in the 1960’s and was using recorded sound samples of real instruments. Each note pressed on the keyboard would play a tape recording of the corresponding note of the selected instrument. One of the most famous songs featuring a mellotron is Strawberry Fields Forever by the Beatles. Apparently it required a lot of care, but it did have a very distinctive sound.
It isn’t very difficult to simulate a mellotron in Pure Data, because playing recorded samples is Pd is relatively easy (see for instance B03.tabread4.pd in Pure Data’s audio examples). There also happens to be mellotron samples available online here. I don’t know who put those online but I’m grateful of her/him for doing so.
As you can see in the picture below, the patch consists in the following elements : instrument selection (to load samples in the table bank), a few controls (release, octave, pitch), the input section (for computer or midi keyboard), and the wavetable oscillators (called yelloscilator) sending their audio output to the DAC.
I will not go into technical details here as everything is explained in the patch and subpatches and abstractions.
Follow these instructions to make it work :
- Download the patch archive and extract the Yellotron folder somewhere,
- Download the mellotron samples here, and put the wav files in the corresponding folders inside the Yellotron folder (cello, woodwind, etc.). Do not rename the folders nor the files.
- Open the yellotron.pd patch, choose an instrument, and it should work.
It is possible to use this patch with other sound samples. You’ll have to study the subpatch used to select the intrument to know what changes need to be made. It will need editing if you rename the folders containing the samples. The text file called “notemap.txt” might also need editing if your samples have different names or if they are at a different octave.
And of course, and sound example. This time it’s a real song called “Sur les deux hémisphères“, in which I used the cello and choir instruments.