[Csnd] how to enter rests in csound scores
Date | 2024-01-06 09:31 |
From | Stefan Thomas |
Subject | [Csnd] how to enter rests in csound scores |
Dear community, I would like to know how to enter rests in Csound as conveniently as possible. I normally use the python programming language for my purposes, for example: durs = [1, 1, 0.5, 0.5, 3],split() To get the start times for the events I use a function created by myself: start = 0 beats = addtimes(durs,start) The result will be: [0, 1.0, 2.0, 2.5, 3.0, 6.0] But how could I handle rests? What if the durations looked like this: durs =[1,1,0.5,3] But the Beats should be: [0,1,2.5,3.0,6.0] How do you deal with such difficulties? |
Date | 2024-01-06 17:43 |
From | ST Music |
Subject | Re: [Csnd] how to enter rests in csound scores |
Hi Stefan, without a better understanding of your code (ex. are you using a schedule/event to trigger notes/samples? ) then one solution might be to use gating or perhaps a "ghost note" (amplitude of 0) as a placeholder for the rest. For example, if you have: durs = [0, 1.0, 2.0, 2.5, 3.0, 6.0, 7.0] amps = [1, 1, 1, 1, 1, 0] then 7.0 would be a silent/ghost note which would serve as a rest. Gating would offer the benefit of controlling not only the start time of each note but also the duration, which would also allow rests, but would be slightly more involved. Best, Scott On Sat, Jan 6, 2024, 4:31 a.m. Stefan Thomas <kontrapunktstefan@gmail.com> wrote:
|