Csound Csound-dev Csound-tekno Search About

[Csnd] Mixing instruments with different ksmps values

Date2020-02-27 17:59
FromJason Hallen
Subject[Csnd] Mixing instruments with different ksmps values
Hi everyone,

I'm working on a .csd file where I'd like one instrument to operate at ksmps = 1 while the rest of the instruments operate around ksmps = 20.  Ideally I'd run everything at ksmps = 1, but that is too much of a load and causes glitches.

The problem I have is that all instruments send their output via chnmix to a master instrument that adjusts levels, applies any global effects, displays a VU meter, and then clears the channel.  This is causing the instrument operating at ksmps = 1 to distort.  I'm guessing this has to do with the mismatch in ksmps when sending signals over chnmix.

Can anyone give me pointers in how I can have an instrument run ksmps = 1 and play nicely with the rest of the orchestra?  Or maybe there's a different explanation for my problem?

Thanks!
Jason
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

Date2020-02-27 18:53
FromMichael Gogins
SubjectRe: [Csnd] Mixing instruments with different ksmps values
Did you try putting the body of your code into a user-defined opcode with a local ksmps of 1 and calling that from your instr definition?

Regards,
Mike

On Thu, Feb 27, 2020, 12:59 Jason Hallen <hallenj@gmail.com> wrote:
Hi everyone,

I'm working on a .csd file where I'd like one instrument to operate at ksmps = 1 while the rest of the instruments operate around ksmps = 20.  Ideally I'd run everything at ksmps = 1, but that is too much of a load and causes glitches.

The problem I have is that all instruments send their output via chnmix to a master instrument that adjusts levels, applies any global effects, displays a VU meter, and then clears the channel.  This is causing the instrument operating at ksmps = 1 to distort.  I'm guessing this has to do with the mismatch in ksmps when sending signals over chnmix.

Can anyone give me pointers in how I can have an instrument run ksmps = 1 and play nicely with the rest of the orchestra?  Or maybe there's a different explanation for my problem?

Thanks!
Jason
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

Date2020-02-27 20:37
FromJason Hallen
SubjectRe: [Csnd] Mixing instruments with different ksmps values
Hi Mike,

That seems to have done the trick, thanks!  The opcode is running at ksmps = 1 and there's no distortion in the instrument.  I really appreciate your tip!

Jason

On Thu, Feb 27, 2020 at 12:53 PM Michael Gogins <michael.gogins@gmail.com> wrote:
Did you try putting the body of your code into a user-defined opcode with a local ksmps of 1 and calling that from your instr definition?

Regards,
Mike

On Thu, Feb 27, 2020, 12:59 Jason Hallen <hallenj@gmail.com> wrote:
Hi everyone,

I'm working on a .csd file where I'd like one instrument to operate at ksmps = 1 while the rest of the instruments operate around ksmps = 20.  Ideally I'd run everything at ksmps = 1, but that is too much of a load and causes glitches.

The problem I have is that all instruments send their output via chnmix to a master instrument that adjusts levels, applies any global effects, displays a VU meter, and then clears the channel.  This is causing the instrument operating at ksmps = 1 to distort.  I'm guessing this has to do with the mismatch in ksmps when sending signals over chnmix.

Can anyone give me pointers in how I can have an instrument run ksmps = 1 and play nicely with the rest of the orchestra?  Or maybe there's a different explanation for my problem?

Thanks!
Jason
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
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