hlolli / csound-mode

Emacs major mode for coding in Csound
41 stars 13 forks source link

time wise evalution #34

Open luqtas opened 5 months ago

luqtas commented 5 months ago

lets say we have

i1 0 5
i1 + 5
i2 5 5

evaluating the 3° line of the score only, with the "time wise" feature, would also play the 2° note of instrument 1, as it starts at 5...

i have no idea if that's doable but i can already feel a possible error: what if the second line was i1 4.5 5? could we render only part of a note?

hlolli commented 5 months ago

I see, yeh this is possible, because of the syntax it's not easy to have a mini parser in emacs. But most simple thing to do is to use the advance statement ('a') that will set the clock to the specified location. When you evaluate over a running csound instance, it will interpret 0 starting from reading the score (the time of evaluation), so the score would just be interpreted relative to the read score time, so you can do this also without the help of emacs, by just placing a 0 4.5 to start at 4.5 and it will then crossover the event starting on 5 and send it. This has a downside for "forever" starting at 0 with negative p3. But there are ways to solve that too.