Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Csound OSX Examples Knackser-Problem

Date2014-10-28 14:49
FromSteven Yi
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
AttachmentsNone  None  
I took a look and could repeat the same results.  I added -b256 and got nice clean sound.  CsoundObj in the OSX examples is also just using Csound's CoreAudio driver; I don't know if CsoundQT is also set to use that or portaudio by default on OSX?  That could explain the discrepancy.  

Also to note, I was emailing with Aure who also experienced this problem, but he noticed it started happening when moving to Yosemite.  

For now, I'm going to hardcode the change to -b256 and will close out that github issue.

On Tue Oct 28 2014 at 4:54:56 AM Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
The reason it cracks, I reckon, is that the circular buffer overflows, and then we loose time between
calls to the IO routine. With a smaller buffer size, the calls are happening more often and there is
chance of overflow.

Regards
========================
Dr 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 28 Oct 2014, at 00:51, Oliver Brodwolf <oliver@helix64.com> wrote:
>
> if I use the code like it is CsoundObj.m :
>
> [self performSelectorInBackground:@selector(runCsound:)
> withObject:csdFilePath];
>
> then it cracks with -B1024 -b256 and I have to change to -B1024 -b64
>
> If I use
>
> [self performSelector:@selector(runCsound:) withObject:csdFilePath];
>
> then all is OK with -B1024 -b256
>
> But I have to use the first form with performSelectorInBackground so other
> parts of the application can work parallel with the csound engine.
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738152.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2014-10-28 15:03
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
I am using the coreaudio/auhal module in CsoundQT, so it is the same code (AFAIK, although I have not looked at the CsoundObj.m etc code). The
report is that you need to change from -B1024 -b256 to -B1024 -b64, but you are saying that -b256 works for you, so I am not sure what is right.

========================
Dr 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 28 Oct 2014, at 14:49, Steven Yi  wrote:
> 
> I took a look and could repeat the same results.  I added -b256 and got nice clean sound.  CsoundObj in the OSX examples is also just using Csound's CoreAudio driver; I don't know if CsoundQT is also set to use that or portaudio by default on OSX?  That could explain the discrepancy.  
> 
> Also to note, I was emailing with Aure who also experienced this problem, but he noticed it started happening when moving to Yosemite.  
> 
> For now, I'm going to hardcode the change to -b256 and will close out that github issue.
> 
> On Tue Oct 28 2014 at 4:54:56 AM Victor Lazzarini  wrote:
> The reason it cracks, I reckon, is that the circular buffer overflows, and then we loose time between
> calls to the IO routine. With a smaller buffer size, the calls are happening more often and there is
> chance of overflow.
> 
> Regards
> ========================
> Dr 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 28 Oct 2014, at 00:51, Oliver Brodwolf  wrote:
> >
> > if I use the code like it is CsoundObj.m :
> >
> > [self performSelectorInBackground:@selector(runCsound:)
> > withObject:csdFilePath];
> >
> > then it cracks with -B1024 -b256 and I have to change to -B1024 -b64
> >
> > If I use
> >
> > [self performSelector:@selector(runCsound:) withObject:csdFilePath];
> >
> > then all is OK with -B1024 -b256
> >
> > But I have to use the first form with performSelectorInBackground so other
> > parts of the application can work parallel with the csound engine.
> >
> >
> >
> > --
> > View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738152.html
> > Sent from the Csound - Dev mailing list archive at Nabble.com.
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-10-28 15:48
FromOliver Brodwolf
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
Your statements confuse me a little bit.

I use Yosemite on the fastest new Mac Pro without any external
audiointerface.
The problem only exists if the csound is uses in a new thread  with
performSelectorInBackground
The buffsersize could not be the problem, because -B8192 -b1024 is ok, the
sound is clean.

Regards, Oliver



--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738160.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net