New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binding to other languages #112
Comments
Brillant! |
I don't know anything about rust FFI, so I'm afraid I won't be able to help on this unless you get more specific ;-) A problem in Gwion is the lack of documentation. |
I had a quick look at ruckus, and I'm not quite sure what's going on there, but I think you should look here. Also that might be of some help. You'll almost certainly have to make some change to the Makefile (or anything else), please let me now. Would it help it distributed as a library? Cause that should be as easy as tweaking the Makefile. |
Indeed, libgwion.a or libgwion.so would be quite useful, if you could manage it. gwion_all.h is awesome, thanks mate! |
Looking at it 😄 |
Maybe you can add libgwion.a: ${lib_obj}
${AR} ${AR_OPT} to your Makefile (line 74). I'm gonna clean my current work and hopefully push soon. |
When trying to add that to makefile I got a |
Ins't that because you pasted it and hence loosed the leading TAB of line 2? |
Yep, that was the problem. I got it working by fixing the tab and adding libgwion.a to the all: target. When you push I'll pull your changes. This is really cool! |
I already pushed, just waited for this to finish to warn you 👍 |
Ok, GCC and some Clang builds succeeded. Does the libgwion.a target need to be added to the all: target? Like this: |
Not yet. ... Coming Soon 😃 Yes clang/windows builds fail due to some header inclusion issue I have not fixed yet. |
Clang is no issue right now, I’m mostly using gcc. |
As I understand you might use Gwion inside tgtracker. How do you plan sound output? |
That's still to be decided. I want tgtracker to be cross-platform as much as possible, so the current plan is to use Rust bindings rsoundio to libsoundio, which can output to:
The other option is the Rust library cpal, which can output to:
I would really really like a Chuck-like language for livecoding in tgtracker, whether it's Chuck, Gwion, or both. I'm in a bit of a crazy mood where I'm coming up with all these ideas to add to tgtracker and feature bloat is a looming problem. |
So as far as I understand it, you'll do mixing in tg. You're gonna need a driver to input/ouput EDIT: There is a soundio driver, but that might not be relevant to your problem and it is not yet ported to the new driver system. |
Yes thank you. I'm very new to systems programming so I need all the help I can get. I'll focus on audio IO and see if i can get some input and output streams and a mixer. I'll also setup bindgen to attempt codegen for gwion_all.h and see how that turns out. |
I'm setting up a copy of gwion tailored to my dev environment which can be very picky about some things ugh As much as I love ChucK, the project layout is frustrating. I like how you've structured your code. Speaking of binding to other languages, have you ever thought about a Chuck => Gwion bridge? Since the syntax is sooo similar, shouldn't be too hard to translate one to the other. |
Happy to read that, I guess that's kind of a point of view. Thank you for your interrest. EDIT @scalarwaves Is there any place whe can discuss this problem? |
If you're OK, @scalarwaves, I close this issue as we have a better place for this discussion. |
First of all thank you for making Gwion! I love ChucK and this project could be of great use to me. Recently I’ve been trying to create a C wrapper for ChucK to bind with a Rust library. It hasn’t been easy, though that’s not to say ChucK isn’t awesome. Is there a master header like gwion.h that would provide an API suitable for FFI with Rust?
The text was updated successfully, but these errors were encountered: