Csound Csound-dev Csound-tekno Search About

[Csnd-dev] csoundCompileCsdTxt() and temporary files

Date2015-11-13 14:51
FromVictor Lazzarini
Subject[Csnd-dev] csoundCompileCsdTxt() and temporary files
I was wondering whether this function should use core files rather than temporary
disk ones. About four years ago we decided to move all CSD processing etc to
core files and it seems a shame to be putting it back

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936

Date2015-11-13 15:03
Fromjpff
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
Where is this function?  i cannot find it, so not sure what the 
problem/solution id.

On Fri, 13 Nov 2015, Victor Lazzarini wrote:

> I was wondering whether this function should use core files rather than temporary
> disk ones. About four years ago we decided to move all CSD processing etc to
> core files and it seems a shame to be putting it back
>
> ========================
> 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

Date2015-11-13 15:12
Fromjpff
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
OK found it Txt -> Text

Date2015-11-13 15:50
FromVictor Lazzarini
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
========================
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 13 Nov 2015, at 15:12, jpff  wrote:
> 
> OK found it Txt -> Text
> 

Date2015-11-13 16:12
FromMichael Gogins
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
The code for running a CSD file in csoundCompileCsd appears to be
quite entangled with the FILE object. That is why I did this, so that
I would not have to rewrite that code. I did not find on Widows a
function for opening a string or a memory buffer as a FILE. On Linux
it would be easy.

This also should handle all features of the CSD file format.

If you know some way of doing the whole performance off a corfile,
that would be better.

Regards,
Mike

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


On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
 wrote:
> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
> ========================
> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>
>> OK found it Txt -> Text
>>

Date2015-11-13 16:19
FromVictor Lazzarini
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
John has implemented cross-platform corfile facilities, so that could be used, if that is
agreeable.
========================
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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
> 
> The code for running a CSD file in csoundCompileCsd appears to be
> quite entangled with the FILE object. That is why I did this, so that
> I would not have to rewrite that code. I did not find on Widows a
> function for opening a string or a memory buffer as a FILE. On Linux
> it would be easy.
> 
> This also should handle all features of the CSD file format.
> 
> If you know some way of doing the whole performance off a corfile,
> that would be better.
> 
> Regards,
> Mike
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>  wrote:
>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>> ========================
>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>> 
>>> OK found it Txt -> Text
>>> 

Date2015-11-13 16:23
FromMichael Gogins
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
So it looks like a FILE?

To be precise, I am talking about read_unified_file2 in
https://github.com/csound/csound/blob/develop/Top/one_file.c.

Regards,
Mike

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


On Fri, Nov 13, 2015 at 11:19 AM, Victor Lazzarini
 wrote:
> John has implemented cross-platform corfile facilities, so that could be used, if that is
> agreeable.
> ========================
> 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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
>>
>> The code for running a CSD file in csoundCompileCsd appears to be
>> quite entangled with the FILE object. That is why I did this, so that
>> I would not have to rewrite that code. I did not find on Widows a
>> function for opening a string or a memory buffer as a FILE. On Linux
>> it would be easy.
>>
>> This also should handle all features of the CSD file format.
>>
>> If you know some way of doing the whole performance off a corfile,
>> that would be better.
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>>  wrote:
>>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>>> ========================
>>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>>>
>>>> OK found it Txt -> Text
>>>>

Date2015-11-13 16:29
FromVictor Lazzarini
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
The functionality is in Engine/corfiles.c
========================
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 13 Nov 2015, at 16:23, Michael Gogins  wrote:
> 
> So it looks like a FILE?
> 
> To be precise, I am talking about read_unified_file2 in
> https://github.com/csound/csound/blob/develop/Top/one_file.c.
> 
> Regards,
> Mike
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Nov 13, 2015 at 11:19 AM, Victor Lazzarini
>  wrote:
>> John has implemented cross-platform corfile facilities, so that could be used, if that is
>> agreeable.
>> ========================
>> 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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
>>> 
>>> The code for running a CSD file in csoundCompileCsd appears to be
>>> quite entangled with the FILE object. That is why I did this, so that
>>> I would not have to rewrite that code. I did not find on Widows a
>>> function for opening a string or a memory buffer as a FILE. On Linux
>>> it would be easy.
>>> 
>>> This also should handle all features of the CSD file format.
>>> 
>>> If you know some way of doing the whole performance off a corfile,
>>> that would be better.
>>> 
>>> Regards,
>>> Mike
>>> 
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>>>  wrote:
>>>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>>>> ========================
>>>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>>>> 
>>>>> OK found it Txt -> Text
>>>>> 
>>>>> Surely read to a corfile and then call csoundCompileCsd on te 

Date2015-11-13 16:33
FromMichael Gogins
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
So this read_unified_file2 is not called?

Or does it need to be modified?

Regards,
Mike

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


On Fri, Nov 13, 2015 at 11:29 AM, Victor Lazzarini
 wrote:
> The functionality is in Engine/corfiles.c
> ========================
> 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 13 Nov 2015, at 16:23, Michael Gogins  wrote:
>>
>> So it looks like a FILE?
>>
>> To be precise, I am talking about read_unified_file2 in
>> https://github.com/csound/csound/blob/develop/Top/one_file.c.
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Fri, Nov 13, 2015 at 11:19 AM, Victor Lazzarini
>>  wrote:
>>> John has implemented cross-platform corfile facilities, so that could be used, if that is
>>> agreeable.
>>> ========================
>>> 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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
>>>>
>>>> The code for running a CSD file in csoundCompileCsd appears to be
>>>> quite entangled with the FILE object. That is why I did this, so that
>>>> I would not have to rewrite that code. I did not find on Widows a
>>>> function for opening a string or a memory buffer as a FILE. On Linux
>>>> it would be easy.
>>>>
>>>> This also should handle all features of the CSD file format.
>>>>
>>>> If you know some way of doing the whole performance off a corfile,
>>>> that would be better.
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> -----------------------------------------------------
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://michaelgogins.tumblr.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>>>>  wrote:
>>>>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>>>>> ========================
>>>>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>>>>>
>>>>>> OK found it Txt -> Text
>>>>>>

Date2015-11-13 16:51
FromVictor Lazzarini
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
yes, it is called. I see what you mean.
I guess it needs a new function that does not open a disk file, 
but uses the corfil functionality. I understand the problem; it can be solved
but it needs extra work.

========================
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 13 Nov 2015, at 16:33, Michael Gogins  wrote:
> 
> So this read_unified_file2 is not called?
> 
> Or does it need to be modified?
> 
> Regards,
> Mike
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Nov 13, 2015 at 11:29 AM, Victor Lazzarini
>  wrote:
>> The functionality is in Engine/corfiles.c
>> ========================
>> 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 13 Nov 2015, at 16:23, Michael Gogins  wrote:
>>> 
>>> So it looks like a FILE?
>>> 
>>> To be precise, I am talking about read_unified_file2 in
>>> https://github.com/csound/csound/blob/develop/Top/one_file.c.
>>> 
>>> Regards,
>>> Mike
>>> 
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Fri, Nov 13, 2015 at 11:19 AM, Victor Lazzarini
>>>  wrote:
>>>> John has implemented cross-platform corfile facilities, so that could be used, if that is
>>>> agreeable.
>>>> ========================
>>>> 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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
>>>>> 
>>>>> The code for running a CSD file in csoundCompileCsd appears to be
>>>>> quite entangled with the FILE object. That is why I did this, so that
>>>>> I would not have to rewrite that code. I did not find on Widows a
>>>>> function for opening a string or a memory buffer as a FILE. On Linux
>>>>> it would be easy.
>>>>> 
>>>>> This also should handle all features of the CSD file format.
>>>>> 
>>>>> If you know some way of doing the whole performance off a corfile,
>>>>> that would be better.
>>>>> 
>>>>> Regards,
>>>>> Mike
>>>>> 
>>>>> -----------------------------------------------------
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>> 
>>>>> 
>>>>> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>>>>>  wrote:
>>>>>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>>>>>> ========================
>>>>>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>>>>>> 
>>>>>>> OK found it Txt -> Text
>>>>>>> 
>>>>>>> Surely read to a corfile and then call csoundCompileCsd on te 

Date2015-11-13 16:56
Fromjpff
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
Suggests converting read_unified_file2 to use corfiles; as you say a 
little work but nit too much.  Keeps us away from filing systems 
especially on mobile devices.
==John


On Fri, 13 Nov 2015, Victor Lazzarini wrote:

> yes, it is called. I see what you mean.
> I guess it needs a new function that does not open a disk file,
> but uses the corfil functionality. I understand the problem; it can be solved
> but it needs extra work.
>
> ========================
> 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 13 Nov 2015, at 16:33, Michael Gogins  wrote:
>>
>> So this read_unified_file2 is not called?
>>
>> Or does it need to be modified?
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Fri, Nov 13, 2015 at 11:29 AM, Victor Lazzarini
>>  wrote:
>>> The functionality is in Engine/corfiles.c
>>> ========================
>>> 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 13 Nov 2015, at 16:23, Michael Gogins  wrote:
>>>>
>>>> So it looks like a FILE?
>>>>
>>>> To be precise, I am talking about read_unified_file2 in
>>>> https://github.com/csound/csound/blob/develop/Top/one_file.c.
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> -----------------------------------------------------
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://michaelgogins.tumblr.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> On Fri, Nov 13, 2015 at 11:19 AM, Victor Lazzarini
>>>>  wrote:
>>>>> John has implemented cross-platform corfile facilities, so that could be used, if that is
>>>>> agreeable.
>>>>> ========================
>>>>> 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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
>>>>>>
>>>>>> The code for running a CSD file in csoundCompileCsd appears to be
>>>>>> quite entangled with the FILE object. That is why I did this, so that
>>>>>> I would not have to rewrite that code. I did not find on Widows a
>>>>>> function for opening a string or a memory buffer as a FILE. On Linux
>>>>>> it would be easy.
>>>>>>
>>>>>> This also should handle all features of the CSD file format.
>>>>>>
>>>>>> If you know some way of doing the whole performance off a corfile,
>>>>>> that would be better.
>>>>>>
>>>>>> Regards,
>>>>>> Mike
>>>>>>
>>>>>> -----------------------------------------------------
>>>>>> Michael Gogins
>>>>>> Irreducible Productions
>>>>>> http://michaelgogins.tumblr.com
>>>>>> Michael dot Gogins at gmail dot com
>>>>>>
>>>>>>
>>>>>> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>>>>>>  wrote:
>>>>>>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>>>>>>> ========================
>>>>>>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>>>>>>>
>>>>>>>> OK found it Txt -> Text
>>>>>>>>
>>>>>>>> Surely read to a corfile and then call csoundCompileCsd on te body?
>

Date2015-11-13 16:57
FromMichael Gogins
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
All right, that's what I think too.

I suggest that the code should be refactored so that csoundCompileCsd
should just copy the contents of the disk file into a corfil and then
call csoundCompileCsdText.

Regards,
Mike

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


On Fri, Nov 13, 2015 at 11:51 AM, Victor Lazzarini
 wrote:
> yes, it is called. I see what you mean.
> I guess it needs a new function that does not open a disk file,
> but uses the corfil functionality. I understand the problem; it can be solved
> but it needs extra work.
>
> ========================
> 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 13 Nov 2015, at 16:33, Michael Gogins  wrote:
>>
>> So this read_unified_file2 is not called?
>>
>> Or does it need to be modified?
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Fri, Nov 13, 2015 at 11:29 AM, Victor Lazzarini
>>  wrote:
>>> The functionality is in Engine/corfiles.c
>>> ========================
>>> 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 13 Nov 2015, at 16:23, Michael Gogins  wrote:
>>>>
>>>> So it looks like a FILE?
>>>>
>>>> To be precise, I am talking about read_unified_file2 in
>>>> https://github.com/csound/csound/blob/develop/Top/one_file.c.
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> -----------------------------------------------------
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://michaelgogins.tumblr.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> On Fri, Nov 13, 2015 at 11:19 AM, Victor Lazzarini
>>>>  wrote:
>>>>> John has implemented cross-platform corfile facilities, so that could be used, if that is
>>>>> agreeable.
>>>>> ========================
>>>>> 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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
>>>>>>
>>>>>> The code for running a CSD file in csoundCompileCsd appears to be
>>>>>> quite entangled with the FILE object. That is why I did this, so that
>>>>>> I would not have to rewrite that code. I did not find on Widows a
>>>>>> function for opening a string or a memory buffer as a FILE. On Linux
>>>>>> it would be easy.
>>>>>>
>>>>>> This also should handle all features of the CSD file format.
>>>>>>
>>>>>> If you know some way of doing the whole performance off a corfile,
>>>>>> that would be better.
>>>>>>
>>>>>> Regards,
>>>>>> Mike
>>>>>>
>>>>>> -----------------------------------------------------
>>>>>> Michael Gogins
>>>>>> Irreducible Productions
>>>>>> http://michaelgogins.tumblr.com
>>>>>> Michael dot Gogins at gmail dot com
>>>>>>
>>>>>>
>>>>>> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>>>>>>  wrote:
>>>>>>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>>>>>>> ========================
>>>>>>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>>>>>>>
>>>>>>>> OK found it Txt -> Text
>>>>>>>>
>>>>>>>> Surely read to a corfile and then call csoundCompileCsd on te body

Date2015-11-13 17:06
FromVictor Lazzarini
SubjectRe: [Csnd-dev] csoundCompileCsdTxt() and temporary files
yes, we will still need that step, as the standard Csound operation expects code to be on files.
========================
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 13 Nov 2015, at 16:57, Michael Gogins  wrote:
> 
> All right, that's what I think too.
> 
> I suggest that the code should be refactored so that csoundCompileCsd
> should just copy the contents of the disk file into a corfil and then
> call csoundCompileCsdText.
> 
> Regards,
> Mike
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Fri, Nov 13, 2015 at 11:51 AM, Victor Lazzarini
>  wrote:
>> yes, it is called. I see what you mean.
>> I guess it needs a new function that does not open a disk file,
>> but uses the corfil functionality. I understand the problem; it can be solved
>> but it needs extra work.
>> 
>> ========================
>> 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 13 Nov 2015, at 16:33, Michael Gogins  wrote:
>>> 
>>> So this read_unified_file2 is not called?
>>> 
>>> Or does it need to be modified?
>>> 
>>> Regards,
>>> Mike
>>> 
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Fri, Nov 13, 2015 at 11:29 AM, Victor Lazzarini
>>>  wrote:
>>>> The functionality is in Engine/corfiles.c
>>>> ========================
>>>> 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 13 Nov 2015, at 16:23, Michael Gogins  wrote:
>>>>> 
>>>>> So it looks like a FILE?
>>>>> 
>>>>> To be precise, I am talking about read_unified_file2 in
>>>>> https://github.com/csound/csound/blob/develop/Top/one_file.c.
>>>>> 
>>>>> Regards,
>>>>> Mike
>>>>> 
>>>>> -----------------------------------------------------
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>> 
>>>>> 
>>>>> On Fri, Nov 13, 2015 at 11:19 AM, Victor Lazzarini
>>>>>  wrote:
>>>>>> John has implemented cross-platform corfile facilities, so that could be used, if that is
>>>>>> agreeable.
>>>>>> ========================
>>>>>> 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 13 Nov 2015, at 16:12, Michael Gogins  wrote:
>>>>>>> 
>>>>>>> The code for running a CSD file in csoundCompileCsd appears to be
>>>>>>> quite entangled with the FILE object. That is why I did this, so that
>>>>>>> I would not have to rewrite that code. I did not find on Widows a
>>>>>>> function for opening a string or a memory buffer as a FILE. On Linux
>>>>>>> it would be easy.
>>>>>>> 
>>>>>>> This also should handle all features of the CSD file format.
>>>>>>> 
>>>>>>> If you know some way of doing the whole performance off a corfile,
>>>>>>> that would be better.
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Mike
>>>>>>> 
>>>>>>> -----------------------------------------------------
>>>>>>> Michael Gogins
>>>>>>> Irreducible Productions
>>>>>>> http://michaelgogins.tumblr.com
>>>>>>> Michael dot Gogins at gmail dot com
>>>>>>> 
>>>>>>> 
>>>>>>> On Fri, Nov 13, 2015 at 10:50 AM, Victor Lazzarini
>>>>>>>  wrote:
>>>>>>>> yes, that’s what I was thinking, but I wanted to ask Mike who is the author first.
>>>>>>>> ========================
>>>>>>>> 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 13 Nov 2015, at 15:12, jpff  wrote:
>>>>>>>>> 
>>>>>>>>> OK found it Txt -> Text
>>>>>>>>> 
>>>>>>>>> Surely read to a corfile and then call csoundCompileCsd on te