Csound Csound-dev Csound-tekno Search About

[Csnd] Csd optimization

Date2025-05-04 02:40
FromGabriel Borin
Subject[Csnd] Csd optimization
Attachments_final.csd  
Hello, everyone

I have a project I am working on that is a little convoluted as far as setup goes, and I am trying to optimize the csd (or my CsoundQt options) as much as I can. 

I have this csd getting OSC from Open Stage Control. Then, I send audio amplitudes downsampled to Max, where I have a jitter patch controlling the visuals. As I was playing with the visuals in fullscreen, my audio in CsoundQt started struggling --- it doesn't happen without fullscreen. I played with a few parameters in CsoundQt (buffersize, multicore, ksmps, etc...), but I just wanna find the best way to troubleshoot this. 

Thank you,
Best,
Gabriel
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

Date2025-05-04 10:59
FromGabriel Borin
SubjectRe: [Csnd] Csd optimization

A quick update. I did realize that some of the processes of the visuals were not running on the GPU, so a big part of my problems came from that. But if there are any optimizations that I should look into here, I would appreciate the help. 


--Gabriel


On Sat, May 3, 2025, 21:40 Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
Hello, everyone

I have a project I am working on that is a little convoluted as far as setup goes, and I am trying to optimize the csd (or my CsoundQt options) as much as I can. 

I have this csd getting OSC from Open Stage Control. Then, I send audio amplitudes downsampled to Max, where I have a jitter patch controlling the visuals. As I was playing with the visuals in fullscreen, my audio in CsoundQt started struggling --- it doesn't happen without fullscreen. I played with a few parameters in CsoundQt (buffersize, multicore, ksmps, etc...), but I just wanna find the best way to troubleshoot this. 

Thank you,
Best,
Gabriel
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

Date2025-05-04 20:29
Fromjoachim heintz
SubjectRe: [Csnd] Csd optimization
hi gabriel -

without going into details, i had a quick look at your code, and for me 
it looks well written and nothing obvious which can be optimized.

the main question for me is why you use csoundqt in this constellaion. 
if you run csound in terminal, you would certainly gain stability and 
performance.  we always had some CPU bottlenecks in csoundqt.  i 
nevertheless run some complex csd in csoundqt because i need the widgets 
(and it works), but as i said, i think for you it is different.

best -
	joachim

On 04/05/2025 11:59, Gabriel Borin wrote:
> A quick update. I did realize that some of the processes of the visuals 
> were not running on the GPU, so a big part of my problems came from 
> that. But if there are any optimizations that I should look into here, I 
> would appreciate the help.
> 
> 
> --Gabriel
> 
> 
> On Sat, May 3, 2025, 21:40 Gabriel Borin  > wrote:
> 
>     Hello, everyone
> 
>     I have a project I am working on that is a little convoluted as far
>     as setup goes, and I am trying to optimize the csd (or my CsoundQt
>     options) as much as I can.
> 
>     I have this csd getting OSC from Open Stage Control. Then, I send
>     audio amplitudes downsampled to Max, where I have a jitter patch
>     controlling the visuals. As I was playing with the visuals in
>     fullscreen, my audio in CsoundQt started struggling --- it
>     doesn't happen without fullscreen. I played with a few parameters in
>     CsoundQt (buffersize, multicore, ksmps, etc...), but I just wanna
>     find the best way to troubleshoot this.
> 
>     Thank you,
>     Best,
>     Gabriel
> 
> 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  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

Date2025-05-04 22:50
FromGabriel Borin
SubjectRe: [Csnd] Csd optimization
Hi, Joachim

TKS for the feedback. 

I started wondering the same thing. I have my vimrc setup for Csound as well, and it seemed to give me some extra CPU to spare. I will keep that in mind for future reference. It is the first time I am using OSC for a live setup.

Thank you.

--Gabriel

On Sun, May 4, 2025, 15:29 joachim heintz <jh@joachimheintz.de> wrote:
hi gabriel -

without going into details, i had a quick look at your code, and for me
it looks well written and nothing obvious which can be optimized.

the main question for me is why you use csoundqt in this constellaion.
if you run csound in terminal, you would certainly gain stability and
performance.  we always had some CPU bottlenecks in csoundqt.  i
nevertheless run some complex csd in csoundqt because i need the widgets
(and it works), but as i said, i think for you it is different.

best -
        joachim

On 04/05/2025 11:59, Gabriel Borin wrote:
> A quick update. I did realize that some of the processes of the visuals
> were not running on the GPU, so a big part of my problems came from
> that. But if there are any optimizations that I should look into here, I
> would appreciate the help.
>
>
> --Gabriel
>
>
> On Sat, May 3, 2025, 21:40 Gabriel Borin <gabriel.s.borin@gmail.com
> <mailto:gabriel.s.borin@gmail.com>> wrote:
>
>     Hello, everyone
>
>     I have a project I am working on that is a little convoluted as far
>     as setup goes, and I am trying to optimize the csd (or my CsoundQt
>     options) as much as I can.
>
>     I have this csd getting OSC from Open Stage Control. Then, I send
>     audio amplitudes downsampled to Max, where I have a jitter patch
>     controlling the visuals. As I was playing with the visuals in
>     fullscreen, my audio in CsoundQt started struggling --- it
>     doesn't happen without fullscreen. I played with a few parameters in
>     CsoundQt (buffersize, multicore, ksmps, etc...), but I just wanna
>     find the best way to troubleshoot this.
>
>     Thank you,
>     Best,
>     Gabriel
>
> Csound mailing list Csound@listserv.heanet.ie
> <mailto:Csound@listserv.heanet.ie> https://listserv.heanet.ie/cgi-bin/
> wa?A0=CSOUND <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND> Send bugs
> reports to https://github.com/csound/csound/issues <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
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

Date2025-05-05 16:10
Fromjoachim heintz
SubjectRe: [Csnd] Csd optimization
yes but just to be clear: i was not speaking about editing, but about 
running csound.  you can edit in csoundqt (or which IDE you like), but 
running the .csd file via command line is still such a nice thing.  just 
don't forget -odac ... =)


On 04/05/2025 23:50, Gabriel Borin wrote:
> Hi, Joachim
> 
> TKS for the feedback.
> 
> I started wondering the same thing. I have my vimrc setup for Csound as 
> well, and it seemed to give me some extra CPU to spare. I will keep that 
> in mind for future reference. It is the first time I am using OSC for a 
> live setup.
> 
> Thank you.
> 
> --Gabriel
> 
> On Sun, May 4, 2025, 15:29 joachim heintz  > wrote:
> 
>     hi gabriel -
> 
>     without going into details, i had a quick look at your code, and for me
>     it looks well written and nothing obvious which can be optimized.
> 
>     the main question for me is why you use csoundqt in this constellaion.
>     if you run csound in terminal, you would certainly gain stability and
>     performance.  we always had some CPU bottlenecks in csoundqt.  i
>     nevertheless run some complex csd in csoundqt because i need the
>     widgets
>     (and it works), but as i said, i think for you it is different.
> 
>     best -
>              joachim
> 
>     On 04/05/2025 11:59, Gabriel Borin wrote:
>      > A quick update. I did realize that some of the processes of the
>     visuals
>      > were not running on the GPU, so a big part of my problems came from
>      > that. But if there are any optimizations that I should look into
>     here, I
>      > would appreciate the help.
>      >
>      >
>      > --Gabriel
>      >
>      >
>      > On Sat, May 3, 2025, 21:40 Gabriel Borin
>     
>      >      >> wrote:
>      >
>      >     Hello, everyone
>      >
>      >     I have a project I am working on that is a little convoluted
>     as far
>      >     as setup goes, and I am trying to optimize the csd (or my
>     CsoundQt
>      >     options) as much as I can.
>      >
>      >     I have this csd getting OSC from Open Stage Control. Then, I send
>      >     audio amplitudes downsampled to Max, where I have a jitter patch
>      >     controlling the visuals. As I was playing with the visuals in
>      >     fullscreen, my audio in CsoundQt started struggling --- it
>      >     doesn't happen without fullscreen. I played with a few
>     parameters in
>      >     CsoundQt (buffersize, multicore, ksmps, etc...), but I just wanna
>      >     find the best way to troubleshoot this.
>      >
>      >     Thank you,
>      >     Best,
>      >     Gabriel
>      >
>      > 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      github.com/csound/csound/issues>      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      listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
>     Send bugs reports to
>     https://github.com/csound/csound/issues      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  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

Date2025-05-06 15:59
FromGabriel Borin
SubjectRe: [Csnd] Csd optimization
Oh, yes. I got it. Thank you very much, again.

--Gabriel

On Mon, May 5, 2025, 11:10 joachim heintz <jh@joachimheintz.de> wrote:
yes but just to be clear: i was not speaking about editing, but about
running csound.  you can edit in csoundqt (or which IDE you like), but
running the .csd file via command line is still such a nice thing.  just
don't forget -odac ... =)


On 04/05/2025 23:50, Gabriel Borin wrote:
> Hi, Joachim
>
> TKS for the feedback.
>
> I started wondering the same thing. I have my vimrc setup for Csound as
> well, and it seemed to give me some extra CPU to spare. I will keep that
> in mind for future reference. It is the first time I am using OSC for a
> live setup.
>
> Thank you.
>
> --Gabriel
>
> On Sun, May 4, 2025, 15:29 joachim heintz <jh@joachimheintz.de
> <mailto:jh@joachimheintz.de>> wrote:
>
>     hi gabriel -
>
>     without going into details, i had a quick look at your code, and for me
>     it looks well written and nothing obvious which can be optimized.
>
>     the main question for me is why you use csoundqt in this constellaion.
>     if you run csound in terminal, you would certainly gain stability and
>     performance.  we always had some CPU bottlenecks in csoundqt.  i
>     nevertheless run some complex csd in csoundqt because i need the
>     widgets
>     (and it works), but as i said, i think for you it is different.
>
>     best -
>              joachim
>
>     On 04/05/2025 11:59, Gabriel Borin wrote:
>      > A quick update. I did realize that some of the processes of the
>     visuals
>      > were not running on the GPU, so a big part of my problems came from
>      > that. But if there are any optimizations that I should look into
>     here, I
>      > would appreciate the help.
>      >
>      >
>      > --Gabriel
>      >
>      >
>      > On Sat, May 3, 2025, 21:40 Gabriel Borin
>     <gabriel.s.borin@gmail.com <mailto:gabriel.s.borin@gmail.com>
>      > <mailto:gabriel.s.borin@gmail.com
>     <mailto:gabriel.s.borin@gmail.com>>> wrote:
>      >
>      >     Hello, everyone
>      >
>      >     I have a project I am working on that is a little convoluted
>     as far
>      >     as setup goes, and I am trying to optimize the csd (or my
>     CsoundQt
>      >     options) as much as I can.
>      >
>      >     I have this csd getting OSC from Open Stage Control. Then, I send
>      >     audio amplitudes downsampled to Max, where I have a jitter patch
>      >     controlling the visuals. As I was playing with the visuals in
>      >     fullscreen, my audio in CsoundQt started struggling --- it
>      >     doesn't happen without fullscreen. I played with a few
>     parameters in
>      >     CsoundQt (buffersize, multicore, ksmps, etc...), but I just wanna
>      >     find the best way to troubleshoot this.
>      >
>      >     Thank you,
>      >     Best,
>      >     Gabriel
>      >
>      > Csound mailing list Csound@listserv.heanet.ie
>     <mailto:Csound@listserv.heanet.ie>
>      > <mailto:Csound@listserv.heanet.ie
>     <mailto:Csound@listserv.heanet.ie>> https://listserv.heanet.ie/cgi-
>     bin/ <https://listserv.heanet.ie/cgi-bin/>
>      > wa?A0=CSOUND <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>> Send bugs
>      > reports to https://github.com/csound/csound/issues <https://
>     github.com/csound/csound/issues> <https://github.com/ <https://
>     github.com/>
>      > csound/csound/issues> Discussions of bugs and features can be
>     posted here
>
>     Csound mailing list
>     Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND <https://
>     listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
>     Send bugs reports to
>     https://github.com/csound/csound/issues <https://github.com/csound/
>     csound/issues>
>     Discussions of bugs and features can be posted here
>
> Csound mailing list Csound@listserv.heanet.ie
> <mailto:Csound@listserv.heanet.ie> https://listserv.heanet.ie/cgi-bin/
> wa?A0=CSOUND <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND> Send bugs
> reports to https://github.com/csound/csound/issues <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
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