Week 1 lesson 3 - sequencing with the mini-notation

Ok welcome to mini-notation week! Here's the first video and worksheet, exploring sequencing of sounds in Tidal's mini-notation.

Please feel free to let me know what you think about this, and ask all the questions, by hitting reply!

  • 0:00 - intro
  • 1:14 - recap - basic interaction, making and stopping sound
  • 3:03 - mini-notation sequencing
  • 3:15 - the steps more you add, the faster it goes to fit them into a cycle
  • 5:03 - 'sound' and 's' mean the same thing
  • 6:01 - split a 'sound' pattern into a 'sound' and 'n' pattern
  • 6:49 - inserting gaps or 'rests' with '~'
  • 7:13 - breaking steps down into 'subsequences'
  • 8:38 - putting subsequences within subsequences

Copy and paste the following into atom (or whatever editor you've set up with tidal), to explore the concepts in the video.

-- Mini-notation worksheet, number one!

-- Play a "kick" sound (the first one in the folder)
d1 $ sound "kick"

-- Play a different sound from the "kick" folder (the fourth one, counting from zero)
d1 $ sound "kick:3"

-- Play a kick - snare loop. Notice two sounds fit in the same time as one did above
d1 $ sound "kick snare"

-- The more you add, the faster it goes - the 'cycle' stays constant
d1 $ sound "kick snare kick snare"

d1 $ sound "kick snare kick snare kurt hi lo hi lo"

-- Again, we can pick sounds with : and a number

d1 $ sound "cpu:0 cpu:2 cpu:4 cpu:6 cpu:0 cpu:2 cpu:6 cpu:8"

-- If they're all from the same folder, it's easier to pattern
-- the sounds using a separate "n" pattern, like this:
d1 $ n "0 2 4 6 0 2 6 8" # sound "cpu"

-- `#` combines together patterns of different kinds, in this case a 'sound'
-- and an 'n' pattern.
-- We'll come back to `#` (and how it differs from '$') in the future!

-- You can have an 'empty' step, known as a musical rest, with '~'
d1 $ sound "kick snare ~ clap:4"

d1 $ n "0 2 2 ~ 8 ~ 8 ~" # sound "cpu"

-- You can also "break down" a step into a subsequence, with []

-- Lets start with a simple pattern
d1 $ sound "hi lo hi lo"

-- And squeeze a two-step subsequence inside that third step:
d1 $ sound "hi lo [hi hi] lo"

-- It works for 'n' patterns too
d1 $ n "0 1 [5 5 5] 4" # sound "drum"

-- You can even break down a step inside a subsequence:
d1 $ sound "hi lo [hi [hi lo hi lo]] lo"

-- It's easy to make nice compount time signatures:
d1 $ sound "[hi lo hi] [hi lo hi lo]"

There's a lot more to go through with the mini-notation, I'll put another video up in the next couple of days.

Have fun with it, while also exploring the sounds in the default samples and extra-samples samplepack (You'll see a list of them in the supercollider "post window" when you start superdirt). If you haven't loaded up the extra-samples yet, have a look at the previous lesson.

If you make something you like, be sure to save it somewhere and keep it safe! You might also like to keep several versions of a pattern, saving not only the final pattern but how you got there.. A lot of the music in live coding is in the edits, and not just the end result!

Next lesson:

35 Likes

Its super cool. I have a doubt regarding this pattern I found that uses notes in the n field (what is that field called?)

d4 $ n "c a f e"
    # sound "supermandolin"

Can you use notes like that on every sound or its just a way of doing it on certain instruments? If you can do it like that it will be cool to experiment with sound fonts :thinking: ?

TIA :slight_smile:

1 Like

I just call it the 'n pattern'.

You won't find a sample folder called supermandolin. That's because it is a synthesiser running in superdirt, rather than a samplebank. In this case 'n' stands for note number, rather than sample number.

The "c a f e" you're seeing is still a pattern of numbers. However, c is an alias for 0, a for 9, f for 5 and e for 4. so d4 $ n "0 9 5 4" # sound "supermandolin" would sound the same.

In short, you can select notes either by number, or by the a - g notation. For sharps and flats you can add 's' or 'f', e.g. es would be 5. You can also select octave e.g. es7 would be the seventh octave, which translates to note number 27. With middle c being 0, the lower octaves would be negative, so c4 would be -12.

Because it's all just numbers, you can indeed use this notation on other sounds. If you are triggering samples, and use note instead of n, then you'll find that the sample will be pitched up/down in semitones.

We'll come back to this :slight_smile:

9 Likes

Hi

when I try to play a breakbeat from the break folder the loop is played out of time. How do I get the correct loop?

There's a few ways, that I'll get to later.. One way is explained here:

Ooh, integer set notation. Awesome. I’ve been wondering about how pitches are notated within Tidal for a while. How does this work in relation to transposition patterns? Is that a possibility? For instance:
d1 $ n “0 4 2 4” $ transpose “0 0 0 -24” # s “supermandolin” – for a 2octave transposition down relative to E5 (if I’m understanding that correctly)
(sorry, don’t know how to do fancy code highlighting.)
Disclaimer: I’m sorry if this is covered in the video, I’ve not had a chance to watch it yet and will remove accordingly if it is covered there.

1 Like

Yes you can do this with pattern arithmetic, an upcoming topic. # combines different patterns, and if you give the same kind of pattern twice, it’ll take the values from the right. # is actually shorthand for |>, the arrow there pointing in the direction where the values come from. So:

d1 $ n "0 4 2 4" |> s "supermandolin" |> n "0 0 0 -24"

would be the same as:

d1 $ n "0 0 0 -24" # s "supermandolin"

So where a control pattern is given twice, |> (and its alias #) replaces values on the left with those on the right.

If you want to transpose rather than replace, then you’d use |+, instead. e.g.:

d1 $ n "0 4 2 4" # s "supermandolin" |+ n "0 0 0 -24"

That’d be the same as:

d1 $ n "0 4 2 -20" # s "supermandolin"

This gets a bit complicated when values don’t match up so neatly, for example if you’re adding together one pattern with four steps with another with three steps. I’ll get to this soon - for now play around and have fun!

7 Likes

That is so good. Thank you!

1 Like

How would one approach applying a note pattern upon a sound patterm, which itself is being addressed with an n pattern, syntactically?

psuedo code:

d1 sound " bd bd sd hh bd hh sd hh'' n "2 3 5 6 3" note "c f g a a f c" 
            ^ this pattern chooses the sample folder to play
                                     ^this pattern picks the sample from the folder
                                                          ^this  pattern selects the pitch to play it back

I left out all operators as I don’t know what goes where in this case and I don’t want to further confuse the issue by putting the wrong ones in the wrong place, but basically that’s what I’m hoping to learn by asking here.

1 Like

This should do the job:

1 Like

I don't know if this will be of help or interest to any one, but while I was attempting to get more familiar with how the cycles work and pattern are handled, I realized that one thing that may be confusing at first is that the, say, master pattern (the one on the left if you use a series of #) is actually doing two things, if I am correct : on an abstract level telling when should an "event" happen, and, conveniently but also maybe a bit surprisingly, tells one of the things (among many possible things) that will happen when that event happen. Something like n "0 3 7 2" would be the equivalent, in a supercollider Pbind, of a combined dur + degree.
So to make things clearer for me I found out that you can actually "start" with a pattern dedicated only to the abstract event structure, that does not convey any other information, like this for example :
d1 $ "1 1 1 1" # s "bd sd" (where the 1 could be any number)
that does exactly the same as d1 $ s "bd bd sd sd"

edit : inaccurate - see yaxu's reply :grinning:

I am not sure if this way of proceeding can have any real use later on since it is obviously more writing (but maybe it can be convenient sometimes), but it has helped me seeing things more clearly at some point, so I thought I would share !

1 Like

If you don’t say what kind of pattern something is, it’ll default to a sound pattern, so d1 $ “1 1 1 1” # s “bd sd” is the same as d1 $ s “1 1 1 1” # s “bd sd”.

You can think of # as meaning, “take the structure from the left, and the values from the right”, so the structure of the lefthand one is used, but not the values (the 1s).

That works fine, although a more canonical way of getting the same result would be to use the struct function: d1 $ struct "t t t t" $ s "bd sd"

1 Like

Allright I fell into a trap here !

Great ! I was hoping for something like that

Hi @yaxu Great video!
I noticed while translating the worksheet to spanish, if I understood correctly, that this line is not about compound time signatures

Maybe you meant to say 'tuplets'?

This is great. Apologies if this is getting a little ahead of things, but in response to vin’s post above, I’m wondering if this is the best way to apply |+ n “0 0 0 -24” every other cycle, for example?

My solution:

d1 $ every 2 (|+ n “0 0 0 -24”) $ s “supermandolin!4” # n “0 1 2 3”

Hi @yako,
Yes you’re right, I don’t have training in music, looking it up, until now I misunderstood the phrase “compound time signature”. What I meant is that the first half of the cycle acts like one time signature, and the second half acts like another… That the cycle contains multiple time signatures.

What I was trying to get across is that the idea of an overall time signature doesn’t apply in the mininotation. You just put some events together and tidal fits it in to a step. Each step can be subdivided arbitrarily. So yes, as I understand it you could say that the second half is a triplet with respect to the first half, but actually as far as the notation is concerned, there is no concept of an overall ‘beat’ in the notation, just sequences within sequences. Am I making sense?

1 Like

Yes that’s a good way! Soon we’ll look at ways of alternating between values in a single notation, in this case I think "0 1 2 <3 -21>" would do the same.

Alex, that kick drum pattern at ~ 9:00 is so cool!

Can’t wait for more mini-notation videos. Do you plan to shoot more advanced ones as well ?

1 Like

Yep I'm planning on covering everything! I feel that once you get beyond the hurdle of understanding things like $ and how patterns combine together, Tidal gets lets technical and more about exploring the combination of simple parts. So as we get more advanced maybe things will get simpler.. a kind of reverse process. We'll see :slight_smile:

3 Likes

This right here answers one of my biggest questions. This really opens up a lot of possibilities. I’m excited to explore this further. I really appreciate the openness to tangential lines of questioning you’ve exhibited with this program. Every time I learn something I walk away with 2 new questions, and having someone who knows the answer and is patient enough to take the time to explain things is invaluable.

6 Likes