Csound Csound-dev Csound-tekno Search About

[Csnd] printsk vs printks

Date2022-06-21 20:08
FromMike McGonagle
Subject[Csnd] printsk vs printks
While these two opcodes seem to do the same thing, they do it in different ways. 'printks' expects a time offset, while 'printsk' doesn't.

At the same time, 'printsk' isn't as stable, or at least it crashes more on me.

There do seem to be a lot of overlapping opcodes, but for the most part, I'm able to figure things out.

So any thoughts on which of these opcodes is 'preferred'?
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

Date2022-06-21 21:42
FromPete Goodeve
SubjectRe: [Csnd] printsk vs printks
AttachmentsNone  

Date2022-06-22 05:59
FromEduardo Moguillansky
SubjectRe: [Csnd] printsk vs printks
If printsk crashes, please open an issue. printsk can be used inside an "if" to print only under certain circumstances. To replicate printks just enclose it in "if metro(...) == 1..."

Pete Goodeve <pete.goodeve@computer.org> schrieb am Di., 21. Juni 2022, 22:42:
On Tue, Jun 21, 2022 at 02:08:08PM -0500, Mike McGonagle wrote:
> While these two opcodes seem to do the same thing, they do it in different
> ways. 'printks' expects a time offset, while 'printsk' doesn't.
>
> At the same time, 'printsk' isn't as stable, or at least it crashes more on
> me.
>
> There do seem to be a lot of overlapping opcodes, but for the most part,
> I'm able to figure things out.
>
> So any thoughts on which of these opcodes is 'preferred'?
>
I'd actually never noticed "printsk" because it's new in 6.15, but it looks
to me to be a little more "special purpose" than "printks".

For a start it prints by default every k-cycle,  which is a lot of printout for
most purposes!  OTOH it does have a "%c" format that printks lacks. which
could be useful.  But if it crashes, that's not so useful...

I'd say just be aware of the differences, and use whichever suits the purpose
best.  (With printks the most likely.)

        -- Pete --

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

Date2022-06-22 21:10
FromMike McGonagle
Subject[Csnd] printsk vs printks
I'm using cabbage, so I'm not quite certain what is actually causing the crash. It just seems that a number of issues I have center around 'printsk'...

On Tuesday, June 21, 2022, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
If printsk crashes, please open an issue. printsk can be used inside an "if" to print only under certain circumstances. To replicate printks just enclose it in "if metro(...) == 1..."

Pete Goodeve <pete.goodeve@computer.org> schrieb am Di., 21. Juni 2022, 22:42:
On Tue, Jun 21, 2022 at 02:08:08PM -0500, Mike McGonagle wrote:
> While these two opcodes seem to do the same thing, they do it in different
> ways. 'printks' expects a time offset, while 'printsk' doesn't.
>
> At the same time, 'printsk' isn't as stable, or at least it crashes more on
> me.
>
> There do seem to be a lot of overlapping opcodes, but for the most part,
> I'm able to figure things out.
>
> So any thoughts on which of these opcodes is 'preferred'?
>
I'd actually never noticed "printsk" because it's new in 6.15, but it looks
to me to be a little more "special purpose" than "printks".

For a start it prints by default every k-cycle,  which is a lot of printout for
most purposes!  OTOH it does have a "%c" format that printks lacks. which
could be useful.  But if it crashes, that's not so useful...

I'd say just be aware of the differences, and use whichever suits the purpose
best.  (With printks the most likely.)

        -- Pete --

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