[Csnd] Csound Support for All Godot Platforms + New Music Synth Example

Hello everyone,

I’m excited to share that I’ve successfully integrated Csound with the Godot game engine, now supporting all platforms that Godot targets: Windows, macOS, Linux, Android, iOS, and Web.

To showcase this, I’ve created an example project—a music synthesizer in Godot based on amsynth. You can explore the web-based version of the project here:
Godot Synth

You can also check out the related projects here:

Best regards,

Werner

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Fantastic. Is your build using 6.x or 7.0?

Prof. Victor Lazzarini
Maynooth University
Ireland

I am using the development branch (7.0) of Csound with some additional pr changes that are still in review progress.

Great, congrats on the work, it’s really good.

Prof. Victor Lazzarini
Maynooth University
Ireland

Very interested in this! …but getting lots of console errors for the example and it doesn’t load:

OS: macOS
Browser: Chrome


01:13:10.982 godot-synths.js:477 Blocking on the main thread is very dangerous, see [https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread](https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread)
onPrintError @ godot-synths.js:477
warnOnce @ godot-synths.js:9
_emscripten_check_blocking_allowed @ godot-synths.js:9
$pthread_cond_timedwait @ 0064751e:0xb8eeb
$pthread_cond_wait @ 0064751e:0xd6e32
$emscripten_proxy_sync_with_ctx @ 0064751e:0xbf690
$emscripten_proxy_sync @ 0064751e:0xabc80
$_emscripten_proxy_dlsync @ 0064751e:0xbf177
(anonymous) @ godot-synths.js:9
__emscripten_dlsync_threads @ godot-synths.js:9
$func1448 @ 0064751e:0xbf545
$func1444 @ 0064751e:0xbf468
$dlopen @ 0064751e:0xbf221
$func1076 @ 08e6f96e:0x29d830
$func57389 @ 08e6f96e:0x1ea8272
$func57412 @ 08e6f96e:0x1eac364
$func50666 @ 08e6f96e:0x1d9c3c8
$func50715 @ 08e6f96e:0x1da178c
$func34374 @ 08e6f96e:0x1550c6f
$func1308 @ 08e6f96e:0x454c82
$func1210 @ 08e6f96e:0x3cae14
$_Z14godot_web_mainiPPc @ 08e6f96e:0x279245
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
Promise.then
start @ godot-synths.js:778
(anonymous) @ godot-synths.js:837Understand this error
01:13:11.112 godot-synths.js:462 Godot Engine v4.3.stable.official.77dcf97d8 - [https://godotengine.org](https://godotengine.org)
01:13:11.210 godot-synths.js:9 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See [https://www.chromestatus.com/feature/5745543795965952](https://www.chromestatus.com/feature/5745543795965952)
add @ godot-synths.js:9
_godot_js_input_mouse_wheel_cb @ godot-synths.js:9
$func764 @ 08e6f96e:0x2357de
$func1283 @ 08e6f96e:0x4476ab
$func1262 @ 08e6f96e:0x3e0ebd
$_Z14godot_web_mainiPPc @ 08e6f96e:0x28bf2d
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
01:13:11.210 godot-synths.js:9 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See [https://www.chromestatus.com/feature/](https://www.chromestatus.com/feature/)5745543795965952
add @ godot-synths.js:9
_godot_js_input_touch_cb @ godot-synths.js:9
$func764 @ 08e6f96e:0x2357ed
$func1283 @ 08e6f96e:0x4476ab
$func1262 @ 08e6f96e:0x3e0ebd
$_Z14godot_web_mainiPPc @ 08e6f96e:0x28bf2d
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
01:13:11.210 godot-synths.js:9 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See [https://www.chromestatus.com/feature/5745543795965952](https://www.chromestatus.com/feature/5745543795965952)
add @ godot-synths.js:9
_godot_js_input_touch_cb @ godot-synths.js:9
$func764 @ 08e6f96e:0x2357ed
$func1283 @ 08e6f96e:0x4476ab
$func1262 @ 08e6f96e:0x3e0ebd
$_Z14godot_web_mainiPPc @ 08e6f96e:0x28bf2d
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
01:13:11.305 godot-synths.js:462 OpenGL API OpenGL ES 3.0 (WebGL 2.0 (OpenGL ES 3.0 Chromium)) - Compatibility - Using Device: WebKit - WebKit WebGL
01:13:11.951 godot-synths.js:477 USER WARNING: /root/Main/CsoundPlayer is trying to play a sample from a stream that cannot be sampled.
onPrintError @ godot-synths.js:477
put_char @ godot-synths.js:9
write @ godot-synths.js:9
write @ godot-synths.js:9
doWritev @ godot-synths.js:9
_fd_write @ godot-synths.js:9
$func1098 @ 0064751e:0xae528
$__vfprintf_internal @ 0064751e:0xe6b3b
$vfprintf @ 0064751e:0xc14d2
$func50452 @ 08e6f96e:0x1d7dcea
$func11104 @ 08e6f96e:0xb1fd0a
$func50448 @ 08e6f96e:0x1d7da29
$func50454 @ 08e6f96e:0x1d7de6b
$func588 @ 08e6f96e:0x21f76f
$func660 @ 08e6f96e:0x226ffa
$func25403 @ 08e6f96e:0x12d1072
$func13617 @ 08e6f96e:0x102e2aa
$func23216 @ 08e6f96e:0x1263496
$func651 @ 08e6f96e:0x225bd8
$func31843 @ 08e6f96e:0x147361c
$func25372 @ 08e6f96e:0x12cef44
$func28631 @ 08e6f96e:0x138c70b
$func28672 @ 08e6f96e:0x138dee7
$func685 @ 08e6f96e:0x22b229
$func16983 @ 08e6f96e:0x10f1f4c
$func16983 @ 08e6f96e:0x10f21b4
$func16983 @ 08e6f96e:0x10f21b4
$func16978 @ 08e6f96e:0x10f15fe
$func17308 @ 08e6f96e:0x11069a4
$_Z14godot_web_mainiPPc @ 08e6f96e:0x29317e
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
Promise.then
start @ godot-synths.js:778
(anonymous) @ godot-synths.js:837Understand this error
01:13:11.951 godot-synths.js:477 at: play_basic (scene/audio/audio_stream_player_internal.cpp:158)
onPrintError @ godot-synths.js:477
put_char @ godot-synths.js:9
write @ godot-synths.js:9
write @ godot-synths.js:9
doWritev @ godot-synths.js:9
_fd_write @ godot-synths.js:9
$func1098 @ 0064751e:0xae528
$__vfprintf_internal @ 0064751e:0xe6b3b
$vfprintf @ 0064751e:0xc14d2
$func50452 @ 08e6f96e:0x1d7dcea
$func11104 @ 08e6f96e:0xb1fd0a
$func50448 @ 08e6f96e:0x1d7da4d
$func50454 @ 08e6f96e:0x1d7de6b
$func588 @ 08e6f96e:0x21f76f
$func660 @ 08e6f96e:0x226ffa
$func25403 @ 08e6f96e:0x12d1072
$func13617 @ 08e6f96e:0x102e2aa
$func23216 @ 08e6f96e:0x1263496
$func651 @ 08e6f96e:0x225bd8
$func31843 @ 08e6f96e:0x147361c
$func25372 @ 08e6f96e:0x12cef44
$func28631 @ 08e6f96e:0x138c70b
$func28672 @ 08e6f96e:0x138dee7
$func685 @ 08e6f96e:0x22b229
$func16983 @ 08e6f96e:0x10f1f4c
$func16983 @ 08e6f96e:0x10f21b4
$func16983 @ 08e6f96e:0x10f21b4
$func16978 @ 08e6f96e:0x10f15fe
$func17308 @ 08e6f96e:0x11069a4
$_Z14godot_web_mainiPPc @ 08e6f96e:0x29317e
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
Promise.then
start @ godot-synths.js:778
(anonymous) @ godot-synths.js:837Understand this error
01:13:12.596 godot-synths.js:477 USER WARNING: Property not found: audio/csound/default_csound_layout
onPrintError @ godot-synths.js:477
put_char @ godot-synths.js:9
write @ godot-synths.js:9
write @ godot-synths.js:9
doWritev @ godot-synths.js:9
_fd_write @ godot-synths.js:9
$func1098 @ 0064751e:0xae528
$__vfprintf_internal @ 0064751e:0xe6b3b
$vfprintf @ 0064751e:0xc14d2
$func50452 @ 08e6f96e:0x1d7dcea
$func11104 @ 08e6f96e:0xb1fd0a
$func50448 @ 08e6f96e:0x1d7da29
$func50454 @ 08e6f96e:0x1d7de6b
$func588 @ 08e6f96e:0x21f76f
$func660 @ 08e6f96e:0x226ffa
$func767 @ 08e6f96e:0x235d97
$func1497 @ 08e6f96e:0x47ca64
$func57522 @ 08e6f96e:0x1eaf1a0
$func7136 @ 0212c9ae:0x183a0c
$func1174 @ 0212c9ae:0xe5e48
$func517 @ 0212c9ae:0xc4118
$func2086 @ 0212c9ae:0x11b7f5
$func57378 @ 08e6f96e:0x1ea6e50
$func3699 @ 08e6f96e:0x645ee8
$func651 @ 08e6f96e:0x225c4b
$func1036 @ 08e6f96e:0x29a940
$func17313 @ 08e6f96e:0x1106d15
$func1033 @ 08e6f96e:0x299357
$_Z14godot_web_mainiPPc @ 08e6f96e:0x29318c
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
Promise.then
start @ godot-synths.js:778
(anonymous) @ godot-synths.js:837Understand this error
01:13:12.596 godot-synths.js:477 at: get_setting_with_override (core/config/project_settings.cpp:375)
onPrintError @ godot-synths.js:477
put_char @ godot-synths.js:9
write @ godot-synths.js:9
write @ godot-synths.js:9
doWritev @ godot-synths.js:9
_fd_write @ godot-synths.js:9
$func1098 @ 0064751e:0xae528
$__vfprintf_internal @ 0064751e:0xe6b3b
$vfprintf @ 0064751e:0xc14d2
$func50452 @ 08e6f96e:0x1d7dcea
$func11104 @ 08e6f96e:0xb1fd0a
$func50448 @ 08e6f96e:0x1d7da4d
$func50454 @ 08e6f96e:0x1d7de6b
$func588 @ 08e6f96e:0x21f76f
$func660 @ 08e6f96e:0x226ffa
$func767 @ 08e6f96e:0x235d97
$func1497 @ 08e6f96e:0x47ca64
$func57522 @ 08e6f96e:0x1eaf1a0
$func7136 @ 0212c9ae:0x183a0c
$func1174 @ 0212c9ae:0xe5e48
$func517 @ 0212c9ae:0xc4118
$func2086 @ 0212c9ae:0x11b7f5
$func57378 @ 08e6f96e:0x1ea6e50
$func3699 @ 08e6f96e:0x645ee8
$func651 @ 08e6f96e:0x225c4b
$func1036 @ 08e6f96e:0x29a940
$func17313 @ 08e6f96e:0x1106d15
$func1033 @ 08e6f96e:0x299357
$_Z14godot_web_mainiPPc @ 08e6f96e:0x29318c
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
Promise.then
start @ godot-synths.js:778
(anonymous) @ godot-synths.js:837Understand this error
01:13:12.596 godot-synths.js:477 USER WARNING: Property not found: audio/csound/default_csound_layout
onPrintError @ godot-synths.js:477
put_char @ godot-synths.js:9
write @ godot-synths.js:9
write @ godot-synths.js:9
doWritev @ godot-synths.js:9
_fd_write @ godot-synths.js:9
$func1098 @ 0064751e:0xae528
$__vfprintf_internal @ 0064751e:0xe6b3b
$vfprintf @ 0064751e:0xc14d2
$func50452 @ 08e6f96e:0x1d7dcea
$func11104 @ 08e6f96e:0xb1fd0a
$func50448 @ 08e6f96e:0x1d7da29
$func50454 @ 08e6f96e:0x1d7de6b
$func588 @ 08e6f96e:0x21f76f
$func660 @ 08e6f96e:0x226ffa
$func767 @ 08e6f96e:0x235d97
$func1497 @ 08e6f96e:0x47ca64
$func57522 @ 08e6f96e:0x1eaf1a0
$func7136 @ 0212c9ae:0x183a0c
$func1176 @ 0212c9ae:0xe631b
$func1174 @ 0212c9ae:0xe614a
$func517 @ 0212c9ae:0xc4118
$func2086 @ 0212c9ae:0x11b7f5
$func57378 @ 08e6f96e:0x1ea6e50
$func3699 @ 08e6f96e:0x645ee8
$func651 @ 08e6f96e:0x225c4b
$func1036 @ 08e6f96e:0x29a940
$func17313 @ 08e6f96e:0x1106d15
$func1033 @ 08e6f96e:0x299357
$_Z14godot_web_mainiPPc @ 08e6f96e:0x29318c
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
Promise.then
start @ godot-synths.js:778
(anonymous) @ godot-synths.js:837Understand this error
01:13:12.596 godot-synths.js:477 at: get_setting_with_override (core/config/project_settings.cpp:375)
onPrintError @ godot-synths.js:477
put_char @ godot-synths.js:9
write @ godot-synths.js:9
write @ godot-synths.js:9
doWritev @ godot-synths.js:9
_fd_write @ godot-synths.js:9
$func1098 @ 0064751e:0xae528
$__vfprintf_internal @ 0064751e:0xe6b3b
$vfprintf @ 0064751e:0xc14d2
$func50452 @ 08e6f96e:0x1d7dcea
$func11104 @ 08e6f96e:0xb1fd0a
$func50448 @ 08e6f96e:0x1d7da4d
$func50454 @ 08e6f96e:0x1d7de6b
$func588 @ 08e6f96e:0x21f76f
$func660 @ 08e6f96e:0x226ffa
$func767 @ 08e6f96e:0x235d97
$func1497 @ 08e6f96e:0x47ca64
$func57522 @ 08e6f96e:0x1eaf1a0
$func7136 @ 0212c9ae:0x183a0c
$func1176 @ 0212c9ae:0xe631b
$func1174 @ 0212c9ae:0xe614a
$func517 @ 0212c9ae:0xc4118
$func2086 @ 0212c9ae:0x11b7f5
$func57378 @ 08e6f96e:0x1ea6e50
$func3699 @ 08e6f96e:0x645ee8
$func651 @ 08e6f96e:0x225c4b
$func1036 @ 08e6f96e:0x29a940
$func17313 @ 08e6f96e:0x1106d15
$func1033 @ 08e6f96e:0x299357
$_Z14godot_web_mainiPPc @ 08e6f96e:0x29318c
__Z14godot_web_mainiPPc @ godot-synths.js:9
$__main_argc_argv @ 0064751e:0xa596a
callMain @ godot-synths.js:9
(anonymous) @ godot-synths.js:804
(anonymous) @ godot-synths.js:799
Promise.then
start @ godot-synths.js:778
(anonymous) @ godot-synths.js:837Understand this error
01:13:12.710 godot-synths.js:462 --Csound version 7.0 (float samples) Sep 10 2024
01:13:12.710 godot-synths.js:462 [commit: 8073b22c40cb92a2f2ed24bbd41560b9c18f7a7f]
...
01:13:12.874 godot-synths.html:139
displayFailureNotice @ godot-synths.html:139Understand this error

Works for a little while on macOS/Safari after getting a popup about MIDI not being available, but after playing with the synth using the mouse for about a minute, Safari hits its memory limit and reloads the page.

Let me know if you need more info. I’m happy to help!
~ Andy Fillebrown

Hello Andy,
Could you provide more details on your computer specs, operating system and browser information so I can try to reproduce and fix the error?
Thanks,
Werner

ya, the console output I posted is from my macOS M1 on Chrome, and the same system on Safari runs for a while but hits Safari’s memory usage limit after about a minute of playing the piano keyboard with the mouse.

It runs here on my mac (M1, MacOS 14.8.1) under the latest Chrome, but I can’t seem to get the sounds to change. I first could not make the sounds change, but once I checked MIDI 1 below, loading presets and changing controls worked.

I mean I couldn’t get the sounds to change at first, then it worked. I tested with MIDI and it works as well.

working here on Windows, but if I go a little crazy it starts to get a little glitchy. Great to see Csound integrated with yet another engine.

Thanks for providing feedback. I was able to reproduce the error on the browser, and it seems to be caused by a memory leak that eventually leads to freezing. I’ll work to fix these issues.

Thanks,

Werner

cool --- i wrote a post on the csound site about it:

let me know about any changes you would like to see in this post.

  joachim

WOW.

Hello everyone,

I’m excited to share an update for the godot-csound project! This plugin integrates Godot Engine with Csound, opening up powerful sound synthesis possibilities.

In this latest update, I’ve:

  • Fixed known issues to improve stability and performance.
  • Added a downloadable release file to make installation and setup even more convenient.
  • Set up CI/CD to automatically test and verify changes, ensuring smoother updates and better reliability.

You can check out the repository and grab the release file here: godot-csound releases

I’d love to hear your feedback or suggestions for further improvement. Let me know if you run into any issues or have ideas for new features!

Thanks,
Werner

Well done, Werner, that looks great.
Huge amount of work.

Prof. Victor Lazzarini
Maynooth University
Ireland

Congratulations! This is really great work.

Awesome.

I can not help but say this…

… some of us have been waiting for godot.

THANKS!