Subject: Re: [ecasound] Metronome problems
From: Julian Dobson (juliand_AT_braverock.com)
Date: Sat Nov 01 2003 - 18:59:32 EET
I take it from this that the metronome uses the sine wave as a trigger
for the ticks. It's not surprising that the function is then so CPU
There's a couple of tricks I can think for improving this:
(a) Don't use a sine wave - for trigger events, just use a square or
triangular wave for instead (triangular would probably be easier to
impliment as you use the same test for the trigger as you do for the sine.
(b) If the sine wave is used in other parts (as a pure tone generator,
for example), then use the old trick of a pre-computed sine table. You
could either (1) statically generate this array (say one value per
degree) and then use linear extrapolation for fractional parts. Or (2)
spend time in the initialization to generate the array to the precision
needed. - The disadvantage of these methods is that it takes up memory,
but you would have a significant saving in CPU.
Kai Vehmanen wrote:
> On Thu, 30 Oct 2003, Stefan Bund wrote:
>>One pre-remark: I'm using ecasound 2.2, since I did not get the
>>pyecasound of 2.3 running stably. After some 20-30 seconds the
>>connection to the ecasound engine is always lost.
> I'll come back to this issue in another mail.
>>First, the metronome consumes a *huge* amount of CPU load. With the
>>metronome enabled, I often get dropouts when recording the second or
>>third track which is absolutely no problem without the metronome (with
>>the metronome, the CPU load is nigh 100%, without only a few %).
> True, the sin-wave generation is done quite naively (uses sin()), and
> could be implemented much more efficiently.
>>The other problem is, that the metronome does not start synchronised
>>when the starting position of the chain is changed using
> This was fixed in 2.3.0.
This archive was generated by hypermail 2b28 : Sat Nov 01 2003 - 18:57:17 EET