Csound Csound-dev Csound-tekno Search About

[Csnd] about audio input and krate

Date2012-10-13 19:37
Fromfrancesco
Subject[Csnd] about audio input and krate
Hello All,
just a curiosity never solved.
When i'm using audio input with ksmps different from 1 i always
get distorted audio, either using internal audio card or external
usb audio card.
Anyone had similar experience?
Is it obvious and i don't understand how audio works?

Ubuntu 12.04 latest Csound double, and jack.

Thanks,
ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2012-10-13 19:40
FromVictor Lazzarini
SubjectRe: [Csnd] about audio input and krate
Did you try ksmps = power of two?

You need that in full duplex (because generally the buffer sizes are pow of two).

Victor

On 13 Oct 2012, at 19:37, francesco wrote:

> Hello All,
> just a curiosity never solved.
> When i'm using audio input with ksmps different from 1 i always
> get distorted audio, either using internal audio card or external
> usb audio card.
> Anyone had similar experience?
> Is it obvious and i don't understand how audio works?
> 
> Ubuntu 12.04 latest Csound double, and jack.
> 
> Thanks,
> ciao,
> francesco.
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2012-10-13 19:53
Fromfrancesco
Subject[Csnd] Re: about audio input and krate
Yes,
at max i can use ksmps=2, yet with 4 i get distorsion.
I need to use sr of 44100, so my kr possibilities are only
2 or 4 (for integer kr).

thanks,
ciao,
francesco



--
View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716811.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2012-10-13 19:57
FromJustin Smith
SubjectRe: [Csnd] Re: about audio input and krate
Not knowing how your instruments are designed - using K rate envelopes
for amplitude can often cause distortion (known as "zipper noise").
This distortion would disappear with ksmps=1. If you are using k rate
enveloping, try using asigs instead and see if that reduces
distortion.

On Sat, Oct 13, 2012 at 11:53 AM, francesco  wrote:
> Yes,
> at max i can use ksmps=2, yet with 4 i get distorsion.
> I need to use sr of 44100, so my kr possibilities are only
> 2 or 4 (for integer kr).
>
> thanks,
> ciao,
> francesco
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716811.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2012-10-13 20:04
Fromfrancesco
Subject[Csnd] Re: about audio input and krate
Thanks,
but no, i'm using only input directly to output (for testing).
This is why i'm curious! It's not depend by csd but somehow
by the system, i guess not by Csound, but i cannot understand ...

ciao,
francesco.
 



--
View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716813.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2012-10-13 20:13
FromVictor Lazzarini
SubjectRe: [Csnd] Re: about audio input and krate
Well, I am not sure about your system, but the general rule is that for  full duplex, ksmps has to divide the buffer size (-b) with no remainder. So for -b 64, you want ksmps = 64, 32, 16, 8, 4, 2, 1

This works perfectly in all systems I've seen (linux, windows and osx).

Victor
On 13 Oct 2012, at 20:04, francesco wrote:

> Thanks,
> but no, i'm using only input directly to output (for testing).
> This is why i'm curious! It's not depend by csd but somehow
> by the system, i guess not by Csound, but i cannot understand ...
> 
> ciao,
> francesco.
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716813.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2012-10-13 21:28
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] Re: about audio input and krate
Is this advice in the manual and Floss Manual?  If not, it should be.  Thanks.

Sent from my iPhone.

On Oct 13, 2012, at 3:13 PM, Victor Lazzarini  wrote:

> Well, I am not sure about your system, but the general rule is that for  full duplex, ksmps has to divide the buffer size (-b) with no remainder. So for -b 64, you want ksmps = 64, 32, 16, 8, 4, 2, 1
> 
> This works perfectly in all systems I've seen (linux, windows and osx).
> 
> Victor
> On 13 Oct 2012, at 20:04, francesco wrote:
> 
>> Thanks,
>> but no, i'm using only input directly to output (for testing).
>> This is why i'm curious! It's not depend by csd but somehow
>> by the system, i guess not by Csound, but i cannot understand ...
>> 
>> ciao,
>> francesco.
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716813.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>> 
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
> 
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
> 
> 
> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 


Date2012-10-13 21:37
FromSteven Yi
SubjectRe: [Csnd] Re: about audio input and krate

Are you using mono input to stereo output, or some other combination? Also are you using nchnls_i? it could have something to do with reading an interleaved audio signal in a non-interleaved way or vice-versa.

On Oct 13, 2012 8:05 PM, "francesco" <ilterzouomo@fastwebnet.it> wrote:
Thanks,
but no, i'm using only input directly to output (for testing).
This is why i'm curious! It's not depend by csd but somehow
by the system, i guess not by Csound, but i cannot understand ...

ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716813.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2012-10-13 23:13
FromVictor Lazzarini
SubjectRe: [Csnd] Re: about audio input and krate
It's in the manual. A message alerting to this is printed by Csound too.
On 13 Oct 2012, at 21:28, Dr. Richard Boulanger wrote:

> Is this advice in the manual and Floss Manual?  If not, it should be.  Thanks.
> 
> Sent from my iPhone.
> 
> On Oct 13, 2012, at 3:13 PM, Victor Lazzarini  wrote:
> 
>> Well, I am not sure about your system, but the general rule is that for  full duplex, ksmps has to divide the buffer size (-b) with no remainder. So for -b 64, you want ksmps = 64, 32, 16, 8, 4, 2, 1
>> 
>> This works perfectly in all systems I've seen (linux, windows and osx).
>> 
>> Victor
>> On 13 Oct 2012, at 20:04, francesco wrote:
>> 
>>> Thanks,
>>> but no, i'm using only input directly to output (for testing).
>>> This is why i'm curious! It's not depend by csd but somehow
>>> by the system, i guess not by Csound, but i cannot understand ...
>>> 
>>> ciao,
>>> francesco.
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716813.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>> 
>>> 
>>> Send bugs reports to the Sourceforge bug tracker
>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>> 
>> 
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>> 
>> 
>> 
>> 
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2012-10-14 00:04
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] Re: about audio input and krate
Excellent.  Thought so. 

Sent from my iPhone.

On Oct 13, 2012, at 6:13 PM, Victor Lazzarini  wrote:

> It's in the manual. A message alerting to this is printed by Csound too.
> On 13 Oct 2012, at 21:28, Dr. Richard Boulanger wrote:
> 
>> Is this advice in the manual and Floss Manual?  If not, it should be.  Thanks.
>> 
>> Sent from my iPhone.
>> 
>> On Oct 13, 2012, at 3:13 PM, Victor Lazzarini  wrote:
>> 
>>> Well, I am not sure about your system, but the general rule is that for  full duplex, ksmps has to divide the buffer size (-b) with no remainder. So for -b 64, you want ksmps = 64, 32, 16, 8, 4, 2, 1
>>> 
>>> This works perfectly in all systems I've seen (linux, windows and osx).
>>> 
>>> Victor
>>> On 13 Oct 2012, at 20:04, francesco wrote:
>>> 
>>>> Thanks,
>>>> but no, i'm using only input directly to output (for testing).
>>>> This is why i'm curious! It's not depend by csd but somehow
>>>> by the system, i guess not by Csound, but i cannot understand ...
>>>> 
>>>> ciao,
>>>> francesco.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716813.html
>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>> 
>>>> 
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>> 
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> Dept. of Music
>>> NUI Maynooth Ireland
>>> tel.: +353 1 708 3545
>>> Victor dot Lazzarini AT nuim dot ie
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Send bugs reports to the Sourceforge bug tracker
>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
> 
> 
> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 


Date2012-10-14 08:40
Fromfrancesco
Subject[Csnd] Re: about audio input and krate
yes,
that is the reason! Using a stereo input (on a stereo output) solved all!
Thanks Mr. Steven, although now i feel a little bit stupid! It was almost
a year that i was trying to understand that, and it was so easy ...
I never thought about interleaved signal ...
And i did not know about nchnls_i, every time a news. And i
use Csound in the last 3 years, so ...

Thanks All,
ciao,
francesco.




--
View this message in context: http://csound.1045644.n5.nabble.com/about-audio-input-and-krate-tp5716809p5716823.html
Sent from the Csound - General mailing list archive at Nabble.com.