Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Warning: major change

Date2017-02-05 20:42
Fromjpff
Subject[Csnd-dev] Warning: major change
I have just committed code that changes spout to be non-interleaved, and
only changed to interleaved in kperf.  Means values in GetSpout are
only updated in kperf but otherwise should perform the same, but
quicker.  Basic testing but not all sample-accurate cases have been
checked.  Please report any oddities to me or this list.

I testing I found a bug in score r opcode which I will start work o
asap.

Date2017-02-06 10:07
FromEduardo Moguillansky
SubjectRe: [Csnd-dev] Warning: major change
Works here. On my own tests, now using out or outch has a similar impact as 
accumulating on a global var.

Thanks!

On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote:
> I have just committed code that changes spout to be non-interleaved, and
> only changed to interleaved in kperf.  Means values in GetSpout are
> only updated in kperf but otherwise should perform the same, but
> quicker.  Basic testing but not all sample-accurate cases have been
> checked.  Please report any oddities to me or this list.
>
> I testing I found a bug in score r opcode which I will start work o
> asap.
>
> ==John ffitch
>

Date2017-02-06 13:59
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
the SC engine optimises something, like not actually summing audio into the output if it is silence?
It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
performs the same.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote:
> 
> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
> 
> Thanks!
> 
> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote:
>> I have just committed code that changes spout to be non-interleaved, and
>> only changed to interleaved in kperf.  Means values in GetSpout are
>> only updated in kperf but otherwise should perform the same, but
>> quicker.  Basic testing but not all sample-accurate cases have been
>> checked.  Please report any oddities to me or this list.
>> 
>> I testing I found a bug in score r opcode which I will start work o
>> asap.
>> 
>> ==John ffitch
>>

Date2017-02-06 15:03
FromEduardo Moguillansky
SubjectRe: [Csnd-dev] Warning: major change
The only thing I could see on the opcode level (I don't have so much 
experience with the inner workings of scsynth) is that they optimize the 
loops to not use indexing but pointers directly

This is their "Out" opcode

for (int i=0; i which leaves us to entertain why it’s still twice the load 
> compared to SC. Do you know if
> the SC engine optimises something, like not actually summing 
> audio into the output if it is silence?
> It would be good to see if you could send a constant value to 
> the output to (like 0.5) to see if it
> performs the same.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
>
>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky 
>>  wrote:
>> 
>> Works here. On my own tests, now using out or outch has a 
>> similar impact as accumulating on a global var.
>> 
>> Thanks!
>> 
>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>
>

Date2017-02-06 15:09
FromSteven Yi
SubjectRe: [Csnd-dev] Warning: major change
One thing to point is out that they are using floats and not doubles.
I don't know if that would have a positive or negative effect, but we
should be careful to compares apples to apples when measuring
performance here.

On Mon, Feb 6, 2017 at 10:03 AM, Eduardo Moguillansky
 wrote:
> The only thing I could see on the opcode level (I don't have so much
> experience with the inner workings of scsynth) is that they optimize the
> loops to not use indexing but pointers directly
>
> This is their "Out" opcode
>
> for (int i=0; i  if (firstOutputChannel + i < maxChannel) {
>    float *in = IN(i+1);
>    ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>    if (touched[i] == bufCounter)
>      *out += *in;
>    else {
>      *out = *in;
>      touched[i] = bufCounter;
>    }
>    RELEASE_BUS_CONTROL((int32)fbusChannel + i);
>  }
> }
> On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>>
>> which leaves us to entertain why it’s still twice the load compared to SC.
>> Do you know if
>> the SC engine optimises something, like not actually summing audio into
>> the output if it is silence?
>> It would be good to see if you could send a constant value to the output
>> to (like 0.5) to see if it
>> performs the same.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>>
>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky
>>>  wrote:
>>>
>>> Works here. On my own tests, now using out or outch has a similar impact
>>> as accumulating on a global var.
>>>
>>> Thanks!
>>>
>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>>
>>
>>
>>

Date2017-02-06 15:42
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
I don’t think pointer arithmetic makes it faster. Running single precision probably does in this case.
But does it really use floats? I never realised that. 
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 6 Feb 2017, at 15:03, Eduardo Moguillansky  wrote:
> 
> The only thing I could see on the opcode level (I don't have so much experience with the inner workings of scsynth) is that they optimize the loops to not use indexing but pointers directly
> 
> This is their "Out" opcode
> 
> for (int i=0; i if (firstOutputChannel + i < maxChannel) {
>  float *in = IN(i+1);
>  ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>  if (touched[i] == bufCounter)
>    *out += *in;
>  else {
>    *out = *in;
>    touched[i] = bufCounter;
>  }
>  RELEASE_BUS_CONTROL((int32)fbusChannel + i);
> }
> } 
> On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
>> the SC engine optimises something, like not actually summing audio into the output if it is silence?
>> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
>> performs the same.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952 
>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote:
>>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
>>> Thanks!
>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>> 
>> 
>> 
> 


Date2017-02-06 15:58
FromMichael Gogins
SubjectRe: [Csnd-dev] Warning: major change
Pointer arithmetic, whenever I have compared it directly in timed controlled experiments, never has been faster than array indexing, and often has been a little slower. Plus it is harder to read. 

Gcc and other compilers are written to take simple, standard style code and make it run as fast as possible. 

Best, 
Mike

On Feb 6, 2017 10:42 AM, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
I don’t think pointer arithmetic makes it faster. Running single precision probably does in this case.
But does it really use floats? I never realised that.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 6 Feb 2017, at 15:03, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
>
> The only thing I could see on the opcode level (I don't have so much experience with the inner workings of scsynth) is that they optimize the loops to not use indexing but pointers directly
>
> This is their "Out" opcode
>
> for (int i=0; i<numChannels; ++i, out++) {
> if (firstOutputChannel + i < maxChannel) {
>  float *in = IN(i+1);
>  ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>  if (touched[i] == bufCounter)
>    *out += *in;
>  else {
>    *out = *in;
>    touched[i] = bufCounter;
>  }
>  RELEASE_BUS_CONTROL((int32)fbusChannel + i);
> }
> }
> On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
>> the SC engine optimises something, like not actually summing audio into the output if it is silence?
>> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
>> performs the same.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
>>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
>>> Thanks!
>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>>
>>
>>
>


Date2017-02-06 16:37
Fromjpff
SubjectRe: [Csnd-dev] Warning: major change
When I easured tis it was slower to use pointers tan indexing, which is 
why it was mostly changed.
==JPff

On Mon, 6 Feb 2017, Eduardo Moguillansky wrote:

> thing I could see on the opcode level (I don't have so much experience with 
> the inner workings of scsynth) is that they optimize the loops to not use 
> indexing but pointers directly
>
> This is their "Out" opcode
>
> for (int i=0; i if (firstOutputChannel + i < maxChannel) {
>   float *in = IN(i+1);
>   ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>   if (touched[i] == bufCounter)
>     *out += *in;
>   else {
>     *out = *in;
>     touched[i] = bufCounter;
>   }
>   RELEASE_BUS_CONTROL((int32)fbusChannel + i);
> }
> } 
> On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>> which leaves us to entertain why it’s still twice the load compared to SC. 
>> Do you know if
>> the SC engine optimises something, like not actually summing audio into the 
>> output if it is silence?
>> It would be good to see if you could send a constant value to the output to 
>> (like 0.5) to see if it
>> performs the same.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952 
>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky 
>>>  wrote:
>>> 
>>> Works here. On my own tests, now using out or outch has a similar impact 
>>> as accumulating on a global var.
>>> 
>>> Thanks!
>>> 
>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>> 
>> 
>> 
>
> From ema

Date2017-02-06 16:39
FromMichael Gogins
SubjectRe: [Csnd-dev] Warning: major change
Measuring is great!

Thanks,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Mon, Feb 6, 2017 at 11:37 AM, jpff  wrote:
> When I easured tis it was slower to use pointers tan indexing, which is why
> it was mostly changed.
> ==JPff
>
>
> On Mon, 6 Feb 2017, Eduardo Moguillansky wrote:
>
>> thing I could see on the opcode level (I don't have so much experience
>> with the inner workings of scsynth) is that they optimize the loops to not
>> use indexing but pointers directly
>>
>> This is their "Out" opcode
>>
>> for (int i=0; i> if (firstOutputChannel + i < maxChannel) {
>>   float *in = IN(i+1);
>>   ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>>   if (touched[i] == bufCounter)
>>     *out += *in;
>>   else {
>>     *out = *in;
>>     touched[i] = bufCounter;
>>   }
>>   RELEASE_BUS_CONTROL((int32)fbusChannel + i);
>> }
>> } On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>>>
>>> which leaves us to entertain why it’s still twice the load compared to
>>> SC. Do you know if
>>> the SC engine optimises something, like not actually summing audio into
>>> the output if it is silence?
>>> It would be good to see if you could send a constant value to the output
>>> to (like 0.5) to see if it
>>> performs the same.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>>
>>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky
>>>>  wrote:
>>>>
>>>> Works here. On my own tests, now using out or outch has a similar impact
>>>> as accumulating on a global var.
>>>>
>>>> Thanks!
>>>>
>>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>>>
>>>
>>>
>>>
>>

Date2017-02-06 17:38
Fromjpff
SubjectRe: [Csnd-dev] Warning: major change
On my laptop the test prgram in realtime takes 21% doubles and 12% single 
precision

On Mon, 6 Feb 2017, Victor Lazzarini wrote:

> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
> the SC engine optimises something, like not actually summing audio into the output if it is silence?
> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
> performs the same.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote:
>>
>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
>>
>> Thanks!
>>
>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote:
>>> I have just committed code that changes spout to be non-interleaved, and
>>> only changed to interleaved in kperf.  Means values in GetSpout are
>>> only updated in kperf but otherwise should perform the same, but
>>> quicker.  Basic testing but not all sample-accurate cases have been
>>> checked.  Please report any oddities to me or this list.
>>>
>>> I testing I found a bug in score r opcode which I will start work o
>>> asap.
>>>
>>> ==John ffitch
>>>
>>>
>
>

Date2017-02-06 18:32
FromSteven Yi
SubjectRe: [Csnd-dev] Warning: major change
Yes, SC3 uses floats for the signal processing chain, but a number of
the UGens use doubles internally to track certain things like phase. I
haven't looked at SC3's code in a while though, but that was the state
of things last I checked.

On Mon, Feb 6, 2017 at 10:42 AM, Victor Lazzarini
 wrote:
> I don’t think pointer arithmetic makes it faster. Running single precision probably does in this case.
> But does it really use floats? I never realised that.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 6 Feb 2017, at 15:03, Eduardo Moguillansky  wrote:
>>
>> The only thing I could see on the opcode level (I don't have so much experience with the inner workings of scsynth) is that they optimize the loops to not use indexing but pointers directly
>>
>> This is their "Out" opcode
>>
>> for (int i=0; i> if (firstOutputChannel + i < maxChannel) {
>>  float *in = IN(i+1);
>>  ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>>  if (touched[i] == bufCounter)
>>    *out += *in;
>>  else {
>>    *out = *in;
>>    touched[i] = bufCounter;
>>  }
>>  RELEASE_BUS_CONTROL((int32)fbusChannel + i);
>> }
>> }
>> On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>>> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
>>> the SC engine optimises something, like not actually summing audio into the output if it is silence?
>>> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
>>> performs the same.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote:
>>>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
>>>> Thanks!
>>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>>>
>>>
>>>
>>

Date2017-02-06 18:52
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
Well, doubles for phase and filter coeffs are sine qua non.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 6 Feb 2017, at 18:33, Steven Yi  wrote:
> 
> Yes, SC3 uses floats for the signal processing chain, but a number of
> the UGens use doubles internally to track certain things like phase. I
> haven't looked at SC3's code in a while though, but that was the state
> of things last I checked.
> 
> On Mon, Feb 6, 2017 at 10:42 AM, Victor Lazzarini
>  wrote:
>> I don’t think pointer arithmetic makes it faster. Running single precision probably does in this case.
>> But does it really use floats? I never realised that.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 6 Feb 2017, at 15:03, Eduardo Moguillansky  wrote:
>>> 
>>> The only thing I could see on the opcode level (I don't have so much experience with the inner workings of scsynth) is that they optimize the loops to not use indexing but pointers directly
>>> 
>>> This is their "Out" opcode
>>> 
>>> for (int i=0; i>> if (firstOutputChannel + i < maxChannel) {
>>> float *in = IN(i+1);
>>> ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>>> if (touched[i] == bufCounter)
>>>   *out += *in;
>>> else {
>>>   *out = *in;
>>>   touched[i] = bufCounter;
>>> }
>>> RELEASE_BUS_CONTROL((int32)fbusChannel + i);
>>> }
>>> }
>>>> On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>>>> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
>>>> the SC engine optimises something, like not actually summing audio into the output if it is silence?
>>>> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
>>>> performs the same.
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952
>>>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote:
>>>>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
>>>>> Thanks!
>>>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...
>>>> 
>>>> 
>>>> 
>>> 

Date2017-02-06 19:35
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
12% looks like what has been reported.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 6 Feb 2017, at 17:38, jpff  wrote:
> 
> On my laptop the test prgram in realtime takes 21% doubles and 12% single precision
> 
> On Mon, 6 Feb 2017, Victor Lazzarini wrote:
> 
>> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
>> the SC engine optimises something, like not actually summing audio into the output if it is silence?
>> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
>> performs the same.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote:
>>> 
>>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
>>> 
>>> Thanks!
>>> 
>>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote:
>>>> I have just committed code that changes spout to be non-interleaved, and
>>>> only changed to interleaved in kperf.  Means values in GetSpout are
>>>> only updated in kperf but otherwise should perform the same, but
>>>> quicker.  Basic testing but not all sample-accurate cases have been
>>>> checked.  Please report any oddities to me or this list.
>>>> 
>>>> I testing I found a bug in score r opcode which I will start work o
>>>> asap.
>>>> 
>>>> ==John ffitch
>>>> 
>>>> 

Date2017-02-07 03:30
FromT M
SubjectRe: [Csnd-dev] Warning: major change
> El 6 feb 2017, a las 12:32, Steven Yi  escribió:
> 
> Yes, SC3 uses floats for the signal processing chain, but a number of
> the UGens use doubles internally to track certain things like phase. I
> haven't looked at SC3's code in a while though, but that was the state
> of things last I checked.
> 

Yes, this is still the state of things in SC. Another reason for a performance difference might be that SC uses Single Instruction, Multiple Data (simd) CPU instructions. Maybe CSound does too.

Tom


> On Mon, Feb 6, 2017 at 10:42 AM, Victor Lazzarini
>  wrote:
>> I don’t think pointer arithmetic makes it faster. Running single precision probably does in this case.
>> But does it really use floats? I never realised that.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 6 Feb 2017, at 15:03, Eduardo Moguillansky  wrote:
>>> 
>>> The only thing I could see on the opcode level (I don't have so much experience with the inner workings of scsynth) is that they optimize the loops to not use indexing but pointers directly
>>> 
>>> This is their "Out" opcode
>>> 
>>> for (int i=0; i>> if (firstOutputChannel + i < maxChannel) {
>>> float *in = IN(i+1);
>>> ACQUIRE_BUS_CONTROL((int32)fbusChannel + i);
>>> if (touched[i] == bufCounter)
>>>   *out += *in;
>>> else {
>>>   *out = *in;
>>>   touched[i] = bufCounter;
>>> }
>>> RELEASE_BUS_CONTROL((int32)fbusChannel + i);
>>> }
>>> }
>>>> On Montag, 6. Februar 2017 14:59:53 CET, Victor Lazzarini wrote:
>>>> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
>>>> the SC engine optimises something, like not actually summing audio into the output if it is silence?
>>>> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
>>>> performs the same.
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952
>>>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote:
>>>>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.
>>>>> Thanks!
>>>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: ...

Date2017-02-07 16:45
FromEduardo Moguillansky
SubjectRe: [Csnd-dev] Warning: major change

I did not check the output, only the performance: I get corrupted data with outch.  Did not test the other out opcodes

<CsoundSynthesizer>
<CsOptions>
</CsOptions
<CsInstruments>
sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1.0
instr 1
  ifreq = 440
  a0 oscili 0.5, ifreq
  outch 1, a0
  ; ** uncomment next line and output gets corrupted **
  ; outch 2, a0
endin
</CsInstruments>
<CsScore>
i 1 0 20
</CsScore>
</CsoundSynthesizer>




On 06.02.2017 18:38, jpff wrote:
On my laptop the test prgram in realtime takes 21% doubles and 12% single precision

On Mon, 6 Feb 2017, Victor Lazzarini wrote:

which leaves us to entertain why it’s still twice the load compared to SC. Do you know if
the SC engine optimises something, like not actually summing audio into the output if it is silence?
It would be good to see if you could send a constant value to the output to (like 0.5) to see if it
performs the same.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 6 Feb 2017, at 10:07, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var.

Thanks!

On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote:
I have just committed code that changes spout to be non-interleaved, and
only changed to interleaved in kperf.  Means values in GetSpout are
only updated in kperf but otherwise should perform the same, but
quicker.  Basic testing but not all sample-accurate cases have been
checked.  Please report any oddities to me or this list.

I testing I found a bug in score r opcode which I will start work o
asap.

==John ffitch






Date2017-02-07 16:51
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
out and outs are working fine.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Feb 2017, at 16:45, Eduardo Moguillansky  wrote:
> 
> I did not check the output, only the performance: I get corrupted data with outch.  Did not test the other out opcodes
> 
> 
> 
>  
> 
> sr = 44100
> ksmps = 128
> nchnls = 2
> 0dbfs = 1.0
> 
> instr 1
>   ifreq = 440
>   a0 oscili 0.5, ifreq
>   outch 1, a0
>   ; ** uncomment next line and output gets corrupted **
>   ; outch 2, a0
> 
> endin
> 
> 
> 
> i 1 0 20
> 
> 
> 
> 
> 
> 
> On 06.02.2017 18:38, jpff wrote:
>> On my laptop the test prgram in realtime takes 21% doubles and 12% single precision 
>> 
>> On Mon, 6 Feb 2017, Victor Lazzarini wrote: 
>> 
>>> which leaves us to entertain why it’s still twice the load compared to SC. Do you know if 
>>> the SC engine optimises something, like not actually summing audio into the output if it is silence? 
>>> It would be good to see if you could send a constant value to the output to (like 0.5) to see if it 
>>> performs the same. 
>>> ======================== 
>>> Prof. Victor Lazzarini 
>>> Dean of Arts, Celtic Studies, and Philosophy, 
>>> Maynooth University, 
>>> Maynooth, Co Kildare, Ireland 
>>> Tel: 00 353 7086936 
>>> Fax: 00 353 1 7086952 
>>> 
>>>> On 6 Feb 2017, at 10:07, Eduardo Moguillansky  wrote: 
>>>> 
>>>> Works here. On my own tests, now using out or outch has a similar impact as accumulating on a global var. 
>>>> 
>>>> Thanks! 
>>>> 
>>>> On Sonntag, 5. Februar 2017 21:42:51 CET, jpff wrote: 
>>>>> I have just committed code that changes spout to be non-interleaved, and 
>>>>> only changed to interleaved in kperf.  Means values in GetSpout are 
>>>>> only updated in kperf but otherwise should perform the same, but 
>>>>> quicker.  Basic testing but not all sample-accurate cases have been 
>>>>> checked.  Please report any oddities to me or this list. 
>>>>> 
>>>>> I testing I found a bug in score r opcode which I will start work o 
>>>>> asap. 
>>>>> 
>>>>> ==

Date2017-02-07 17:17
Fromjpff
SubjectRe: [Csnd-dev] Warning: major change
but te code
   outch 2, a0
   outch 1, a0

works!  Will look closer

On Tue, 7 Feb 2017, Eduardo Moguillansky wrote:

> 
> I did not check the output, only the performance: I get corrupted data with
> outch.  Did not test the other out opcodes
> 
> 
> 
>  
> 
> sr = 44100
> ksmps = 128
> nchnls = 2
> 0dbfs = 1.0
> 
> instr 1
> 
>   ifreq = 440
>   a0 oscili 0.5, ifreq
>   outch 1, a0
>   ; ** uncomment next line and output gets corrupted **
>   ; outch 2, a0
> 
> endin
> 
> 
> 
> 
> i 1 0 20
> 
> 
> 
> 
> 
> 
> 
> On 06.02.2017 18:38, jpff wrote:
>       On my laptop the test prgram in realtime takes 21% doubles and 12%
>       single precision
>
>       On Mon, 6 Feb 2017, Victor Lazzarini wrote:
>
>             which leaves us to entertain why it’s still twice the
>             load compared to SC. Do you know if
>             the SC engine optimises something, like not actually
>             summing audio into the output if it is silence?
>             It would be good to see if you could send a constant
>             value to the output to (like 0.5) to see if it
>             performs the same.
>             ========================
>             Prof. Victor Lazzarini
>             Dean of Arts, Celtic Studies, and Philosophy,
>             Maynooth University,
>             Maynooth, Co Kildare, Ireland
>             Tel: 00 353 7086936
>             Fax: 00 353 1 7086952
>
>                   On 6 Feb 2017, at 10:07, Eduardo
>                   Moguillansky
>                    wrote:
>
>                   Works here. On my own tests, now using out
>                   or outch has a similar impact as
>                   accumulating on a global var.
>
>                   Thanks!
>
>                   On Sonntag, 5. Februar 2017 21:42:51 CET,
>                   jpff wrote:
>                         I have just committed code
>                         that changes spout to be
>                         non-interleaved, and
>                         only changed to interleaved in
>                         kperf.  Means values in
>                         GetSpout are
>                         only updated in kperf but
>                         otherwise should perform the
>                         same, but
>                         quicker.  Basic testing but
>                         not all sample-accurate cases
>                         have been
>                         checked.  Please report any
>                         oddities to me or this list.
>
>                         I testing I found a bug in
>                         score r opcode which I will
>                         start work o
>                         asap.
>
>                         ==John ffitch
> 
> 
> 
> 
> 
> 
>

Date2017-02-07 17:21
Fromjpff
SubjectRe: [Csnd-dev] Warning: major change
Fixed in git


On Tue, 7 Feb 2017, Eduardo Moguillansky wrote:

> 
> I did not check the output, only the performance: I get corrupted data with
> outch.  Did not test the other out opcodes
> 
> 
> 
>  
> 
> sr = 44100
> ksmps = 128
> nchnls = 2
> 0dbfs = 1.0
> 
> instr 1
> 
>   ifreq = 440
>   a0 oscili 0.5, ifreq
>   outch 1, a0
>   ; ** uncomment next line and output gets corrupted **
>   ; outch 2, a0
> 
> endin
> 
> 
> 
> 
> i 1 0 20
> 
> 
> 
> 
> 
> 
> 
> On 06.02.2017 18:38, jpff wrote:
>       On my laptop the test prgram in realtime takes 21% doubles and 12%
>       single precision
>
>       On Mon, 6 Feb 2017, Victor Lazzarini wrote:
>
>             which leaves us to entertain why it’s still twice the
>             load compared to SC. Do you know if
>             the SC engine optimises something, like not actually
>             summing audio into the output if it is silence?
>             It would be good to see if you could send a constant
>             value to the output to (like 0.5) to see if it
>             performs the same.
>             ========================
>             Prof. Victor Lazzarini
>             Dean of Arts, Celtic Studies, and Philosophy,
>             Maynooth University,
>             Maynooth, Co Kildare, Ireland
>             Tel: 00 353 7086936
>             Fax: 00 353 1 7086952
>
>                   On 6 Feb 2017, at 10:07, Eduardo
>                   Moguillansky
>                    wrote:
>
>                   Works here. On my own tests, now using out
>                   or outch has a similar impact as
>                   accumulating on a global var.
>
>                   Thanks!
>
>                   On Sonntag, 5. Februar 2017 21:42:51 CET,
>                   jpff wrote:
>                         I have just committed code
>                         that changes spout to be
>                         non-interleaved, and
>                         only changed to interleaved in
>                         kperf.  Means values in
>                         GetSpout are
>                         only updated in kperf but
>                         otherwise should perform the
>                         same, but
>                         quicker.  Basic testing but
>                         not all sample-accurate cases
>                         have been
>                         checked.  Please report any
>                         oddities to me or this list.
>
>                         I testing I found a bug in
>                         score r opcode which I will
>                         start work o
>                         asap.
>
>                         ==John ffitch
> 
> 
> 
> 
> 
> 
>

Date2017-02-07 17:37
FromRory Walsh
SubjectRe: [Csnd-dev] Warning: major change
Hi all. I'm kind of late to the party, but do front-end developers using get spout and get spin need to modify their code at all following these changes? 

On 7 Feb 2017 17:22, "jpff" <jpff@codemist.co.uk> wrote:
Fixed in git


On Tue, 7 Feb 2017, Eduardo Moguillansky wrote:


I did not check the output, only the performance: I get corrupted data with
outch.  Did not test the other out opcodes

<CsoundSynthesizer>
<CsOptions>
</CsOptions
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1.0

instr 1

  ifreq = 440
  a0 oscili 0.5, ifreq
  outch 1, a0
  ; ** uncomment next line and output gets corrupted **
  ; outch 2, a0

endin

</CsInstruments>
<CsScore>

i 1 0 20

</CsScore>
</CsoundSynthesizer>




On 06.02.2017 18:38, jpff wrote:
      On my laptop the test prgram in realtime takes 21% doubles and 12%
      single precision

      On Mon, 6 Feb 2017, Victor Lazzarini wrote:

            which leaves us to entertain why it’s still twice the
            load compared to SC. Do you know if
            the SC engine optimises something, like not actually
            summing audio into the output if it is silence?
            It would be good to see if you could send a constant
            value to the output to (like 0.5) to see if it
            performs the same.
            ========================
            Prof. Victor Lazzarini
            Dean of Arts, Celtic Studies, and Philosophy,
            Maynooth University,
            Maynooth, Co Kildare, Ireland
            Tel: 00 353 7086936
            Fax: 00 353 1 7086952

                  On 6 Feb 2017, at 10:07, Eduardo
                  Moguillansky
                  <eduardo.moguillansky@gmail.com> wrote:

                  Works here. On my own tests, now using out
                  or outch has a similar impact as
                  accumulating on a global var.

                  Thanks!

                  On Sonntag, 5. Februar 2017 21:42:51 CET,
                  jpff wrote:
                        I have just committed code
                        that changes spout to be
                        non-interleaved, and
                        only changed to interleaved in
                        kperf.  Means values in
                        GetSpout are
                        only updated in kperf but
                        otherwise should perform the
                        same, but
                        quicker.  Basic testing but
                        not all sample-accurate cases
                        have been
                        checked.  Please report any
                        oddities to me or this list.

                        I testing I found a bug in
                        score r opcode which I will
                        start work o
                        asap.

                        ==John ffitch







Date2017-02-07 17:43
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
no

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 7 Feb 2017, at 17:37, Rory Walsh <rorywalsh@EAR.IE> wrote:

Hi all. I'm kind of late to the party, but do front-end developers using get spout and get spin need to modify their code at all following these changes? 

On 7 Feb 2017 17:22, "jpff" <jpff@codemist.co.uk> wrote:
Fixed in git


On Tue, 7 Feb 2017, Eduardo Moguillansky wrote:


I did not check the output, only the performance: I get corrupted data with
outch.  Did not test the other out opcodes

<CsoundSynthesizer>
<CsOptions>
</CsOptions
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1.0

instr 1

  ifreq = 440
  a0 oscili 0.5, ifreq
  outch 1, a0
  ; ** uncomment next line and output gets corrupted **
  ; outch 2, a0

endin

</CsInstruments>
<CsScore>

i 1 0 20

</CsScore>
</CsoundSynthesizer>




On 06.02.2017 18:38, jpff wrote:
      On my laptop the test prgram in realtime takes 21% doubles and 12%
      single precision

      On Mon, 6 Feb 2017, Victor Lazzarini wrote:

            which leaves us to entertain why it’s still twice the
            load compared to SC. Do you know if
            the SC engine optimises something, like not actually
            summing audio into the output if it is silence?
            It would be good to see if you could send a constant
            value to the output to (like 0.5) to see if it
            performs the same.
            ========================
            Prof. Victor Lazzarini
            Dean of Arts, Celtic Studies, and Philosophy,
            Maynooth University,
            Maynooth, Co Kildare, Ireland
            Tel: 00 353 7086936
            Fax: 00 353 1 7086952

                  On 6 Feb 2017, at 10:07, Eduardo
                  Moguillansky
                  <eduardo.moguillansky@gmail.com> wrote:

                  Works here. On my own tests, now using out
                  or outch has a similar impact as
                  accumulating on a global var.

                  Thanks!

                  On Sonntag, 5. Februar 2017 21:42:51 CET,
                  jpff wrote:
                        I have just committed code
                        that changes spout to be
                        non-interleaved, and
                        only changed to interleaved in
                        kperf.  Means values in
                        GetSpout are
                        only updated in kperf but
                        otherwise should perform the
                        same, but
                        quicker.  Basic testing but
                        not all sample-accurate cases
                        have been
                        checked.  Please report any
                        oddities to me or this list.

                        I testing I found a bug in
                        score r opcode which I will
                        start work o
                        asap.

                        ==John ffitch







Date2017-02-07 17:48
Fromjpff
SubjectRe: [Csnd-dev] Warning: major change

On Tue, 7 Feb 2017, Rory Walsh wrote:

> Hi all. I'm kind of late to the party, but do front-end developers using get
> spout and get spin need to modify their code at all following these changes? 
> 
I think not but I have never used tat facility.

What happens is that there is a new private structure (called spraw) which 
is the output data not interleaved but channels in order.  In kperf this 
data is interleaved into spout.  So difference is spout data is only valid 
after kperf and until the next out call.

Does that help?

==JPff

Date2017-02-07 18:11
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
Just to add: changes are internal. Spout continues as before to external entities.

I have been thinking of an api switch to bypass interleaving for cases where the
host does not use interleaved audio (ie.
auhal)

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 7 Feb 2017, at 17:49, jpff  wrote:
> 
> 
> 
>> On Tue, 7 Feb 2017, Rory Walsh wrote:
>> 
>> Hi all. I'm kind of late to the party, but do front-end developers using get
>> spout and get spin need to modify their code at all following these changes? 
> I think not but I have never used tat facility.
> 
> What happens is that there is a new private structure (called spraw) which is the output data not interleaved but channels in order.  In kperf this data is interleaved into spout.  So difference is spout data is only valid after kperf and until the next out call.
> 
> Does that help?
> 

Date2017-02-07 18:13
FromMichael Gogins
SubjectRe: [Csnd-dev] Warning: major change
Rory, if you always only take turns calling PerformKsmps and accessing spin and spout, you will never have a problem. 

Regards, 
Mike

On Feb 7, 2017 12:48 PM, "jpff" <jpff@codemist.co.uk> wrote:


On Tue, 7 Feb 2017, Rory Walsh wrote:

Hi all. I'm kind of late to the party, but do front-end developers using get
spout and get spin need to modify their code at all following these changes? 

I think not but I have never used tat facility.

What happens is that there is a new private structure (called spraw) which is the output data not interleaved but channels in order.  In kperf this data is interleaved into spout.  So difference is spout data is only valid after kperf and until the next out call.

Does that help?

==JPff

Date2017-02-07 19:34
FromRory Walsh
SubjectRe: [Csnd-dev] Warning: major change
That's what I do. Thanks guys. 

On 7 Feb 2017 18:14, "Michael Gogins" <michael.gogins@gmail.com> wrote:
Rory, if you always only take turns calling PerformKsmps and accessing spin and spout, you will never have a problem. 

Regards, 
Mike

On Feb 7, 2017 12:48 PM, "jpff" <jpff@codemist.co.uk> wrote:


On Tue, 7 Feb 2017, Rory Walsh wrote:

Hi all. I'm kind of late to the party, but do front-end developers using get
spout and get spin need to modify their code at all following these changes? 

I think not but I have never used tat facility.

What happens is that there is a new private structure (called spraw) which is the output data not interleaved but channels in order.  In kperf this data is interleaved into spout.  So difference is spout data is only valid after kperf and until the next out call.

Does that help?

==JPff

Date2018-03-17 11:10
FromMichael Gogins
SubjectRe: [Csnd-dev] Warning: major change
What does this mean for opcodes that write directly to the lowest
level audio buffer, e.g. chnmix or the signal flow graph opcodes?

Best,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Feb 5, 2017 at 5:42 PM, jpff  wrote:
> I have just committed code that changes spout to be non-interleaved, and
> only changed to interleaved in kperf.  Means values in GetSpout are
> only updated in kperf but otherwise should perform the same, but
> quicker.  Basic testing but not all sample-accurate cases have been
> checked.  Please report any oddities to me or this list.
>
> I testing I found a bug in score r opcode which I will start work o
> asap.
>

Date2018-03-17 11:14
FromMichael Gogins
SubjectRe: [Csnd-dev] Warning: major change
Ignore that about direct writes in chmix or signal flow graph, just
woke up and did not read code...

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sat, Mar 17, 2018 at 8:10 AM, Michael Gogins
 wrote:
> What does this mean for opcodes that write directly to the lowest
> level audio buffer, e.g. chnmix or the signal flow graph opcodes?
>
> Best,
> Mike
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Sun, Feb 5, 2017 at 5:42 PM, jpff  wrote:
>> I have just committed code that changes spout to be non-interleaved, and
>> only changed to interleaved in kperf.  Means values in GetSpout are
>> only updated in kperf but otherwise should perform the same, but
>> quicker.  Basic testing but not all sample-accurate cases have been
>> checked.  Please report any oddities to me or this list.
>>
>> I testing I found a bug in score r opcode which I will start work o
>> asap.
>>

Date2018-03-17 11:27
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Warning: major change
This was last year.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 17 Mar 2018, at 11:14, Michael Gogins  wrote:
> 
> Ignore that about direct writes in chmix or signal flow graph, just
> woke up and did not read code...
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Sat, Mar 17, 2018 at 8:10 AM, Michael Gogins
>  wrote:
>> What does this mean for opcodes that write directly to the lowest
>> level audio buffer, e.g. chnmix or the signal flow graph opcodes?
>> 
>> Best,
>> Mike
>> 
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>> 
>> 
>>> On Sun, Feb 5, 2017 at 5:42 PM, jpff  wrote:
>>> I have just committed code that changes spout to be non-interleaved, and
>>> only changed to interleaved in kperf.  Means values in GetSpout are
>>> only updated in kperf but otherwise should perform the same, but
>>> quicker.  Basic testing but not all sample-accurate cases have been
>>> checked.  Please report any oddities to me or this list.
>>> 
>>> I testing I found a bug in score r opcode which I will start work o
>>> asap.
>>>