File: messageCallback.py

package info (click to toggle)
csound 1%3A6.08.0~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 46,084 kB
  • sloc: ansic: 179,873; cpp: 58,415; python: 11,289; lisp: 4,046; xml: 1,302; objc: 1,198; yacc: 1,197; perl: 635; java: 618; sh: 608; tcl: 341; lex: 209; makefile: 168
file content (19 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- coding: utf-8 -*-
"""
This example shows how to set the message callback to receive Csound's messages
in python
"""

from __future__ import print_function

import csnd6

cs=csnd6.Csound()

def message_callback(message):
    print("__message__: "  + message, end="")

cs.SetMessageCallback(message_callback)

cs.Start()
cs.Stop()