Csound Csound-dev Csound-tekno Search About

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

Date2014-10-27 19:15
FromSteven Yi
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
AttachmentsNone  None  
Hi Oliver,

The large buffer size would certainly be a problem.  Could you file a bug at http://github.com/csound/csound/issues for this?  I can investigate further to see what's going on.

Thanks,
steven

On Mon Oct 27 2014 at 12:37:24 PM Oliver Brodwolf <oliver@helix64.com> wrote:
if I add

as argument to csoundCompile then there are no cracks anymore.



--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738143.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

Date2014-10-27 20:49
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
The coreaudio/auhal module works like this:

1) it uses a circular buffer to send data asynchronously to the audio card
2) it places -b N sample frames on the circular buffer at a time
3) the coreaudio callback reads -b N sample frames from the buffer at a time
4) the circular buffer is -B N sample frames in size.

So -b (software buffer size) should be about 1/4 or 1/8 of the -B (hardware buffer size) value. For instance
-B 1024 and -b 256 would work well, or -B 1024, -b 128, or -B 512 -b 64 etc.

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 27 Oct 2014, at 19:15, Steven Yi  wrote:
> 
> Hi Oliver,
> 
> The large buffer size would certainly be a problem.  Could you file a bug at http://github.com/csound/csound/issues for this?  I can investigate further to see what's going on.
> 
> Thanks,
> steven
> 
> On Mon Oct 27 2014 at 12:37:24 PM Oliver Brodwolf  wrote:
> if I add
> 
> as argument to csoundCompile then there are no cracks anymore.
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738143.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

Date2014-10-27 22:06
FromOliver Brodwolf
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
Thanks for the explanation about -b and -B.

I have tried the following Values:

char *argv[6] = { "csound",
	"-+ignore_csopts=0",
	"-+rtaudio=coreaudio",
	"-B1024",
	"-b64",
	(char*)[csdFilePath cStringUsingEncoding:NSASCIIStringEncoding]};


-b = -B / 4  (sound is not ok)
-b = -B / 8  (sound is not ok)
-b = -B /16 (sound is ok)


Regards, Oliver



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

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

Date2014-10-27 22:12
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
I guess it might depend on the system. Here I can (with CsoundQT) run 1/4, 1/8, 1/16.
========================
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 27 Oct 2014, at 22:06, Oliver Brodwolf  wrote:
> 
> Thanks for the explanation about -b and -B.
> 
> I have tried the following Values:
> 
> char *argv[6] = { "csound",
> 	"-+ignore_csopts=0",
> 	"-+rtaudio=coreaudio",
> 	"-B1024",
> 	"-b64",
> 	(char*)[csdFilePath cStringUsingEncoding:NSASCIIStringEncoding]};
> 
> 
> -b = -B / 4  (sound is not ok)
> -b = -B / 8  (sound is not ok)
> -b = -B /16 (sound is ok)
> 
> 
> Regards, Oliver
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738146.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

Date2014-10-27 22:20
FromOliver Brodwolf
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
The 1/4 and 1/8 problem only exists on the Csound OSX Examples.
With CsoundQT I have no problems



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

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

Date2014-10-27 22:22
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
That’s interesting, I wonder what the difference is.
========================
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 27 Oct 2014, at 22:20, Oliver Brodwolf  wrote:
> 
> The 1/4 and 1/8 problem only exists on the Csound OSX Examples.
> With CsoundQT I have no problems
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738148.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://lis

Date2014-10-27 23:43
FromMichael Gogins
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
AttachmentsNone  None  
CsoundQt has, I suspect, its own audio layer that depends on JUCE and reads spin and writes to spout directly.

Regards,
Mike


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

On Mon, Oct 27, 2014 at 6:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
That’s interesting, I wonder what the difference is.
========================
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 27 Oct 2014, at 22:20, Oliver Brodwolf <oliver@helix64.com> wrote:
>
> The 1/4 and 1/8 problem only exists on the Csound OSX Examples.
> With CsoundQT I have no problems
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738148.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 00:23
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
No, it doesn’t have any such layer. It uses the Csound-supplied io modules.
========================
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 27 Oct 2014, at 23:43, Michael Gogins  wrote:
> 
> CsoundQt has, I suspect, its own audio layer that depends on JUCE and reads spin and writes to spout directly.
> 
> Regards,
> Mike
> 
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> On Mon, Oct 27, 2014 at 6:22 PM, Victor Lazzarini  wrote:
> That’s interesting, I wonder what the difference is.
> ========================
> 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 27 Oct 2014, at 22:20, Oliver Brodwolf  wrote:
> >
> > The 1/4 and 1/8 problem only exists on the Csound OSX Examples.
> > With CsoundQT I have no problems
> >
> >
> >
> > --
> > View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738148.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
https://lists.

Date2014-10-28 00:51
FromOliver Brodwolf
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
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

Date2014-10-28 08:54
FromVictor Lazzarini
SubjectRe: [Cs-dev] Csound OSX Examples Knackser-Problem
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