Csound Csound-dev Csound-tekno Search About

[Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)

Date2015-12-18 17:03
Fromjpff
Subject[Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)
---------- Forwarded message ----------
Date: Fri, 18 Dec 2015 11:56:24 -0500
From: Steven Yi 
Subject: [Old-Cs-dev] Issue with audio device selection?

Hi all,

I was trying out some csound code this morning using the latest from
develop branch and oddly it's choosing to write to aif file. I have
the following in my ~/.csound6rc :

-+rtaudio=pa_bl -g -o dac -W -d -+ignore_csopts=1

and when running "csound adsr140.csd" I get:

Steven-Yis-MacBook-Pro:tests stevenyi$ csound adsr140.csd
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.07 (double samples) Dec 16 2015
libsndfile-1.0.25
Reading options from $HOME/.csound6rc
UnifiedCSD:  adsr140.csd
Calling unified file system4
STARTING FILE
Creating orchestra
Creating score
rtaudio: PortAudio module enabled ...
using callback interface
rtmidi: PortMIDI module enabled
defining argument _adsr140_calc_coef__samps as...#kattack_samps#
defining argument _adsr140_calc_coef__ratio as...#0.3#
defining argument _adsr140_calc_coef__samps as...#kdecay_samps#
defining argument _adsr140_calc_coef__ratio as...#0.0001#
defining argument _adsr140_calc_coef__samps as...#krelease_samps#
defining argument _adsr140_calc_coef__ratio as...#0.0001#
Elapsed time at end of orchestra compile: real: 0.008s, CPU: 0.008s
sorting score ...
         ... done
Elapsed time at end of score sort: real: 0.009s, CPU 0.008s
--Csound version 6.07 (double samples) Dec  6 2015
graphics suppressed, ascii substituted
0dBFS level = 1.0
orch now loaded
audio buffered in 1024 sample-frame blocks
writing 4096-byte blks of shorts to test.aif (AIFF)

The CSD has no CsOptions.  Did something change recently for audio
selection?  Seems like a new bug. I can add "-o dac" on the
commandline to get realtime audio out but the values in the .csound6rc
should work as it did before.

Thanks!
steven

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

Date2015-12-18 17:07
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)
Maybe to do with the new CSD reading code that has been introduced?
========================
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 18 Dec 2015, at 17:03, jpff  wrote:
> 
> ---------- Forwarded message ----------
> Date: Fri, 18 Dec 2015 11:56:24 -0500
> From: Steven Yi 
> Subject: [Old-Cs-dev] Issue with audio device selection?
> 
> Hi all,
> 
> I was trying out some csound code this morning using the latest from
> develop branch and oddly it's choosing to write to aif file. I have
> the following in my ~/.csound6rc :
> 
> -+rtaudio=pa_bl -g -o dac -W -d -+ignore_csopts=1
> 
> and when running "csound adsr140.csd" I get:
> 
> Steven-Yis-MacBook-Pro:tests stevenyi$ csound adsr140.csd
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 6.07 (double samples) Dec 16 2015
> libsndfile-1.0.25
> Reading options from $HOME/.csound6rc
> UnifiedCSD:  adsr140.csd
> Calling unified file system4
> STARTING FILE
> Creating orchestra
> Creating score
> rtaudio: PortAudio module enabled ...
> using callback interface
> rtmidi: PortMIDI module enabled
> defining argument _adsr140_calc_coef__samps as...#kattack_samps#
> defining argument _adsr140_calc_coef__ratio as...#0.3#
> defining argument _adsr140_calc_coef__samps as...#kdecay_samps#
> defining argument _adsr140_calc_coef__ratio as...#0.0001#
> defining argument _adsr140_calc_coef__samps as...#krelease_samps#
> defining argument _adsr140_calc_coef__ratio as...#0.0001#
> Elapsed time at end of orchestra compile: real: 0.008s, CPU: 0.008s
> sorting score ...
>        ... done
> Elapsed time at end of score sort: real: 0.009s, CPU 0.008s
> --Csound version 6.07 (double samples) Dec  6 2015
> graphics suppressed, ascii substituted
> 0dBFS level = 1.0
> orch now loaded
> audio buffered in 1024 sample-frame blocks
> writing 4096-byte blks of shorts to test.aif (AIFF)
> 
> The CSD has no CsOptions.  Did something change recently for audio
> selection?  Seems like a new bug. I can add "-o dac" on the
> commandline to get realtime audio out but the values in the .csound6rc
> should work as it did before.
> 
> Thanks!
> steven
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net

Date2015-12-18 17:08
Fromjpff
SubjectRe: [Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)
There was a change in readng .csound6rc files.  I could have got the 
precedence wrong I suppose.  Not sure what -+ignore_csopts does though.

y

> ---------- Forwarded message ----------
> Date: Fri, 18 Dec 2015 11:56:24 -0500
> From: Steven Yi 
> Subject: [Old-Cs-dev] Issue with audio device selection?
>
> Hi all,
>
> I was trying out some csound code this morning using the latest from
> develop branch and oddly it's choosing to write to aif file. I have
> the following in my ~/.csound6rc :
>
> -+rtaudio=pa_bl -g -o dac -W -d -+ignore_csopts=1
>
> and when running "csound adsr140.csd" I get:
>
> Steven-Yis-MacBook-Pro:tests stevenyi$ csound adsr140.csd
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 6.07 (double samples) Dec 16 2015
> libsndfile-1.0.25
> Reading options from $HOME/.csound6rc
> UnifiedCSD:  adsr140.csd
> Calling unified file system4
> STARTING FILE
> Creating orchestra
> Creating score
> rtaudio: PortAudio module enabled ...
> using callback interface
> rtmidi: PortMIDI module enabled
> defining argument _adsr140_calc_coef__samps as...#kattack_samps#
> defining argument _adsr140_calc_coef__ratio as...#0.3#
> defining argument _adsr140_calc_coef__samps as...#kdecay_samps#
> defining argument _adsr140_calc_coef__ratio as...#0.0001#
> defining argument _adsr140_calc_coef__samps as...#krelease_samps#
> defining argument _adsr140_calc_coef__ratio as...#0.0001#
> Elapsed time at end of orchestra compile: real: 0.008s, CPU: 0.008s
> sorting score ...
>        ... done
> Elapsed time at end of score sort: real: 0.009s, CPU 0.008s
> --Csound version 6.07 (double samples) Dec  6 2015
> graphics suppressed, ascii substituted
> 0dBFS level = 1.0
> orch now loaded
> audio buffered in 1024 sample-frame blocks
> writing 4096-byte blks of shorts to test.aif (AIFF)
>
> The CSD has no CsOptions.  Did something change recently for audio
> selection?  Seems like a new bug. I can add "-o dac" on the
> commandline to get realtime audio out but the values in the .csound6rc
> should work as it did before.
>
> Thanks!
> steven
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2015-12-18 17:37
FromSteven Yi
SubjectRe: [Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)
I think ~/.csound6rc isn't being read correctly. I tried changing
rtaudio to coreaudio in there and csound still reported portaudio
being used.  I'm looking through commits now.

On Fri, Dec 18, 2015 at 12:08 PM, jpff  wrote:
> There was a change in readng .csound6rc files.  I could have got the
> precedence wrong I suppose.  Not sure what -+ignore_csopts does though.
>
> y
>
>
>> ---------- Forwarded message ----------
>> Date: Fri, 18 Dec 2015 11:56:24 -0500
>> From: Steven Yi 
>> Subject: [Old-Cs-dev] Issue with audio device selection?
>>
>> Hi all,
>>
>> I was trying out some csound code this morning using the latest from
>> develop branch and oddly it's choosing to write to aif file. I have
>> the following in my ~/.csound6rc :
>>
>> -+rtaudio=pa_bl -g -o dac -W -d -+ignore_csopts=1
>>
>> and when running "csound adsr140.csd" I get:
>>
>> Steven-Yis-MacBook-Pro:tests stevenyi$ csound adsr140.csd
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> Csound version 6.07 (double samples) Dec 16 2015
>> libsndfile-1.0.25
>> Reading options from $HOME/.csound6rc
>> UnifiedCSD:  adsr140.csd
>> Calling unified file system4
>> STARTING FILE
>> Creating orchestra
>> Creating score
>> rtaudio: PortAudio module enabled ...
>> using callback interface
>> rtmidi: PortMIDI module enabled
>> defining argument _adsr140_calc_coef__samps as...#kattack_samps#
>> defining argument _adsr140_calc_coef__ratio as...#0.3#
>> defining argument _adsr140_calc_coef__samps as...#kdecay_samps#
>> defining argument _adsr140_calc_coef__ratio as...#0.0001#
>> defining argument _adsr140_calc_coef__samps as...#krelease_samps#
>> defining argument _adsr140_calc_coef__ratio as...#0.0001#
>> Elapsed time at end of orchestra compile: real: 0.008s, CPU: 0.008s
>> sorting score ...
>>        ... done
>> Elapsed time at end of score sort: real: 0.009s, CPU 0.008s
>> --Csound version 6.07 (double samples) Dec  6 2015
>> graphics suppressed, ascii substituted
>> 0dBFS level = 1.0
>> orch now loaded
>> audio buffered in 1024 sample-frame blocks
>> writing 4096-byte blks of shorts to test.aif (AIFF)
>>
>> The CSD has no CsOptions.  Did something change recently for audio
>> selection?  Seems like a new bug. I can add "-o dac" on the
>> commandline to get realtime audio out but the values in the .csound6rc
>> should work as it did before.
>>
>> Thanks!
>> steven
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>

Date2015-12-18 17:59
FromSteven Yi
SubjectRe: [Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)
I've committed a fix that adds calls to corfile_rewind() after copying
the contents of the file to the CORFIL.

I also fixed a segfault if a bad filename is given to csound. There
was a problem where the code was trying to read from a corfile that
was NULL.  The fix I put in is:

        if (cf == NULL) {
          csound->Die(csound, Str("Reading CSD failed ... stopping"));
        }

this is line 176 in Top/main.c.  I'm not sure if this is the
appropriate fix (John could you review these?)

Thanks,
steven

On Fri, Dec 18, 2015 at 12:37 PM, Steven Yi  wrote:
> I think ~/.csound6rc isn't being read correctly. I tried changing
> rtaudio to coreaudio in there and csound still reported portaudio
> being used.  I'm looking through commits now.
>
> On Fri, Dec 18, 2015 at 12:08 PM, jpff  wrote:
>> There was a change in readng .csound6rc files.  I could have got the
>> precedence wrong I suppose.  Not sure what -+ignore_csopts does though.
>>
>> y
>>
>>
>>> ---------- Forwarded message ----------
>>> Date: Fri, 18 Dec 2015 11:56:24 -0500
>>> From: Steven Yi 
>>> Subject: [Old-Cs-dev] Issue with audio device selection?
>>>
>>> Hi all,
>>>
>>> I was trying out some csound code this morning using the latest from
>>> develop branch and oddly it's choosing to write to aif file. I have
>>> the following in my ~/.csound6rc :
>>>
>>> -+rtaudio=pa_bl -g -o dac -W -d -+ignore_csopts=1
>>>
>>> and when running "csound adsr140.csd" I get:
>>>
>>> Steven-Yis-MacBook-Pro:tests stevenyi$ csound adsr140.csd
>>> virtual_keyboard real time MIDI plugin for Csound
>>> 0dBFS level = 32768.0
>>> Csound version 6.07 (double samples) Dec 16 2015
>>> libsndfile-1.0.25
>>> Reading options from $HOME/.csound6rc
>>> UnifiedCSD:  adsr140.csd
>>> Calling unified file system4
>>> STARTING FILE
>>> Creating orchestra
>>> Creating score
>>> rtaudio: PortAudio module enabled ...
>>> using callback interface
>>> rtmidi: PortMIDI module enabled
>>> defining argument _adsr140_calc_coef__samps as...#kattack_samps#
>>> defining argument _adsr140_calc_coef__ratio as...#0.3#
>>> defining argument _adsr140_calc_coef__samps as...#kdecay_samps#
>>> defining argument _adsr140_calc_coef__ratio as...#0.0001#
>>> defining argument _adsr140_calc_coef__samps as...#krelease_samps#
>>> defining argument _adsr140_calc_coef__ratio as...#0.0001#
>>> Elapsed time at end of orchestra compile: real: 0.008s, CPU: 0.008s
>>> sorting score ...
>>>        ... done
>>> Elapsed time at end of score sort: real: 0.009s, CPU 0.008s
>>> --Csound version 6.07 (double samples) Dec  6 2015
>>> graphics suppressed, ascii substituted
>>> 0dBFS level = 1.0
>>> orch now loaded
>>> audio buffered in 1024 sample-frame blocks
>>> writing 4096-byte blks of shorts to test.aif (AIFF)
>>>
>>> The CSD has no CsOptions.  Did something change recently for audio
>>> selection?  Seems like a new bug. I can add "-o dac" on the
>>> commandline to get realtime audio out but the values in the .csound6rc
>>> should work as it did before.
>>>
>>> Thanks!
>>> steven
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>

Date2015-12-18 18:04
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)
I had noticed that Csound was crashing when given a non-existent CSD file.
========================
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 18 Dec 2015, at 17:59, Steven Yi  wrote:
> 
> I've committed a fix that adds calls to corfile_rewind() after copying
> the contents of the file to the CORFIL.
> 
> I also fixed a segfault if a bad filename is given to csound. There
> was a problem where the code was trying to read from a corfile that
> was NULL.  The fix I put in is:
> 
>        if (cf == NULL) {
>          csound->Die(csound, Str("Reading CSD failed ... stopping"));
>        }
> 
> this is line 176 in Top/main.c.  I'm not sure if this is the
> appropriate fix (John could you review these?)
> 
> Thanks,
> steven
> 
> On Fri, Dec 18, 2015 at 12:37 PM, Steven Yi  wrote:
>> I think ~/.csound6rc isn't being read correctly. I tried changing
>> rtaudio to coreaudio in there and csound still reported portaudio
>> being used.  I'm looking through commits now.
>> 
>> On Fri, Dec 18, 2015 at 12:08 PM, jpff  wrote:
>>> There was a change in readng .csound6rc files.  I could have got the
>>> precedence wrong I suppose.  Not sure what -+ignore_csopts does though.
>>> 
>>> y
>>> 
>>> 
>>>> ---------- Forwarded message ----------
>>>> Date: Fri, 18 Dec 2015 11:56:24 -0500
>>>> From: Steven Yi 
>>>> Subject: [Old-Cs-dev] Issue with audio device selection?
>>>> 
>>>> Hi all,
>>>> 
>>>> I was trying out some csound code this morning using the latest from
>>>> develop branch and oddly it's choosing to write to aif file. I have
>>>> the following in my ~/.csound6rc :
>>>> 
>>>> -+rtaudio=pa_bl -g -o dac -W -d -+ignore_csopts=1
>>>> 
>>>> and when running "csound adsr140.csd" I get:
>>>> 
>>>> Steven-Yis-MacBook-Pro:tests stevenyi$ csound adsr140.csd
>>>> virtual_keyboard real time MIDI plugin for Csound
>>>> 0dBFS level = 32768.0
>>>> Csound version 6.07 (double samples) Dec 16 2015
>>>> libsndfile-1.0.25
>>>> Reading options from $HOME/.csound6rc
>>>> UnifiedCSD:  adsr140.csd
>>>> Calling unified file system4
>>>> STARTING FILE
>>>> Creating orchestra
>>>> Creating score
>>>> rtaudio: PortAudio module enabled ...
>>>> using callback interface
>>>> rtmidi: PortMIDI module enabled
>>>> defining argument _adsr140_calc_coef__samps as...#kattack_samps#
>>>> defining argument _adsr140_calc_coef__ratio as...#0.3#
>>>> defining argument _adsr140_calc_coef__samps as...#kdecay_samps#
>>>> defining argument _adsr140_calc_coef__ratio as...#0.0001#
>>>> defining argument _adsr140_calc_coef__samps as...#krelease_samps#
>>>> defining argument _adsr140_calc_coef__ratio as...#0.0001#
>>>> Elapsed time at end of orchestra compile: real: 0.008s, CPU: 0.008s
>>>> sorting score ...
>>>>       ... done
>>>> Elapsed time at end of score sort: real: 0.009s, CPU 0.008s
>>>> --Csound version 6.07 (double samples) Dec  6 2015
>>>> graphics suppressed, ascii substituted
>>>> 0dBFS level = 1.0
>>>> orch now loaded
>>>> audio buffered in 1024 sample-frame blocks
>>>> writing 4096-byte blks of shorts to test.aif (AIFF)
>>>> 
>>>> The CSD has no CsOptions.  Did something change recently for audio
>>>> selection?  Seems like a new bug. I can add "-o dac" on the
>>>> commandline to get realtime audio out but the values in the .csound6rc
>>>> should work as it did before.
>>>> 
>>>> Thanks!
>>>> steven
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 

Date2015-12-18 20:46
Fromjpff
SubjectRe: [Csnd-dev] [Old-Cs-dev] Issue with audio device selection? (fwd)
On Fri, 18 Dec 2015, Steven Yi wrote:

>
> I also fixed a segfault if a bad filename is given to csound. There
> was a problem where the code was trying to read from a corfile that
> was NULL.  The fix I put in is:
>
>        if (cf == NULL) {
>          csound->Die(csound, Str("Reading CSD failed ... stopping"));
>        }
>
> this is line 176 in Top/main.c.  I'm not sure if this is the
> appropriate fix (John could you review these?)
>

Looks correct to me.  Need to consder if a rewind is always used after a 
read to core