Expseg opcode with control rate variables possible?

I am trying to create a curve for amp/freq modulation but this opcode takes only init time variables.
Why I need control rate is because I am trying to render a long list of notes with each note when transitioning to another can follow a curve and the interval between notes can be any and that interval if I pull from a table then it gives control rate and does work. I can’t specify init time values as these must be dynamically passed to expseg.

One way to solve is to use a long score file with init time inputs but then problem is I can’t think of better of programming the algo I am trying to build.


Maybe there is another opcode for that but you could use a table (GEN 05 for exponential segments) that you change in performance time (perhaps use tablemix or tabmorph to use the contents) and then oscilikt https://csound.com/docs/manual/oscilikt.html to read the enevelope from table for example.

Just an ide, not sure, if it works.



Kontakt Ranjeet Devgun via The Csound Community (<noreply@forum.csound.com>) kirjutas kuupäeval T, 17. august 2021 kell 18:28:

if you condense your program to show what you want to do, i can have a look.
i think there must be better ways than looking for a k-rate expseg
(which is not existing as far as i know).

Thanks Tarmo, I will try tonight and update if I get any success.

if I try to put in more clear words then this is what I need.

Lets say we start with 7 notes e.g. C# D# F F# G# A# C.
When moving to note D# from C#, I want to move with a smooth frequency transition like a glide on a violin from one note to another, instead of a flat jump. I assume amplitude transition wont give the real effect e.g. dropping amp for C# and increasing for D# wont give that affect.

I can also do a move from D# to F# as gliding over F and then straight smooth glide to C.
This smooth transitions can be done as I understood by applying a smooth envelope but envelopes expects init time input and I want these envelopes to be applied dynamically based on source-target notes and also based on if my tempo is slow/faster.
for tempo A
if I do C# to D# I use env1
if I do D# to F I use env2

for tempo B
if I do C# to D# I use env3
if I do D# to F I use env4

also I am not sure if there be will issues like pops because of control rate choice.

is this monophonic, so only one pitch at a time?

I tried oscilikt and didn’t work on table with sampled data GEN 01.
It seems like only best option is to use score and it seems I am able to proceed. I will share once I have a something ready on this thread.