Notes

Pitches are an important building block in many musical traditions. In Strudel, pitches can be expressed as note names, note numbers or frequencies. Here’s the same pattern written in three different ways:

  • note: letter notation, good for those who are familiar with western music theory:

    note("a3 c#4 e4 a4")
  • note: number notation, good for those who want to use recognisable pitches, but don’t care about music theory:

    note("57 61 64 69")
  • freq: frequency notation, good for those who want to go beyond standardised tuning systems:

    freq("220 275 330 440")

Let’s look at those in more detail…

note names

Notes names can be notated with the note letter, followed by the octave number. You can notate flats with b and sharps with #.

note("a3 c#4 e4 a4")

By the way, you can edit the contents of the player, and press “update” to hear your change! You can also press “play” on the next player without needing to stop the last one.

note numbers

If you prefer, you can also use numbers with note instead:

note("57 61 64 69")

These numbers are interpreted as so called MIDI numbers, where adjacent whole numbers are one ‘semitone’ apart.

You could also write decimal numbers to get ‘microtonal’ pitches (in between the black and white piano notes):

note("74.5 75 75.5 76")

freq

To get maximum freedom, you can also use freq to directly control the frequency:

freq("220 275 330 440")

Hearing and frequency

In the above example, we play A3 (220Hz), C#4 natural (275Hz), E4 (330Hz) and A4 (440Hz), mirroring our previous examples.

But can you hear the difference between these individual frequencies?

freq("220 221 223 224")

How about these?

freq("2020 2021 2023 2024")

The higher we go up…

freq("5020 5021 5023 5024")

The less distance we can hear between the frequencies!

freq("10020 10021 10023 10024")

Why is this? Human hearing operates logarithmically.

From notes to sounds

In this page, when we played a pattern of notes like this:

note("a3 c#4 e4 a4")

We heard a simple synthesised sound, in fact we heard a triangle wave oscillator.

This is the default synthesiser used by Strudel, but how do we then make different sounds in Strudel?

Let’s find out in the next page on Sounds.