Jack connections through python API
Date | 2015-12-20 16:38 |
From | "vallste@libero.it" <00000008a49663bc-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Jack connections through python API |
Attachments | csndconfig.txt test_opt.csd test_opt.py |
Hello, I'd like to have a python program (running a csound program) to connect to jackd (1.9.11 in Ubuntu 14.04) but seems that I'm not able to have SetOption function working. Find attached three files: 1) csndconfig.txt - is a text file to store Csound options to be assigned via API to the csd file (a semicolon is to comment like in csound). 2) test_opt.py - is the main program (create the csound istance, read the csound options from the txt file/assign them to the istance, and start the performance thread) 3) test_opt.csd - is the csound program launched by .py file (a simple sinewave) My problem is that in qjackctl the csound program doesen't appear in the connection window nor I can't hear anything. For sure I'm doing something wrong but can someone please explain what? Thank you in advance Stefano 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 |
Date | 2015-12-20 16:55 |
From | Hlöðver Sigurðsson |
Subject | Re: Jack connections through python API |
Without looking at your files, you can always create a textfile ~/.csound6rc with compilerflags (fx. -+rtaudio=jack -odac ..etc.) that will always overwrite the setting in individual files. Great for browsing the 44100Hz examples in the manual but having jack set at 48000Hz. 2015-12-20 17:38 GMT+01:00 vallste@libero.it <00000008a49663bc-dmarc-request@listserv.heanet.ie>: Hello, |
Date | 2015-12-22 09:15 |
From | Tarmo Johannes |
Subject | Re: Jack connections through python API |
Hi, doing some tests: from command line $ csound -odac -iadc -+rtaudio=jack test_opt.csd works - csound6 appears in jack connections in you attached .txt file there were lines starting with "Csound mailing list" - proabably copied accidentally to the example. Aftere deleting those, it worked for me :) It is good to add testing/edbugging lines to your code to find the problem more easily like: if opt[0] != ";" and opt != "": option = opt.replace(' ', '').strip('\n') print option c.SetOption(option) best! tarmo On Sunday 20 December 2015 17:38:42 you wrote: > Hello, > I'd like to have a python program (running a csound program) to connect to > jackd (1.9.11 in Ubuntu 14.04) but seems that I'm not able to have > SetOption function working. Find attached three files: 1) csndconfig.txt - > is a text file to store Csound options to be > assigned via API to the csd file (a semicolon is to comment like in > csound). > 2) test_opt.py - is the main program (create the csound istance, read the > csound options from the txt file/assign them to the istance, and start the > performance thread) 3) test_opt.csd - is the csound program launched by .py > file (a simple sinewave) > > My problem is that in qjackctl the csound program doesen't appear in the > connection window nor I can't hear anything. For sure I'm doing something > wrong but can someone please explain what? > > Thank you in advance > > Stefano > > > 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 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 |