Monday 21 November 2016

What is MIDIf(x)_mr actually doing to the notes?

THE QUESTION

OK, so you looked at the previous blog entry and you need to know more. You aren't the first, and I'm sure that you won't be the last, to ask:

        What is MIDIf(x)_mr actually doing to the notes?

It's a good question, and here's some of the answer!

THE ANSWER

Firstly, we need to look at what the 'Limit' rotary control is doing.

This diagram shows an 8th note sequence looping around and around, playing the white notes from C1 to C2, which is MIDI note numbers 36 to 48. 

When you set the Limit rotary control to '12', then it does two things: it shifts the notes down to the bottom of the MIDI range of note numbers, and it restricts the range of 'allowed' note numbers to 0 to 11 (That's 12 different values). So the notes that you would hear now are from C-2 (MIDI note number 00) to B-1 (MIDI note number 11). Unfortunately, these notes are very low in pitch, and many instruments won't make much of a useful sound. Also note that the highest note, the C-1, is too high, and so it gets 'folded around and sounds as a C-2.

This is where the 'Offset' rotary control is used. (note that this is different to the 'Offset' rotary control near to the top left of the MIDIf(x)_mr window) This works on the output of the 'warp' processor. By setting it to 36 (to the right, -36 would be to the left), then the notes are shifted up by 3 octaves, and will now play in the C1 to B2 range. 


The important thing here is that this is not just a shift downwards in pitch, and then adding an offset to restore the same pitch. The 'Limit ' rotary control sets the range of notes that will be played, and the 8 white notes between C1 and C2 stretch across a range of 13 notes, so when the Limit is set to 12, then that 13th note will be transposed downwards because it is outside of the allowed 12 values.

If we set the 'Limit to '1', then the range would be a single note, and so the loop would be from C-2 to C-2, and when we transpose this up 3 octaves, it will result in C1 playing 8 times per loop. If we set the Limit to 2, then we would get 2 notes, the C-2 and the Csharp-2, which would be transposed by the Offset to C1 and Csharp1. A Limit of 3 would give 3 notes, and so on. The Limit rotary control just 'limits' the range of notes which are produced. 

If the Limit is larger than the range of notes, 24 for instance, then you would not hear any effect - the loop would play all of the white notes from C1 to C2. The reason why this is important depends on the 'Range rotary  control.

The other thing that happens when the range is set to 1 and the limit is set to 12 is that the notes are repeated across the keyboard exactly as you are used to them being...





When the Range rotary control is set to a value higher than 1, then the note numbers are multiplied, which is a bit like changing the width of the keyboard. An octave is now a span of less keys, and this changes how the Limit rotary control affects things.

Here's what happens when the Range rotary control is set to a value like 1.55. The C-2 to B-1 white notes are stretched so that they fill just over one and a half octaves: about 18 notes. But 18 notes is bigger than the range of 12 which the Limit has imposed, so what happens?





The 18 notes get limited just as before, and so note numbers outside of the 0-11 range get 'folded' downwards into that range. But because the width of an octave has changed, the pitch change is not an octave. You can see this in the diagram: the orange notes are the first time that new notes occur in the output as we move from the left to the right. Unlike the repeated pattern of notes the happened when the Range was 1, the pattern no longer repeats. The repeats happen at the Limit value divided by the Range value, which is 12 / 1.55, which is between 7 and 8 notes. If we plot the input note against the output note then we get this table (which is just the diagram above showing the purple and orange notes, but expressed as note numbers.):

0
0
1
1
2
3
3
4
4
6
5
7
6
9
7
10
8
0
9
1
10
3
11
5
12
6
13
8
14
9
15
11
16
0
17
2
18
3
19
5
20
7
21
8
22
10
23
11
24
1
25
2
26
4
27
5
28
7
29
8
30
10
31
0
32
1
33
3
34
4
35
6
36
7
37
9
38
10
39
0
40
2
41
3
42
5
43
6
44
8
45
9
46
11
47
0
48
2

Note that each block of 7 or 8 notes across the keyboard maps to the 'Limit'-controlled outputs, and you would normally use the 'Offset' control to transpose them to usable pitches. The numbers also reinforce the non-repeating nature of the 'Warp' processing inside MIDIf(x)_mr. This is just multiplication creating the transformation from one set of note numbers (the inputs) to another (by stretching the width of the keyboard), and not musical theory, and so you do not get a single scale for each octave, or each block, but instead blocks where the scale varies for almost every block. One block is repeated in the example shown - can you find it?

APPLICATIONS

From here onwards, it is up to you to see what the effect of the different Range and Limit settings do to the notes that you input to MIDIf(x)_mr. There are two sets of Range and Limit rotary controls, followed by the Offset rotary control to put the notes back into a usable range, which means that you can do two different stretches of keyboards, each followed by a range limit. The Range control is deliberately restricted in range to 256 values so that it is repeatable. If you set the values in the big boxes again later, then the output will be exactly the same. (Floating point controls do not guarantee this repeatability...)

Because the scale changes for each block, then initially, whilst learning to use MIDIf(x)_mr, it is a good idea to use Scale, Schwarzonator2, or any other 'scale control' MIDI effect to constrain the output to a single scale!

The original description gives one hint for a very interesting effect to explore: set a Range, and then select the Range rotary control with the cursor and nudge it up or down with the cursor keys - you will find that the scale changes back and forth as you nudge. If you nudge up and down with Limits where the limit range is smaller than the range of the notes, then you will get the same scale, but arpeggiated in different ways. So MIDIf(x)_mr is actually a real-time scale converter and arpeggiator with a huge number of possibilities to explore. Assuming a useful Limit range of 10 notes (from 8 to 18 notes), then the number of different outputs is approximately 250 x 10 x 250 x 10, which is more than six million.

More information can also be found in this blog entry on one of the tools used to develop MIDIf(x)_mr.

Also see: Inverted MIDI Velocity




No comments:

Post a Comment