B Statement
Prev | Score Statements and GEN Routines | Next

## B Statement

B Statement — This statement adjusts the clock.

## Description

This statement adjusts the clock accumultively.

## Syntax

    B p1

## Performance

p1 -- Specifies how the clock is to be set.

### Special Considerations

p1 is the number of beats by which p2 values of subsequent i statements are modified. If p1 is positive, the clock is reset forward, and subsequent notes appear later, the number of beats specified by p1 being added to the note's p2. If p1 is negative, the clock is reset backward, and subsequent notes appear earlier, the number of beats specified by p1 being subtracted from the note's p2. The clock is incremented by p1 for subsequent notes.

## Examples

Here is an example of the B statement. It uses the file capB.csd.

Example 1251. Example of the B statement.

    <CsoundSynthesizer>
    <CsOptions>
    ; Select audio/midi flags here according to platform
    -odac     ;;;realtime audio out
    ;-iadc    ;;;uncomment -iadc if RT audio input is needed too
    ; For Non-realtime ouput leave only the line below:
    ; -o b.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

    sr = 44100
    ksmps = 32
    nchnls = 2
    0dbfs  = 1

    instr 1

    aenv expseg .01, p3*0.25, 1, p3*0.75, 0.01
    asig poscil3 .4*aenv, 220, 1
         outs asig, asig

    endin

    instr 2

    asig pluck 0.7, p4, 220, 0, 1
         outs asig, asig

    endin

    instr 3

    asig loscil .8, 1, 2, 1
         outs asig, asig

    endin

    instr 4
    asig  bamboo .8, 0.01
          outs asig, asig

    endin
    </CsInstruments>
    <CsScore>
    f 1 0 16384 10 1		;sine wave
    f 2 0 0 1 "fox.wav" 0 0 0	;sample

    i1  0 2
    i1  10 2

    b 5			; set the clock "forward"
    i2 1 2 220		; start time = 6
    i2 2 2 110		; start time = 7

    B -6			; move clock back
    i3 3   2		; start time = 2
    i3 5.5 1		; start time = 4.5

    b 0			; reset clock to normal
    i4 10 2			; start time = 10

    e
    </CsScore>
    </CsoundSynthesizer>

## Credits

New in Csound 6.15.

Prev | Up | Next
b Statement | Home | C Statement