I don’t see this opcode anywhere in the system, I’ve only seen log() with 1 argument (for any rate and for i/k arrays).
I’ve implemented the array version but I don’t remember doing the 2 argument version. The source code only
contains the 1 input version. You will need to convert from the required base to either log, log2 or log10.
John’s name is in the docs so maybe he has more ideas about this.
Hi Scott,
it's just an idea, but in your code you used something like:
kLog[0] log kArray[0], iBase
But you said that the iBase arguments is for arrays only, so it should read:
kLog log kArray, iBase
No indices, because then the opcode will not see arrays, but one k-rate signal.
Thanks Jeanette! That works for me. So basically it works on the whole array, not just individual indices. The manual description seems a little misleading, or perhaps I’m just a bit dimwitted
However, with most other array opcodes it’s defined in the manual, such as maparray:
karray **maparray** kinarray, String
So it’s a little unusual that log uses the array symbols:
Hi Scott,
oh a few opcodes use the [] symbols to mark arrays, but mostly when an array is a choice:
For example linlin: https://csound.com/manual/linlin.html
And others. A few random number generators, I think, other matyhematical functions, if one needs them. Though with basic maths working with direct operators probably looks more straightforward.
I see now; there was no such opcode for i-time arrays (only for k-rate) and that was what tripped me.
Now I’ve added the i-time version to Csound 7.0 only (and removed the k-rate duplicate I had committed).