Yellotron : a mellotron with Pure Data

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.

GuitarExtended - Yellotron

Yellotron – an implementation of the mellotron in Pure Data.

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 :

  1. Download the patch archive and extract the Yellotron folder somewhere,
  2. 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.
  3. 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.

The archive containing the patch and other necessary files and folders can be downloaded here.

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.

This entry was posted in Tips for writing patches and tagged , , . Bookmark the permalink.

4 Responses to Yellotron : a mellotron with Pure Data

  1. tom says:

    Hello Pierre, it sounds awesome in your song. It happens I’cant extract the files out of the zip folder. It launches a error!! This is the message:

    C:\Documents and Settings\local2\Mis documentos\Downloads\ The archive is either in unknown format or damaged

    Do you know what happends?

    Thank you men.

    • Hi,
      The samples are not hosted by me, so I can’t do anything if it doesn’t work for me.
      It works fine on my machine for MkIIViolins. Perhaps you could try downloading it again.

  2. Hey, Pierre–

    I just downloaded everything and it works great!

    The only small bug (easy to fix) is that the Yellotron zip file creates an empty directory for the Choir samples with a name different from what the patch wants. In Linux, do something like this:

    $ mv CombindeChoir CombinedChoir

    (or do something equivalent for your OS)

    Many thanks for the great patch!

  3. says:

    whoa nice!
    exactly what i was lookin for!
    thanks for sharing

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s