scoreline
Prev | Orchestra Opcodes and Operators | Next

## scoreline

scoreline — Issues one or more score line events from an instrument.

## Description

Scoreline will issue one or more score events, if ktrig is 1 every k-period. It can handle strings in the same conditions as the standard score. Multi-line strings are accepted, using {{ }} to enclose the string.

## Syntax

    scoreline Sin, ktrig

## Initialization

“Sin” -- a string (in double-quotes or enclosed by {{ }}) containing one or more score events.

## Performance

“ktrig” -- event trigger, 1 issues the score event, 0 bypasses it.

## Examples

Here is an example of the scoreline opcode. It uses the file scoreline.csd.

Example 945. Example of the scoreline opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

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

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

    instr 1

    ktrig metro 3				;trigger 3 times a second
    scoreline {{				;so it sounds like an echo
                i 2  0  3  "flute.aiff"
                i 2  1  3  "drumsMlp.wav"
                }}, ktrig
    ktrig = 0

    endin

    instr 2

    asig soundin p4
         outs asig*.3, asig*.3

    endin
    </CsInstruments>
    <CsScore>

    i1 0 2	;play for 2 seconds, so the samples are played 6 times
    e
    </CsScore>
    </CsoundSynthesizer>

You can use string opcodes like sprintfk to produce strings to be passed to scoreline like this:

    Sfil = "/Volumes/Bla/file.aif"
    String  sprintfk {{i 2 0 %f "%s" %f %f %f %f}}, idur, Sfil, p5, p6, knorm, iskip
    scoreline String, ktrig

## See also

Instrument Invocation

More information on this opcode: http://www.csoundjournal.com/issue15/phrase_loops.html written by Jim Aikin, and in the Floss Manuals: https://flossmanual.csound.com/csound-language/live-events.

## Credits

Author: Victor Lazzarini, 2007

Prev | Up | Next
schedwhen | Home | scoreline_i