strfromurl
Prev | Orchestra Opcodes and Operators | Next

## strfromurl

strfromurl — Set string variable to value read from an URL

## Description

strfromurl sets a string variable at initialization time to the value found from reading an URL.

## Syntax

    Sdst strfromurl StringURL

## Initialization

StringURL -- string naming an URL.

Sdst -- destination string variable

## Examples

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

Example 1004. Example of the strfromurl 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 strget.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

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

    #include "http://codemist.co.uk/jpff/test.in"

    instr 2

    Sfile strfromurl "http://codemist.co.uk/jpff/test.in"
      prints Sfile
    endin
    </CsInstruments>
    <CsScore>

    i 1 0 1
    i 2 1 1
    e
    </CsScore>
    </CsoundSynthesizer>

## See also

strset

## Credits

Author: John ffitch

2013

URLs available from Csound 6.02 if built with support

Prev | Up | Next
streson | Home | strget