[Csnd] question for docB re dbRackCsound

Hi docB!

I’m finally starting to play with dbRackCsound, experimenting with porting a custom instrument I made for the Nebulae module. I’m getting compilation error (assuming that’s what the blinking red light indicates). Is there any way to see the error messages?

Thanks,
Dave

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

OK, got it working. Didn’t think to actually run the code through Csound on the commandline. D’oh!

New issue: I haven’t yet been able to get the control inputs to work Here’s an example snippet:

koffa = scale2(chnget:k(“P1”), 0.001, 0.1, -10, 10)
koffb = scale2(chnget:k(“IN1C1”), 0.001, 0.1, -5, -5)
koff = koffa ;+ koffb
koff1 = koff
koff2 = 2 * koff
koff3 = 3 * koff
koff4 = 4 * koff

Here, I’m trying to get the value in IN1C1 and add it to the value of P1. If I change the line

koff = koffa ;+ koffb

to

koff = koffa + koffb

(i.e., remove the comment), this kills Rack.exe.

What am I doing wrong?

Hi

i think here is the problem

> koffb = scale2(chnget:k("IN1C1"), 0.001, 0.1, -5, -5)

as scale2 seems to return infinity or "not a number" if the range is -5,-5

should be -5,5 i guess

On linux this does not crash Rack but there is NAN on the output.

best regards

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

Argh! That was it, thanks! One of those insidious bugs that isn’t caught by a syntax check. This works now for IN1, but now my usage of IN2 is failing (without that bug, but probably with a different one:

kndxa = scale2(chnget:k(“P2”), giNumTables-1, 0, -10, 10)
kndxb = scale2(chnget:k(“IN2C1”), giNumTables-1, 0, -5, 5)
kndx = kndxa ;+ kndxb
ftmorf kndx, giList, giMorf

I threw in the qnan() check just to see what happens, but this code fails with or without that check, apparently on use of the kndxb variable… I’m sure that there’s some other horrible bug that I am just not seeing. I am sending similar LFOs to IN1 and IN2 (-5 to +5).

(BTW: the workflow I’m using now is to edit the Csound code in VSCode as an ORC file, and then execute “csound --orc --syntax-check-only ” before pasting it into the module.)

Attaching the entire ORC file for context.

(Attachment risset.orc is missing)

Seems like the previous attachment was rejected, here it is again with a .txt suffix.

risset.orc.txt (2.9 KB)

In the logfile of Rack there is the csound error message:

Invalid ftable no. 0.000000

so i guess that frmorf gets a table index of 0.

maybe this should be checked before passing.

Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

Interesting, I don’t get that error. And AFAIK, ftmorf is zero-based, which is how I’ve been using it for a while. But thanks very much, I will keep looking.

BTW, I don’t know if this is possible, but it would be really useful to send Csound print*() output to the Rack log.
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

on my side it does show:

printk 0.5 kindx

[50.414 info src/DBCSound.hpp:100 compile] csound compiled ksnps=32 nchnls=2
i 1 time 52.23000: 2.50000
i 1 time 52.73000: 2.50000
i 1 time 53.23000: 2.50000
i 1 time 53.73000: 2.50000
i 1 time 54.23000: 2.50000
i 1 time 54.73000: 2.50000
i 1 time 55.23000: 2.50000
i 1 time 55.73000: 2.50000

Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

It does work if P2 = 10 what means that kndxb = 0. if kndxb > 0 then there could occur greater indexes as in the log file printed

(i added “printk 0.5,kndx”)

i 1 time 377.42467: 7.90272
Invalid ftable no. 0.000000

if P2 = 10 then it looks ok e.g.

i 1 time 45.50067: 0.18161
i 1 time 46.00067: 1.36173
i 1 time 46.50067: 3.09503
i 1 time 47.00067: 4.53410
i 1 time 47.50067: 4.98996
i 1 time 48.00067: 4.24227
i 1 time 48.50067: 2.65244
i 1 time 49.00067: 0.98279
i 1 time 49.50067: 0.05293
i 1 time 50.00067: 0.31542
i 1 time 50.50067: 1.64635
i 1 time 51.00067: 3.38955
i 1 time 51.50067: 4.69761
i 1 time 52.00067: 4.94344
i 1 time 52.50067: 4.00820
i 1 time 53.00067: 2.34322
i 1 time 53.50067: 0.74858
i 1 time 54.00067: 0.00846
i 1 time 54.50067: 0.48291

Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

Had issue with compiling error with my onboard mic a couple weeks back, which
I never use to begin with, I leave it turned off, ‘mic in 0’ and never a problem.

Checked internal setting on the laptop, still got ‘mic in 0’ which was never a
problem before. Still had compiling error.

I uninstalled dbRackCsound, check my system preference settings for audio,
nothing changed, ran one of my Csound projects and it all came back. No
compiling errors.

Maybe with all the audio software on my computer, it didn’t want to deal
with another. So now I’m wondering about that. dbRack use resources that
prioritized for itself over Csound???

-PBS

Hmmm,…

Thinking face

i cannot understand your compiling issue with csound, but dbRackCsound simply runs one csound instance

which does not interfere with any audio devices of the system as it uses the vcvrack audio inputs and outputs.

If the csound module is deleted in a vcv rack patch, the csound instance is stopped and destroyed.

Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

:thinking::thinking: Hmmm,… double hmmm,…

-PBS

I need to take a break from this and cook dinner. However, I note that “printk” does not leave anything in the rack log for me.

ok i will check this, maybe i have to grab the csound messages and put them into the rack info log. Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

I’m on Win11, if that makes a difference.

https://github.com/docb/dbRackCsound/releases/tag/v2.0.4

here you can get a version which displays the csound messages as Rack INFO messages.

(tested on Win11 VM)

Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here

Thanks very much, I will try it out, should be very helpful in debugging my issue.