Skip to content
roomi fields

The BP3 language · B4 · Course

Flags and Decremental Weights

What if a grammar could count, remember, and exhaust itself?

Published 12 February 2026 · updated 15 February 2026 · Lire en français

Dynamic Control

What if a grammar could count, remember, and exhaust itself?

Where does this article fit in?

Previous articles laid the groundwork: B1 for controlled randomness, B2 for building blocks, and B3 for the five modes. But all of this remains static: weights don’t change, rules apply blindly. This article introduces the two mechanisms that make BP3 (Bol Processor 3, I2) truly dynamic: flags (conditional counters) and decremental weights. These are what allow us to model the exhaustion of a musical idea, the gradual end of a development, or the conditional execution of a passage. The formalization relies on the configurations and inference rules of L6.


Why is this important?

Imagine a musician improvising on an Indian raga (a melodic framework prescribing the notes, ornaments, and atmosphere of a piece). They explore a melodic motif, repeat it, vary it — then let it die out naturally to move on to something else. This is not random: the musician mentally counts, decides when a motif has been sufficiently explored, and controls the transition. It is precisely this type of dynamic control that Bernard Bel and James Kippen sought to model by creating BP3’s flags and weights [BelKippen1992a], based on their observation of tabla masters from the Lucknow gharānā [Kippen1988].

A classical probabilistic grammar (B1 — Probabilistic Context-Free Grammar) cannot do this. Its probabilities are fixed: the same rule always has the same chance of being chosen, whether it’s the first or the hundredth time. It’s like an ordinary die: it has no memory.

BP3 solves this problem with two complementary mechanisms:

  • Flags: named counters that can be tested, incremented, or decremented. They allow you to say “apply this rule only if the avart (remaining cycles) counter is greater than 00, and decrement it.”
  • Decremental weights: weights that decrease with each use. They allow you to say “this rule is very probable at the beginning, but gradually exhausts itself.”

Flags are logical guards (yes/no), decremental weights are probabilistic guards (increasingly improbable). Together, they give BP3 an expressiveness that far exceeds classical grammars.

The idea in one sentence

Flags are conditional counters that control the applicability of rules, and decremental weights are probabilities that erode with each use, allowing BP3 to model the gradual exhaustion of a musical motif.


Let’s explain step by step

1. Flags: conditional counters

What is a flag?

A flag is a named variable, attached to a grammar rule, which serves two purposes: to condition the application of the rule and to modify the system’s state after application.

Sidebar: The restaurant counter analogy

Imagine a restaurant offering a special menu: “first 20 orders half price.” The waiter keeps a counter:

  • At the start: counter=20\text{counter} = 20
  • For each special order: counter=counter−1\text{counter} = \text{counter} - 1
  • When counter=0\text{counter} = 0: “sorry, the offer is over”

BP3 flags work exactly like this. The avart counter starts at 44 (number of tāla cycles to play), each cycle decrements it, and when it reaches 00, variations stop.

BP3 Syntax

Flags appear between slashes / in rules:

gram#1[1] /avart=4/ |S| --> |A| |S|
gram#1[2]           |S| --> -
gram#1[3] /avart/   |A| --> dha dhin dhin dha /avart-1/
gram#1[4]           |A| --> tin ta -

This grammar plays 4 cycles (āvart) of the tintāl theka (dha dhin dhin dha), then stops. When the cycles are exhausted, only the dry motif (tin ta -) remains available. Let’s break down the flags:

  • /avart=4/: initializes the avart flag to 44 (number of remaining cycles)
  • /avart/: tests that the avart flag is non-zero (>0> 0)
  • /avart-1/: decrements the avart flag by 11 after each cycle

The six operators

BP3 offers six operators to manipulate flags:

OperatorBP3 SyntaxMeaningExample
(empty)/avart/Tests if the flag is non-zero (>0> 0)Guard: apply only if avart>0\text{avart} > 0
=/avart=4/Assigns a valueInitialization or reset
+/cycle+1/IncrementsIncreases the counter
-/avart-1/DecrementsDecreases the counter
>/avart>2/Tests if strictly greater thanConditional guard
</phase<5/Tests if strictly less thanConditional guard

Operators fall into two categories:

  • Guards (conditions): "" (non-zero test), >, < — they decide if the rule can apply
  • Effects (operations): =, +, - — they modify the state after application

The AST Flag node

In the AST (Abstract Syntax Tree — see L4) of the BP2SC (Bol Processor to I3) transpiler (source-to-source compiler — see B7), a flag is represented by the node:

@dataclass
class Flag:
    name: str                    # "avart", "phrase", "reprise"
    op: str = ""                 # "", "=", "+", "-", ">", "<"
    value: str | None = None     # "20", "1", None (for simple test)

The op field is an empty string for the non-zero test (the /avart/ case without an explicit operator). The value field is None when no value is needed (simple test).

SOS Rule: Flag-Cond

The formal semantics of flags are expressed as an inference rule in L6. A configuration now includes a flag environment φ\varphi (phi) that associates each flag name with its current integer value.

Sidebar: SOS Reminder

In structural operational semantics (L6), program behavior is described by inference rules of the form:

    premise(s)
─────────────────── (Rule-Name)
    conclusion

The conclusion applies only if all premises are satisfied. Configurations (σ,φ,t)(\sigma, \varphi, t) represent: the working string σ\sigma (sigma), the flag environment φ\varphi, and time tt.

Here is the Flag-Cond rule for a conditional flag with decrement:

φ(avart)>0r=(/avart/  A→β  /avart-1/)(σ1⋅A⋅σ2,  φ,  t)⟹(σ1⋅β⋅σ2,  φ[avart↦φ(avart)−1],  t)\textsc(Flag−Cond)\frac{\varphi(\text{avart}) > 0 \qquad r = (\texttt{/avart/}\; A \to \beta\; \texttt{/avart-1/})}{(\sigma_1 \cdot A \cdot \sigma_2,\; \varphi,\; t) \Longrightarrow (\sigma_1 \cdot \beta \cdot \sigma_2,\; \varphi[\text{avart} \mapsto \varphi(\text{avart}) - 1],\; t)} \quad \textsc{(Flag-Cond)}

Reading this rule:

  • Premise 1: the current value of the avart flag in the environment φ\varphi is strictly positive
  • Premise 2: there exists a rule rr that has /avart/ as a guard and /avart-1/ as an effect
  • Conclusion: AA is replaced by β\beta (beta, the right-hand side of the rule) in the working string, and the environment is updated by decrementing avart by 11

The notation φ[avart↦φ(avart)−1]\varphi[\text{avart} \mapsto \varphi(\text{avart}) - 1] means “the same environment φ\varphi, except that the value of avart is replaced by its current value minus 11.” This is a functional update: the old environment is not modified, a new one is created.

What happens when the flag reaches 00?

Premise φ(avart)>0\varphi(\text{avart}) > 0 is no longer satisfied. The rule can no longer apply. If another rule for the same non-terminal (symbol that can still be derived, denoted between bars |A| in BP3 — see B2) exists without a guard (like rule 4 in our example), it takes over. Otherwise, the derivation blocks.


2. Decremental weights

What is a decremental weight?

A decremental weight is a rule weight (like those seen in B1) that decreases each time the rule is chosen. The BP3 notation is <N-M>: initial weight NN, decremented by MM with each use.

Sidebar: The soloist who gets tired analogy

Imagine a jam session. At first, a musician raises their hand every turn to take a solo — they are enthusiastic, almost certain to be chosen (high probability). But with each solo played, their desire decreases: they raise their hand less often (low probability), then eventually stay seated (zero probability). The musician is still there, and if chosen, would play as well as before — but they no longer volunteer.

This is exactly what a decremental weight does: the rule always produces the same result when chosen, but its probability of being chosen decreases until it reaches zero.

BP3 Syntax

gram#1[1] |S| --> <50-12> |A| |S|
gram#1[2] |S| --> <1> fin
  • <50-12>: initial weight 5050, decremented by 1212 with each use
  • <1>: fixed weight 11 (no decrement)

The AST Weight node

@dataclass
class Weight:
    value: int                   # 50 (initial weight)
    decrement: int | None = None # 12 (decrement per use), None if fixed

When decrement is None, the weight is static (as in a classical PCFG). When it is defined, the weight evolves dynamically.

SOS Rule: Weight-Dec

Let’s formalize the semantics of decremental weights. The configuration is enriched with a weight function ww that associates each rule with its current weight:

w(r)=50r chosen according to categorical distribution on w(σ,  φ,  t,  w)⟹(σ′,  φ,  t,  w[r↦max⁡(0,  w(r)−12)])\textsc(Weight−Dec)\frac{w(r) = 50 \quad r \text{ chosen according to categorical distribution on } w}{(\sigma,\; \varphi,\; t,\; w) \Longrightarrow (\sigma',\; \varphi,\; t,\; w[r \mapsto \max(0,\; w(r) - 12)])} \quad \textsc{(Weight-Dec)}

Reading:

  • Rule rr is chosen according to a categorical distribution (weighted draw) based on current weights
  • After application, the weight of rr is decreased by 1212, with a floor of 00 (the weight never becomes negative)
  • Flags φ\varphi and time tt are not affected

Sidebar: Categorical distribution

A categorical distribution (also called a discrete Gibbs distribution) is the generalization of a die roll to any number of faces with arbitrary probabilities. If we have three rules with weights [50,10,1][50, 10, 1], the probabilities are:

  • P(rule 1)=5050+10+1=82%P(\text{rule 1}) = \frac{50}{50 + 10 + 1} = 82\%
  • P(rule 2)=1061=16%P(\text{rule 2}) = \frac{10}{61} = 16\%
  • P(rule 3)=161=2%P(\text{rule 3}) = \frac{1}{61} = 2\%

The key point: probabilities are recalculated at each step, because weights change. This is not a one-time calculation, but a continuous recalculation. This continuous renormalization is what distinguishes decremental weights from a PCFG.

Probability evolution: a concrete example

Let’s take the example again:

gram#1[1] |S| --> <50-12> |A| |S|
gram#1[2] |S| --> <1> fin
UseWeight of r1r_1Weight of r2r_2P(continue)P(\text{continue})P(finish)P(\text{finish})
150198.0%2.0%
238197.4%2.6%
326196.3%3.7%
414193.3%6.7%
52166.7%33.3%
6010.0%100.0%

Observe the profile: the first four uses are almost certain (the recursive rule largely dominates). Then the fifth use shifts abruptly — the probability of continuing drops to 67%67\%. And at the sixth, the recursive rule is dead: the weight has fallen to 00.

Convergence and guaranteed termination: unlike a pure PCFG where recursion can theoretically last indefinitely, decremental weights guarantee termination. In at most ⌈N/M⌉+1\lceil N/M \rceil + 1 uses (here ⌈50/12⌉+1=6\lceil 50/12 \rceil + 1 = 6), the recursive rule reaches a weight of 00 and can no longer be chosen. This is a fundamental property for music: the composer knows that their motif will have a bounded length.

Sidebar: Decremental weights vs. flags

Both mechanisms control termination, but in different ways:

AspectFlagsDecremental Weights
Type of controlLogical (yes/no)Probabilistic (gradual)
TransitionAbrupt (active -> inactive)Progressive (from probable to impossible)
Musical analogy“Stop after 20 notes”“The idea naturally fades”
ExpressivenessDeterministic structuresOrganic structures

Flags are switches, decremental weights are dimmers.


3. Flag and mode interactions

Flags interact richly with the B3. The two most important combinations are RND + flags and ORD + flags.

RND with flags: conditional choice

In RND mode (weighted random — see the five modes in B3), flags transform random choice into conditional choice: the rule is eligible only if its guards are satisfied.

-mo.RND
gram#1[1] /avart=8/ |S| --> |A| |S|
gram#1[2] /avart/   |A| --> dha dhin dhin dha /avart-1/
gram#1[3]           |A| --> tin ta -

The /avart=8/ flag initializes a counter to 88. As long as avart>0\text{avart} > 0, rule 2 is eligible and decrements the counter. When it reaches 00, only rule 3 (without a guard) remains available. The BP2SC transpiler translates this combination into a SuperCollider Prout — see the detailed translation in B8 §1.

ORD with flags: sequential conditional execution

In ORD mode (sequential), flags allow deterministic control: rules are tried in order, but only if their guards are satisfied. This is the equivalent of a if/else if/else cascade.

-mo.ORD
gram#1[1] /reprise=1/ |S| --> |A| |S|
gram#1[2]             |S| --> -
gram#1[3] /reprise>0/ |A| --> dha dhin /reprise-1/
gram#1[4]             |A| --> tin ta

Here, the reprise flag controls whether rule 3 is available. Once reprise is decremented to 00, rule 4 (without a guard) takes over. In ORD mode, this logic is purely sequential and deterministic.

Decremental weights in RND mode

Decremental weights in RND mode are translated into SC by a Prout with mutable local weight variables and a weighted selection recalculated at each iteration:

-mo.RND
gram#1[1] |S| --> <50-12> |A| |S|
gram#1[2] |S| --> <1> fin

At each iteration, a random draw is made based on the total of the current weights. The weight of rule 1 decreases by 1212 with each use (bounded at 00), while the fixed weight of rule 2 does not change — it eventually dominates. See the detailed SuperCollider translation in B8 §1.


4. Concrete examples

Example 1: Mohanam — the raga with controlled exhaustion

The Mohanam raga is a pentatonic (five-note) Indian raga (Sa Ri Ga Pa Dha) used in many Carnatic compositions (classical tradition of South India). Here’s how BP3 can model the progressive exploration and then exhaustion of a motif:

-al.Mohanam
Sa Ri Ga Pa Dha

-mo.RND
gram#1[1] /phrase=20/ |S| --> |Phrase| |S|
gram#1[2]             |S| --> |Cadence|
gram#1[3] /phrase/    |Phrase| --> |Motif| |Motif| /phrase-1/
gram#1[4]             |Phrase| --> |Repos|
gram#1[5]             |Motif|  --> Sa Ri Ga
gram#1[6]             |Motif|  --> Pa Dha Pa
gram#1[7]             |Motif|  --> Ga Ri Sa
gram#1[8]             |Repos|  --> - - -
gram#1[9]             |Cadence| --> Dha Pa Ga Ri Sa

Behavior analysis:

  • The phrase flag starts at 2020. As long as it is positive, phrases contain melodic motifs (rule 3). Each phrase decrements phrase by 11.
  • When phrase reaches 00, rule 3 stops applying. Only rule 4 remains: rests.
  • Finally, the recursion of |S| eventually chooses rule 2 (the final cadence).

The musical result: active exploration for about 2020 phrases, then a slowdown with silences, then a conclusive cadence. This is a model of the alapana (introductory exploration) of a raga.

Sidebar: Vādi and samvādi — the dominant notes of the raga

In the Mohanam raga (Sa Ri Ga Pa Dha), not all notes have the same weight. The vādi note (dominant note, the most important) is Pa and the samvādi note (sub-dominant note) is Sa. A flag could model this hierarchy:

gram#1[10] /vadi/ |Motif| --> Pa |Ornement| Pa /vadi-1/

The /vadi/ flag would ensure that Pa (the vādi) appears regularly in the melody — exactly as an Indian musician naturally returns to the dominant note of the raga. This structural constraint, impossible in a classical PCFG, is at the heart of what Bel and Kippen sought to formalize [BelKippen1992a].

Sidebar: The ālāp — when flags reach their limits

The ālāp (opening of a raga where notes are introduced progressively: first Sa alone, then Sa-Re, then Sa-Re-Ga…) poses an interesting challenge. Can it be modeled with flags? Yes, but laboriously:

gram#1[1] /phase=1/ |Phrase| --> Sa Sa Sa /phase+1/
gram#1[2] /phase=2/ |Phrase| --> Sa Re Sa Re /phase+1/
gram#1[3] /phase=3/ |Phrase| --> Sa Re Ga Re Sa /phase+1/
gram#1[4] /phase=4/ |Phrase| --> Sa Re Ga Ma Ga Re Sa /phase+1/

This works, but it requires one rule per note introduced — enumerating cases instead of generating them. The ālāp reveals that flags are counters, not accumulators: they know how many notes have been introduced, but not which ones. For a more elegant solution, the context markers of B6 allow writing “play this note only if previous notes are already present” — an accumulation constraint that only BP3’s context-sensitive extensions can express naturally.

Example 2: gradual exhaustion with decremental weights

Let’s visualize the evolution of probabilities for a richer grammar:

gram#1[1] |S| --> <40-8>  |Thème| |S|
gram#1[2] |S| --> <10-2>  |Variation| |S|
gram#1[3] |S| --> <1>     |Coda|
Stepw(Theme)w(\text{Theme})w(Var.)w(\text{Var.})w(Coda)w(\text{Coda})P(Theme)P(\text{Theme})P(Var.)P(\text{Var.})P(Coda)P(\text{Coda})
14010178.4%19.6%2.0%
2328178.0%19.5%2.4%
3246177.4%19.4%3.2%
4164176.2%19.0%4.8%
582172.7%18.2%9.1%
60010.0%0.0%100.0%

This table reveals expressive behavior:

  1. Exposition phase (steps 1-3): the theme largely dominates, variations are possible but rare, the coda is almost impossible.
  2. Transition phase (steps 4-5): the theme gradually weakens, variations maintain their relative proportion, the coda becomes conceivable.
  3. Conclusion phase (step 6): both recursive rules are dead (weight 0). Only the coda remains: it is forced.

This is a model of the classical musical form Exposition-Development-Conclusion, emerging naturally from decremental weights without any explicit programming of the structure.

Sidebar: The beauty of decremental weights

Note that the two recursive rules exhaust themselves at the same time (step 6), because 40/8=10/2=540/8 = 10/2 = 5 uses before reaching 00. This is not a coincidence: the composer calibrated the N/MN/M ratios to synchronize the exhaustions. A higher ratio (like <40-4>) would extend the theme’s life to 1010 uses, creating a longer piece.

Example 3: Kayda with flag control — tāla cycles

A kayda is a tabla composition structured in cycles (āvart) of tāla. The composer-performer plays a determined number of variation cycles before concluding with a tihāī (cadence). Flags naturally model this cycle counting:

-mo.RND
gram#1[1] /avart=4/ |S| --> |Cycle| |S|
gram#1[2]           |S| --> |Tihai|
gram#1[3] /avart/   |Cycle| --> |Variation| |Variation| /avart-1/
gram#1[4]           |Cycle| --> |Theka|
gram#1[5]           |Variation| --> dha tirakita dhin dhin dha
gram#1[6]           |Variation| --> dha dhin tirakita ta tirakita dhin
gram#1[7]           |Theka| --> dha dhin dhin dha dha dhin dhin dha
gram#1[8]           |Tihai| --> dha tirakita dhin - dha tirakita dhin - dha tirakita dhin

The /avart=4/ flag allows exactly 44 cycles (āvart) of variations (rule 3). When the counter reaches 00, only rule 4 (simple theka) remains available, then the grammar converges to the tihāī (rule 8). This is a faithful modeling of the structure of a kayda: theme → variations over N cycles → final cadence [BelKippen1992a].

Flag + weight interaction: two-level control

Flags and weights can coexist in the same grammar, offering two levels of control:

gram#1[1] /avart=15/ |S| --> <30-6> |A| |S| /avart-1/
gram#1[2]            |S| --> <1> -

Here, rule 1 has two guards:

  • The avart flag must be >0> 0 (logical guard)
  • The decremental weight <30-6> makes the rule less and less probable (probabilistic guard)

The first of the two to exhaust itself stops the recursion. With avart=15 (exhaustion in 1515 steps) and <30-6> (exhaustion in 55 steps), the weight wins: the recursion will probably stop around 55 iterations, well before the flag reaches 00.

This dual control allows defining a hard limit (the flag: at most 1515 iterations, never more) and a soft tendency (the weight: on average 44-55 iterations, with variation).


5. Expressive power of decremental weights

Decremental weights are linear (<N-M> subtracts MM at each step) — there is no exponential or logarithmic decay. But this simple mechanism produces rich behaviors thanks to renormalization and the combinatorics between rules.

Implicit increment by renormalization

The first counter-intuitive observation: decrementing one rule increments the others. If two rules have weights [50,1][50, 1] and only the first one decrements, the second goes from P=1/51≈2%P = 1/51 \approx 2\% to P=1/3≈33%P = 1/3 \approx 33\% without its weight having changed. Decremental weights thus offer incremental control for free — simply decrement what you want to see disappear.

Single shot: <1-1>

A <1-1> weight cancels itself after a single use. This is a one-time event: the rule can trigger at most once, then disappears. Useful for an introduction, a harmonic surprise, or an ornament that should not be repeated:

gram#1[1] |S| --> <1-1> |Surprise| |S|
gram#1[2] |S| --> <5>   |Normal| |S|
gram#1[3] |S| --> <1>   -

The surprise has a chance to occur at the beginning (1/7≈14%1/7 \approx 14\%), then cannot return.

Immortal anchor: <N> without decrement

A fixed-weight rule never dies. When all others exhaust themselves, it becomes the sole survivor — an attractor towards which the grammar inevitably converges. This is the role of the Coda in the Theme/Variation/Coda example: its <1> weight does not move, but its probability grows to 100%100\%.

Synchronized vs. staggered death

The ratio N/MN/M determines a rule’s lifespan: ⌈N/M⌉\lceil N/M \rceil steps. By calibrating the ratios, one controls the temporal shape of the piece:

StrategyRatiosMusical Effect
Synchronized death<40-8> and <10-2> (ratio 55 and 55)Theme and variation die together → abrupt coda
Staggered death<40-8> and <50-2> (ratio 55 and 2525)Theme dies, variation survives longer → gradual transition
Succession<10-5>, <30-3>, <1> (ratio 22, 1010, ∞\infty)First motif A dominates, then B takes over, then C inherits

Succession is particularly interesting: it creates a relay form where behaviors pass the torch, without any explicit programming of the temporal structure.

Non-linear relationship between rules

Each weight decrements linearly, but the ratio between two weights evolves non-linearly. If AA has <100-10> and BB has <50-2>:

Stepw(A)w(A)w(B)w(B)Ratio A/BA/B
1100502.0
380461.7
560421.4
740381.05
920340.59
110300.0

The ratio goes from 2.02.0 to 00 — AA dominates first, then BB takes over. The ratio curve is non-linear (it accelerates towards the end) even if individual decrements are constant. Two straight lines descending at different speeds produce a curved ratio.

Phase transition

An extreme ratio between weight and decrement creates an abrupt switch rather than a gradual fade:

  • <100-99>: P≈99%P \approx 99\% for 11 step, then 0%0\% → switch
  • <100-10>: P≈90%P \approx 90\%+ for 99 steps, then drops → plateau + cliff
  • <100-1>: PP decreases very slowly over 100100 steps → long fade

The composer chooses the form of the transition by calibrating the N/MN/M ratio.

Limitation: linear profile only

Despite this combinatorial richness, the decline of each individual rule remains strictly linear. A true exponential decline (division by 22 at each step) or logarithmic decline (rapid decline then plateau) is not expressible. This limitation does not change formal expressiveness (an exponential weight remains context-free), but it restricts the palette of temporal profiles available to the composer.


Key takeaways

  • Flags are named conditional counters, manipulated by six operators: test (""), assignment (=), increment (+), decrement (-), greater than (>), less than (<).
  • Flags are divided into guards (applicability conditions) and effects (state modifications).
  • Decremental weights <N-M> decrease by MM with each use, reaching 00 in ⌈N/M⌉\lceil N/M \rceil steps, which guarantees termination of recursions.
  • The categorical distribution is renormalized at each step: probabilities are dynamically recalculated, which fundamentally distinguishes BP3 from PCFGs.
  • In SuperCollider, BP2SC translates flags into Prout with if/else structures and decremental weights into mutable local variables — see B8 for SC code examples.
  • Flags offer logical control (switch), decremental weights offer probabilistic control (dimmer). Combined, they allow two-level control.
  • Direction: this article describes flags and weights in the sense of production. In analytical mode (ANAL), weights play an inverse role: each rule used to recognize a sequence sees its weight incremented, which constitutes an integrated learning mechanism. Flags, meanwhile, serve to trace the analytical path. See B8.

To go further

  • BP3 Documentation: Bol Processor — Flags and Conditions
  • Dynamic Weights: Bol Processor — Grammar Control
  • PCFG and beyond: Lari & Young (1990), “The estimation of stochastic context-free grammars using the Inside-Outside algorithm” — to understand why classical PCFGs are not sufficient for dynamic control
  • Non-Markovian stochastic processes: Feller, An Introduction to Probability Theory and Its Applications, vol. 2, chapter on processes with memory
  • Raga and controlled improvisation: Subramanian (2007), “Generative Grammar of Carnatic Music” — a grammatical model of raga improvisation
  • The foundational article: Bel, B. & Kippen, J. (1992), “Modelling Music with Grammars: Formal Language Representation in the Bol Processor” — flags and weights applied to tabla
  • The ethnomusicological context: Kippen, J. (1988), The Tabla of Lucknow: A Cultural Analysis of a Musical Tradition, Cambridge University Press
  • Flags and weights in analytical mode: B8 — how flags and weights work in BP3’s ANAL and TEMP directions

Glossary

  • Ālāp: Opening of a raga where notes are introduced progressively (Sa, then Sa-Re, then Sa-Re-Ga…). Its accumulative structure exceeds the capabilities of flags (counters) and requires BP3’s context-sensitive extensions (B6).
  • Categorical (distribution): Discrete probability distribution over a finite set of categories, each with its own weight. Generalizes the roll of a biased die to an arbitrary number of faces.
  • Configuration (SOS): Tuple representing the complete state of the system during derivation. For BP3 with flags and weights: (σ,φ,t,w)(\sigma, \varphi, t, w) — working string, flag environment, time, weight function.
  • Āvart: A complete tāla cycle. A kayda can extend over several āvart before concluding with a tihāī.
  • Convergence: Property of a process that tends towards a final state. Decremental weights converge to 00, forcing termination.
  • Decrement: Decrease in a value. In <50-12>, the decrement is 1212: the weight loses 1212 with each use.
  • Flag environment (φ\varphi): Function that associates each flag name with its current integer value. Notation: φ(avart)=4\varphi(\text{avart}) = 4.
  • Flag: Named variable attached to BP3 rules, serving as a conditional counter. Can be tested, assigned, incremented, or decremented.
  • Guard: Condition that must be satisfied for a rule to apply. Flags in test mode (/avart/, /avart>2/) function as guards.
  • Functional update: Operation that creates a new environment identical to the old one except for one variable. Notation: φ[avart↦3]\varphi[\text{avart} \mapsto 3] means ”φ\varphi with avart changed to 33.”
  • Decremental weight: Weight associated with a rule that decreases after each use of that rule. BP3 notation: <N-M> (initial weight NN, decrement MM).
  • Renormalization: Recalculation of probabilities after weight modification. If weights change from [50, 1][50,\, 1] to [38, 1][38,\, 1], probabilities are recalculated from [98%, 2%][98\%,\, 2\%] to [97.4%, 2.6%][97.4\%,\, 2.6\%].
  • Kayda: Tabla composition with a fixed theme (mukhra) and systematic variations over several tāla cycles, concluding with a tihāī.
  • Guaranteed termination: Property of a system that necessarily reaches a final state in a finite number of steps. Decremental weights guarantee at most ⌈N/M⌉+1\lceil N/M \rceil + 1 steps.
  • Tihāī: Indian cadence where a motif is repeated exactly three times to land on sam (the first beat of the cycle).
  • Vādi: Dominant note of a raga, the most frequent and important. Its regular presence can be modeled by a BP3 flag.

Prerequisites: B1, B3, L6 Reading time: 12 min Tags: #flags #weights #control #BP3 #stochastic #SOS


← Back to index