MusicMaster Blog
Favored and Disallowed Patterns posted on September 23rd, 2024
by Paul Ziino
We see a lot of databases every week, and frequently, we see folks using the rules of Favored Patterns or Disallowed Patterns, but they are set up incorrectly. So today, we’ll discuss how to set those rules up and why, as well as when not to use these rules.
The Disallowed Pattern rule allows you to set a maximum of 16 patterns for a given attribute field, each up to 8 codes in sequence, that you will not tolerate. The rule is available for Attribute-Overall, Attribute-Combo, and Attribute-Multiple fields.
In the following example, we have codes 1=Ugh, 3=OK, and 5=Yay for our Mood field. We can also use code ‘?’ as a wild card. If we set a pattern of 1??1, that means we cannot have a 1 code followed by any two other codes and then another 1 code in the field. Our second disallowed pattern is 33333 which means we will not allow five Mood 3 songs in a row. And the third pattern listed of 555 prevents MusicMaster from playing three Mood 5 songs in a row. I’ve also indicated we should not include non-music items in our test of Mood – Disallowed Pattern.
The rule is tested constantly throughout the scheduling process. So wherever there is a Mood 1 song being considered, MusicMaster will look back and ahead to make sure we will not run into the disallowed pattern. Wherever there is a 3 code being considered, MusicMaster will look back and ahead to make sure we have no situation where there’d be five of that code in a row.
A common mistake we see is codes separated by commas. 1,?,?,1. This will only work if you have a comma used as a code in the field and you’re trying to prevent that code from playing in between every song. 3,3,3,3,3 will not work, nor would 5,5,5…again, unless comma is a code you’re using in the field.
Please note, only the patterns listed in the Disallowed Patterns rule will be forbidden. Any other pattern is allowed. You can only list 16 patterns max. We have seen folks use the rule multiple times with different patterns in each. The problem with this is that any pattern not listed in the first rule violates the second one. And any pattern not listed in the second will violate the first.
This all works the same way in Favored Patterns. You can create up to 16 patterns, each up to 8 codes in sequence, that MusicMaster must obey. Please note, with Favored Patterns, only those patterns listed will be tolerated. Any pattern that doesn’t show up in your list will be considered a failure. And the same goes for using a comma (or any other character) in between the codes… Don’t do it.
In the following example, we will allow a 1 code to play followed by five wildcards then another 1 code. We’ll also allow four 3s in a row followed by a 1 or four 3s followed by a 5. And we’ll allow two 5s in a row followed by a 1, or two 5s in a row followed by a 3, but no other patterns are allowed.
We mentioned that only those patterns in the Favored Pattern rule will be allowed and only those patterns in the Disallowed Pattern rule will be considered violations. As such, it would be counter-productive to use both rules in your rule tree together. This is because any pattern that passes the Favored Pattern rule will fail the Disallowed Pattern rule.
At the start of this article, I mentioned I’d explain when not to use these rules. The answer is that there is often another rule that can do the same job. For example, if you set up a Disallowed Pattern indicating 555 is not allowed, we could also turn on a rule for Mood 5, Max in Sequence of 2.
That gives you the same result as a disallowed pattern of 555.
The Disallowed Pattern of 1??1 can be accomplished with a Max in Sequence rule of 1, separated by 2.
Why do I prefer the maximum in sequence rules? Because should it be broken, we will know exactly what rule is in violation. Allow me to explain.
Let’s say I have 16 Disallowed Patterns set up in my rule and I’m editing my log, and I see a song violates the Disallowed Patterns rule. I don’t know which of the 16 patterns that song is failing. But if I use the Max in Sequence rules, the Editor will tell me exactly what rule is in violation.
By no means am I telling you not to use Disallowed Patterns or Favored Patterns rules, I’m just telling you why I prefer to use the others.
Sometimes there is no other way to get the desired result. If you always want MusicMaster to follow a certain pattern, then Favored Patterns is the way to go.
I can’t create any other rule that would give me the results of the patterns listed above.
Thinking of using a Pattern rule in your database? Give your MusicMaster Scheduling Consultant a call and they’ll help you figure out the best way to do so!