Csound Csound-dev Csound-tekno Search About

[Csnd] Clipping on linux only

Date2020-06-25 08:37
FromAndreas Bergsland
Subject[Csnd] Clipping on linux only

Hi

I am puzzled by the fact that a .csd I wrote can run nicely on OSX, writing a file (with fout) without any distortion (max amp at ca.0.5), and then produce a severly distorted file when running the same .csd on a Linux system with ALSA.

Any ideas what might be causing this? Are there any settings I could check for the ALSA driver? Or could it be related to the playback of the soundfiles I use in the project?

BTW, the Linux system (Xubuntu LTS 18.04) produces distorted output for other apps as well.

Best,

Andreas

 

-- 

Andreas Bergsland

 

Associate professor - førsteamanuensis

Study Programme Leader - studieprogramleder

Music Technology Programme - Musikkteknologiseksjonen

Department of Music - Institutt for musikk

Olavskvartalet

NTNU (Norwegian University of Science and Technology)

7491 Trondheim, NORWAY

 

Visiting address/besøksadresse: Fjordgt.1 (3.etg.)

e-mail: andreas.bergsland@ntnu.no

Office phone (Skype for business):7359 0096

Mobil: 4566 3316

http://folk.ntnu.no/andbe

https://www.vibra.no/

https://www.ntnu.edu/studies/mmct

https://www.ntnu.no/studier/mmust


Date2020-06-25 08:58
From"Peter P."
SubjectRe: [Csnd] Clipping on linux only
AttachmentsNone  

Date2020-06-25 09:21
FromAndreas Bergsland
SubjectRe: [Csnd] Clipping on linux only
It didn't make any difference using CoreAudio or external sound card on OSX before, and I doubt this is the issue now. What I really don't get is that this also happens using fout, which simply writes to file. So in principle it doesn't really go through the DAC at all.
But I don't know Linux well enough to tell if this can be related to ALSA or anything else, like the audio coding on the system. BTW, I was using fout with format option 8, 24-bit integers with a header, and default header type (wav).
Best, 
Andreas

On 25/06/2020, 09:58, "A discussion list for users of Csound on behalf of Peter P."  wrote:

    * Andreas Bergsland  [2020-06-25 09:37]:
    > Hi
    > I am puzzled by the fact that a .csd I wrote can run nicely on OSX, writing a file (with fout) without any distortion (max amp at ca.0.5), and then produce a severly distorted file when running the same .csd on a Linux system with ALSA.
    > Any ideas what might be causing this? Are there any settings I could check for the ALSA driver? Or could it be related to the playback of the soundfiles I use in the project?
    I think it is could be OS X which automatically limits its audio output
    before it is sent to the built in dac. Makes my students write
    computermusic that distorts on other computers than their latest
    expensive apple laptop. Try on OS X with an external interface, it
    should clip there as well or use a good VU meter to check levels
    pre-dac. On Linux, there are good and precise meters in the x42-plugins package.

    > BTW, the Linux system (Xubuntu LTS 18.04) produces distorted output for other apps as well.
    Well, do these apps output signals above 0dBFS (see "meters" above)?

    cheers, P

    Csound mailing list
    Csound@listserv.heanet.ie
    https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
    Send bugs reports to
            https://github.com/csound/csound/issues
    Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-06-25 11:05
Fromthorin kerr
SubjectRe: [Csnd] Clipping on linux only
Are you sure the file really is distorted?

I once had an issue with an audio editor which happily played 24 bit files, except the files looked and sounded distorted. It was the player assuming everything it played was 16 bit.

Just speculating...

Thorin

On Thu, 25 Jun. 2020, 6:21 pm Andreas Bergsland, <andreas.bergsland@ntnu.no> wrote:
It didn't make any difference using CoreAudio or external sound card on OSX before, and I doubt this is the issue now. What I really don't get is that this also happens using fout, which simply writes to file. So in principle it doesn't really go through the DAC at all.
But I don't know Linux well enough to tell if this can be related to ALSA or anything else, like the audio coding on the system. BTW, I was using fout with format option 8, 24-bit integers with a header, and default header type (wav).
Best,
Andreas

On 25/06/2020, 09:58, "A discussion list for users of Csound on behalf of Peter P." <CSOUND@LISTSERV.HEANET.IE on behalf of peterparker@FASTMAIL.COM> wrote:

    * Andreas Bergsland <andreas.bergsland@NTNU.NO> [2020-06-25 09:37]:
    > Hi
    > I am puzzled by the fact that a .csd I wrote can run nicely on OSX, writing a file (with fout) without any distortion (max amp at ca.0.5), and then produce a severly distorted file when running the same .csd on a Linux system with ALSA.
    > Any ideas what might be causing this? Are there any settings I could check for the ALSA driver? Or could it be related to the playback of the soundfiles I use in the project?
    I think it is could be OS X which automatically limits its audio output
    before it is sent to the built in dac. Makes my students write
    computermusic that distorts on other computers than their latest
    expensive apple laptop. Try on OS X with an external interface, it
    should clip there as well or use a good VU meter to check levels
    pre-dac. On Linux, there are good and precise meters in the x42-plugins package.

    > BTW, the Linux system (Xubuntu LTS 18.04) produces distorted output for other apps as well.
    Well, do these apps output signals above 0dBFS (see "meters" above)?

    cheers, P

    Csound mailing list
    Csound@listserv.heanet.ie
    https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
    Send bugs reports to
            https://github.com/csound/csound/issues
    Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-25 12:32
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Clipping on linux only
you need to run this to a file (not fout) instead of DAC (-o filename) to test.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 25 Jun 2020, at 09:22, Andreas Bergsland  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> It didn't make any difference using CoreAudio or external sound card on OSX before, and I doubt this is the issue now. What I really don't get is that this also happens using fout, which simply writes to file. So in principle it doesn't really go through the DAC at all.
> But I don't know Linux well enough to tell if this can be related to ALSA or anything else, like the audio coding on the system. BTW, I was using fout with format option 8, 24-bit integers with a header, and default header type (wav).
> Best,
> Andreas
> 
> On 25/06/2020, 09:58, "A discussion list for users of Csound on behalf of Peter P."  wrote:
> 
>    * Andreas Bergsland  [2020-06-25 09:37]:
>> Hi
>> I am puzzled by the fact that a .csd I wrote can run nicely on OSX, writing a file (with fout) without any distortion (max amp at ca.0.5), and then produce a severly distorted file when running the same .csd on a Linux system with ALSA.
>> Any ideas what might be causing this? Are there any settings I could check for the ALSA driver? Or could it be related to the playback of the soundfiles I use in the project?
>    I think it is could be OS X which automatically limits its audio output
>    before it is sent to the built in dac. Makes my students write
>    computermusic that distorts on other computers than their latest
>    expensive apple laptop. Try on OS X with an external interface, it
>    should clip there as well or use a good VU meter to check levels
>    pre-dac. On Linux, there are good and precise meters in the x42-plugins package.
> 
>> BTW, the Linux system (Xubuntu LTS 18.04) produces distorted output for other apps as well.
>    Well, do these apps output signals above 0dBFS (see "meters" above)?
> 
>    cheers, P
> 
>    Csound mailing list
>    Csound@listserv.heanet.ie
>    https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7Cdf6a70420a2f4df94c3608d818e0d822%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637286701263045787&sdata=pN6dtsVyr4UFseU3bdvBegUsc1ah0sw1LXZLlkhHoGQ%3D&reserved=0
>    Send bugs reports to
>            https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7Cdf6a70420a2f4df94c3608d818e0d822%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637286701263045787&sdata=uaL5R1dbebHZWbiK7YtYx6hV0ooY9n2%2BXwdYggDWTMc%3D&reserved=0
>    Discussions of bugs and features can be posted here
> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7Cdf6a70420a2f4df94c3608d818e0d822%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637286701263045787&sdata=pN6dtsVyr4UFseU3bdvBegUsc1ah0sw1LXZLlkhHoGQ%3D&reserved=0
> Send bugs reports to
>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7Cdf6a70420a2f4df94c3608d818e0d822%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637286701263045787&sdata=uaL5R1dbebHZWbiK7YtYx6hV0ooY9n2%2BXwdYggDWTMc%3D&reserved=0
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here