Skip to content
/ mono Public
generated from stagas/ts

mono is a low level language for audio expressions that compiles to wasm

License

Notifications You must be signed in to change notification settings

stagas/mono

Repository files navigation

monolang

mono is a low level language for audio expressions that compiles to wasm

npm i monolang -g pnpm add monolang -g yarn global add monolang

API

# CompilerErrorCauses src/causes.ts#L1
# CompStep src/compiler.ts#L184
# Type src/typed.ts#L4
# Arg src/compiler.ts#L165
# Buffer src/compiler.ts#L61
# CompilerError src/compiler.ts#L16
# Context src/compiler.ts#L349
# Func src/compiler.ts#L333
# Module src/compiler.ts#L411
# MonoParam src/linker-service.ts#L38
# Scope src/compiler.ts#L248
# Struct src/compiler.ts#L31
# Sym src/compiler.ts#L189
# Token

    # constructor(value)
    # group

      string

    # source

      RegExpMatchArrayLike

    # index
    # value
    # as(value, group)

      # value

        string

      # group

        string

      as(value, group)  =>

    # is(group, value)

      # group

        string

      # value

        string

      is(group, value)  =>

        boolean

    # toJSON()
    # create(value, group, source)

      # value

        string

      # group

        string

      # source

        RegExpMatchArrayLike

      create(value, group, source)  =>

# VM src/linker-service.ts#L82
# Includes src/compiler.ts#L178
# MonoBuffer src/linker-service.ts#L74
# SExpr src/sexpr.ts#L3
# TokenJson

    # group

      string

    # source

      {

      # index

        number

      # input

        string

      # match

        string []

      }

    # value

      string

# InstanceExports src/linker-service.ts#L28
# Node

    NodeArray | Token & {

    # lexer

      Lexer

    # toString()

      toString()  =>

        string

    }

# BYTES_CHANNELS  =  ... src/const.ts#L22

    number

# BYTES_EVENTS  =  ... src/const.ts#L7

    number

# BYTES_PADDING  =  ... src/const.ts#L4

    number

# BYTES_PAGE  =  ... src/const.ts#L3

    number

# BYTES_SAMPLES  =  SAMPLE_SIZES.bytes src/const.ts#L32

    number

# BYTES_USER  =  ... src/const.ts#L5

    number

# EVENTS_SIZE  =  128 src/const.ts#L6

    128

# MAX_CHANNELS  =  2 src/const.ts#L11

    2

# MAX_SIZE_BLOCK  =  128 src/const.ts#L12

    128

# SAMPLE_CHANNELS  =  2 src/const.ts#L16

    2

# SAMPLE_MAX_COUNT  =  1 src/const.ts#L17

    1

# SAMPLE_SAMPLE_RATE  =  44100 src/const.ts#L14

    44100

# SAMPLE_SECONDS  =  4 src/const.ts#L15

    4

# SAMPLE_SIZES  =  ... src/const.ts#L24
# SIZE_CHANNEL_IO  =  ... src/const.ts#L21

    number

# SIZE_CHANNEL_ONE  =  ... src/const.ts#L20

    number

# channelsPtr  =  ... src/const.ts#L34

    number

# eventsPtr  =  BYTES_PADDING src/const.ts#L9

    number

# memory  =  ... src/const.ts#L46
# setupPtr  =  ... src/const.ts#L39

    number

# syntax  =  ... src/syntax.ts#L10
# userPtr  =  ... src/const.ts#L40

    number

# Parse(input) src/parser.ts#L11

    # input

      string

    Parse(input)  =>

# compile(root, scope_record, includes, init_body, fill_body, types, step) src/compiler.ts#L588

    # root
    # scope_record  =  {}

      Record<string, Type>

    # includes  =  {}
    # init_body  =  []
    # fill_body  =  []
    # types  =  ...

      TypesMap

    # step  =  CompStep.User

    compile(root, scope_record, includes, init_body, fill_body, types, step)  =>

# getSharedWorkerPort() src/get-shared-worker-port.ts#L1

    getSharedWorkerPort()  =>

      MessagePort

# parse(input) src/parser.ts#L9

    # input

      string

    parse(input)  =>

Credits

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2023 stagas